allyhub 0.13.0 → 0.15.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +14 -0
- package/dist/commands/frames.js +9 -11
- package/dist/node_modules/@allyhub/3d-extension/package.json +1 -1
- package/dist/node_modules/@allyhub/audio/package.json +1 -1
- package/dist/node_modules/@allyhub/browser/package.json +1 -1
- package/dist/node_modules/@allyhub/build/package.json +1 -1
- package/dist/node_modules/@allyhub/canvas-extension/package.json +1 -1
- package/dist/node_modules/@allyhub/canvas-model/package.json +1 -1
- package/dist/node_modules/@allyhub/chart/package.json +1 -1
- package/dist/node_modules/@allyhub/check/package.json +1 -1
- package/dist/node_modules/@allyhub/cloud/package.json +1 -1
- package/dist/node_modules/@allyhub/components/package.json +1 -1
- package/dist/node_modules/@allyhub/dev-server/dist/tools.js +1 -1
- package/dist/node_modules/@allyhub/dev-server/package.json +1 -1
- package/dist/node_modules/@allyhub/diagnostics/package.json +1 -1
- package/dist/node_modules/@allyhub/doc/package.json +1 -1
- package/dist/node_modules/@allyhub/doc-extension/package.json +1 -1
- package/dist/node_modules/@allyhub/doc-print/package.json +1 -1
- package/dist/node_modules/@allyhub/export/package.json +1 -1
- package/dist/node_modules/@allyhub/extension-api/package.json +1 -1
- package/dist/node_modules/@allyhub/extension-host/dist/points.js +1 -1
- package/dist/node_modules/@allyhub/extension-host/package.json +1 -1
- package/dist/node_modules/@allyhub/formats/dist/files.d.ts +9 -2
- package/dist/node_modules/@allyhub/formats/dist/files.js +1 -1
- package/dist/node_modules/@allyhub/formats/dist/note-shape.d.ts +9 -0
- package/dist/node_modules/@allyhub/formats/dist/note-shape.js +1 -1
- package/dist/node_modules/@allyhub/formats/package.json +1 -1
- package/dist/node_modules/@allyhub/i18n/package.json +1 -1
- package/dist/node_modules/@allyhub/image-draw/package.json +1 -1
- package/dist/node_modules/@allyhub/image-extension/package.json +1 -1
- package/dist/node_modules/@allyhub/image-measure/package.json +1 -1
- package/dist/node_modules/@allyhub/image-psd/package.json +1 -1
- package/dist/node_modules/@allyhub/image-render/package.json +1 -1
- package/dist/node_modules/@allyhub/image-runtime/package.json +1 -1
- package/dist/node_modules/@allyhub/image-sdk/package.json +1 -1
- package/dist/node_modules/@allyhub/jobs/package.json +1 -1
- package/dist/node_modules/@allyhub/linkedin-extension/package.json +1 -1
- package/dist/node_modules/@allyhub/linkedin-model/package.json +1 -1
- package/dist/node_modules/@allyhub/linkedin-view/package.json +1 -1
- package/dist/node_modules/@allyhub/measure/package.json +1 -1
- package/dist/node_modules/@allyhub/media/package.json +1 -1
- package/dist/node_modules/@allyhub/media-extension/package.json +39 -1
- package/dist/node_modules/@allyhub/model/package.json +1 -1
- package/dist/node_modules/@allyhub/ooxml/package.json +1 -1
- package/dist/node_modules/@allyhub/piece/package.json +1 -1
- package/dist/node_modules/@allyhub/project/package.json +1 -1
- package/dist/node_modules/@allyhub/protocol/dist/tools.d.ts +36 -0
- package/dist/node_modules/@allyhub/protocol/dist/tools.js +1 -1
- package/dist/node_modules/@allyhub/protocol/package.json +1 -1
- package/dist/node_modules/@allyhub/registry/package.json +1 -1
- package/dist/node_modules/@allyhub/render/package.json +1 -1
- package/dist/node_modules/@allyhub/runtime/package.json +1 -1
- package/dist/node_modules/@allyhub/runtimes/package.json +1 -1
- package/dist/node_modules/@allyhub/scaffold/package.json +1 -1
- package/dist/node_modules/@allyhub/scenery/package.json +1 -1
- package/dist/node_modules/@allyhub/scenery-host/package.json +1 -1
- package/dist/node_modules/@allyhub/sheet/package.json +1 -1
- package/dist/node_modules/@allyhub/sheet-extension/package.json +1 -1
- package/dist/node_modules/@allyhub/slides-core/package.json +1 -1
- package/dist/node_modules/@allyhub/slides-extension/package.json +1 -1
- package/dist/node_modules/@allyhub/slides-pptx/package.json +1 -1
- package/dist/node_modules/@allyhub/slides-runtime/package.json +1 -1
- package/dist/node_modules/@allyhub/stage/package.json +1 -1
- package/dist/node_modules/@allyhub/stage-page/package.json +1 -1
- package/dist/node_modules/@allyhub/stage-runtime/package.json +1 -1
- package/dist/node_modules/@allyhub/telemetry/package.json +1 -1
- package/dist/node_modules/@allyhub/text-extension/markup/allyhub.yaml +2 -0
- package/dist/node_modules/@allyhub/text-extension/markup/markup.json +19 -0
- package/dist/node_modules/@allyhub/text-extension/markup/notes/launch.md +9 -0
- package/dist/node_modules/@allyhub/text-extension/package.json +64 -0
- package/dist/node_modules/@allyhub/video-core/package.json +1 -1
- package/dist/node_modules/@allyhub/video-extension/package.json +1 -1
- package/dist/node_modules/@allyhub/video-measure/package.json +1 -1
- package/dist/node_modules/@allyhub/video-sdk/package.json +1 -1
- package/dist/node_modules/@allyhub/website/package.json +1 -1
- package/dist/node_modules/@allyhub/website-extension/package.json +1 -1
- package/dist/node_modules/@allyhub/x-extension/package.json +1 -1
- package/dist/node_modules/@allyhub/x-model/package.json +1 -1
- package/dist/node_modules/@allyhub/x-view/package.json +1 -1
- package/dist/package.json +12 -12
- package/dist/works.js +1 -1
- package/editor-web/assets/{abnfDiagram-WEYOIA3C-D70jg8mE.js → abnfDiagram-WEYOIA3C-BHI0AbUY.js} +1 -1
- package/editor-web/assets/{architecture-WOLXFQ4H-CrXS3E8e.js → architecture-WOLXFQ4H-BMQS-OKZ.js} +1 -1
- package/editor-web/assets/{architectureDiagram-ZHVYKT53-JrBljCOx.js → architectureDiagram-ZHVYKT53-DZp9CM6P.js} +1 -1
- package/editor-web/assets/{article-BWrfVMRA.js → article-C_mBG5a1.js} +4 -4
- package/editor-web/assets/{article-hxHjqzV1.js → article-DWBxNvX0.js} +2 -2
- package/editor-web/assets/{blockDiagram-RJAE7QA3-BzfC1xTS.js → blockDiagram-RJAE7QA3-h6LWaev4.js} +1 -1
- package/editor-web/assets/{textarea-DBwRbOyF.js → browser-C9NP0ZYz.js} +47 -47
- package/editor-web/assets/button-BVQH7zxz.js +41 -0
- package/editor-web/assets/{c4Diagram-XDPPPE54-s2TpXKgH.js → c4Diagram-XDPPPE54-BvSMs7J4.js} +1 -1
- package/editor-web/assets/channel-BFHB0S0f.js +1 -0
- package/editor-web/assets/{chunk-2E7WHVMD-DyE9v6UX.js → chunk-2E7WHVMD-0EJTAmDF.js} +1 -1
- package/editor-web/assets/{chunk-4EMNKR2T-CCunMMcT.js → chunk-4EMNKR2T-BeYB4AEY.js} +1 -1
- package/editor-web/assets/{chunk-55XCU76K-CZgJYrN4.js → chunk-55XCU76K-BPFOPTBe.js} +1 -1
- package/editor-web/assets/{chunk-7S6XSTFO-B01FlTFf.js → chunk-7S6XSTFO-CZ2C7ULu.js} +1 -1
- package/editor-web/assets/{chunk-AQDTSKZB-latWUvVu.js → chunk-AQDTSKZB-B5RtsZkj.js} +1 -1
- package/editor-web/assets/{chunk-DSNLSHJZ-BHFiQInN.js → chunk-DSNLSHJZ-_3G4hddj.js} +1 -1
- package/editor-web/assets/{chunk-HAGFOTED-C4hR36ab.js → chunk-HAGFOTED-DO5b4ll2.js} +1 -1
- package/editor-web/assets/{chunk-HNE4Q36P-CNrxiD2Q.js → chunk-HNE4Q36P-C6XNI71Q.js} +1 -1
- package/editor-web/assets/{chunk-NQOKRVIF-DpyEHKEY.js → chunk-NQOKRVIF-nDCX29rQ.js} +1 -1
- package/editor-web/assets/{chunk-UHW7PFBP-SIEJdixh.js → chunk-UHW7PFBP-CRCOiitq.js} +1 -1
- package/editor-web/assets/{chunk-VQ5W62QI-CxWnQRxx.js → chunk-VQ5W62QI-hNPKKjCN.js} +1 -1
- package/editor-web/assets/{chunk-WQQL4CDK-CbRuCBm6.js → chunk-WQQL4CDK-KlnVtIDc.js} +1 -1
- package/editor-web/assets/{chunk-YZO67HFG-Cgu-EQvs.js → chunk-YZO67HFG-B76hDUrM.js} +1 -1
- package/editor-web/assets/{chunk-ZAUX2LTX-pAl5CV3o.js → chunk-ZAUX2LTX-D9m1N0wI.js} +1 -1
- package/editor-web/assets/{chunk-ZCHMQSOR-Du5hY-FP.js → chunk-ZCHMQSOR-443euxzo.js} +1 -1
- package/editor-web/assets/{classDiagram-v2-4MYWR3UA-CevU94T6.js → classDiagram-v2-4MYWR3UA-Bbw-8Ons.js} +1 -1
- package/editor-web/assets/{collaborator-C6IJkcGR.js → collaborator-2qfw-8OJ.js} +1 -1
- package/editor-web/assets/{cynefin-EF2NZ3EQ-DBHwpMRJ.js → cynefin-EF2NZ3EQ-C4E7TlUr.js} +1 -1
- package/editor-web/assets/{cynefinDiagram-WF24UDRP-CxUzpjvG.js → cynefinDiagram-WF24UDRP-PBPGa_HS.js} +1 -1
- package/editor-web/assets/{dagre-NK4GIZVX-BAJNBDYO.js → dagre-NK4GIZVX-DwXdEtQG.js} +1 -1
- package/editor-web/assets/{diagram-CBK3MWTC-BQW9Fbw-.js → diagram-CBK3MWTC-BE3FwdX7.js} +1 -1
- package/editor-web/assets/{diagram-I5XIIV2D-DQBROUfn.js → diagram-I5XIIV2D-BPl2ZY33.js} +1 -1
- package/editor-web/assets/{diagram-ODIL2UCW-DEoK31qy.js → diagram-ODIL2UCW-BLVPYSzw.js} +1 -1
- package/editor-web/assets/{diagram-PFBEJUXE-BTCa2We1.js → diagram-PFBEJUXE-BVZk62FO.js} +1 -1
- package/editor-web/assets/{diagram-RJA3I4VV-DNM8qWC3.js → diagram-RJA3I4VV-Z75LSbxH.js} +1 -1
- package/editor-web/assets/{diagram-TYUNFSNR-BcKpED4d.js → diagram-TYUNFSNR-BynGqDAg.js} +1 -1
- package/editor-web/assets/{dist-RkxskWGK.js → dist--ijXGgvi.js} +4 -4
- package/editor-web/assets/dist-BrGYx10E.js +2 -0
- package/editor-web/assets/{dist-Dpet39Yp.js → dist-C-yi9AAi.js} +27 -27
- package/editor-web/assets/dist-CIQUbiAd.js +38 -0
- package/editor-web/assets/{dist-BSPs7tZR.js → dist-Ch34PllS.js} +1 -1
- package/editor-web/assets/dist-CxlIyluY.js +43 -0
- package/editor-web/assets/{dist-DMZ1VHPK.js → dist-D9N4Fxqr.js} +1 -1
- package/editor-web/assets/dist-DWKEqAou.js +6 -0
- package/editor-web/assets/{dist-aANR6S2I.js → dist-DX0VLTRV.js} +3 -3
- package/editor-web/assets/dist-D_xVYGnk.js +45 -0
- package/editor-web/assets/dist-Nc_h0Jye.js +4 -0
- package/editor-web/assets/dist-UG2TIZxP.js +16 -0
- package/editor-web/assets/dist-VP4ECMOk.js +1 -0
- package/editor-web/assets/dist-cUeSwqws.js +1 -0
- package/editor-web/assets/dist-xpAaABxb.js +24 -0
- package/editor-web/assets/{ebnfDiagram-V4P3TTPT-D-1x27Eh.js → ebnfDiagram-V4P3TTPT-SwhqbeK4.js} +1 -1
- package/editor-web/assets/{elk-QONTBCTQ-BJSCxiTH.js → elk-QONTBCTQ-Bb1GSt2Z.js} +1 -1
- package/editor-web/assets/{erDiagram-KYQIGQAA-C7Q357iD.js → erDiagram-KYQIGQAA-qUy0NDKn.js} +1 -1
- package/editor-web/assets/{eventmodeling-K75KTNOO-kXrQLSF5.js → eventmodeling-K75KTNOO-BYBYso_j.js} +1 -1
- package/editor-web/assets/file-exclamation-point-C_fX4fpI.js +1 -0
- package/editor-web/assets/flowDiagram-IUGLLWBU-BSCBBtP3.js +1 -0
- package/editor-web/assets/{ganttDiagram-R7GPNTJY-Bt3SRgK7.js → ganttDiagram-R7GPNTJY-Cw-BkZT8.js} +1 -1
- package/editor-web/assets/{gitGraph-VSP46ZUC-DS4CkhfK.js → gitGraph-VSP46ZUC-CTXzWPq_.js} +1 -1
- package/editor-web/assets/{gitGraphDiagram-PDYL7XHY-BgfmSVdI.js → gitGraphDiagram-PDYL7XHY-Jd9HU3WA.js} +1 -1
- package/editor-web/assets/{hint-BmRKl2nL.js → hint-mQB8slJ2.js} +1 -1
- package/editor-web/assets/index-Br4a-QEv.css +2 -0
- package/editor-web/assets/index-CglHrLRS.js +28 -0
- package/editor-web/assets/{info-OHQRW6UA-BZjctF3x.js → info-OHQRW6UA-C4oj5BpF.js} +1 -1
- package/editor-web/assets/{infoDiagram-MVDRKAX5-BAp5oUXk.js → infoDiagram-MVDRKAX5-D09aYJ28.js} +1 -1
- package/editor-web/assets/{ishikawaDiagram-HPEHV2GE-DGL7ZfUu.js → ishikawaDiagram-HPEHV2GE-BEdXoXb2.js} +1 -1
- package/editor-web/assets/{journeyDiagram-BOSHW7O7-DOOoBGx-.js → journeyDiagram-BOSHW7O7-DE-_0aww.js} +1 -1
- package/editor-web/assets/{kanban-definition-FNSA4HC5-lbLuUiMW.js → kanban-definition-FNSA4HC5-Cn3_bvPS.js} +1 -1
- package/editor-web/assets/{mermaid-parser.core-RkCFmJcg.js → mermaid-parser.core-BK52JMZH.js} +3 -3
- package/editor-web/assets/{mermaid.core-BVUl-afX.js → mermaid.core-CmfBU89G.js} +4 -4
- package/editor-web/assets/{mindmap-definition-6OY57UG3-C3DC4T1J.js → mindmap-definition-6OY57UG3-CtUhkv9I.js} +1 -1
- package/editor-web/assets/{packet-JDAUHWVQ-Bkd6YpX8.js → packet-JDAUHWVQ-C7nciBNp.js} +1 -1
- package/editor-web/assets/pdf-BHx8b9rl.js +54 -0
- package/editor-web/assets/pdf.worker.min-CjEcRF4W.mjs +28 -0
- package/editor-web/assets/pdf.worker.min-DI4FfYVf.js +1 -0
- package/editor-web/assets/{pegDiagram-ECIUJNBX-B5Seh4Oe.js → pegDiagram-ECIUJNBX-DUkbAcTs.js} +1 -1
- package/editor-web/assets/{pie-XZMESJXO-BNbb4Q8k.js → pie-XZMESJXO-BIGyKhav.js} +1 -1
- package/editor-web/assets/{pieDiagram-GNMPY74T-_hnbUloZ.js → pieDiagram-GNMPY74T-DrYj-JeG.js} +1 -1
- package/editor-web/assets/{progress-D6wSFdpY.js → progress-udl4pNsP.js} +1 -1
- package/editor-web/assets/{props-form-BfwEi6jW.js → props-form-DrZYDmSM.js} +1 -1
- package/editor-web/assets/{quadrantDiagram-D57K4MC3-1rbqW-KO.js → quadrantDiagram-D57K4MC3-qkBoh1ep.js} +1 -1
- package/editor-web/assets/{radar-ABXABTNO-BWSnhBSp.js → radar-ABXABTNO-BkJmvR6a.js} +1 -1
- package/editor-web/assets/{railroad-I3PHUGI6-BNB-OKs1.js → railroad-I3PHUGI6-BFH-ip4B.js} +1 -1
- package/editor-web/assets/{railroad-abnf-LNEFI6M7-BKgidf_B.js → railroad-abnf-LNEFI6M7-BBlzHL6Z.js} +1 -1
- package/editor-web/assets/{railroad-ebnf-DWYD2UWJ-CNCnxtHp.js → railroad-ebnf-DWYD2UWJ-CCVsG0ui.js} +1 -1
- package/editor-web/assets/{railroad-peg-JR7BVNR7-CyBW6_0o.js → railroad-peg-JR7BVNR7-Puo7BFPl.js} +1 -1
- package/editor-web/assets/{railroadDiagram-Y72NRBL7-Cud3SJ7O.js → railroadDiagram-Y72NRBL7-DCwfkv35.js} +1 -1
- package/editor-web/assets/{requirementDiagram-EQYSW5RA-BrSCcpqV.js → requirementDiagram-EQYSW5RA-DSTcDj32.js} +1 -1
- package/editor-web/assets/{row-VwyPfa1b.js → row-dgHEAE7h.js} +1 -1
- package/editor-web/assets/{sankeyDiagram-SY24JHO5-rJV4dJFn.js → sankeyDiagram-SY24JHO5-Kqq4fCvG.js} +1 -1
- package/editor-web/assets/schemas-B89k2jEC.js +1 -0
- package/editor-web/assets/scissors-BURkYWPv.js +1 -0
- package/editor-web/assets/search-jKDvFIEU.js +1 -0
- package/editor-web/assets/{sequenceDiagram-BLEHNHQU-CEUuD2n6.js → sequenceDiagram-BLEHNHQU-B1uodEgL.js} +1 -1
- package/editor-web/assets/{session-DE0fvAcs.js → session-CUCSWPTE.js} +1 -1
- package/editor-web/assets/{slides-BgacyjJW.js → slides-BdaWgL_N.js} +1 -1
- package/editor-web/assets/{snapshots-D8TtZp1x.js → snapshots-CTS2iez5.js} +1 -1
- package/editor-web/assets/{split-Cx2MMnC_.js → split-Cu0fidVK.js} +1 -1
- package/editor-web/assets/{stateDiagram-v2-A6IESKWZ-BRE_C2he.js → stateDiagram-v2-A6IESKWZ-B6gG3vUm.js} +1 -1
- package/editor-web/assets/surface-D9qJjJQL.js +1 -0
- package/editor-web/assets/swatch-S8YuBYyj.js +1 -0
- package/editor-web/assets/{swimlanes-B3ENRKFQ-BEPqWgVe.js → swimlanes-B3ENRKFQ-CZayRtvU.js} +1 -1
- package/editor-web/assets/swimlanesDiagram-AYQRV4AK-B9tLTrym.js +8 -0
- package/editor-web/assets/{switch-DaG6OuAi.js → switch-D5kPl2jO.js} +1 -1
- package/editor-web/assets/syntax-DSsHrzWF.js +1 -0
- package/editor-web/assets/{syntax-CLaCSmoi.js → syntax-PERQ2szW.js} +1 -1
- package/editor-web/assets/tabs-B_K0Db1I.js +1 -0
- package/editor-web/assets/textarea-mzr9Kfuf.js +1 -0
- package/editor-web/assets/{timeline-definition-JXYKGLGB-p8Qeg4pS.js → timeline-definition-JXYKGLGB-5YoY8Xhw.js} +1 -1
- package/editor-web/assets/{treeView-D4JQ5SDB-C9FTdXKq.js → treeView-D4JQ5SDB-Brd_NUPx.js} +1 -1
- package/editor-web/assets/{treemap-SAJKECNS-XAeLVOtI.js → treemap-SAJKECNS-DmfdnlWl.js} +1 -1
- package/editor-web/assets/{usecaseDiagram-WPOLBNNX-BV3AMRuH.js → usecaseDiagram-WPOLBNNX-lcAkMviI.js} +1 -1
- package/editor-web/assets/{vennDiagram-Q3Y3IDCW-CJdKcYyA.js → vennDiagram-Q3Y3IDCW-DY_n48hQ.js} +1 -1
- package/editor-web/assets/{video-He8p6dr6.js → video-Bv3rETBU.js} +1 -1
- package/editor-web/assets/w3c-keyname-BOAvb0qz.js +1 -0
- package/editor-web/assets/{wardley-7MLQ67FV-DZh6Mf22.js → wardley-7MLQ67FV-DzIFSBQz.js} +1 -1
- package/editor-web/assets/{wardleyDiagram-IVAIDKWA-XtvKSX-m.js → wardleyDiagram-IVAIDKWA-CsXNajIg.js} +1 -1
- package/editor-web/assets/whole-word-6DliXke2.js +1 -0
- package/editor-web/assets/{words-CjW-1tZI.js → words-BTRrBFUo.js} +1 -1
- package/editor-web/assets/{words-CPHp_0tt.js → words-ll_94CD2.js} +1 -1
- package/editor-web/assets/{xychartDiagram-4URNHDU4-CGkL42sz.js → xychartDiagram-4URNHDU4-DDpGFEum.js} +1 -1
- package/editor-web/index.html +4 -4
- package/package.json +2 -8
- package/dist/commands/frames/report.js +0 -2
- package/dist/node_modules/@allyhub/report-extension/dist/build.js +0 -2
- package/dist/node_modules/@allyhub/report-extension/dist/check.js +0 -3
- package/dist/node_modules/@allyhub/report-extension/dist/cli/find.js +0 -2
- package/dist/node_modules/@allyhub/report-extension/dist/cli/index.js +0 -5
- package/dist/node_modules/@allyhub/report-extension/dist/cli/picture.js +0 -30
- package/dist/node_modules/@allyhub/report-extension/dist/export.js +0 -2
- package/dist/node_modules/@allyhub/report-extension/dist/inline.js +0 -58
- package/dist/node_modules/@allyhub/report-extension/dist/page.js +0 -21
- package/dist/node_modules/@allyhub/report-extension/dist/project-tools.js +0 -21
- package/dist/node_modules/@allyhub/report-extension/dist/styles.js +0 -5
- package/dist/node_modules/@allyhub/report-extension/dist/theme.js +0 -2
- package/dist/node_modules/@allyhub/report-extension/dist/tools.js +0 -2
- package/dist/node_modules/@allyhub/report-extension/dist/workspace.js +0 -2
- package/dist/node_modules/@allyhub/report-extension/package.json +0 -182
- package/dist/node_modules/@allyhub/report-extension/styles/allyhub/STYLE.md +0 -139
- package/dist/node_modules/@allyhub/report-extension/styles/allyhub/style.css +0 -109
- package/dist/node_modules/@allyhub/report-extension/styles/allyhub/style.json +0 -17
- package/dist/node_modules/@allyhub/report-extension/styles/allyhub/tokens.js +0 -40
- package/editor-web/assets/button-EftXSfev.js +0 -41
- package/editor-web/assets/channel-BFbXY6R0.js +0 -1
- package/editor-web/assets/dist-90dg0B0d.js +0 -2
- package/editor-web/assets/dist-CP9XwbBS.js +0 -45
- package/editor-web/assets/dist-CRxtC7DG.js +0 -24
- package/editor-web/assets/dist-Cmnq14RO.js +0 -6
- package/editor-web/assets/dist-CrZwqOm2.js +0 -1
- package/editor-web/assets/dist-CzUWTcvC.js +0 -38
- package/editor-web/assets/dist-DYnXIW8F.js +0 -16
- package/editor-web/assets/dist-Dre4Cwpz.js +0 -1
- package/editor-web/assets/dist-qSuFWuVB.js +0 -4
- package/editor-web/assets/flowDiagram-IUGLLWBU-GSC4btef.js +0 -1
- package/editor-web/assets/index-D8qc_ipi.js +0 -28
- package/editor-web/assets/index-DDtZpLDF.css +0 -2
- package/editor-web/assets/palette-INFK0Zsr.js +0 -1
- package/editor-web/assets/scissors-D9WmgvNP.js +0 -1
- package/editor-web/assets/swatch-lxK4C8fD.js +0 -1
- package/editor-web/assets/swimlanesDiagram-AYQRV4AK-DAcNszZ6.js +0 -8
- package/editor-web/assets/syntax-9LD8MzGy.js +0 -1
- package/editor-web/assets/tabs-DjhzblAG.js +0 -1
- package/editor-web/assets/trash-2-DrnRa91l.js +0 -1
- /package/dist/node_modules/@allyhub/{report-extension → text-extension}/LICENSE +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,20 @@
|
|
|
2
2
|
|
|
3
3
|
Feature highlights from each AllyHub release.
|
|
4
4
|
|
|
5
|
+
## 0.15.0
|
|
6
|
+
|
|
7
|
+
- **Reports are set aside.** AllyHub no longer makes reports, and `allyhub report style` is gone. Write a page of findings as a doc, a sheet or a deck instead.
|
|
8
|
+
|
|
9
|
+
## 0.14.1
|
|
10
|
+
|
|
11
|
+
- **Plain files read better.** Notes and plain text read as a page, ⌘F is a find bar with replace, and a PDF opens with its pages one under another.
|
|
12
|
+
- **The right viewer whatever a name's case**, and a file that cannot be shown as text, or is too large, says so instead of being read.
|
|
13
|
+
|
|
14
|
+
## 0.14.0
|
|
15
|
+
|
|
16
|
+
- **Any file opens.** A note, data, a config, a log, subtitles or a loose picture, video or sound opens as text or media, edited by hand beside the agent and marked up like any other work. The agent can show any file, listed in the project or not.
|
|
17
|
+
- **A cloud Studio wakes in place on the web.** The page you were on stays as the Studio wakes, instead of loading again.
|
|
18
|
+
|
|
5
19
|
## 0.13.0
|
|
6
20
|
|
|
7
21
|
- **Decks and sheets work like PowerPoint and Excel.** The deck editor has PowerPoint's ribbon and every animation effect; the sheet editor has Excel's everyday commands, from filters by colour to Paste Special, and rich text in a cell. An export says what it leaves out.
|
package/dist/commands/frames.js
CHANGED
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
/*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
|
|
2
|
-
import{relative as _,sep as G}from"node:path";import{z as
|
|
3
|
-
`)}}if(e.grid!==void 0)throw
|
|
4
|
-
`)}}const c=e.item===void 0?void 0:await
|
|
5
|
-
`)
|
|
6
|
-
`)}}
|
|
7
|
-
`)}}
|
|
8
|
-
`)}}const
|
|
9
|
-
`)}}),
|
|
10
|
-
`)
|
|
11
|
-
`)}}),framesWeb=w({name:"frames web",summary:"A web page's screenshot with its named elements' boxes in the image's pixels, for a screen demo",input:r.strictObject({url:r.string().describe("The page: an address, or an HTML file on this computer"),el:r.array(r.string()).optional().describe("An element to locate, name=selector (CSS, or text=<words>); [data-el] elements are found too"),click:r.array(r.string()).optional().describe("Selectors clicked in order before the shot (close a banner, open a dialog)"),full:r.boolean().default(!1).describe("The whole page, not one viewport"),out:r.string().optional().describe("Where the picture goes (a WebP), its boxes in <out>.elements.json beside it; default under .allyhub/work/pages/"),dir:O,size:r.string().default(`${String(j.width)}x${String(j.height)}`).describe("The viewport, WIDTHxHEIGHT in CSS pixels"),scale:r.number().min(1).max(4).default(j.scale).describe("Image pixels per CSS pixel; 2 draws a high-density screen, sharp when a camera goes in"),wait:r.number().int().min(0).optional().describe("Milliseconds to wait after loading and clicking")}),positional:["url"],output:r.looseObject({out:r.string(),elementsFile:r.string()}),examples:["allyhub frames web https://example.com --el cta=text=Sign\\ up --scale 2 --out assets/media/home","allyhub frames web page.html --click '#accept' --full"]},async(e,i)=>{const a=i.cwd,[l,c]=B(e.size),s=await Y({cwd:a,root:await F(a,e.dir),url:e.url,out:e.out,el:e.el,click:e.click,width:l,height:c,scale:e.scale,full:e.full,wait:e.wait});return{value:s,text:[`${s.out}: ${String(s.width)}×${String(s.height)}${s.scale===1?"":` (${String(s.scale)} image pixels per CSS pixel)`}, ${String(Object.keys(s.elements).length)} elements (${Object.keys(s.elements).join(", ")||"none"}) in ${s.elementsFile}`,...s.missing.length>0?[`Not found: ${s.missing.join(", ")} (the selector is wrong, or something must be opened with --click first).`]:[]].join(`
|
|
12
|
-
`),exit:s.missing.length>0?C.failed:C.ok}}),FRAMES_COMMANDS=[frames,framesCuts,framesCompare,framesWeb];
|
|
2
|
+
import{relative as _,sep as G}from"node:path";import{z as t}from"zod";import{formatConsole as N,formatProblem as R}from"../text/index.js";import{sizeOf as B}from"@allyhub/build";import{COMPARE_DEFAULTS as H}from"@allyhub/measure";import{CUT_REVIEW_DEFAULTS as U,cutLine as J,dbText as S,silenceText as V}from"@allyhub/video-measure";import{consoleJson as T}from"@allyhub/project";import{PAGE_CAPTURE_DEFAULTS as x}from"@allyhub/browser";import{itemIdOf as q}from"@allyhub/formats";import{EXIT as A}from"@allyhub/protocol";import{defineCommand as b}from"../command.js";import{dir as O}from"../fields.js";import{parameters as C}from"../parameters.js";import{tellPresence as D}from"../presence.js";import{projectRoot as w}from"../project.js";import{VERSION_FIELDS as j,commandError as E,withVersion as $}from"../version.js";import{compareText as P,comparePictures as W}from"./frames/compare.js";import{isPicture as k,isVideo as z,usage as f}from"./frames/common.js";import{cutSheets as X}from"./frames/cuts.js";import{fileFrames as K}from"./frames/file.js";import{pageShot as Q}from"./frames/page.js";import{pieceMoments as Y,stillsSheet as Z}from"./frames/piece.js";import{docPicture as ee}from"./frames/doc.js";import{findDoc as te}from"@allyhub/doc-extension/cli";import{sheetPicture as re}from"./frames/sheet.js";import{findSheet as M}from"@allyhub/sheet-extension/cli";function y(e){return[...e.problems.filter(a=>a.level==="error").map(R),...N(T(e.console))]}const v=e=>({problems:e.problems,...T(e.console)}),F=(e,s)=>w(e,s),oe=t.strictObject({...j,item:t.string().optional().describe("The piece (its id, its file without its extension, or its file; default the project's only one), a sheet, a doc, or a video file: a path ending in .mp4, .mov, .webm, .m4v, .qt, .mkv or .avi is a file"),range:t.string().optional().describe("A sheet's: what to draw, a sheet (Summary), a range (Summary!B3:D9, or B3:D9 on the first sheet), columns (A:C) or rows (1:20); default its sheets, from A1"),page:t.string().optional().describe("A doc's: the pages to draw large, counted from 1 (2, 2-4, 1,5); default every page, small, tiled"),at:t.array(t.string()).optional().describe("Moments: seconds (from the start of --part when given) or anchors (@press, @/map a stretch's end, @press+0.2); a video file's are seconds. One is written as the frame itself, several are tiled. Without it, --part's still, or every part's still on one sheet."),part:t.string().optional().describe("The part --at, --from and --to count from; alone, its still"),from:t.number().optional().describe("A stretch of consecutive frames from this second (with --to), instead of --at"),to:t.number().optional().describe("The stretch's last second"),clip:t.string().optional().describe("Write the stretch as a small silent video, .gif, .mp4 or .webm by its extension; with --out, the grid too"),overlay:t.boolean().default(!1).describe("Draw over each tile the face boxes with ids, the person matte's outline, the covered areas and the text boxes (a deck's: each shape's box and name, and the lines nearly in line); places nothing. Alone, over every part's still"),beside:t.string().optional().describe("Another video file (a reference) whose frame at the same time goes on each tile's left"),grid:t.number().int().min(4).optional().describe("A video file at one --at: the frame at its own size with numbered lines every this many pixels"),out:t.string().optional().describe("Where the picture goes, always a WebP whatever the extension; default under .allyhub/work/frames/")});function ae(e){const s=[["--combo",e.combo!==void 0],["--part",e.part!==void 0],["--beside",e.beside!==void 0],["--overlay",e.overlay]].filter(([,a])=>a).map(([a])=>a);if(s.length>0)throw f("bad-option",`${s.join(" and ")} ${s.length===1?"is":"are"} a piece's: a video file has no combos or parts.`)}function ne(e){const s=[["--at",e.at!==void 0],["--part",e.part!==void 0],["--from",e.from!==void 0],["--to",e.to!==void 0],["--clip",e.clip!==void 0],["--overlay",e.overlay],["--beside",e.beside!==void 0],["--range",e.range!==void 0],["--combo",e.combo!==void 0]].filter(([,a])=>a).map(([a])=>a);if(s.length>0)throw f("bad-option",`${s.join(" and ")} ${s.length===1?"is":"are"} not a doc's: a doc has pages (--page), not moments.`)}export const frames=b({name:"frames",summary:"Pictures of a piece over time, drawn as the render draws them: every part's still on a sheet (default), a moment, a stretch tiled or as a clip, overlays; a sheet's cells, or a range of them; a doc's pages as they print, with how many; or any video file's frames",input:oe,positional:["item"],output:t.looseObject({mode:t.enum(["sheet","frame","grid","clip"])}),examples:["allyhub frames launch/film","allyhub frames launch/film --at 2.5","allyhub frames launch/film --part hook --from 0 --to 1 --clip hook.gif","allyhub frames launch/film --at 1,2,3 --overlay","allyhub frames reference.mp4 --at 0,1,2","allyhub frames reference.mp4 --at 3 --grid 50","allyhub frames finance/budget --range 'Summary!A1:F20'","allyhub frames launch/plan","allyhub frames launch/plan --page 2-3"]},async(e,s)=>{const a=s.cwd;if(e.item!==void 0&&z(e.item)){ae(e);const r=await K({cwd:a,root:await F(a,e.dir),file:e.item,at:e.at,from:e.from,to:e.to,clip:e.clip,out:e.out,grid:e.grid}).catch(g=>{throw E(g)}),n=r.video,p=`${r.file} · ${n.duration.toFixed(2)} s · ${String(n.width)}×${String(n.height)} · ${String(n.fps)} fps`,u="clip"in r&&r.clip?`${r.clip.out} (${r.clip.type}, ${String(r.clip.frames)} frames at ${String(r.clip.fps)} fps, no sound)`:void 0;return{value:r,text:[p,..."out"in r?[`${r.out}${"tiles"in r?` (${String(r.tiles.length)} moments in ${String(r.cols)} columns)`:""}`]:[],...u?[u]:[]].join(`
|
|
3
|
+
`)}}if(e.grid!==void 0)throw f("bad-option","--grid draws a video file's frame at its own size: give the file.");const d=await w(a,e.dir);if(e.item!==void 0&&await M(d,a,e.item)!==void 0){const r=await re({cwd:a,root:d,item:e.item,range:e.range,out:e.out}),n=await M(d,a,e.item);return n!==void 0&&Object.keys(r.at).length>0&&await D(d,{doing:"looking",item:q(_(d,n).split(G).join("/")),place:r.at}),{value:r,text:[r.out,...r.cut].join(`
|
|
4
|
+
`)}}const c=e.item===void 0?void 0:await te(d,a,e.item);if(c!==void 0){ne(e);const r=await ee({cwd:a,root:d,file:c,page:e.page,out:e.out,progress:p=>{s.progress(p)}}),n=r.drawn.length===r.pages?"every page":`page${r.drawn.length===1?"":"s"} ${r.drawn.join(", ")}`;return{value:r,text:[r.out,`${r.doc}: ${String(r.pages)} page${r.pages===1?"":"s"} on ${String(r.paper.width)} × ${String(r.paper.height)} mm paper; ${n} drawn`].join(`
|
|
5
|
+
`)}}if(e.page!==void 0)throw f("bad-option","--page is a doc's: name the doc.");if(e.range!==void 0)throw f("bad-option","--range is a sheet's: name the sheet.");const l=e.at!==void 0||e.part!==void 0||e.from!==void 0||e.to!==void 0;if(!l&&(e.clip!==void 0||e.beside!==void 0))throw f("bad-option","--clip and --beside draw moments: give --at, --part, or --from and --to.");if(!l&&!e.overlay){const{result:r,...n}=await $(e,s,"render",g=>Z(g,{cwd:a,root:d,out:e.out})),{unit:p,...u}=r;return{value:{...u,...v(n)},text:[`${r.out} (${r.piece} · ${r.format} · ${String(r.parts.length)} ${r.parts.length===1?p.noun:p.plural})`,...y(n)].join(`
|
|
6
|
+
`)}}const h=!l&&e.overlay,{result:o,...i}=await $(e,s,"render",async r=>{const n=await Y(r,{cwd:a,root:d,at:h?r.timeline.parts.map(L=>String(L.still)):e.at,part:e.part,from:e.from,to:e.to,clip:e.clip,out:e.out,overlay:e.overlay,beside:e.beside}),p="tiles"in n?n.tiles[0]:void 0,u=n.mode==="frame"?n.t:n.stretch?.from??p?.t,g=n.mode==="frame"?n.part:p?.part;return u!==void 0&&!h&&await D(d,{doing:"looking",item:r.piece.place,place:{t:u,...g===void 0?{}:{part:g}}}),n}),m=[];if(o.mode==="frame"&&m.push(`${o.out} (${o.piece} · ${o.format} · ${o.part} · ${o.t.toFixed(2)} s)`),o.mode==="grid"){m.push(`${o.out} (${o.piece} · ${String(o.tiles.length)} moments in ${String(o.cols)} columns)`,` ${o.tiles.map(n=>`${n.t.toFixed(o.stretch?3:2)} ${n.part}`).join(" · ")}`);const r=[...new Set(o.tiles.flatMap(n=>n.overlay?.missing??[]))];r.length>0&&m.push(` Not measured: ${r.join(", ")}.`)}return o.stretch&&m.push(` Stretch ${o.stretch.from.toFixed(3)}–${o.stretch.to.toFixed(3)} s, one frame in ${String(o.stretch.every)}: ${String(o.stretch.frames)} frames.`),"clip"in o&&o.clip&&m.push(`${o.clip.out} (${o.clip.type}, ${String(o.clip.frames)} frames at ${String(o.clip.fps)} fps, no sound)`),{value:{...o,...v(i)},text:[...m,...y(i)].join(`
|
|
7
|
+
`)}}),framesCuts=b({name:"frames cuts",summary:"A review sheet per cut of a video (a cut take's jumps, part joins, a scenery camera's cuts): frames around it, waveform and level, the words each side, the sound at it",input:t.strictObject({...j,part:t.string().optional().describe("Only this part's cuts and its joins"),out:t.string().optional().describe("The folder the sheets go in; default .allyhub/work/cuts/"),params:C({span:t.number().positive().max(10).default(U.span).describe("Seconds shown on each side of a cut")})}),positional:["item"],output:t.looseObject({out:t.string(),cuts:t.array(t.looseObject({sheet:t.string()}))}),examples:["allyhub frames cuts launch/film","allyhub frames cuts launch/film --part hook"]},async(e,s)=>{const a=s.cwd,d=await w(a,e.dir),{result:c,...l}=await $(e,s,"render",i=>X(i,{cwd:a,root:d,part:e.part,out:e.out,review:{span:e.params.span}})),h=c.part===void 0?`${String(c.cuts.length)} cut${c.cuts.length===1?"":"s"}`:`${String(c.cuts.length)} of ${String(c.total)} cuts (part ${c.part} and its joins)`,o=[`${c.piece} · ${c.format} · ${h}; silence is sound under ${String(c.threshold)} dBFS`];for(const i of c.cuts){const m=i.sound?`level ${S(i.sound.levelDb)} / around ${S(i.sound.aroundDb)} dBFS, peak ${S(i.sound.peakDb)}, step ${i.sound.jumpDb<0?"−":"+"}${Math.abs(i.sound.jumpDb).toFixed(1)} dB`:"no sound";o.push(`${String(i.index).padStart(3)} ${i.t.toFixed(3).padStart(7)} s ${i.kind.padEnd(6)} ${J(i)}`,` silence at the cut: ${V(i.silence)} · ${m}`,` “${i.said.before}” | “${i.said.after}”${i.across?` · across the cut: “${i.across}”`:""}`,` ${i.sheet}`)}return{value:{...c,...v(l)},text:[...o,...y(l)].join(`
|
|
8
|
+
`)}});const I=H;export const framesCompare=b({name:"frames compare",summary:"How a candidate picture differs from a reference, as numbers (ΔE, channels, SSIM, levels, grain, edges, regions) with a heatmap and a side-by-side: a piece's moment, a picture file or a video file's frame",input:t.strictObject({reference:t.string().describe("The reference picture (PNG, WebP, JPEG…)"),candidate:t.string().optional().describe("A piece (its id, its file without its extension, or its file; default the project's only one) at --at or --part's still; or a file by its extension: a picture (.png, .jpg, .webp…), or a video file's frame at --at (.mp4, .mov, .webm…)"),combo:j.combo,dir:O,at:t.string().optional().describe("The moment: seconds (from the start of --part when given) or an anchor of the piece; a video file's are seconds (default 0)"),part:t.string().optional().describe("The piece's part --at counts from; alone, its still"),refCrop:t.string().optional().describe("Cut the reference to x,y,width,height, or to an element of the elements.json beside it (frames web writes one)"),crop:t.string().optional().describe("Cut the candidate to x,y,width,height before any resize"),encode:t.string().optional().describe("Draw the candidate through this encode first, as a platform serves it: codec:kbps, h264 or hevc (hevc:618)"),out:t.string().optional().describe("Where its files go, a path without extension; default under .allyhub/work/compare/"),params:C({resize:t.enum(["stretch","width","none"]).default(I.resize).describe("When sizes differ: stretch the candidate to the reference, scale it to its width, or compare the common area"),shift:t.number().int().min(0).max(32).default(I.shift).describe("Search the best offset within this many pixels each way")})}),positional:["reference","candidate"],output:t.looseObject({reference:t.string(),files:t.looseObject({side:t.string(),heatmap:t.string()})}),examples:["allyhub frames compare reference.png launch/film --at 2.5 --encode hevc:618","allyhub frames compare reference.png shot.webp --ref-crop cta","allyhub frames compare reference.png theirs.mp4 --at 3"]},async(e,s)=>{const a=s.cwd,d=e.params;if(!k(e.reference))throw f("bad-reference",`${e.reference} is not a picture: the reference comes first, a picture file (PNG, WebP, JPEG…), then the piece or file to compare with it.`,`For example: allyhub frames compare ${e.candidate!==void 0&&k(e.candidate)?e.candidate:"reference.png"} ${e.reference}`);const c=e.candidate!==void 0&&(k(e.candidate)||z(e.candidate))?e.candidate:void 0,l=m=>({cwd:a,root:m,reference:e.reference,file:c,at:e.at===void 0?void 0:[e.at],part:e.part,refCrop:e.refCrop,crop:e.crop,encode:e.encode,out:e.out,options:{shift:d.shift,resize:d.resize}});if(c!==void 0){if(e.combo!==void 0||e.part!==void 0)throw f("bad-option","--combo and --part are a piece's: the candidate is a file.");const m=await W(l(await F(a,e.dir)),void 0).catch(r=>{throw E(r)});return{value:m,text:P(m)}}const h=await w(a,e.dir),{result:o,...i}=await $({...e,item:e.candidate},s,"render",m=>W(l(h),m));return{value:{...o,...v(i)},text:[P(o),...y(i)].join(`
|
|
9
|
+
`)}}),framesWeb=b({name:"frames web",summary:"A web page's screenshot with its named elements' boxes in the image's pixels, for a screen demo",input:t.strictObject({url:t.string().describe("The page: an address, or an HTML file on this computer"),el:t.array(t.string()).optional().describe("An element to locate, name=selector (CSS, or text=<words>); [data-el] elements are found too"),click:t.array(t.string()).optional().describe("Selectors clicked in order before the shot (close a banner, open a dialog)"),full:t.boolean().default(!1).describe("The whole page, not one viewport"),out:t.string().optional().describe("Where the picture goes (a WebP), its boxes in <out>.elements.json beside it; default under .allyhub/work/pages/"),dir:O,size:t.string().default(`${String(x.width)}x${String(x.height)}`).describe("The viewport, WIDTHxHEIGHT in CSS pixels"),scale:t.number().min(1).max(4).default(x.scale).describe("Image pixels per CSS pixel; 2 draws a high-density screen, sharp when a camera goes in"),wait:t.number().int().min(0).optional().describe("Milliseconds to wait after loading and clicking")}),positional:["url"],output:t.looseObject({out:t.string(),elementsFile:t.string()}),examples:["allyhub frames web https://example.com --el cta=text=Sign\\ up --scale 2 --out assets/media/home","allyhub frames web page.html --click '#accept' --full"]},async(e,s)=>{const a=s.cwd,[d,c]=B(e.size),l=await Q({cwd:a,root:await F(a,e.dir),url:e.url,out:e.out,el:e.el,click:e.click,width:d,height:c,scale:e.scale,full:e.full,wait:e.wait});return{value:l,text:[`${l.out}: ${String(l.width)}×${String(l.height)}${l.scale===1?"":` (${String(l.scale)} image pixels per CSS pixel)`}, ${String(Object.keys(l.elements).length)} elements (${Object.keys(l.elements).join(", ")||"none"}) in ${l.elementsFile}`,...l.missing.length>0?[`Not found: ${l.missing.join(", ")} (the selector is wrong, or something must be opened with --click first).`]:[]].join(`
|
|
10
|
+
`),exit:l.missing.length>0?A.failed:A.ok}}),FRAMES_COMMANDS=[frames,framesCuts,framesCompare,framesWeb];
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
|
|
2
|
-
import{createHash as
|
|
2
|
+
import{createHash as O}from"node:crypto";import{access as y,stat as C}from"node:fs/promises";import{basename as L,join as g,posix as E}from"node:path";import{pathToFileURL as M}from"node:url";import{inTime as T,listWork as N,projectItems as h,stageId as _}from"@allyhub/build";import{NEVER_CANCELLED as D}from"@allyhub/extension-api";import{OUT_DIR as H,fileEditorIn as W,isListedFile as F,unscanned as U,WORK_FILE as A}from"@allyhub/formats";import{OpenedVersion as K,componentStills as V,itemDigests as q,keyedStills as G,parseCombo as z}from"@allyhub/project";import{runtimeFile as B,stageFiles as J}from"@allyhub/stage-page";import{RPC_ERROR as c,RpcError as f,SNAPSHOT_TREE as j,TREE_PAGES as R,listedFileEditor as b,listedKind as $,stillPath as Q}from"@allyhub/protocol";import{comboKey as X,componentRefText as Y}from"@allyhub/piece";import{providedPreview as Z}from"./card.js";import{kindItem as ee}from"./kinds.js";import{rpcErrorOf as x}from"./live.js";import{forwarded as te}from"./ports.js";const oe=o=>O("sha256").update(o).digest("base64url").slice(0,16);async function S(o,t,n){const e=t.replace(/^\.\//u,""),r=(await h(o.live.root,o.live.kinds)).items.find(l=>l.id===e||l.entry===e);if(!r)throw new f(c.notFound,`There is no item ${t} in the project's list.`);const i=(n.folder??"").replace(/\/+$/u,""),s=n.file??r.entry;if(i!==""&&!s.startsWith(`${i}/`))throw new f(c.invalid,`${s} is not in the folder ${i} the page is served from.`);return o.pages.url(r.id,i,s)}const v=(o,t)=>{const n=o.tree();if(n===void 0)throw new f(c.unavailable,"This server serves no pages: only allyhub dev's does.");return new URL(t,n).href},I=(o,t,n)=>({url:v(o,`${t}?${n.toString()}`),probe:v(o,R.probe)});async function ne(o,t,n){if(t.title!==void 0)return t.title;const e=await o.extensions?.kindProvider(t.kind);if(!e?.title)return(await n()).get(t.id);try{const r=await e.title(ee(t),o.kindContext,D);return typeof r=="string"?r:void 0}catch{return}}export function contributedTools(o){const t=new Map;for(const n of o)for(const e of n.projectTools??[])t.has(e.name)||t.set(e.name,e);return t}const k=new Map;export async function contributedTool(o){let t=k.get(o.module);t||(t=import(M(o.module).href).then(e=>{if(typeof e.default!="object"||e.default===null)throw new Error(`${o.extension}'s project tools (${o.module}) have no default export.`);return e.default}),k.set(o.module,t),t.catch(()=>{k.get(o.module)===t&&k.delete(o.module)}));const n=(await t)[o.name];if(!n)throw new Error(`${o.extension} contributes the project tool "${o.name}" but its module (${o.module}) has none of that name.`);return n}export function projectToolContext(o){const{live:t}=o,n=new Map;return{root:t.root,kinds:t.kinds,prepared:()=>t.prepared(),target:(e,r)=>t.target(e,r),itemCode:e=>t.itemCode(e),items:async()=>(await h(t.root,t.kinds)).items,async version(e,r,i,s){try{return await t.withSession(async l=>{const a=await K.open({root:t.root,item:e,...r===void 0?{}:{combos:[z(r)]},purpose:i,session:l});try{return await s(a)}finally{await a.close()}})}catch(l){throw x(l)}},async componentStills(e,r,i){try{const s=await t.prepared(),{gpu:l}=await t.browser();return await G(r,{prepared:s,item:e,combo:i,gpu:l,withSession:a=>t.withSession(a)})}catch(s){throw x(s)}},served:e=>v(o,e),page:(e,r)=>I(o,e,r),buildDir:t.pieceDir,stageStyles:()=>J().fontCss.flatMap(e=>{const r=B(e);return r===void 0?[]:[{file:r,url:v(o,`${j.runtime}${e}`)}]}),kept(e,r){return n.has(e)||n.set(e,r()),n.get(e)},held(e,r){return o.held.has(e)||o.held.set(e,r()),o.held.get(e)},jobs:o.services.jobs,cloud:o.services.cloud,env:o.services.env??process.env,forward:e=>te(o.services.ports,e),pageOf:(e,r={})=>S(o,e,r),recordInputs:(e,r,i)=>{o.inputs.set(e,r,i)}}}export function toolHandlers(o){const{live:t}=o;return{"project/items":async()=>{const n=await h(t.root,t.kinds,void 0,o.extensions?.fileEditors()??[]);let e;const r=()=>e??=(async()=>{const a=await t.prepared().catch(()=>t.latest()),p=new Map;for(const d of a?.pieces??[]){const u=typeof d.title=="string"?d.title:void 0;u&&p.set(d.place,u)}return p})(),i=new Map((t.latest()?.items??[]).map(a=>[a.id,a.files])),s=o.extensions?.fileEditors()??[];return{items:await Promise.all(n.listed.map(async a=>{const p={id:a.id,dir:a.dir,entry:a.entry,...a.title===void 0?{}:{title:a.title},groups:a.groups};if(F(a)){const w=s.find(P=>P.id===a.editor);return{...p,...w?{kindInfo:b(w)}:{}}}const d=await ne(o,a,r),u=t.kinds.find(w=>w.id===a.kind),m=i.get(a.id);return{...p,kind:a.kind,...d?{title:d}:{},...m?{files:m}:{},...u?{kindInfo:$(u)}:{}}})),kinds:t.kinds.map(a=>({id:a.id,...$(a)})),name:L(t.root),scope:oe(t.root),revision:t.revision}},"project/file":async({path:n})=>{const e=n.replace(/^\.\//u,""),r=o.extensions?.fileEditors()??[],s=(await h(t.root,t.kinds,void 0,r)).listed.find(d=>d.entry===e||d.id===e);if(s){const d={id:s.id,dir:s.dir,entry:s.entry,...s.title===void 0?{}:{title:s.title},groups:s.groups};if(F(s)){const m=r.find(w=>w.id===s.editor);return{item:{...d,...m?{kindInfo:b(m)}:{}}}}const u=t.kinds.find(m=>m.id===s.kind);return{item:{...d,kind:s.kind,...u?{kindInfo:$(u)}:{}}}}const l=!U(e)&&await C(g(t.root,e)).then(d=>d.isFile(),()=>!1),a=l?W(r,e):void 0;if(!a)throw new f(c.notFound,l?`No editor opens ${e} by its name.`:`The project has no file ${e}.`);const p=E.dirname(e);return{item:{id:e,dir:p==="."?"":p,entry:e,groups:[],kindInfo:b(a)}}},"items/preview":async({item:n})=>{const e=n.replace(/^\.\//u,""),r=(await h(t.root,t.kinds)).items.find(s=>s.id===e||s.entry===e);if(!r)throw new f(c.notFound,`There is no item ${n} in the project's list.`);const i=await Z(o.extensions,r,o.kindContext);return i===void 0?{}:{preview:i}},"items/page":async({item:n,folder:e,file:r})=>({url:await S(o,n,{folder:e,file:r})}),"work/add":async({kind:n,file:e,title:r})=>{if(!t.kinds.some(i=>i.id===n))throw new f(c.invalid,`No extension here contributes the kind ${n}.`);return await y(g(t.root,e)).catch(()=>{throw new f(c.notFound,`There is no file ${e} to list in ${A}.`)}),await N(t.root,{kind:n,file:e,...r===void 0?{}:{title:r}}),{}},"components/list":async({item:n})=>{const e=await t.prepared(),r=e.items.find(i=>i.id===n||i.entry===n)?.dir??n;return{components:e.components.map(i=>{const s=E.relative(r,i.file);return{of:Y({path:s.startsWith(".")?s:`./${s}`,name:i.export}),name:i.name,...i.label===void 0?{}:{label:i.label}}})}},"components/stage":async({item:n,version:e})=>{const{prepared:r,host:i,combo:s}=await t.componentHost(n,e);if(!("components"in i)&&T(i,r.kinds))throw new f(c.notFound,`${n} has no components to draw alone: a deck's or a doc's are.`);const{code:l}=await q(r,i),a=new URLSearchParams({piece:_(i),combo:X(s),mode:"component",code:l.slice(0,16)});return I(o,R.stage,a)},"components/stills":async({item:n,version:e,components:r})=>{v(o,j.stills);try{const{prepared:i,host:s,combo:l}=await t.componentHost(n,e);if(!("components"in s)&&T(s,i.kinds))throw new f(c.notFound,`${n} has no components to draw alone: a deck's or a doc's are.`);const{gpu:a}=await t.browser();return{stills:(await V(r,{prepared:i,item:s,combo:l,gpu:a,withSession:d=>t.withSession(d)})).map(({key:d})=>({key:d,url:v(o,Q(d))}))}}catch(i){throw x(i)}},"check/results":()=>Promise.resolve(o.checker?.state??{status:"off",revision:t.revision,problems:[],facts:[]}),"check/run":()=>{if(!o.checker)throw new f(c.unavailable,"This server runs no check.");return o.checker.schedule(!0),Promise.resolve({})},"export/start":async({item:n,versions:e,types:r,options:i})=>{const{items:s}=await h(t.root,t.kinds);if(!s.some(l=>l.id===n))throw new f(c.notFound,`There is no item ${n}.`);return{job:o.exports.start(n,e??[],r??[],i)}},"export/cancel":({job:n})=>{if(!o.exports.cancel(n))throw new f(c.notFound,`No export ${n} is under way.`);return Promise.resolve({})},"export/list":()=>Promise.resolve({jobs:o.exports.list(),reveal:o.reveal!==void 0}),"export/reveal":async({path:n})=>{if(!o.reveal)throw new f(c.unavailable,"This server is not on the person's computer: download the file.");if(!n.startsWith(`${H}/`))throw new f(c.notFound,`${n} is no exported file.`);const e=o.exports.savedOf(n),r=e!==void 0&&await y(e).then(()=>!0,()=>!1)?e:g(t.root,n);return await y(r).catch(()=>{throw new f(c.notFound,`There is no file ${n}.`)}),await o.reveal(r),{}}}}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
|
|
2
|
-
import{CORE as _,declareRules as v,ruleOf as C}from"@allyhub/diagnostics";import{STAGE_LOADS as R}from"@allyhub/formats";import{LOCALES as A}from"@allyhub/i18n";import{PROJECT_TOOLS as L,RuntimeSchema as M,StageFolderSchema as W,StageLoadSchema as V,known as D}from"@allyhub/protocol";import{z as n}from"zod";import{KEY as K,MENUS as U,SETTING_TYPES as E,VIEW_CONTAINERS as p,inMenuBar as G,settingProblem as O,whenProblem as H}from"./shell.js";export const definePoint=e=>e,WordsSchema=n.record(n.string(),n.string().min(1));export function missingLocales(e){return A.filter(t=>!(t in e))}export const wordIn=(e,t)=>e[t]??e.en??Object.values(e)[0]??"";const h=n.string().regex(/^(@[a-z0-9][\w.-]*\/)?[a-z0-9][\w.-]*(\/[\w.-]+)*$/u);function b(e,t,i){if(typeof e!="object"||e===null||Array.isArray(e))return`is not an object of ${t}.`;const o=[];for(const[s,a]of Object.entries(e)){if(!Array.isArray(a))return`.${s} is not a list.`;a.forEach((d,u)=>{o.push([`.${s}[${String(u)}]`,typeof d=="object"&&d!==null?{...d,[i]:s}:d])})}return o}const y=n.string().regex(/^[a-z0-9][\w-]*(\.[\w-]+)+$/u),f=n.string().superRefine((e,t)=>{const i=H(e);i!==void 0&&t.addIssue({code:"custom",message:i})}),J=n.object({id:y,title:WordsSchema,enablement:f.optional(),place:n.enum(["workspace","ui"]).default("workspace")});export const COMMANDS=definePoint({id:"commands",about:"Commands a person runs from the palette, the menus and the keys.",entry:J,key:e=>e.id,activation:(e,t)=>e.place===t?[`onCommand:${e.id}`]:[],check:e=>{const t=missingLocales(e.title);return t.length>0?[`${e.id}'s title has no words in ${t.join(", ")}.`]:[]}});const B=n.object({command:y,key:n.string().regex(K,{message:"A key is modifiers among Mod, Shift and Alt, then a capital letter, a digit, a sign or a key's name (Mod+Shift+H)."}),when:f.optional()});export const KEYBINDING_POINT=definePoint({id:"keybindings",about:"Keys that run commands, each while its when clause holds.",entry:B});const F=n.object({menu:n.string().min(1),command:y,when:f.optional(),group:n.string().min(1).optional()});export const MENU_POINT=definePoint({id:"menus",about:`Commands in menus, by menu (${U.join(", ")}), each while its when clause holds.`,entry:F,entries:e=>b(e,"menus","menu"),check:e=>G(e.menu)?[`${e.command} is not placed in ${e.menu}: Studio's menu bar shows the core's entries alone yet.`]:[]});const x="Studio places no extension's view yet; its work card and its sidebar show the core's alone.",Y=n.object({location:n.string().min(1),id:n.string().regex(/^[a-z0-9][\w-]*(\.[\w-]+)+$/u),title:WordsSchema,icon:n.string().min(1).optional()});export const VIEW_CONTAINER_POINT=definePoint({id:"viewsContainers",about:`Containers of views, by where each goes; the shell gives its own (${p.join(", ")}) and takes none of an extension's yet.`,entry:Y,entries:e=>b(e,"places","location"),key:e=>e.id,check:e=>{const t=missingLocales(e.title);return[...t.length>0?[`${e.id}'s title has no words in ${t.join(", ")}.`]:[],`the container ${e.id} is not placed: ${x}`]}});const Z=n.object({container:n.string().min(1),id:n.string().regex(/^[a-z0-9][\w-]*(\.[\w-]+)+$/u),name:WordsSchema,when:f.optional(),icon:n.string().min(1).optional(),module:h.optional()});export const VIEW_POINT=definePoint({id:"views",about:`Views, by the container each is in (${p.join(", ")}): a page in a frame, as an editor is.`,entry:Z,entries:e=>b(e,"containers","container"),key:e=>e.id,check:e=>{const t=missingLocales(e.name);return[...p.includes(e.container)?[]:[`${e.container} is not a container: a view goes in ${p.join(" or ")}.`],...t.length>0?[`${e.id}'s name has no words in ${t.join(", ")}.`]:[],...e.module===void 0?[`${e.id} names no module: a view is a page's module, as an editor is.`]:[],`the view ${e.id} is not placed: ${x}`]}});const S=n.union([n.string(),n.boolean(),n.number()]),X=n.object({type:n.string().min(1),default:S.optional(),title:WordsSchema,description:WordsSchema.optional(),enum:n.array(S).min(1).optional(),enumItemLabels:n.array(WordsSchema).optional(),enumDescriptions:n.array(WordsSchema).optional(),minimum:n.number().optional(),maximum:n.number().optional(),minLength:n.number().int().min(0).optional(),order:n.number().int().optional()}),q=n.object({title:WordsSchema,order:n.number().int().optional(),properties:n.record(n.string(),X)});function Q(e,t){const i=[],o=(s,a)=>{const d=missingLocales(a);d.length>0&&i.push(`${e}'s ${s} has no words in ${d.join(", ")}.`)};return o("title",t.title),t.description!==void 0&&o("description",t.description),t.enumItemLabels?.forEach((s,a)=>{o(`label of choice ${String(a+1)}`,s)}),t.enumDescriptions?.forEach((s,a)=>{o(`description of choice ${String(a+1)}`,s)}),i}export const CONFIGURATION_POINT=definePoint({id:"configuration",about:"Settings: a title and JSON Schema properties by key, drawn as rows in the shell and read through allyhub.settings.",entry:q,entries:e=>Array.isArray(e)?e.map((t,i)=>[`[${String(i)}]`,t]):typeof e=="object"&&e!==null?[["",e]]:"is not a configuration or a list of them.",check:(e,t)=>{const i=[],o=missingLocales(e.title);o.length>0&&i.push(`a configuration's title has no words in ${o.join(", ")}.`);for(const[s,a]of Object.entries(e.properties)){if((!s.startsWith(`${t}.`)||s===`${t}.`)&&i.push(`${s} is not named by its extension: a setting's key is ${t}. and a name.`),i.push(...Q(s,a)),!E.includes(a.type)){i.push(`${s} is of type ${a.type}: a shell draws ${E.join(", ")}.`);continue}const d={...a,type:a.type};for(const[u,m]of(a.enum??[]).entries()){const c=O({type:d.type},m);c!==void 0&&i.push(`${s}'s choice ${String(u+1)}: ${c}`)}if(a.default!==void 0){const u=O(d,a.default);u!==void 0&&i.push(`${s}'s default: ${u}`)}for(const u of["enumItemLabels","enumDescriptions"]){const m=a[u];m!==void 0&&m.length!==(a.enum?.length??0)&&i.push(`${s}'s ${u} are ${String(m.length)}, and its choices ${String(a.enum?.length??0)}.`)}}return i}});const ee=n.object({name:n.string().regex(/^[a-z0-9][a-z0-9_-]*$/u),title:n.string().min(1),description:n.string().min(1),inputSchema:n.record(n.string(),n.unknown()),annotations:n.object({readOnlyHint:n.boolean(),destructiveHint:n.boolean(),idempotentHint:n.boolean(),openWorldHint:n.boolean()}).partial().optional()});export const WINDOW_TOOL_POINT=definePoint({id:"windowTools",about:"Tools an agent calls that act in the person's window, during its own turn: a name, a description, a JSON Schema of the input.",entry:ee,key:e=>e.name,check:e=>{const t=z(e.inputSchema);return[...t===void 0?[]:[`${e.name}'s inputSchema ${t}`],`the window tool ${e.name} is not given: Studio's MCP server gives the core's tools alone yet.`]}});const ne=n.object({name:n.string().regex(/^[a-z0-9][a-z0-9-]*( [a-z0-9][a-z0-9-]*){0,2}$/u),summary:n.string().min(1),work:n.string().min(1).optional(),module:n.string().min(1)});export const CLI_COMMANDS=definePoint({id:"cliCommands",about:"Commands the agent runs, `allyhub <name>`, listed in `allyhub help` before their module is loaded.",entry:ne,key:e=>e.name});const te=n.object({name:n.string().regex(/^[a-z0-9][a-z0-9.-]*\/[a-z][a-z0-9-]*$/u),source:n.enum(["project","asleep","machine"]),does:n.union([n.object({command:n.string().min(1)}),n.object({files:n.string().min(1)}),n.object({person:n.string().min(1)})]),module:n.string().min(1),readView:h.optional()});export const PROJECT_TOOL_POINT=definePoint({id:"projectTools",about:"Project tools: what an editor asks of a project through tools/call, each with the command or files that do the same for the agent.",entry:te,key:e=>e.name,check:(e,t)=>{if(Object.hasOwn(L,e.name))return[`${e.name} is the core's own project tool.`];const i=e.name.slice(0,e.name.lastIndexOf("/"));return T(t)||i===t?[]:[`the project tool ${e.name} does not start with its extension's id (${t}/…).`]}});const oe=n.object({folder:W,loads:n.array(V),module:n.string().min(1)});export const STAGE_ROUTE_POINT=definePoint({id:"stageRoutes",about:"Stage routes: a folder of the stage's tree an extension answers, what the stage's pages load from it, and what a snapshot records of it.",entry:oe,key:e=>e.folder});const ie=n.object({name:n.string().min(1),only:n.array(n.string().min(1)).min(1),values:n.array(n.string().min(1)).optional()}),se=n.object({files:n.record(n.string().min(1),n.string()),entry:n.string().min(1)}),w=e=>!e.startsWith("/")&&!e.includes("\\")&&e.split("/").every(t=>t!==""&&t!=="."&&t!==".."),ae=n.object({id:n.string().regex(/^[a-z][a-z0-9-]*$/u),name:WordsSchema,plural:WordsSchema.optional(),noun:n.string().min(1),part:n.object({noun:n.string().min(1),plural:n.string().min(1)}).optional(),pages:n.boolean().optional(),editor:n.string().min(1).optional(),shown:n.object({line:WordsSchema,order:n.number()}).optional(),icon:n.string().min(1).optional(),color:n.string().min(1).optional(),exports:n.object({types:n.array(n.string().min(1)).min(1),extras:n.array(n.string().min(1)).default([]),options:n.array(ie).default([]),names:n.record(n.string().min(1),WordsSchema).default({})}).optional(),renders:n.object({types:n.array(n.string().min(1)).min(1),defaults:n.array(n.string().min(1)).min(1)}).optional(),starter:se.optional(),share:n.boolean().optional(),build:n.string().min(1).optional()});export const KIND_POINT=definePoint({id:"kinds",about:"Kinds of item: their names, their editor, their icon and colour, what they export and render, what a new one starts as, whether one is shared alone.",entry:ae,key:e=>e.id,activation:(e,t)=>t==="workspace"?[`onKind:${e.id}`]:[],check:e=>{const t=[],i=missingLocales(e.name);i.length>0&&t.push(`${e.id}'s name has no words in ${i.join(", ")}.`);const o=e.plural&&missingLocales(e.plural);o&&o.length>0&&t.push(`${e.id}'s plural has no words in ${o.join(", ")}.`);for(const[a,d]of Object.entries(e.exports?.names??{})){const u=missingLocales(d);u.length>0&&t.push(`${e.id}'s name for its export ${a} has no words in ${u.join(", ")}.`)}const s=Object.keys(e.starter?.files??{});for(const a of s.filter(d=>!w(d)))t.push(`${e.id}'s starter file ${a} is not inside the new item's folder.`);return e.starter&&!s.includes(e.starter.entry)&&t.push(`${e.id}'s starter's entry ${e.starter.entry} is none of its files.`),t}});const I=n.union([n.string().min(1),n.array(n.string().min(1)).min(1)]),re=n.object({id:n.string().regex(/^[a-z0-9][\w-]*(\.[\w-]+)+$/u),markup:I.optional(),kinds:n.array(n.string().min(1)).default([]),files:n.array(n.string().min(1)).default([]),noun:n.string().min(1).optional(),name:WordsSchema.optional(),plural:WordsSchema.optional(),icon:n.string().min(1).optional(),color:n.string().min(1).optional(),check:n.string().min(1).optional(),priority:n.enum(["default","option"]).default("default"),module:h.optional(),place:n.record(n.string(),n.unknown()).optional()});function z(e){if(e.type!=="object")return'is not of "type": "object".';try{n.fromJSONSchema(e)}catch(t){return`is not a JSON Schema zod reads: ${t instanceof Error?t.message:String(t)}.`}}export const EDITOR_POINT=definePoint({id:"editors",about:"Editors: the kinds each opens, or the files it opens by their names (glob patterns, with their name, sign and check), whether it is their default, the module a page imports for it, and the schema of where a person is in what it opens.",entry:re,key:e=>e.id,activation:(e,t)=>t==="ui"?[`onEditor:${e.id}`]:[],check:e=>{const t=[],i=e.place&&z(e.place);if(i!==void 0&&t.push(`${e.id}'s place ${i}`),e.kinds.length===0&&e.files.length===0&&t.push(`${e.id} opens no kind and no files.`),e.kinds.length>0&&e.files.length>0&&t.push(`${e.id} opens kinds and files: an editor opens one or the other.`),e.files.length>0){e.noun===void 0&&t.push(`${e.id} opens files and has no noun for them.`),e.name===void 0&&t.push(`${e.id} opens files and has no name for them.`);for(const[o,s]of[["name",e.name],["plural",e.plural]]){const a=s===void 0?[]:missingLocales(s);a.length>0&&t.push(`${e.id}'s ${o} has no words in ${a.join(", ")}.`)}for(const o of e.files)(o.startsWith("/")||o.split("/").includes(".."))&&t.push(`${e.id}'s pattern ${o} is not of project paths (no leading /, no ..).`)}else e.check!==void 0&&t.push(`${e.id} has a check and opens no files: a kind's items are checked by its build.`);return t}});export function fileEditorTable(e,t=(i,o)=>o){return e.flatMap(({extension:i,entry:o})=>o.files.length===0||o.name===void 0||o.noun===void 0?[]:[{id:o.id,files:[...o.files],noun:o.noun,name:{...o.name},...o.plural===void 0?{}:{plural:{...o.plural}},...o.icon===void 0?{}:{icon:o.icon},...o.color===void 0?{}:{color:o.color},...o.check===void 0?{}:{check:t(i,o.check)},extension:i}])}const de=n.object({id:n.string().regex(/^[a-z0-9][\w-]*(\.[\w-]+)+$/u),markup:I.optional(),types:n.array(n.string().regex(/^[a-z]+\/(?:\*|[\w.+-]+)$/u)).min(1),module:h});export const PREVIEW_RENDERER_POINT=definePoint({id:"previewRenderers",about:"Preview renderers: how a file of a media type is drawn wherever one is shown (a canvas's node); each its media types and the module a page imports for it.",entry:de,key:e=>e.id});const T=e=>e.startsWith("allyhub.");function $(e,t,i){return T(e)||t.startsWith(`${e}/`)?[]:[`the ${i} ${t} does not start with its extension's id (${e}/…).`]}const le=n.object({code:n.string().regex(/^(AK-[A-Z]\d{3}|[a-z0-9][a-z0-9-]*\.[a-z0-9][a-z0-9-]*\/[A-Za-z0-9][\w.-]*)$/u),level:n.enum(["error","warn"]),rule:n.string().min(1)});export const RULE_POINT=definePoint({id:"rules",about:"Rules: the codes an extension reports problems under, each with its level and what it says.",entry:le,key:e=>e.code,check:(e,t)=>{const i=C(e.code);return[...$(t,e.code,"rule"),...i&&i.extension!==t?[`${e.code} is ${i.extension===_?"the core's":`${i.extension}'s`} rule already.`]:[]]},added:(e,t)=>v(t,[e])});const ce=n.object({kind:n.string().regex(/^([a-z][a-z0-9-]*|[a-z0-9][a-z0-9-]*\.[a-z0-9][a-z0-9-]*\/[a-z][a-z0-9-]*)$/u),about:n.string().min(1)});export const FACT_POINT=definePoint({id:"facts",about:"Kinds of fact: what an extension measures for the agent to judge, each with what it says.",entry:ce,key:e=>e.kind,check:(e,t)=>$(t,e.kind,"kind of fact")});const ue=n.object({module:n.string().min(1)});export const BUILD_PLUGINS_POINT=definePoint({id:"buildPlugins",about:"Build plugins: a module whose Vite plugins and lent packages every stage bundle of a project takes.",entry:ue});const k=n.string().min(1),me=n.object({name:n.string().regex(/^[a-z][a-z0-9-]*$/u),summary:n.string().min(1),module:k});export const INSPECT_VIEW_POINT=definePoint({id:"inspectViews",about:"Views of `allyhub inspect <name>`: a measurement now, listed in `allyhub help` before its module is loaded.",entry:me,key:e=>e.name});const pe=n.object({id:n.string().regex(/^[a-z0-9][\w-]*(\.[\w-]+)+$/u),types:n.array(n.string().min(1)).min(1),module:k});export const EXPORT_PROCESSOR_POINT=definePoint({id:"exportProcessors",about:"Export processors: a step run on every file of the types it names that an export makes.",entry:pe,key:e=>e.id,check:(e,t)=>e.id.startsWith(`${t}.`)?[]:[`the processor ${e.id} does not start with its extension's id (${t}.…).`]});const he=n.object({id:n.string().regex(/^([a-z][a-z0-9-]*|[a-z0-9][a-z0-9-]*\.[a-z0-9][a-z0-9-]*\/[a-z][a-z0-9-]*)$/u),about:n.string().min(1),what:n.string().min(1),media:n.array(n.enum(["image","audio","video"])).min(1),runtimes:n.array(n.string().regex(/^[a-z0-9][a-z0-9-]*$/u)).default([]),module:k});export const MEDIA_ANALYSIS_POINT=definePoint({id:"mediaAnalyses",about:"Media analyses: what the media index measures of a file once, by its content, when a version needs it.",entry:he,key:e=>e.id,check:(e,t)=>$(t,e.id,"media analysis")});const fe=n.object({id:n.string().regex(/^[a-z0-9][a-z0-9-]*$/u),...M.shape});export const RUNTIME_POINT=definePoint({id:"runtimes",about:"Runtimes: a tool's pinned download (a program, a model), fetched when first needed, checked, cached.",entry:fe,key:e=>e.id}),SKILL_NAME=/^(?=.{1,64}$)[a-z0-9]+(-[a-z0-9]+)*$/u;const g=e=>e.replace(/^\.\//u,"").replace(/\/+$/u,""),ge=n.object({path:n.string().min(1)});export const SKILL_POINT=definePoint({id:"skills",about:"Skills for the agent: a folder laid out as an Agent Skill's, a skill of its own or files of the skill of its name.",entry:ge,check:e=>{const t=g(e.path);if(!w(t))return[`the skill folder ${e.path} is not a folder inside its package.`];const i=t.slice(t.lastIndexOf("/")+1);return SKILL_NAME.test(i)?[]:[`the skill folder ${e.path} is not named as a skill is (lower-case letters, digits and hyphens, at most 64).`]}});const P=n.record(n.string(),n.string()),be=n.union([n.object({name:n.string().regex(/^[a-z0-9][a-z0-9_-]*$/u),command:n.string().min(1),args:n.array(n.string()).default([]),env:P.default({}),cwd:n.string().min(1).optional()}),n.object({name:n.string().regex(/^[a-z0-9][a-z0-9_-]*$/u),url:n.url(),headers:P.default({})})]);export const MCP_SERVER_POINT=definePoint({id:"mcpServers",about:"MCP servers: a local program or an address that gives an agent tools, defined as .mcp.json defines one.",entry:be,key:e=>e.name,check:e=>"cwd"in e&&e.cwd!==void 0&&!w(g(e.cwd))?[`the MCP server ${e.name}'s cwd is not a folder inside its package.`]:[]}),CORE_POINTS=[COMMANDS,KEYBINDING_POINT,MENU_POINT,VIEW_CONTAINER_POINT,VIEW_POINT,CONFIGURATION_POINT,WINDOW_TOOL_POINT,CLI_COMMANDS,KIND_POINT,EDITOR_POINT,PREVIEW_RENDERER_POINT,RULE_POINT,FACT_POINT,BUILD_PLUGINS_POINT,PROJECT_TOOL_POINT,STAGE_ROUTE_POINT,INSPECT_VIEW_POINT,EXPORT_PROCESSOR_POINT,MEDIA_ANALYSIS_POINT,RUNTIME_POINT,SKILL_POINT,MCP_SERVER_POINT];export function kindTable(e,t=(d,u)=>u,i=[],o=[],s=[],a=()=>{}){const d=c=>{const r=i.filter(l=>l.extension===c).map(l=>t(c,l.entry.module));return r.length>0?r:void 0},u=c=>{const r=o.filter(l=>l.extension===c).map(({entry:l})=>({name:l.name,source:l.source,does:l.does,module:t(c,l.module),extension:c}));return r.length>0?r:void 0},m=c=>{const r=s.filter(l=>l.extension===c).map(({entry:l})=>({folder:l.folder,loads:l.loads.filter(N=>D(R,N)),module:t(c,l.module),extension:c}));return r.length>0?r:void 0};return e.map(({extension:c,entry:r})=>({id:r.id,editor:r.editor,noun:r.noun,part:r.part,...r.pages===!0?{pages:!0}:{},name:r.name,plural:r.plural,icon:r.icon,color:r.color,exports:r.exports&&{types:r.exports.types,extras:r.exports.extras,options:r.exports.options.map(l=>({name:l.name,only:l.only,...l.values===void 0?{}:{values:l.values}})),...Object.keys(r.exports.names).length===0?{}:{names:r.exports.names}},renders:r.renders&&{types:r.renders.types,defaults:r.renders.defaults},starter:r.starter&&{files:{...r.starter.files},entry:r.starter.entry},share:r.share,build:r.build===void 0?void 0:t(c,r.build),buildPlugins:d(c),projectTools:u(c),stageRoutes:m(c),points:a(c),extension:c}))}export const inspectViewTable=(e,t)=>e.map(({extension:i,entry:o})=>({name:o.name,summary:o.summary,module:t(i,o.module),extension:i})),cliCommandTable=(e,t)=>e.map(({extension:i,entry:o})=>({name:o.name,summary:o.summary,...o.work===void 0?{}:{work:o.work},module:t(i,o.module),extension:i})),processorTable=(e,t)=>e.map(({extension:i,entry:o})=>({id:o.id,types:o.types,module:t(i,o.module),extension:i})),analysisTable=(e,t)=>e.map(({extension:i,entry:o})=>({id:o.id,about:o.about,what:o.what,media:o.media,runtimes:o.runtimes,module:t(i,o.module),extension:i})),skillTable=(e,t)=>e.map(({extension:i,entry:o})=>{const s=g(o.path);return{name:s.slice(s.lastIndexOf("/")+1),folder:t(i,s),extension:i}});const j=(e,t)=>e.replaceAll("${PLUGIN_ROOT}",t);export const mcpServerTable=(e,t,i)=>e.map(({extension:o,entry:s})=>{if("url"in s)return{name:s.name,url:s.url,headers:{...s.headers},extension:o};const a=t(o);return{name:s.name,command:j(s.command,a),args:s.args.map(d=>j(d,a)),env:Object.fromEntries(Object.entries(s.env).map(([d,u])=>[d,j(u,a)])),cwd:s.cwd===void 0?a:i(o,g(s.cwd)),extension:o}});
|
|
2
|
+
import{CORE as _,declareRules as v,ruleOf as C}from"@allyhub/diagnostics";import{STAGE_LOADS as R}from"@allyhub/formats";import{LOCALES as A}from"@allyhub/i18n";import{PROJECT_TOOLS as L,RuntimeSchema as M,StageFolderSchema as W,StageLoadSchema as V,known as D}from"@allyhub/protocol";import{z as n}from"zod";import{KEY as K,MENUS as U,SETTING_TYPES as E,VIEW_CONTAINERS as p,inMenuBar as G,settingProblem as O,whenProblem as H}from"./shell.js";export const definePoint=e=>e,WordsSchema=n.record(n.string(),n.string().min(1));export function missingLocales(e){return A.filter(t=>!(t in e))}export const wordIn=(e,t)=>e[t]??e.en??Object.values(e)[0]??"";const h=n.string().regex(/^(@[a-z0-9][\w.-]*\/)?[a-z0-9][\w.-]*(\/[\w.-]+)*$/u);function b(e,t,i){if(typeof e!="object"||e===null||Array.isArray(e))return`is not an object of ${t}.`;const o=[];for(const[s,a]of Object.entries(e)){if(!Array.isArray(a))return`.${s} is not a list.`;a.forEach((d,u)=>{o.push([`.${s}[${String(u)}]`,typeof d=="object"&&d!==null?{...d,[i]:s}:d])})}return o}const y=n.string().regex(/^[a-z0-9][\w-]*(\.[\w-]+)+$/u),f=n.string().superRefine((e,t)=>{const i=H(e);i!==void 0&&t.addIssue({code:"custom",message:i})}),J=n.object({id:y,title:WordsSchema,enablement:f.optional(),place:n.enum(["workspace","ui"]).default("workspace")});export const COMMANDS=definePoint({id:"commands",about:"Commands a person runs from the palette, the menus and the keys.",entry:J,key:e=>e.id,activation:(e,t)=>e.place===t?[`onCommand:${e.id}`]:[],check:e=>{const t=missingLocales(e.title);return t.length>0?[`${e.id}'s title has no words in ${t.join(", ")}.`]:[]}});const B=n.object({command:y,key:n.string().regex(K,{message:"A key is modifiers among Mod, Shift and Alt, then a capital letter, a digit, a sign or a key's name (Mod+Shift+H)."}),when:f.optional()});export const KEYBINDING_POINT=definePoint({id:"keybindings",about:"Keys that run commands, each while its when clause holds.",entry:B});const F=n.object({menu:n.string().min(1),command:y,when:f.optional(),group:n.string().min(1).optional()});export const MENU_POINT=definePoint({id:"menus",about:`Commands in menus, by menu (${U.join(", ")}), each while its when clause holds.`,entry:F,entries:e=>b(e,"menus","menu"),check:e=>G(e.menu)?[`${e.command} is not placed in ${e.menu}: Studio's menu bar shows the core's entries alone yet.`]:[]});const x="Studio places no extension's view yet; its work card and its sidebar show the core's alone.",Y=n.object({location:n.string().min(1),id:n.string().regex(/^[a-z0-9][\w-]*(\.[\w-]+)+$/u),title:WordsSchema,icon:n.string().min(1).optional()});export const VIEW_CONTAINER_POINT=definePoint({id:"viewsContainers",about:`Containers of views, by where each goes; the shell gives its own (${p.join(", ")}) and takes none of an extension's yet.`,entry:Y,entries:e=>b(e,"places","location"),key:e=>e.id,check:e=>{const t=missingLocales(e.title);return[...t.length>0?[`${e.id}'s title has no words in ${t.join(", ")}.`]:[],`the container ${e.id} is not placed: ${x}`]}});const Z=n.object({container:n.string().min(1),id:n.string().regex(/^[a-z0-9][\w-]*(\.[\w-]+)+$/u),name:WordsSchema,when:f.optional(),icon:n.string().min(1).optional(),module:h.optional()});export const VIEW_POINT=definePoint({id:"views",about:`Views, by the container each is in (${p.join(", ")}): a page in a frame, as an editor is.`,entry:Z,entries:e=>b(e,"containers","container"),key:e=>e.id,check:e=>{const t=missingLocales(e.name);return[...p.includes(e.container)?[]:[`${e.container} is not a container: a view goes in ${p.join(" or ")}.`],...t.length>0?[`${e.id}'s name has no words in ${t.join(", ")}.`]:[],...e.module===void 0?[`${e.id} names no module: a view is a page's module, as an editor is.`]:[],`the view ${e.id} is not placed: ${x}`]}});const S=n.union([n.string(),n.boolean(),n.number()]),X=n.object({type:n.string().min(1),default:S.optional(),title:WordsSchema,description:WordsSchema.optional(),enum:n.array(S).min(1).optional(),enumItemLabels:n.array(WordsSchema).optional(),enumDescriptions:n.array(WordsSchema).optional(),minimum:n.number().optional(),maximum:n.number().optional(),minLength:n.number().int().min(0).optional(),order:n.number().int().optional()}),q=n.object({title:WordsSchema,order:n.number().int().optional(),properties:n.record(n.string(),X)});function Q(e,t){const i=[],o=(s,a)=>{const d=missingLocales(a);d.length>0&&i.push(`${e}'s ${s} has no words in ${d.join(", ")}.`)};return o("title",t.title),t.description!==void 0&&o("description",t.description),t.enumItemLabels?.forEach((s,a)=>{o(`label of choice ${String(a+1)}`,s)}),t.enumDescriptions?.forEach((s,a)=>{o(`description of choice ${String(a+1)}`,s)}),i}export const CONFIGURATION_POINT=definePoint({id:"configuration",about:"Settings: a title and JSON Schema properties by key, drawn as rows in the shell and read through allyhub.settings.",entry:q,entries:e=>Array.isArray(e)?e.map((t,i)=>[`[${String(i)}]`,t]):typeof e=="object"&&e!==null?[["",e]]:"is not a configuration or a list of them.",check:(e,t)=>{const i=[],o=missingLocales(e.title);o.length>0&&i.push(`a configuration's title has no words in ${o.join(", ")}.`);for(const[s,a]of Object.entries(e.properties)){if((!s.startsWith(`${t}.`)||s===`${t}.`)&&i.push(`${s} is not named by its extension: a setting's key is ${t}. and a name.`),i.push(...Q(s,a)),!E.includes(a.type)){i.push(`${s} is of type ${a.type}: a shell draws ${E.join(", ")}.`);continue}const d={...a,type:a.type};for(const[u,m]of(a.enum??[]).entries()){const c=O({type:d.type},m);c!==void 0&&i.push(`${s}'s choice ${String(u+1)}: ${c}`)}if(a.default!==void 0){const u=O(d,a.default);u!==void 0&&i.push(`${s}'s default: ${u}`)}for(const u of["enumItemLabels","enumDescriptions"]){const m=a[u];m!==void 0&&m.length!==(a.enum?.length??0)&&i.push(`${s}'s ${u} are ${String(m.length)}, and its choices ${String(a.enum?.length??0)}.`)}}return i}});const ee=n.object({name:n.string().regex(/^[a-z0-9][a-z0-9_-]*$/u),title:n.string().min(1),description:n.string().min(1),inputSchema:n.record(n.string(),n.unknown()),annotations:n.object({readOnlyHint:n.boolean(),destructiveHint:n.boolean(),idempotentHint:n.boolean(),openWorldHint:n.boolean()}).partial().optional()});export const WINDOW_TOOL_POINT=definePoint({id:"windowTools",about:"Tools an agent calls that act in the person's window, during its own turn: a name, a description, a JSON Schema of the input.",entry:ee,key:e=>e.name,check:e=>{const t=z(e.inputSchema);return[...t===void 0?[]:[`${e.name}'s inputSchema ${t}`],`the window tool ${e.name} is not given: Studio's MCP server gives the core's tools alone yet.`]}});const ne=n.object({name:n.string().regex(/^[a-z0-9][a-z0-9-]*( [a-z0-9][a-z0-9-]*){0,2}$/u),summary:n.string().min(1),work:n.string().min(1).optional(),module:n.string().min(1)});export const CLI_COMMANDS=definePoint({id:"cliCommands",about:"Commands the agent runs, `allyhub <name>`, listed in `allyhub help` before their module is loaded.",entry:ne,key:e=>e.name});const te=n.object({name:n.string().regex(/^[a-z0-9][a-z0-9.-]*\/[a-z][a-z0-9-]*$/u),source:n.enum(["project","asleep","machine"]),does:n.union([n.object({command:n.string().min(1)}),n.object({files:n.string().min(1)}),n.object({person:n.string().min(1)})]),module:n.string().min(1),readView:h.optional()});export const PROJECT_TOOL_POINT=definePoint({id:"projectTools",about:"Project tools: what an editor asks of a project through tools/call, each with the command or files that do the same for the agent.",entry:te,key:e=>e.name,check:(e,t)=>{if(Object.hasOwn(L,e.name))return[`${e.name} is the core's own project tool.`];const i=e.name.slice(0,e.name.lastIndexOf("/"));return T(t)||i===t?[]:[`the project tool ${e.name} does not start with its extension's id (${t}/…).`]}});const oe=n.object({folder:W,loads:n.array(V),module:n.string().min(1)});export const STAGE_ROUTE_POINT=definePoint({id:"stageRoutes",about:"Stage routes: a folder of the stage's tree an extension answers, what the stage's pages load from it, and what a snapshot records of it.",entry:oe,key:e=>e.folder});const ie=n.object({name:n.string().min(1),only:n.array(n.string().min(1)).min(1),values:n.array(n.string().min(1)).optional()}),se=n.object({files:n.record(n.string().min(1),n.string()),entry:n.string().min(1)}),w=e=>!e.startsWith("/")&&!e.includes("\\")&&e.split("/").every(t=>t!==""&&t!=="."&&t!==".."),ae=n.object({id:n.string().regex(/^[a-z][a-z0-9-]*$/u),name:WordsSchema,plural:WordsSchema.optional(),noun:n.string().min(1),part:n.object({noun:n.string().min(1),plural:n.string().min(1)}).optional(),pages:n.boolean().optional(),editor:n.string().min(1).optional(),shown:n.object({line:WordsSchema,order:n.number()}).optional(),icon:n.string().min(1).optional(),color:n.string().min(1).optional(),exports:n.object({types:n.array(n.string().min(1)).min(1),extras:n.array(n.string().min(1)).default([]),options:n.array(ie).default([]),names:n.record(n.string().min(1),WordsSchema).default({})}).optional(),renders:n.object({types:n.array(n.string().min(1)).min(1),defaults:n.array(n.string().min(1)).min(1)}).optional(),starter:se.optional(),share:n.boolean().optional(),build:n.string().min(1).optional()});export const KIND_POINT=definePoint({id:"kinds",about:"Kinds of item: their names, their editor, their icon and colour, what they export and render, what a new one starts as, whether one is shared alone.",entry:ae,key:e=>e.id,activation:(e,t)=>t==="workspace"?[`onKind:${e.id}`]:[],check:e=>{const t=[],i=missingLocales(e.name);i.length>0&&t.push(`${e.id}'s name has no words in ${i.join(", ")}.`);const o=e.plural&&missingLocales(e.plural);o&&o.length>0&&t.push(`${e.id}'s plural has no words in ${o.join(", ")}.`);for(const[a,d]of Object.entries(e.exports?.names??{})){const u=missingLocales(d);u.length>0&&t.push(`${e.id}'s name for its export ${a} has no words in ${u.join(", ")}.`)}const s=Object.keys(e.starter?.files??{});for(const a of s.filter(d=>!w(d)))t.push(`${e.id}'s starter file ${a} is not inside the new item's folder.`);return e.starter&&!s.includes(e.starter.entry)&&t.push(`${e.id}'s starter's entry ${e.starter.entry} is none of its files.`),t}});const I=n.union([n.string().min(1),n.array(n.string().min(1)).min(1)]),re=n.object({id:n.string().regex(/^[a-z0-9][\w-]*(\.[\w-]+)+$/u),markup:I.optional(),kinds:n.array(n.string().min(1)).default([]),files:n.array(n.string().min(1)).default([]),noun:n.string().min(1).optional(),name:WordsSchema.optional(),plural:WordsSchema.optional(),icon:n.string().min(1).optional(),color:n.string().min(1).optional(),check:n.string().min(1).optional(),priority:n.enum(["default","option"]).default("default"),module:h.optional(),place:n.record(n.string(),n.unknown()).optional()});function z(e){if(e.type!=="object")return'is not of "type": "object".';try{n.fromJSONSchema(e)}catch(t){return`is not a JSON Schema zod reads: ${t instanceof Error?t.message:String(t)}.`}}export const EDITOR_POINT=definePoint({id:"editors",about:"Editors: the kinds each opens, or the files it opens by their names (glob patterns, with their name, sign and check), whether it is their default, the module a page imports for it, and the schema of where a person is in what it opens.",entry:re,key:e=>e.id,activation:(e,t)=>t==="ui"?[`onEditor:${e.id}`]:[],check:e=>{const t=[],i=e.place&&z(e.place);if(i!==void 0&&t.push(`${e.id}'s place ${i}`),e.kinds.length===0&&e.files.length===0&&t.push(`${e.id} opens no kind and no files.`),e.kinds.length>0&&e.files.length>0&&t.push(`${e.id} opens kinds and files: an editor opens one or the other.`),e.files.length>0){e.noun===void 0&&t.push(`${e.id} opens files and has no noun for them.`),e.name===void 0&&t.push(`${e.id} opens files and has no name for them.`);for(const[o,s]of[["name",e.name],["plural",e.plural]]){const a=s===void 0?[]:missingLocales(s);a.length>0&&t.push(`${e.id}'s ${o} has no words in ${a.join(", ")}.`)}for(const o of e.files)(o.startsWith("/")||o.split("/").includes(".."))&&t.push(`${e.id}'s pattern ${o} is not of project paths (no leading /, no ..).`)}else e.check!==void 0&&t.push(`${e.id} has a check and opens no files: a kind's items are checked by its build.`);return t}});export function fileEditorTable(e,t=(i,o)=>o){return e.flatMap(({extension:i,entry:o})=>o.files.length===0||o.name===void 0||o.noun===void 0?[]:[{id:o.id,files:[...o.files],noun:o.noun,name:{...o.name},...o.plural===void 0?{}:{plural:{...o.plural}},...o.icon===void 0?{}:{icon:o.icon},...o.color===void 0?{}:{color:o.color},...o.priority==="option"?{priority:o.priority}:{},...o.check===void 0?{}:{check:t(i,o.check)},extension:i}])}const de=n.object({id:n.string().regex(/^[a-z0-9][\w-]*(\.[\w-]+)+$/u),markup:I.optional(),types:n.array(n.string().regex(/^[a-z]+\/(?:\*|[\w.+-]+)$/u)).min(1),module:h});export const PREVIEW_RENDERER_POINT=definePoint({id:"previewRenderers",about:"Preview renderers: how a file of a media type is drawn wherever one is shown (a canvas's node); each its media types and the module a page imports for it.",entry:de,key:e=>e.id});const T=e=>e.startsWith("allyhub.");function $(e,t,i){return T(e)||t.startsWith(`${e}/`)?[]:[`the ${i} ${t} does not start with its extension's id (${e}/…).`]}const le=n.object({code:n.string().regex(/^(AK-[A-Z]\d{3}|[a-z0-9][a-z0-9-]*\.[a-z0-9][a-z0-9-]*\/[A-Za-z0-9][\w.-]*)$/u),level:n.enum(["error","warn"]),rule:n.string().min(1)});export const RULE_POINT=definePoint({id:"rules",about:"Rules: the codes an extension reports problems under, each with its level and what it says.",entry:le,key:e=>e.code,check:(e,t)=>{const i=C(e.code);return[...$(t,e.code,"rule"),...i&&i.extension!==t?[`${e.code} is ${i.extension===_?"the core's":`${i.extension}'s`} rule already.`]:[]]},added:(e,t)=>v(t,[e])});const ce=n.object({kind:n.string().regex(/^([a-z][a-z0-9-]*|[a-z0-9][a-z0-9-]*\.[a-z0-9][a-z0-9-]*\/[a-z][a-z0-9-]*)$/u),about:n.string().min(1)});export const FACT_POINT=definePoint({id:"facts",about:"Kinds of fact: what an extension measures for the agent to judge, each with what it says.",entry:ce,key:e=>e.kind,check:(e,t)=>$(t,e.kind,"kind of fact")});const ue=n.object({module:n.string().min(1)});export const BUILD_PLUGINS_POINT=definePoint({id:"buildPlugins",about:"Build plugins: a module whose Vite plugins and lent packages every stage bundle of a project takes.",entry:ue});const k=n.string().min(1),me=n.object({name:n.string().regex(/^[a-z][a-z0-9-]*$/u),summary:n.string().min(1),module:k});export const INSPECT_VIEW_POINT=definePoint({id:"inspectViews",about:"Views of `allyhub inspect <name>`: a measurement now, listed in `allyhub help` before its module is loaded.",entry:me,key:e=>e.name});const pe=n.object({id:n.string().regex(/^[a-z0-9][\w-]*(\.[\w-]+)+$/u),types:n.array(n.string().min(1)).min(1),module:k});export const EXPORT_PROCESSOR_POINT=definePoint({id:"exportProcessors",about:"Export processors: a step run on every file of the types it names that an export makes.",entry:pe,key:e=>e.id,check:(e,t)=>e.id.startsWith(`${t}.`)?[]:[`the processor ${e.id} does not start with its extension's id (${t}.…).`]});const he=n.object({id:n.string().regex(/^([a-z][a-z0-9-]*|[a-z0-9][a-z0-9-]*\.[a-z0-9][a-z0-9-]*\/[a-z][a-z0-9-]*)$/u),about:n.string().min(1),what:n.string().min(1),media:n.array(n.enum(["image","audio","video"])).min(1),runtimes:n.array(n.string().regex(/^[a-z0-9][a-z0-9-]*$/u)).default([]),module:k});export const MEDIA_ANALYSIS_POINT=definePoint({id:"mediaAnalyses",about:"Media analyses: what the media index measures of a file once, by its content, when a version needs it.",entry:he,key:e=>e.id,check:(e,t)=>$(t,e.id,"media analysis")});const fe=n.object({id:n.string().regex(/^[a-z0-9][a-z0-9-]*$/u),...M.shape});export const RUNTIME_POINT=definePoint({id:"runtimes",about:"Runtimes: a tool's pinned download (a program, a model), fetched when first needed, checked, cached.",entry:fe,key:e=>e.id}),SKILL_NAME=/^(?=.{1,64}$)[a-z0-9]+(-[a-z0-9]+)*$/u;const g=e=>e.replace(/^\.\//u,"").replace(/\/+$/u,""),ge=n.object({path:n.string().min(1)});export const SKILL_POINT=definePoint({id:"skills",about:"Skills for the agent: a folder laid out as an Agent Skill's, a skill of its own or files of the skill of its name.",entry:ge,check:e=>{const t=g(e.path);if(!w(t))return[`the skill folder ${e.path} is not a folder inside its package.`];const i=t.slice(t.lastIndexOf("/")+1);return SKILL_NAME.test(i)?[]:[`the skill folder ${e.path} is not named as a skill is (lower-case letters, digits and hyphens, at most 64).`]}});const P=n.record(n.string(),n.string()),be=n.union([n.object({name:n.string().regex(/^[a-z0-9][a-z0-9_-]*$/u),command:n.string().min(1),args:n.array(n.string()).default([]),env:P.default({}),cwd:n.string().min(1).optional()}),n.object({name:n.string().regex(/^[a-z0-9][a-z0-9_-]*$/u),url:n.url(),headers:P.default({})})]);export const MCP_SERVER_POINT=definePoint({id:"mcpServers",about:"MCP servers: a local program or an address that gives an agent tools, defined as .mcp.json defines one.",entry:be,key:e=>e.name,check:e=>"cwd"in e&&e.cwd!==void 0&&!w(g(e.cwd))?[`the MCP server ${e.name}'s cwd is not a folder inside its package.`]:[]}),CORE_POINTS=[COMMANDS,KEYBINDING_POINT,MENU_POINT,VIEW_CONTAINER_POINT,VIEW_POINT,CONFIGURATION_POINT,WINDOW_TOOL_POINT,CLI_COMMANDS,KIND_POINT,EDITOR_POINT,PREVIEW_RENDERER_POINT,RULE_POINT,FACT_POINT,BUILD_PLUGINS_POINT,PROJECT_TOOL_POINT,STAGE_ROUTE_POINT,INSPECT_VIEW_POINT,EXPORT_PROCESSOR_POINT,MEDIA_ANALYSIS_POINT,RUNTIME_POINT,SKILL_POINT,MCP_SERVER_POINT];export function kindTable(e,t=(d,u)=>u,i=[],o=[],s=[],a=()=>{}){const d=c=>{const r=i.filter(l=>l.extension===c).map(l=>t(c,l.entry.module));return r.length>0?r:void 0},u=c=>{const r=o.filter(l=>l.extension===c).map(({entry:l})=>({name:l.name,source:l.source,does:l.does,module:t(c,l.module),extension:c}));return r.length>0?r:void 0},m=c=>{const r=s.filter(l=>l.extension===c).map(({entry:l})=>({folder:l.folder,loads:l.loads.filter(N=>D(R,N)),module:t(c,l.module),extension:c}));return r.length>0?r:void 0};return e.map(({extension:c,entry:r})=>({id:r.id,editor:r.editor,noun:r.noun,part:r.part,...r.pages===!0?{pages:!0}:{},name:r.name,plural:r.plural,icon:r.icon,color:r.color,exports:r.exports&&{types:r.exports.types,extras:r.exports.extras,options:r.exports.options.map(l=>({name:l.name,only:l.only,...l.values===void 0?{}:{values:l.values}})),...Object.keys(r.exports.names).length===0?{}:{names:r.exports.names}},renders:r.renders&&{types:r.renders.types,defaults:r.renders.defaults},starter:r.starter&&{files:{...r.starter.files},entry:r.starter.entry},share:r.share,build:r.build===void 0?void 0:t(c,r.build),buildPlugins:d(c),projectTools:u(c),stageRoutes:m(c),points:a(c),extension:c}))}export const inspectViewTable=(e,t)=>e.map(({extension:i,entry:o})=>({name:o.name,summary:o.summary,module:t(i,o.module),extension:i})),cliCommandTable=(e,t)=>e.map(({extension:i,entry:o})=>({name:o.name,summary:o.summary,...o.work===void 0?{}:{work:o.work},module:t(i,o.module),extension:i})),processorTable=(e,t)=>e.map(({extension:i,entry:o})=>({id:o.id,types:o.types,module:t(i,o.module),extension:i})),analysisTable=(e,t)=>e.map(({extension:i,entry:o})=>({id:o.id,about:o.about,what:o.what,media:o.media,runtimes:o.runtimes,module:t(i,o.module),extension:i})),skillTable=(e,t)=>e.map(({extension:i,entry:o})=>{const s=g(o.path);return{name:s.slice(s.lastIndexOf("/")+1),folder:t(i,s),extension:i}});const j=(e,t)=>e.replaceAll("${PLUGIN_ROOT}",t);export const mcpServerTable=(e,t,i)=>e.map(({extension:o,entry:s})=>{if("url"in s)return{name:s.name,url:s.url,headers:{...s.headers},extension:o};const a=t(o);return{name:s.name,command:j(s.command,a),args:s.args.map(d=>j(d,a)),env:Object.fromEntries(Object.entries(s.env).map(([d,u])=>[d,j(u,a)])),cwd:s.cwd===void 0?a:i(o,g(s.cwd)),extension:o}});
|
|
@@ -17,6 +17,12 @@ export interface FileEditorSpec {
|
|
|
17
17
|
readonly icon?: string | undefined;
|
|
18
18
|
/** Its colour, a token of the UI kit's. */
|
|
19
19
|
readonly color?: string | undefined;
|
|
20
|
+
/**
|
|
21
|
+
* Whether it opens the files its patterns match by default, or only when
|
|
22
|
+
* no default editor's do (VS Code's "Reopen With"): a text editor of any
|
|
23
|
+
* file opens a canvas only when asked; none is `default`.
|
|
24
|
+
*/
|
|
25
|
+
readonly priority?: "default" | "option" | undefined;
|
|
20
26
|
/**
|
|
21
27
|
* Its check module, where the check imports it from (its contribution's
|
|
22
28
|
* `check`, resolved against its extension's folder): its default export
|
|
@@ -37,10 +43,11 @@ export interface EditorFile {
|
|
|
37
43
|
* A glob pattern as a test of project paths, as VS Code's file patterns
|
|
38
44
|
* read: `*` is any run of characters but `/`, `?` one of them, `**` any
|
|
39
45
|
* run of folders (none among them), `{a,b}` either; a pattern with no `/`
|
|
40
|
-
* matches a file's name in any folder (`*.canvas` as `**\/*.canvas`)
|
|
46
|
+
* matches a file's name in any folder (`*.canvas` as `**\/*.canvas`);
|
|
47
|
+
* whatever the case of its letters.
|
|
41
48
|
*/
|
|
42
49
|
export declare function globTest(pattern: string): (path: string) => boolean;
|
|
43
|
-
/** The editor that opens a project path by its name, in a table: the first whose pattern matches. */
|
|
50
|
+
/** The editor that opens a project path by its name, in a table: the first whose pattern matches, an editor of its files by default before one that opens them only when asked. */
|
|
44
51
|
export declare function fileEditorIn(table: FileEditorTable, path: string): FileEditorSpec | undefined;
|
|
45
52
|
/**
|
|
46
53
|
* The files of a project the editors of `table` open by their names, in
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
|
|
2
|
-
import{unscanned as
|
|
2
|
+
import{unscanned as u}from"./layout.js";const l=/[.+^${}()|[\]\\]/gu;export function globTest(i){const e=i.includes("/")?i:`**/${i}`;let s="";for(let t=0;t<e.length;t++){const o=e.charAt(t);if(o==="*"&&e.charAt(t+1)==="*"){const n=e.charAt(t+2)==="/";s+=n?"(?:[^/]+/)*":".*",t+=n?2:1}else if(o==="*")s+="[^/]*";else if(o==="?")s+="[^/]";else if(o==="{"){const n=e.indexOf("}",t);n<0?s+="\\{":(s+=`(?:${e.slice(t+1,n).split(",").map(c=>c.replace(l,"\\$&").replaceAll("*","[^/]*")).join("|")})`,t=n)}else s+=o.replace(l,"\\$&")}const r=new RegExp(`^${s}$`,"iu");return t=>r.test(t)}const f=i=>i.priority==="option",p=i=>[...i.filter(e=>!f(e)),...i.filter(f)];export function fileEditorIn(i,e){return p(i).find(s=>s.files.some(r=>globTest(r)(e)))}export function scanFiles(i,e){if(e.length===0)return[];const s=p(e).map(t=>({id:t.id,tests:t.files.map(globTest)})),r=[];for(const t of[...i].filter(o=>!u(o)).sort()){const o=s.find(n=>n.tests.some(c=>c(t)));o&&r.push({path:t,editor:o.id})}return r}
|
|
@@ -56,4 +56,13 @@ export declare function mapOutline(outline: readonly (readonly NotePoint[])[], m
|
|
|
56
56
|
export declare function outlineBox(outline: readonly (readonly NotePoint[])[]): NoteBox;
|
|
57
57
|
/** Whether a point is inside an outline: inside one of its rings (the even-odd rule a ring). */
|
|
58
58
|
export declare function insideOutline(outline: readonly (readonly NotePoint[])[], p: NotePoint): boolean;
|
|
59
|
+
/**
|
|
60
|
+
* A mark as SVG path data, its points mapped (into the pixels of what it is
|
|
61
|
+
* on: a board, a picture), and whether it holds an area: a region a tool
|
|
62
|
+
* that takes a mask is handed (`NoteRegion`).
|
|
63
|
+
*/
|
|
64
|
+
export declare function shapePath(shape: NoteShape, map: (p: NotePoint) => NotePoint): {
|
|
65
|
+
path: string;
|
|
66
|
+
area: boolean;
|
|
67
|
+
};
|
|
59
68
|
//# sourceMappingURL=note-shape.d.ts.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
|
|
2
|
-
const O=6,P=.85,I=.25,S=40,k=12,
|
|
2
|
+
const O=6,P=.85,I=.25,S=40,k=12,f=(t,n,r)=>Math.min(r,Math.max(n,t));function a(t){const n=t.map(e=>e.x),r=t.map(e=>e.y),c=Math.min(...n),o=Math.min(...r);return{x:c,y:o,width:Math.max(...n)-c,height:Math.max(...r)-o}}function l(t){const[n]=t,r=t.at(-1);if(!n||!r)return!1;const{width:c,height:o}=a(t),e=Math.hypot(c,o);return e>0&&Math.hypot(r.x-n.x,r.y-n.y)<=e*.25}const m=(t,n)=>t.x<n.x+Math.max(n.width,1)&&t.x+Math.max(t.width,1)>n.x&&t.y<n.y+Math.max(n.height,1)&&t.y+Math.max(t.height,1)>n.y;function w(t,n){const r=t.width/2||1,c=t.height/2||1,o=t.x+r,e=t.y+c,i=(f(o,n.x,n.x+n.width)-o)/r,s=(f(e,n.y,n.y+n.height)-e)/c;return Math.hypot(i,s)<=.85}function $(t,n,r){const c=n.x-t.x,o=n.y-t.y;let e=0,i=1;for(const[s,u]of[[-c,t.x-r.x],[c,r.x+r.width-t.x],[-o,t.y-r.y],[o,r.y+r.height-t.y]]){if(s===0){if(u<0)return!1}else s<0?e=Math.max(e,u/s):i=Math.min(i,u/s);if(e>i)return!1}return!0}export function touches(t,n){switch(t.kind){case"box":return m(t.rect,n);case"round":return w(t.rect,n);case"arrow":return m({x:t.to.x-6,y:t.to.y-6,width:12,height:12},n);case"line":return l(t.points)?w(a(t.points),n):t.points.some((r,c)=>$(t.points[c-1]??r,r,n))}}function d(t,n){return n.flatMap(r=>n.map(c=>({x:t.x+t.width*c,y:t.y+t.height*r})))}function T(t){const n=t.map((o,e)=>{const i=t[e-1]??o;return Math.hypot(o.x-i.x,o.y-i.y)}),r=n.reduce((o,e)=>o+e,0),c=f(Math.ceil(r/40)+1,2,12);return Array.from({length:c},(o,e)=>{let i=r*e/(c-1);for(const[s,u]of t.entries()){const x=n[s]??0,h=t[s-1];if(h&&i<=x){const M=x===0?0:i/x;return{x:h.x+(u.x-h.x)*M,y:h.y+(u.y-h.y)*M}}i-=x}return t.at(-1)??{x:0,y:0}})}export function pointsOf(t){switch(t.kind){case"box":return d(t.rect,[.5,.2,.8]);case"round":return d(t.rect,[.5,.3,.7]);case"arrow":return[t.to];case"line":return l(t.points)?d(a(t.points),[.5,.3,.7]):T(t.points)}}export function mapShape(t,n){switch(t.kind){case"box":case"round":{const r=n(t.rect),c=n({x:t.rect.x+t.rect.width,y:t.rect.y+t.rect.height});return{kind:t.kind,rect:{...r,width:c.x-r.x,height:c.y-r.y}}}case"arrow":return{kind:"arrow",from:n(t.from),to:n(t.to)};case"line":return{kind:"line",points:t.points.map(n)}}}export function rectOutline(t){return[[{x:t.x,y:t.y},{x:t.x+t.width,y:t.y},{x:t.x+t.width,y:t.y+t.height},{x:t.x,y:t.y+t.height}]]}export function turnedOutline(t,n){if(n%360===0)return rectOutline(t);const r=n*Math.PI/180,c=Math.cos(r),o=Math.sin(r),e=t.x+t.width/2,i=t.y+t.height/2;return rectOutline(t).map(s=>s.map(u=>({x:e+(u.x-e)*c-(u.y-i)*o,y:i+(u.x-e)*o+(u.y-i)*c})))}const g=48;export function roundOutline(t){const n=t.width/2,r=t.height/2;return[Array.from({length:g},(c,o)=>{const e=2*Math.PI*o/g;return{x:t.x+n+n*Math.cos(e),y:t.y+r+r*Math.sin(e)}})]}export function mapOutline(t,n){return t.map(r=>r.map(n))}export function outlineBox(t){return a(t.flat())}export function insideOutline(t,n){return t.some(r=>{let c=!1;for(let o=0,e=r.length-1;o<r.length;e=o++){const i=r[o],s=r[e];!i||!s||i.y>n.y!=s.y>n.y&&n.x<(s.x-i.x)*(n.y-i.y)/(s.y-i.y)+i.x&&(c=!c)}return c})}const y=t=>String(Math.round(t*10)/10);export function shapePath(t,n){switch(t.kind){case"box":{const r=n({x:t.rect.x,y:t.rect.y}),c=n({x:t.rect.x+t.rect.width,y:t.rect.y+t.rect.height});return{path:`M ${y(r.x)} ${y(r.y)} H ${y(c.x)} V ${y(c.y)} H ${y(r.x)} Z`,area:!0}}case"round":{const r=n({x:t.rect.x,y:t.rect.y}),c=n({x:t.rect.x+t.rect.width,y:t.rect.y+t.rect.height}),o=Math.abs(c.x-r.x)/2,e=Math.abs(c.y-r.y)/2,i=(r.y+c.y)/2,s=Math.min(r.x,c.x);return{path:`M ${y(s)} ${y(i)} A ${y(o)} ${y(e)} 0 1 0 ${y(s+2*o)} ${y(i)} A ${y(o)} ${y(e)} 0 1 0 ${y(s)} ${y(i)} Z`,area:!0}}case"arrow":{const r=n(t.from),c=n(t.to);return{path:`M ${y(r.x)} ${y(r.y)} L ${y(c.x)} ${y(c.y)}`,area:!1}}case"line":{const r=t.points.map(n),c=r.length>2&&l(r);return{path:r.map((o,e)=>`${e===0?"M":"L"} ${y(o.x)} ${y(o.y)}`).join(" ")+(c?" Z":""),area:c}}}}
|