@mountaya/elements 0.0.0-stage → 0.1.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 +235 -0
- package/LICENCE.fr.txt +280 -0
- package/LICENSE.txt +262 -0
- package/README.md +1509 -2
- package/THIRD-PARTY-NOTICES.txt +103 -0
- package/dist/accentColor-GNKBD2CW.js +4 -0
- package/dist/accentColor-GNKBD2CW.js.map +1 -0
- package/dist/accentColor-VX2JSMGE.cjs +17 -0
- package/dist/accentColor-VX2JSMGE.cjs.map +1 -0
- package/dist/agent/index.cjs +1964 -0
- package/dist/agent/index.cjs.map +1 -0
- package/dist/agent/index.d.cts +2016 -0
- package/dist/agent/index.d.ts +2016 -0
- package/dist/agent/index.js +1937 -0
- package/dist/agent/index.js.map +1 -0
- package/dist/amenities-B3-qAjxu.d.cts +160 -0
- package/dist/amenities-B3-qAjxu.d.ts +160 -0
- package/dist/bundle-Je5zsRFg.d.cts +222 -0
- package/dist/bundle-xYrrbJTH.d.ts +222 -0
- package/dist/camera/index.cjs +3477 -0
- package/dist/camera/index.cjs.map +1 -0
- package/dist/camera/index.d.cts +1751 -0
- package/dist/camera/index.d.ts +1751 -0
- package/dist/camera/index.js +3328 -0
- package/dist/camera/index.js.map +1 -0
- package/dist/camera-BrFLU1DH.d.cts +549 -0
- package/dist/camera-C48Ykaxv.d.ts +549 -0
- package/dist/chunk-23PFRRB6.js +3 -0
- package/dist/chunk-23PFRRB6.js.map +1 -0
- package/dist/chunk-2GI5SAH2.js +71 -0
- package/dist/chunk-2GI5SAH2.js.map +1 -0
- package/dist/chunk-2MQK6A74.js +39 -0
- package/dist/chunk-2MQK6A74.js.map +1 -0
- package/dist/chunk-2RE7R4LD.js +73 -0
- package/dist/chunk-2RE7R4LD.js.map +1 -0
- package/dist/chunk-3JZQKN4O.js +6 -0
- package/dist/chunk-3JZQKN4O.js.map +1 -0
- package/dist/chunk-3NDXVUUI.js +50 -0
- package/dist/chunk-3NDXVUUI.js.map +1 -0
- package/dist/chunk-3R4GFTUM.cjs +59 -0
- package/dist/chunk-3R4GFTUM.cjs.map +1 -0
- package/dist/chunk-3RVUQ6JN.cjs +22 -0
- package/dist/chunk-3RVUQ6JN.cjs.map +1 -0
- package/dist/chunk-4F6BJMJC.cjs +49 -0
- package/dist/chunk-4F6BJMJC.cjs.map +1 -0
- package/dist/chunk-4NWQD4BX.js +132 -0
- package/dist/chunk-4NWQD4BX.js.map +1 -0
- package/dist/chunk-5K2MH3R6.js +10 -0
- package/dist/chunk-5K2MH3R6.js.map +1 -0
- package/dist/chunk-6ACRNQQQ.cjs +8 -0
- package/dist/chunk-6ACRNQQQ.cjs.map +1 -0
- package/dist/chunk-6D26E3IA.js +66 -0
- package/dist/chunk-6D26E3IA.js.map +1 -0
- package/dist/chunk-6ESAW35P.cjs +80 -0
- package/dist/chunk-6ESAW35P.cjs.map +1 -0
- package/dist/chunk-6LIW2A5M.cjs +1176 -0
- package/dist/chunk-6LIW2A5M.cjs.map +1 -0
- package/dist/chunk-6OTTWVCA.js +57 -0
- package/dist/chunk-6OTTWVCA.js.map +1 -0
- package/dist/chunk-6VROJ4UG.js +862 -0
- package/dist/chunk-6VROJ4UG.js.map +1 -0
- package/dist/chunk-6Y7FTGO4.js +23 -0
- package/dist/chunk-6Y7FTGO4.js.map +1 -0
- package/dist/chunk-75I4CG64.js +104 -0
- package/dist/chunk-75I4CG64.js.map +1 -0
- package/dist/chunk-7CUBXHAH.cjs +14 -0
- package/dist/chunk-7CUBXHAH.cjs.map +1 -0
- package/dist/chunk-7GTCURVY.js +52 -0
- package/dist/chunk-7GTCURVY.js.map +1 -0
- package/dist/chunk-7IWOL6AM.cjs +100 -0
- package/dist/chunk-7IWOL6AM.cjs.map +1 -0
- package/dist/chunk-7QN7M667.cjs +151 -0
- package/dist/chunk-7QN7M667.cjs.map +1 -0
- package/dist/chunk-A6KQDKLM.cjs +1197 -0
- package/dist/chunk-A6KQDKLM.cjs.map +1 -0
- package/dist/chunk-A77EA67G.js +354 -0
- package/dist/chunk-A77EA67G.js.map +1 -0
- package/dist/chunk-AFKOABJ4.cjs +7194 -0
- package/dist/chunk-AFKOABJ4.cjs.map +1 -0
- package/dist/chunk-AG6JV5Z2.cjs +183 -0
- package/dist/chunk-AG6JV5Z2.cjs.map +1 -0
- package/dist/chunk-APBK7NMS.js +30 -0
- package/dist/chunk-APBK7NMS.js.map +1 -0
- package/dist/chunk-AWO5YA7A.cjs +33 -0
- package/dist/chunk-AWO5YA7A.cjs.map +1 -0
- package/dist/chunk-AZATU6QW.js +108 -0
- package/dist/chunk-AZATU6QW.js.map +1 -0
- package/dist/chunk-BD2U3WST.cjs +623 -0
- package/dist/chunk-BD2U3WST.cjs.map +1 -0
- package/dist/chunk-BHBEOU6L.cjs +65 -0
- package/dist/chunk-BHBEOU6L.cjs.map +1 -0
- package/dist/chunk-CNOSNYNE.js +8 -0
- package/dist/chunk-CNOSNYNE.js.map +1 -0
- package/dist/chunk-CW3EFR4O.js +12 -0
- package/dist/chunk-CW3EFR4O.js.map +1 -0
- package/dist/chunk-DASVRNBK.js +7187 -0
- package/dist/chunk-DASVRNBK.js.map +1 -0
- package/dist/chunk-DJ6LCKYP.js +42 -0
- package/dist/chunk-DJ6LCKYP.js.map +1 -0
- package/dist/chunk-E5FHQAIO.cjs +45 -0
- package/dist/chunk-E5FHQAIO.cjs.map +1 -0
- package/dist/chunk-EOML5OTY.cjs +360 -0
- package/dist/chunk-EOML5OTY.cjs.map +1 -0
- package/dist/chunk-EP5CASHL.js +613 -0
- package/dist/chunk-EP5CASHL.js.map +1 -0
- package/dist/chunk-EP5OEEVZ.cjs +14 -0
- package/dist/chunk-EP5OEEVZ.cjs.map +1 -0
- package/dist/chunk-EUXI3FGQ.js +150 -0
- package/dist/chunk-EUXI3FGQ.js.map +1 -0
- package/dist/chunk-EWFSHCOS.js +40 -0
- package/dist/chunk-EWFSHCOS.js.map +1 -0
- package/dist/chunk-EX2C5K2T.cjs +25 -0
- package/dist/chunk-EX2C5K2T.cjs.map +1 -0
- package/dist/chunk-FEXWDQIZ.cjs +8 -0
- package/dist/chunk-FEXWDQIZ.cjs.map +1 -0
- package/dist/chunk-FEYBFY7H.cjs +358 -0
- package/dist/chunk-FEYBFY7H.cjs.map +1 -0
- package/dist/chunk-FRGAV6N6.cjs +34 -0
- package/dist/chunk-FRGAV6N6.cjs.map +1 -0
- package/dist/chunk-G5DHP5VF.js +6 -0
- package/dist/chunk-G5DHP5VF.js.map +1 -0
- package/dist/chunk-G5W2UHV2.js +99 -0
- package/dist/chunk-G5W2UHV2.js.map +1 -0
- package/dist/chunk-G7OP7O2C.cjs +39 -0
- package/dist/chunk-G7OP7O2C.cjs.map +1 -0
- package/dist/chunk-GE6CFCAM.cjs +25 -0
- package/dist/chunk-GE6CFCAM.cjs.map +1 -0
- package/dist/chunk-GIFALLHI.cjs +111 -0
- package/dist/chunk-GIFALLHI.cjs.map +1 -0
- package/dist/chunk-GLFET5GM.js +129 -0
- package/dist/chunk-GLFET5GM.js.map +1 -0
- package/dist/chunk-GQ6UFPFM.js +22 -0
- package/dist/chunk-GQ6UFPFM.js.map +1 -0
- package/dist/chunk-GQJWVMXS.js +129 -0
- package/dist/chunk-GQJWVMXS.js.map +1 -0
- package/dist/chunk-GVVJPUKC.js +80 -0
- package/dist/chunk-GVVJPUKC.js.map +1 -0
- package/dist/chunk-GZ2HOCQ2.cjs +134 -0
- package/dist/chunk-GZ2HOCQ2.cjs.map +1 -0
- package/dist/chunk-HCBOHXWP.js +37 -0
- package/dist/chunk-HCBOHXWP.js.map +1 -0
- package/dist/chunk-IBQJDVHF.cjs +281 -0
- package/dist/chunk-IBQJDVHF.cjs.map +1 -0
- package/dist/chunk-ISLB6Y5Q.cjs +106 -0
- package/dist/chunk-ISLB6Y5Q.cjs.map +1 -0
- package/dist/chunk-J55CRR4F.js +105 -0
- package/dist/chunk-J55CRR4F.js.map +1 -0
- package/dist/chunk-JBG6Z6MQ.cjs +28 -0
- package/dist/chunk-JBG6Z6MQ.cjs.map +1 -0
- package/dist/chunk-K3RQOZRU.js +61 -0
- package/dist/chunk-K3RQOZRU.js.map +1 -0
- package/dist/chunk-KDJYS4GB.cjs +703 -0
- package/dist/chunk-KDJYS4GB.cjs.map +1 -0
- package/dist/chunk-KMCAHUZM.cjs +4 -0
- package/dist/chunk-KMCAHUZM.cjs.map +1 -0
- package/dist/chunk-KUCBNPC6.js +87 -0
- package/dist/chunk-KUCBNPC6.js.map +1 -0
- package/dist/chunk-KV6UE5A4.js +50 -0
- package/dist/chunk-KV6UE5A4.js.map +1 -0
- package/dist/chunk-L6TZ2HQR.cjs +18 -0
- package/dist/chunk-L6TZ2HQR.cjs.map +1 -0
- package/dist/chunk-L7QHHGG2.cjs +141 -0
- package/dist/chunk-L7QHHGG2.cjs.map +1 -0
- package/dist/chunk-LHK3Y2AL.js +271 -0
- package/dist/chunk-LHK3Y2AL.js.map +1 -0
- package/dist/chunk-LO5RYRBH.cjs +6317 -0
- package/dist/chunk-LO5RYRBH.cjs.map +1 -0
- package/dist/chunk-LS5SJMUO.cjs +194 -0
- package/dist/chunk-LS5SJMUO.cjs.map +1 -0
- package/dist/chunk-LUGTMZFN.cjs +42 -0
- package/dist/chunk-LUGTMZFN.cjs.map +1 -0
- package/dist/chunk-LVUQU6D5.js +32 -0
- package/dist/chunk-LVUQU6D5.js.map +1 -0
- package/dist/chunk-M2QRC2GZ.js +166 -0
- package/dist/chunk-M2QRC2GZ.js.map +1 -0
- package/dist/chunk-M6QJYQIM.cjs +53 -0
- package/dist/chunk-M6QJYQIM.cjs.map +1 -0
- package/dist/chunk-MGCPH5EO.js +12 -0
- package/dist/chunk-MGCPH5EO.js.map +1 -0
- package/dist/chunk-MLVUWEZR.cjs +474 -0
- package/dist/chunk-MLVUWEZR.cjs.map +1 -0
- package/dist/chunk-MTAMJMZL.cjs +707 -0
- package/dist/chunk-MTAMJMZL.cjs.map +1 -0
- package/dist/chunk-MXL5AT3N.js +48 -0
- package/dist/chunk-MXL5AT3N.js.map +1 -0
- package/dist/chunk-MYEQSESM.cjs +75 -0
- package/dist/chunk-MYEQSESM.cjs.map +1 -0
- package/dist/chunk-N3VPF6ZD.js +427 -0
- package/dist/chunk-N3VPF6ZD.js.map +1 -0
- package/dist/chunk-N6VUAIGI.js +7 -0
- package/dist/chunk-N6VUAIGI.js.map +1 -0
- package/dist/chunk-N6XRLUN6.js +6286 -0
- package/dist/chunk-N6XRLUN6.js.map +1 -0
- package/dist/chunk-NOGDOZIT.cjs +114 -0
- package/dist/chunk-NOGDOZIT.cjs.map +1 -0
- package/dist/chunk-NUWXEISH.cjs +10 -0
- package/dist/chunk-NUWXEISH.cjs.map +1 -0
- package/dist/chunk-NZCZHXYN.cjs +161 -0
- package/dist/chunk-NZCZHXYN.cjs.map +1 -0
- package/dist/chunk-ODROSWQX.cjs +53 -0
- package/dist/chunk-ODROSWQX.cjs.map +1 -0
- package/dist/chunk-OE36AYKG.cjs +82 -0
- package/dist/chunk-OE36AYKG.cjs.map +1 -0
- package/dist/chunk-OLON7MO6.cjs +437 -0
- package/dist/chunk-OLON7MO6.cjs.map +1 -0
- package/dist/chunk-PBUOR2IT.js +277 -0
- package/dist/chunk-PBUOR2IT.js.map +1 -0
- package/dist/chunk-PC2ELXFF.cjs +225 -0
- package/dist/chunk-PC2ELXFF.cjs.map +1 -0
- package/dist/chunk-PCSGXLOC.js +71 -0
- package/dist/chunk-PCSGXLOC.js.map +1 -0
- package/dist/chunk-PFNMP6FQ.js +56 -0
- package/dist/chunk-PFNMP6FQ.js.map +1 -0
- package/dist/chunk-PIWSZTIP.js +690 -0
- package/dist/chunk-PIWSZTIP.js.map +1 -0
- package/dist/chunk-PKWHJ2GI.js +136 -0
- package/dist/chunk-PKWHJ2GI.js.map +1 -0
- package/dist/chunk-PLMVBX2A.cjs +76 -0
- package/dist/chunk-PLMVBX2A.cjs.map +1 -0
- package/dist/chunk-PM3XCD2G.cjs +113 -0
- package/dist/chunk-PM3XCD2G.cjs.map +1 -0
- package/dist/chunk-QAL4GZO7.cjs +143 -0
- package/dist/chunk-QAL4GZO7.cjs.map +1 -0
- package/dist/chunk-QDB2SEA2.js +74 -0
- package/dist/chunk-QDB2SEA2.js.map +1 -0
- package/dist/chunk-QOV7UNUN.js +25 -0
- package/dist/chunk-QOV7UNUN.js.map +1 -0
- package/dist/chunk-QQUWYLSF.cjs +50 -0
- package/dist/chunk-QQUWYLSF.cjs.map +1 -0
- package/dist/chunk-QUMBH3U4.cjs +9 -0
- package/dist/chunk-QUMBH3U4.cjs.map +1 -0
- package/dist/chunk-R4KA7OFQ.js +12 -0
- package/dist/chunk-R4KA7OFQ.js.map +1 -0
- package/dist/chunk-RBSGAZQQ.js +17 -0
- package/dist/chunk-RBSGAZQQ.js.map +1 -0
- package/dist/chunk-RM5YJWZI.js +46 -0
- package/dist/chunk-RM5YJWZI.js.map +1 -0
- package/dist/chunk-ROKNKXA4.cjs +8 -0
- package/dist/chunk-ROKNKXA4.cjs.map +1 -0
- package/dist/chunk-RQG6D546.cjs +75 -0
- package/dist/chunk-RQG6D546.cjs.map +1 -0
- package/dist/chunk-SG4YDD5L.cjs +74 -0
- package/dist/chunk-SG4YDD5L.cjs.map +1 -0
- package/dist/chunk-SNRCA7EO.js +56 -0
- package/dist/chunk-SNRCA7EO.js.map +1 -0
- package/dist/chunk-SO75R4WW.cjs +22 -0
- package/dist/chunk-SO75R4WW.cjs.map +1 -0
- package/dist/chunk-SP34NHFI.js +45 -0
- package/dist/chunk-SP34NHFI.js.map +1 -0
- package/dist/chunk-SSKSSBWJ.cjs +179 -0
- package/dist/chunk-SSKSSBWJ.cjs.map +1 -0
- package/dist/chunk-TB5663C2.js +1108 -0
- package/dist/chunk-TB5663C2.js.map +1 -0
- package/dist/chunk-TGH4NRES.js +220 -0
- package/dist/chunk-TGH4NRES.js.map +1 -0
- package/dist/chunk-TJ6ZPNID.js +189 -0
- package/dist/chunk-TJ6ZPNID.js.map +1 -0
- package/dist/chunk-U45T35N2.cjs +90 -0
- package/dist/chunk-U45T35N2.cjs.map +1 -0
- package/dist/chunk-UKVOPEZ2.js +442 -0
- package/dist/chunk-UKVOPEZ2.js.map +1 -0
- package/dist/chunk-UTB4NROA.cjs +887 -0
- package/dist/chunk-UTB4NROA.cjs.map +1 -0
- package/dist/chunk-UTW33B5V.js +6 -0
- package/dist/chunk-UTW33B5V.js.map +1 -0
- package/dist/chunk-UYUBSD2V.cjs +33 -0
- package/dist/chunk-UYUBSD2V.cjs.map +1 -0
- package/dist/chunk-V3JEP5AG.cjs +59 -0
- package/dist/chunk-V3JEP5AG.cjs.map +1 -0
- package/dist/chunk-VFAGJXHR.js +18 -0
- package/dist/chunk-VFAGJXHR.js.map +1 -0
- package/dist/chunk-VMEE57E5.cjs +58 -0
- package/dist/chunk-VMEE57E5.cjs.map +1 -0
- package/dist/chunk-VQVBEX3Y.cjs +113 -0
- package/dist/chunk-VQVBEX3Y.cjs.map +1 -0
- package/dist/chunk-VZDXX7TT.cjs +64 -0
- package/dist/chunk-VZDXX7TT.cjs.map +1 -0
- package/dist/chunk-WE5ZTI4D.js +346 -0
- package/dist/chunk-WE5ZTI4D.js.map +1 -0
- package/dist/chunk-WEFUVABP.js +19 -0
- package/dist/chunk-WEFUVABP.js.map +1 -0
- package/dist/chunk-WMU4LRKC.js +28 -0
- package/dist/chunk-WMU4LRKC.js.map +1 -0
- package/dist/chunk-WQ24RRHL.cjs +354 -0
- package/dist/chunk-WQ24RRHL.cjs.map +1 -0
- package/dist/chunk-WW4CGS7G.cjs +26 -0
- package/dist/chunk-WW4CGS7G.cjs.map +1 -0
- package/dist/chunk-WXE5WCTM.js +1144 -0
- package/dist/chunk-WXE5WCTM.js.map +1 -0
- package/dist/chunk-X23BGIYA.cjs +37 -0
- package/dist/chunk-X23BGIYA.cjs.map +1 -0
- package/dist/chunk-XEW4FTR2.js +98 -0
- package/dist/chunk-XEW4FTR2.js.map +1 -0
- package/dist/chunk-XIOI4IYW.js +167 -0
- package/dist/chunk-XIOI4IYW.js.map +1 -0
- package/dist/chunk-XLVPJ37V.cjs +44 -0
- package/dist/chunk-XLVPJ37V.cjs.map +1 -0
- package/dist/chunk-XOHAXXZA.cjs +51 -0
- package/dist/chunk-XOHAXXZA.cjs.map +1 -0
- package/dist/chunk-Y4NRIHK6.cjs +313 -0
- package/dist/chunk-Y4NRIHK6.cjs.map +1 -0
- package/dist/chunk-Y4YMMKL3.js +23 -0
- package/dist/chunk-Y4YMMKL3.js.map +1 -0
- package/dist/chunk-YJNYBVE3.cjs +14 -0
- package/dist/chunk-YJNYBVE3.cjs.map +1 -0
- package/dist/chunk-Z762QNQP.cjs +60 -0
- package/dist/chunk-Z762QNQP.cjs.map +1 -0
- package/dist/chunk-ZG5KMBOF.js +669 -0
- package/dist/chunk-ZG5KMBOF.js.map +1 -0
- package/dist/chunk-ZKONQEFA.js +344 -0
- package/dist/chunk-ZKONQEFA.js.map +1 -0
- package/dist/chunk-ZR5X7QMH.js +39 -0
- package/dist/chunk-ZR5X7QMH.js.map +1 -0
- package/dist/chunk-ZW4BJQ26.js +84 -0
- package/dist/chunk-ZW4BJQ26.js.map +1 -0
- package/dist/climbs-BhlWuu0x.d.ts +70 -0
- package/dist/climbs-DgBFwySV.d.cts +70 -0
- package/dist/collab/index.cjs +1283 -0
- package/dist/collab/index.cjs.map +1 -0
- package/dist/collab/index.d.cts +850 -0
- package/dist/collab/index.d.ts +850 -0
- package/dist/collab/index.js +1274 -0
- package/dist/collab/index.js.map +1 -0
- package/dist/data/index.cjs +132 -0
- package/dist/data/index.cjs.map +1 -0
- package/dist/data/index.d.cts +468 -0
- package/dist/data/index.d.ts +468 -0
- package/dist/data/index.js +15 -0
- package/dist/data/index.js.map +1 -0
- package/dist/editor/index.cjs +4506 -0
- package/dist/editor/index.cjs.map +1 -0
- package/dist/editor/index.d.cts +59 -0
- package/dist/editor/index.d.ts +59 -0
- package/dist/editor/index.js +4486 -0
- package/dist/editor/index.js.map +1 -0
- package/dist/elevationTiles-pmsb9wnU.d.cts +77 -0
- package/dist/elevationTiles-pmsb9wnU.d.ts +77 -0
- package/dist/errors/index.cjs +28 -0
- package/dist/errors/index.cjs.map +1 -0
- package/dist/errors/index.d.cts +125 -0
- package/dist/errors/index.d.ts +125 -0
- package/dist/errors/index.js +3 -0
- package/dist/errors/index.js.map +1 -0
- package/dist/geo/index.cjs +232 -0
- package/dist/geo/index.cjs.map +1 -0
- package/dist/geo/index.d.cts +821 -0
- package/dist/geo/index.d.ts +821 -0
- package/dist/geo/index.js +15 -0
- package/dist/geo/index.js.map +1 -0
- package/dist/geodesy-543qXKtI.d.cts +78 -0
- package/dist/geodesy-543qXKtI.d.ts +78 -0
- package/dist/geolocation-DDkQdWMN.d.cts +106 -0
- package/dist/geolocation-DDkQdWMN.d.ts +106 -0
- package/dist/i18n/fr/index.cjs +338 -0
- package/dist/i18n/fr/index.cjs.map +1 -0
- package/dist/i18n/fr/index.d.cts +25 -0
- package/dist/i18n/fr/index.d.ts +25 -0
- package/dist/i18n/fr/index.js +336 -0
- package/dist/i18n/fr/index.js.map +1 -0
- package/dist/i18n/index.cjs +464 -0
- package/dist/i18n/index.cjs.map +1 -0
- package/dist/i18n/index.d.cts +227 -0
- package/dist/i18n/index.d.ts +227 -0
- package/dist/i18n/index.js +430 -0
- package/dist/i18n/index.js.map +1 -0
- package/dist/icons/index.cjs +116 -0
- package/dist/icons/index.cjs.map +1 -0
- package/dist/icons/index.d.cts +457 -0
- package/dist/icons/index.d.ts +457 -0
- package/dist/icons/index.js +11 -0
- package/dist/icons/index.js.map +1 -0
- package/dist/index.cjs +1869 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +251 -0
- package/dist/index.d.ts +251 -0
- package/dist/index.js +67 -0
- package/dist/index.js.map +1 -0
- package/dist/itinerary-Dp2ZnqgD.d.cts +178 -0
- package/dist/itinerary-Dp2ZnqgD.d.ts +178 -0
- package/dist/language-CEWQ5uYw.d.cts +69 -0
- package/dist/language-CEWQ5uYw.d.ts +69 -0
- package/dist/layers/index.cjs +318 -0
- package/dist/layers/index.cjs.map +1 -0
- package/dist/layers/index.d.cts +1555 -0
- package/dist/layers/index.d.ts +1555 -0
- package/dist/layers/index.js +17 -0
- package/dist/layers/index.js.map +1 -0
- package/dist/map-client/index.cjs +4 -0
- package/dist/map-client/index.cjs.map +1 -0
- package/dist/map-client/index.d.cts +1856 -0
- package/dist/map-client/index.d.ts +1856 -0
- package/dist/map-client/index.js +3 -0
- package/dist/map-client/index.js.map +1 -0
- package/dist/maplibre-worker.mjs +12 -0
- package/dist/markerSprite-DGBQF6PO.cjs +49 -0
- package/dist/markerSprite-DGBQF6PO.cjs.map +1 -0
- package/dist/markerSprite-DZLTR6F6.js +8 -0
- package/dist/markerSprite-DZLTR6F6.js.map +1 -0
- package/dist/mountayaMap-C9mxRFib.d.cts +3277 -0
- package/dist/mountayaMap-DgnlQ2fE.d.ts +3277 -0
- package/dist/navigation/index.cjs +699 -0
- package/dist/navigation/index.cjs.map +1 -0
- package/dist/navigation/index.d.cts +632 -0
- package/dist/navigation/index.d.ts +632 -0
- package/dist/navigation/index.js +689 -0
- package/dist/navigation/index.js.map +1 -0
- package/dist/order-BLhsGsH8.d.ts +132 -0
- package/dist/order-BZkUwMou.d.cts +132 -0
- package/dist/paint-BgUcj8l7.d.cts +118 -0
- package/dist/paint-Dx_qGNE_.d.ts +118 -0
- package/dist/profile/index.cjs +675 -0
- package/dist/profile/index.cjs.map +1 -0
- package/dist/profile/index.d.cts +2086 -0
- package/dist/profile/index.d.ts +2086 -0
- package/dist/profile/index.js +18 -0
- package/dist/profile/index.js.map +1 -0
- package/dist/provider-DM71XnLX.d.cts +121 -0
- package/dist/provider-DM71XnLX.d.ts +121 -0
- package/dist/roadAccess-D_rOE4xW.d.cts +86 -0
- package/dist/roadAccess-D_rOE4xW.d.ts +86 -0
- package/dist/routeProfile-BKfSfxx6.d.ts +210 -0
- package/dist/routeProfile-BsSUABXv.d.cts +210 -0
- package/dist/seams/index.cjs +39 -0
- package/dist/seams/index.cjs.map +1 -0
- package/dist/seams/index.d.cts +254 -0
- package/dist/seams/index.d.ts +254 -0
- package/dist/seams/index.js +6 -0
- package/dist/seams/index.js.map +1 -0
- package/dist/search/index.cjs +147 -0
- package/dist/search/index.cjs.map +1 -0
- package/dist/search/index.d.cts +888 -0
- package/dist/search/index.d.ts +888 -0
- package/dist/search/index.js +14 -0
- package/dist/search/index.js.map +1 -0
- package/dist/searchHighlight-DFE7LVIL.cjs +33 -0
- package/dist/searchHighlight-DFE7LVIL.cjs.map +1 -0
- package/dist/searchHighlight-MHAQZVWG.js +12 -0
- package/dist/searchHighlight-MHAQZVWG.js.map +1 -0
- package/dist/searchLimits-j99-NTXR.d.cts +24 -0
- package/dist/searchLimits-j99-NTXR.d.ts +24 -0
- package/dist/sections-CVlc2Inr.d.cts +953 -0
- package/dist/sections-CmtaduLc.d.ts +953 -0
- package/dist/segmentRoute-C5UL_5bp.d.ts +172 -0
- package/dist/segmentRoute-CIo6dR8Y.d.cts +172 -0
- package/dist/strings-30RSdIat.d.cts +552 -0
- package/dist/strings-DPTIbzT5.d.ts +552 -0
- package/dist/stripeImage-CQUXM2YI.js +14 -0
- package/dist/stripeImage-CQUXM2YI.js.map +1 -0
- package/dist/stripeImage-R43OPA6U.cjs +39 -0
- package/dist/stripeImage-R43OPA6U.cjs.map +1 -0
- package/dist/style/index.cjs +116 -0
- package/dist/style/index.cjs.map +1 -0
- package/dist/style/index.d.cts +538 -0
- package/dist/style/index.d.ts +538 -0
- package/dist/style/index.js +11 -0
- package/dist/style/index.js.map +1 -0
- package/dist/styles.css +11 -0
- package/dist/testing/index.cjs +629 -0
- package/dist/testing/index.cjs.map +1 -0
- package/dist/testing/index.d.cts +265 -0
- package/dist/testing/index.d.ts +265 -0
- package/dist/testing/index.js +623 -0
- package/dist/testing/index.js.map +1 -0
- package/dist/timezone/index.cjs +759 -0
- package/dist/timezone/index.cjs.map +1 -0
- package/dist/timezone/index.d.cts +53 -0
- package/dist/timezone/index.d.ts +53 -0
- package/dist/timezone/index.js +757 -0
- package/dist/timezone/index.js.map +1 -0
- package/dist/types-B034JMjl.d.ts +973 -0
- package/dist/types-B2NDLxQA.d.cts +21 -0
- package/dist/types-B2NDLxQA.d.ts +21 -0
- package/dist/types-BEv8V_8V.d.cts +55 -0
- package/dist/types-BEv8V_8V.d.ts +55 -0
- package/dist/types-C8aX5KMU.d.cts +973 -0
- package/dist/types-CTQwbSdA.d.cts +321 -0
- package/dist/types-nO2joeRk.d.ts +321 -0
- package/dist/units/index.cjs +99 -0
- package/dist/units/index.cjs.map +1 -0
- package/dist/units/index.d.cts +75 -0
- package/dist/units/index.d.ts +75 -0
- package/dist/units/index.js +6 -0
- package/dist/units/index.js.map +1 -0
- package/dist/units-D9mBrusY.d.cts +900 -0
- package/dist/units-D9mBrusY.d.ts +900 -0
- package/dist/video/index.cjs +2198 -0
- package/dist/video/index.cjs.map +1 -0
- package/dist/video/index.d.cts +873 -0
- package/dist/video/index.d.ts +873 -0
- package/dist/video/index.js +2173 -0
- package/dist/video/index.js.map +1 -0
- package/dist/videoOverlay-Dh_D5_Zs.d.cts +44 -0
- package/dist/videoOverlay-Dh_D5_Zs.d.ts +44 -0
- package/dist/view/index.cjs +43 -0
- package/dist/view/index.cjs.map +1 -0
- package/dist/view/index.d.cts +836 -0
- package/dist/view/index.d.ts +836 -0
- package/dist/view/index.js +34 -0
- package/dist/view/index.js.map +1 -0
- package/dist/zones-B05QA8fy.d.cts +75 -0
- package/dist/zones-B05QA8fy.d.ts +75 -0
- package/package.json +433 -4
- package/src/agent/engines/session.ts +2255 -0
- package/src/agent/index.ts +109 -0
- package/src/agent/rules/agentError.ts +128 -0
- package/src/agent/rules/boundedInputJson.ts +53 -0
- package/src/agent/rules/conversation.ts +629 -0
- package/src/agent/rules/conversationFaults.ts +349 -0
- package/src/agent/rules/conversationHost.ts +390 -0
- package/src/agent/rules/dispatcher.ts +102 -0
- package/src/agent/rules/errorCodes.ts +78 -0
- package/src/agent/rules/errorStatus.ts +65 -0
- package/src/agent/rules/scriptedTransport.ts +390 -0
- package/src/agent/rules/stickToBottom.ts +38 -0
- package/src/agent/rules/toolResultPayload.ts +197 -0
- package/src/auth/rules/clientHeader.ts +22 -0
- package/src/auth/rules/sentCredential.ts +76 -0
- package/src/auth/rules/transformRequest.ts +803 -0
- package/src/camera/engines/videoFlight.ts +1758 -0
- package/src/camera/index.ts +157 -0
- package/src/camera/rules/clearance.ts +1099 -0
- package/src/camera/rules/fit.ts +132 -0
- package/src/camera/rules/modes.ts +1023 -0
- package/src/camera/rules/plan.ts +478 -0
- package/src/camera/rules/planner.ts +129 -0
- package/src/camera/rules/poseRanges.ts +38 -0
- package/src/camera/rules/presets.ts +185 -0
- package/src/camera/rules/profileSamples.ts +243 -0
- package/src/camera/rules/route.ts +596 -0
- package/src/camera/rules/routeContent.ts +104 -0
- package/src/camera/rules/spline.ts +765 -0
- package/src/camera/rules/sweptViewports.ts +39 -0
- package/src/camera/rules/track.ts +1412 -0
- package/src/camera/rules/vocabulary.ts +130 -0
- package/src/camera/rules/zoom.ts +216 -0
- package/src/collab/engines/session.ts +1902 -0
- package/src/collab/engines/trailingThrottle.ts +151 -0
- package/src/collab/index.ts +56 -0
- package/src/collab/rules/dispatch.ts +143 -0
- package/src/collab/rules/peerNames.ts +51 -0
- package/src/collab/rules/scriptedTransport.ts +244 -0
- package/src/compose/engines/baseMapSwitch.ts +1136 -0
- package/src/compose/engines/events.ts +962 -0
- package/src/compose/engines/mountayaMap.ts +5674 -0
- package/src/compose/engines/sentCredentials.ts +146 -0
- package/src/compose/engines/slotRequests.ts +413 -0
- package/src/compose/rules/accessRefusal.ts +109 -0
- package/src/compose/rules/accessStanding.ts +75 -0
- package/src/compose/rules/analysisKinds.ts +331 -0
- package/src/compose/rules/analysisLayers.ts +176 -0
- package/src/compose/rules/cameraMoves.ts +38 -0
- package/src/compose/rules/carriedLayers.ts +87 -0
- package/src/compose/rules/developmentWarnings.ts +166 -0
- package/src/compose/rules/fitCamera.ts +54 -0
- package/src/compose/rules/geoJsonSlot.ts +61 -0
- package/src/compose/rules/geometrySlots.ts +155 -0
- package/src/compose/rules/glyphNode.ts +62 -0
- package/src/compose/rules/layerKeys.ts +92 -0
- package/src/compose/rules/layerOrder.ts +85 -0
- package/src/compose/rules/layersManifest.ts +26 -0
- package/src/compose/rules/mapOptions.ts +300 -0
- package/src/compose/rules/maplibreWorkerVersion.gen.ts +8 -0
- package/src/compose/rules/markerPin.ts +122 -0
- package/src/compose/rules/markerRegistry.ts +85 -0
- package/src/compose/rules/markerSprite.ts +382 -0
- package/src/compose/rules/maxBounds.ts +120 -0
- package/src/compose/rules/overlayLookup.ts +49 -0
- package/src/compose/rules/paintDiff.ts +38 -0
- package/src/compose/rules/panLock.ts +77 -0
- package/src/compose/rules/patch.ts +124 -0
- package/src/compose/rules/queriedFeature.ts +55 -0
- package/src/compose/rules/queryLayers.ts +46 -0
- package/src/compose/rules/searchHighlight.ts +313 -0
- package/src/compose/rules/slotNames.ts +19 -0
- package/src/compose/rules/stripeImage.ts +253 -0
- package/src/compose/rules/swapMarker.ts +66 -0
- package/src/compose/rules/terrainVariant.ts +88 -0
- package/src/compose/rules/types.ts +566 -0
- package/src/compose/rules/urlHash.ts +19 -0
- package/src/compose/rules/viewOptions.ts +451 -0
- package/src/compose/rules/workerUrl.ts +96 -0
- package/src/data/engines/itineraryResource.ts +643 -0
- package/src/data/index.ts +78 -0
- package/src/data/rules/adapt.ts +473 -0
- package/src/data/rules/editModes.ts +51 -0
- package/src/data/rules/itinerary.ts +168 -0
- package/src/data/rules/nullable.ts +63 -0
- package/src/data/rules/roadAccess.ts +169 -0
- package/src/data/rules/segmentGroups.ts +309 -0
- package/src/data/rules/selectors.ts +95 -0
- package/src/data/rules/zones.ts +79 -0
- package/src/draw/engines/boundaryEngine.ts +1003 -0
- package/src/draw/engines/framedAdapter.ts +198 -0
- package/src/draw/engines/pointerCursor.ts +205 -0
- package/src/draw/engines/segmentEngine.ts +1405 -0
- package/src/draw/engines/snapIndex.ts +254 -0
- package/src/draw/engines/waypointEngine.ts +574 -0
- package/src/draw/engines/zoneEngine.ts +1137 -0
- package/src/draw/rules/drawFrame.ts +123 -0
- package/src/draw/rules/insertVertex.ts +226 -0
- package/src/draw/rules/screenSpace.ts +62 -0
- package/src/draw/rules/seeds.ts +185 -0
- package/src/draw/rules/snap.ts +115 -0
- package/src/draw/rules/snapCameraKey.ts +50 -0
- package/src/draw/rules/terraDrawShared.ts +214 -0
- package/src/draw/rules/zoneOutline.ts +213 -0
- package/src/editing/engines/cursor.ts +505 -0
- package/src/editing/engines/draftMarker.ts +149 -0
- package/src/editing/rules/accent.ts +11 -0
- package/src/editing/rules/engine.ts +286 -0
- package/src/editing/rules/placement.ts +22 -0
- package/src/editing/rules/positions.ts +89 -0
- package/src/editing/rules/sources.ts +9 -0
- package/src/editing/rules/types.ts +457 -0
- package/src/editing/rules/vocabulary.ts +10 -0
- package/src/editing/rules/waypointCursor.ts +228 -0
- package/src/editor/engines/directionArrows.ts +459 -0
- package/src/editor/engines/directions.ts +1383 -0
- package/src/editor/engines/editorClient.ts +134 -0
- package/src/editor/engines/eventScope.ts +59 -0
- package/src/editor/engines/frameLoop.ts +159 -0
- package/src/editor/engines/itineraryPreview.ts +272 -0
- package/src/editor/engines/mapLockGuard.ts +66 -0
- package/src/editor/engines/overlayRenderer.ts +2696 -0
- package/src/editor/engines/peerDraft.ts +760 -0
- package/src/editor/engines/poiPick.ts +305 -0
- package/src/editor/engines/pointPick.ts +84 -0
- package/src/editor/engines/roadAccessLine.ts +140 -0
- package/src/editor/engines/searchHighlight.ts +183 -0
- package/src/editor/engines/viewClient.ts +4083 -0
- package/src/editor/engines/zoneBadges.ts +503 -0
- package/src/editor/index.ts +97 -0
- package/src/editor/rules/accentColor.ts +116 -0
- package/src/editor/rules/camera.ts +121 -0
- package/src/editor/rules/contract.ts +125 -0
- package/src/editor/rules/icons.ts +825 -0
- package/src/editor/rules/markerElements.ts +244 -0
- package/src/editor/rules/style.ts +51 -0
- package/src/editor/rules/terrain.ts +98 -0
- package/src/editor/rules/tileWarm.ts +191 -0
- package/src/editor/rules/tilesReload.ts +158 -0
- package/src/editor/rules/zoneBadgePlacement.ts +1832 -0
- package/src/editor/rules/zoneTimeStyling.ts +119 -0
- package/src/errors/index.ts +25 -0
- package/src/errors/rules/errors.ts +157 -0
- package/src/errors/rules/print.ts +129 -0
- package/src/geo/index.ts +94 -0
- package/src/geo/rules/boundaries.ts +105 -0
- package/src/geo/rules/camera.ts +496 -0
- package/src/geo/rules/corridor.ts +242 -0
- package/src/geo/rules/elevationTiles.ts +269 -0
- package/src/geo/rules/formatLngLat.ts +63 -0
- package/src/geo/rules/geodesy.ts +125 -0
- package/src/geo/rules/geometry.ts +362 -0
- package/src/geo/rules/lineWalk.ts +77 -0
- package/src/geo/rules/longitude.ts +99 -0
- package/src/geo/rules/searchLimits.ts +22 -0
- package/src/geo/rules/segmentGeometry.ts +80 -0
- package/src/geo/rules/terrain.ts +107 -0
- package/src/geo/rules/tuples.ts +124 -0
- package/src/geo/rules/types.ts +54 -0
- package/src/geo/rules/webMercator.ts +57 -0
- package/src/i18n/fr/index.ts +17 -0
- package/src/i18n/fr/rules/fr.ts +85 -0
- package/src/i18n/fr/rules/words.gen.ts +277 -0
- package/src/i18n/index.ts +81 -0
- package/src/i18n/rules/bundle.ts +378 -0
- package/src/i18n/rules/config.ts +71 -0
- package/src/i18n/rules/endonyms.gen.ts +19 -0
- package/src/i18n/rules/language.ts +92 -0
- package/src/i18n/rules/localizedName.ts +33 -0
- package/src/i18n/rules/merge.ts +106 -0
- package/src/i18n/rules/scope.ts +127 -0
- package/src/i18n/rules/strings.ts +632 -0
- package/src/i18n/rules/videoOverlay.ts +121 -0
- package/src/i18n/rules/wordForms.ts +95 -0
- package/src/i18n/rules/words.gen.ts +277 -0
- package/src/icons/index.ts +54 -0
- package/src/icons/rules/activities.ts +40 -0
- package/src/icons/rules/amenities.ts +250 -0
- package/src/icons/rules/artwork.gen.ts +83 -0
- package/src/icons/rules/artwork.ts +47 -0
- package/src/icons/rules/fallback.ts +21 -0
- package/src/icons/rules/lucideMarkers.gen.ts +112 -0
- package/src/icons/rules/lucideUi.gen.ts +197 -0
- package/src/icons/rules/paint.ts +107 -0
- package/src/icons/rules/parse.ts +475 -0
- package/src/icons/rules/provider.ts +373 -0
- package/src/icons/rules/sprites.ts +54 -0
- package/src/icons/rules/ui.ts +348 -0
- package/src/icons/rules/waypoints.ts +215 -0
- package/src/index.ts +1012 -0
- package/src/layers/engines/layersSelection.ts +515 -0
- package/src/layers/engines/readoutEngine.ts +131 -0
- package/src/layers/index.ts +151 -0
- package/src/layers/rules/analysis.ts +135 -0
- package/src/layers/rules/enrichment.ts +30 -0
- package/src/layers/rules/geoJson.ts +270 -0
- package/src/layers/rules/hover.ts +67 -0
- package/src/layers/rules/itineraries.ts +182 -0
- package/src/layers/rules/layersPanel.ts +237 -0
- package/src/layers/rules/order.ts +194 -0
- package/src/layers/rules/overlayInstant.ts +49 -0
- package/src/layers/rules/overlays.ts +52 -0
- package/src/layers/rules/poiPanel.ts +119 -0
- package/src/layers/rules/pois.ts +114 -0
- package/src/layers/rules/readout.ts +340 -0
- package/src/layers/rules/streetView.ts +16 -0
- package/src/layers/rules/tileTimestamp.ts +146 -0
- package/src/layers/rules/timeSlider.ts +192 -0
- package/src/layers/rules/timeWindow.ts +123 -0
- package/src/layers/rules/zones.ts +43 -0
- package/src/layers/rules/zoom.ts +77 -0
- package/src/map-client/index.ts +71 -0
- package/src/map-client/rules/mapClient.ts +1943 -0
- package/src/navigation/engines/navigation.ts +493 -0
- package/src/navigation/index.ts +51 -0
- package/src/navigation/rules/followedRoute.ts +78 -0
- package/src/navigation/rules/instructions.ts +89 -0
- package/src/navigation/rules/itineraryRoute.ts +232 -0
- package/src/navigation/rules/offRoute.ts +41 -0
- package/src/navigation/rules/progress.ts +230 -0
- package/src/navigation/rules/prompts.ts +217 -0
- package/src/navigation/rules/routeRequest.ts +98 -0
- package/src/navigation/rules/status.ts +142 -0
- package/src/navigation/rules/steps.ts +234 -0
- package/src/navigation/rules/types.ts +83 -0
- package/src/profile/index.ts +307 -0
- package/src/profile/rules/amenityBadge.ts +35 -0
- package/src/profile/rules/amenityFilter.ts +74 -0
- package/src/profile/rules/amenityStacks.ts +66 -0
- package/src/profile/rules/axis.ts +89 -0
- package/src/profile/rules/axisCulling.ts +83 -0
- package/src/profile/rules/axisLookup.ts +180 -0
- package/src/profile/rules/climbs.ts +292 -0
- package/src/profile/rules/cursorMarker.ts +122 -0
- package/src/profile/rules/cursorReadout.ts +104 -0
- package/src/profile/rules/curvePlacement.ts +216 -0
- package/src/profile/rules/dock.ts +293 -0
- package/src/profile/rules/elevation.ts +1263 -0
- package/src/profile/rules/instant.ts +89 -0
- package/src/profile/rules/intl.ts +237 -0
- package/src/profile/rules/legEmphasis.ts +53 -0
- package/src/profile/rules/profileColors.ts +66 -0
- package/src/profile/rules/profileLayout.ts +59 -0
- package/src/profile/rules/profileSlices.ts +55 -0
- package/src/profile/rules/routeProfile.ts +475 -0
- package/src/profile/rules/rowMatch.ts +50 -0
- package/src/profile/rules/scale.ts +650 -0
- package/src/profile/rules/scaleFrame.ts +171 -0
- package/src/profile/rules/sectionChips.ts +83 -0
- package/src/profile/rules/sections.ts +923 -0
- package/src/profile/rules/slopeRamp.ts +160 -0
- package/src/profile/rules/statStrip.ts +103 -0
- package/src/profile/rules/steepness.ts +51 -0
- package/src/profile/rules/tableCells.ts +269 -0
- package/src/profile/rules/tableCursor.ts +87 -0
- package/src/profile/rules/unitPatterns.ts +335 -0
- package/src/profile/rules/units.ts +1025 -0
- package/src/profile/rules/waypointCard.ts +593 -0
- package/src/profile/rules/webAddress.ts +130 -0
- package/src/profile/rules/windowSpans.ts +65 -0
- package/src/rules/asciiFold.ts +17 -0
- package/src/rules/inDevelopment.ts +54 -0
- package/src/rules/listeners.ts +62 -0
- package/src/rules/timers.ts +9 -0
- package/src/rules/types.ts +22 -0
- package/src/rules/uuid.ts +87 -0
- package/src/seams/engines/geolocateControl.ts +286 -0
- package/src/seams/index.ts +50 -0
- package/src/seams/rules/clock.ts +169 -0
- package/src/seams/rules/geolocation.ts +165 -0
- package/src/seams/rules/segmentRoute.ts +187 -0
- package/src/search/engines/search.ts +1093 -0
- package/src/search/index.ts +114 -0
- package/src/search/rules/describe.ts +383 -0
- package/src/search/rules/filters.ts +195 -0
- package/src/search/rules/highlight.ts +270 -0
- package/src/search/rules/pick.ts +90 -0
- package/src/search/rules/rows.ts +258 -0
- package/src/search/rules/searchFocus.ts +27 -0
- package/src/search/rules/searchViewport.ts +44 -0
- package/src/search/rules/shown.ts +77 -0
- package/src/search/rules/types.ts +340 -0
- package/src/stream/rules/reconnectSchedule.ts +83 -0
- package/src/style/engines/organizationRead.ts +80 -0
- package/src/style/index.ts +63 -0
- package/src/style/rules/apply.ts +268 -0
- package/src/style/rules/attribution.ts +119 -0
- package/src/style/rules/itineraryLine.ts +142 -0
- package/src/style/rules/language.ts +668 -0
- package/src/style/rules/layout.gen.ts +27 -0
- package/src/style/rules/organization.ts +96 -0
- package/src/style/rules/paint.ts +143 -0
- package/src/style/rules/panelLayout.ts +51 -0
- package/src/style/rules/roadAccessColors.ts +29 -0
- package/src/style/rules/roadAccessLine.ts +267 -0
- package/src/style/rules/segmentColors.ts +207 -0
- package/src/testing/catalogs.ts +103 -0
- package/src/testing/index.ts +30 -0
- package/src/testing/mapClient.ts +241 -0
- package/src/testing/mountayaMap.ts +741 -0
- package/src/timezone/index.ts +14 -0
- package/src/timezone/rules/viewport.ts +875 -0
- package/src/units/index.ts +55 -0
- package/src/units/rules/conversions.ts +620 -0
- package/src/units/rules/preferenceChoices.ts +124 -0
- package/src/units/rules/preferences.ts +77 -0
- package/src/units/rules/rounding.ts +69 -0
- package/src/video/engines/videoRun.ts +654 -0
- package/src/video/engines/viewClient.ts +6 -0
- package/src/video/index.ts +83 -0
- package/src/video/profileOverlay/rules/contract.ts +212 -0
- package/src/video/profileOverlay/rules/curve.ts +216 -0
- package/src/video/profileOverlay/rules/draw.ts +410 -0
- package/src/video/profileOverlay/rules/fonts.ts +54 -0
- package/src/video/profileOverlay/rules/graphDesign.ts +690 -0
- package/src/video/profileOverlay/rules/minimalDesign.ts +144 -0
- package/src/video/profileOverlay/rules/registry.ts +23 -0
- package/src/video/profileOverlay/rules/staticLayer.ts +582 -0
- package/src/video/profileOverlay/rules/stripDesign.ts +327 -0
- package/src/video/profileOverlay/rules/types.ts +78 -0
- package/src/video/rules/videoConstants.ts +250 -0
- package/src/video/rules/videoEncoder.ts +277 -0
- package/src/video/rules/videoFrames.ts +99 -0
- package/src/video/rules/videoPreview.ts +185 -0
- package/src/video/rules/videoRecorder.ts +746 -0
- package/src/video/rules/videoWatermark.ts +155 -0
- package/src/video/rules/watermarkMark.ts +40 -0
- package/src/view/engines/viewClient.ts +6 -0
- package/src/view/index.ts +20 -0
|
@@ -0,0 +1,390 @@
|
|
|
1
|
+
import { MountayaElementsError } from "../../errors/rules/errors.js";
|
|
2
|
+
import type { AgentEngine, AgentStreamPosition } from "../engines/session.js";
|
|
3
|
+
import { statusOf } from "./errorStatus.js";
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* ConversationHostConfig wires a host to one conversation's world: how it records
|
|
7
|
+
* the user's turn, resolves the run's organization and point-in-time context,
|
|
8
|
+
* builds the session it drives, and where each failure mode is surfaced. The host
|
|
9
|
+
* owns the session and the started guard, and calls back into these seams so the
|
|
10
|
+
* store writes, error mapping, and org resolution stay with the surface that knows
|
|
11
|
+
* them: the host itself knows only the start/send/resume lifecycle.
|
|
12
|
+
*/
|
|
13
|
+
export interface ConversationHostConfig {
|
|
14
|
+
/** appendUserMessage records the user's outgoing turn before the run is touched. */
|
|
15
|
+
appendUserMessage(message: string): void;
|
|
16
|
+
/**
|
|
17
|
+
* buildContext resolves the point-in-time snapshot the run opens with, or
|
|
18
|
+
* undefined for a contextless start. It must not reject (a snapshot failure
|
|
19
|
+
* resolves undefined), so only a start rejection routes to onStartError.
|
|
20
|
+
*/
|
|
21
|
+
buildContext(): Promise<Record<string, unknown> | undefined>;
|
|
22
|
+
/** buildSession builds a fresh session wired to the surface's observer. */
|
|
23
|
+
buildSession(): AgentEngine;
|
|
24
|
+
/** onMissingOrganization surfaces that there is no resource to scope a run to. */
|
|
25
|
+
onMissingOrganization(): void;
|
|
26
|
+
/**
|
|
27
|
+
* onSendFault reports a follow-up message that did not reach its run.
|
|
28
|
+
*
|
|
29
|
+
* @param error What the send rejected with.
|
|
30
|
+
* @param runGone Whether the failure says the run is gone: the engine refused the message
|
|
31
|
+
* (the run ended, or the engine was disposed) or the gateway answered 404. The host then
|
|
32
|
+
* clears its guard and the next message opens a new run. Otherwise the run is kept, and
|
|
33
|
+
* the next message is posted into it.
|
|
34
|
+
*/
|
|
35
|
+
onSendFault(error: unknown, runGone: boolean): void;
|
|
36
|
+
/**
|
|
37
|
+
* onStartError maps a rejection of the run's start or of its read onto the surface's copy.
|
|
38
|
+
*
|
|
39
|
+
* @param organizationId The organization the run was started in.
|
|
40
|
+
* @param error What the start rejected with.
|
|
41
|
+
* @param runId The run the start opened, when its post answered and its stream then failed for
|
|
42
|
+
* good. Absent when the start opened no run: the gateway refused it, or it never reached the
|
|
43
|
+
* gateway. A status means something else on each: a 404 refusing the start is an
|
|
44
|
+
* organization the reader does not reach, and a 404 refusing the stream of an opened run is
|
|
45
|
+
* a run the gateway no longer holds.
|
|
46
|
+
*/
|
|
47
|
+
onStartError(organizationId: string, error: unknown, runId?: string | undefined): void;
|
|
48
|
+
/**
|
|
49
|
+
* routeForMessage lets the surface pick the tool set this turn should offer
|
|
50
|
+
* before the message reaches the run. It is called for every message, first
|
|
51
|
+
* one included, so the run OPENS on the routed set rather than being narrowed
|
|
52
|
+
* only from the second turn on. Optional: a surface with no router omits it and
|
|
53
|
+
* the session offers every permitted tool.
|
|
54
|
+
*/
|
|
55
|
+
routeForMessage?(message: string): void;
|
|
56
|
+
/**
|
|
57
|
+
* routeForState lets the surface re-pick the tool set from LIVE state, with no
|
|
58
|
+
* new message. It is what makes a surface the run itself unlocks reachable: a
|
|
59
|
+
* router keyed only on the user's words cannot know that the run just opened a
|
|
60
|
+
* suggest session, so without this the tools it unlocked stay invisible until
|
|
61
|
+
* the user happens to type again. Optional, exactly as routeForMessage.
|
|
62
|
+
*/
|
|
63
|
+
routeForState?(): void;
|
|
64
|
+
/** resolveOrganizationId reads the org that owns the resource the run acts on. */
|
|
65
|
+
resolveOrganizationId(): string | null | undefined;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* ConversationHost is one AI conversation's session lifecycle: it opens a run on
|
|
70
|
+
* the first message, sends follow-ups into the open run, reconnects a persisted
|
|
71
|
+
* run, and tears down on stop/close/unmount. A single started guard distinguishes
|
|
72
|
+
* "open a run" from "send into it". A run that ends (its `done`, or the session giving up
|
|
73
|
+
* on it) clears that guard, and so does a follow-up refused because its run is gone, so the
|
|
74
|
+
* next message opens a fresh run rather than posting into a run that takes no more input. A
|
|
75
|
+
* follow-up that fails any other way (a dropped connection) keeps the run, and the next
|
|
76
|
+
* message is posted into it. Only the open run speaks for the conversation: a start, a
|
|
77
|
+
* resume or a send that settles after a later call or a restart replaced its run clears
|
|
78
|
+
* nothing and reports nothing, and of several sends refused as gone from one run, the first
|
|
79
|
+
* alone recovers the conversation.
|
|
80
|
+
*/
|
|
81
|
+
export interface ConversationHost {
|
|
82
|
+
/**
|
|
83
|
+
* dispose aborts the session's open stream and parked consumer; idempotent.
|
|
84
|
+
*
|
|
85
|
+
* It asks the gateway nothing, so the run goes on there, and the host keeps where the session
|
|
86
|
+
* stood in it: a {@link ConversationHost.resume} of that run is read on from that position by
|
|
87
|
+
* the session it builds, and hands the conversation nothing a second time.
|
|
88
|
+
*/
|
|
89
|
+
dispose(): void;
|
|
90
|
+
/** finish asks the run to close (POST close), then disposes the session. */
|
|
91
|
+
finish(): void;
|
|
92
|
+
/**
|
|
93
|
+
* reroute re-reads the router from live state and carries the resulting tool
|
|
94
|
+
* set into the open run. A no-op when no run is open, and free when the
|
|
95
|
+
* selection has not moved: the session drops an unchanged manifest itself.
|
|
96
|
+
*/
|
|
97
|
+
reroute(): void;
|
|
98
|
+
/**
|
|
99
|
+
* restart ends the conversation's run and eagerly swaps in a fresh session: it asks the run to
|
|
100
|
+
* close (POST close), as {@link ConversationHost.finish} does, then disposes the live session
|
|
101
|
+
* and builds the next one. The close covers a run the session gave up reading and still owes
|
|
102
|
+
* one, so a stopped run spends no more of the gateway's model budget.
|
|
103
|
+
*/
|
|
104
|
+
restart(): void;
|
|
105
|
+
/**
|
|
106
|
+
* resume builds the session so its observer is wired the moment the conversation
|
|
107
|
+
* mounts, and reconnects a persisted run exactly once. A null run id primes the
|
|
108
|
+
* session without reconnecting; a resume fault clears the guard then calls
|
|
109
|
+
* onFault with what the reconnect failed with, and a resumed run that ends clears the
|
|
110
|
+
* guard without calling it. A resume that a later start or a restart replaced does
|
|
111
|
+
* neither.
|
|
112
|
+
*
|
|
113
|
+
* The run is read on from where the session a {@link ConversationHost.dispose} tore down
|
|
114
|
+
* stood in it, when that session read this run and its stream named a position. With no such
|
|
115
|
+
* position (a host built after a reload, another run, a run that a finish or a restart
|
|
116
|
+
* closed) the gateway answers with the run's history from its first event.
|
|
117
|
+
*/
|
|
118
|
+
resume(runId: string | null | undefined, onFault: (error: unknown) => void): void;
|
|
119
|
+
/**
|
|
120
|
+
* submit opens a run on the first message, and on the first message after a run ended,
|
|
121
|
+
* or sends the follow-up into the open run.
|
|
122
|
+
*
|
|
123
|
+
* A follow-up submitted before that run has its id (while its context is captured, or while
|
|
124
|
+
* its start is still being posted) is held and delivered once the run opens, the routed
|
|
125
|
+
* tool set ahead of it. When the start fails, the held follow-up is dropped and
|
|
126
|
+
* `onStartError` is the one report: `onSendFault` is for a message that failed on its way
|
|
127
|
+
* into a run that was open. A follow-up that fails keeps the run unless the failure says the
|
|
128
|
+
* run is gone (see {@link ConversationHostConfig.onSendFault}).
|
|
129
|
+
*/
|
|
130
|
+
submit(message: string): void;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
/**
|
|
134
|
+
* isRunGone reports whether a failed follow-up says its run takes no more messages: the
|
|
135
|
+
* engine's own refusal (a run that ended, an engine disposed) or the gateway's 404. Every other
|
|
136
|
+
* failure, a dropped connection first, leaves the run where it was.
|
|
137
|
+
*/
|
|
138
|
+
const isRunGone = (error: unknown): boolean =>
|
|
139
|
+
error instanceof MountayaElementsError || statusOf(error) === 404;
|
|
140
|
+
|
|
141
|
+
/**
|
|
142
|
+
* createConversationHost builds the session lifecycle for one AI conversation over
|
|
143
|
+
* the supplied seams. The session and the started guard live in this closure:
|
|
144
|
+
* they survive across the surface's re-renders without being reactive state, and
|
|
145
|
+
* the surface reads its conversation off the store the observer drives, never off
|
|
146
|
+
* the session directly.
|
|
147
|
+
*
|
|
148
|
+
* It is one long closure on purpose. Each function in it is a few lines over the same
|
|
149
|
+
* variables (the session, the guard, the open call, its hand-over to the session and the
|
|
150
|
+
* position a teardown parked), and a split would pass that state between modules for no
|
|
151
|
+
* reader's benefit.
|
|
152
|
+
*/
|
|
153
|
+
export const createConversationHost = (config: ConversationHostConfig): ConversationHost => {
|
|
154
|
+
let session: AgentEngine | null = null;
|
|
155
|
+
let started = false;
|
|
156
|
+
// The start or resume whose settle speaks for the run the conversation has open. Each call
|
|
157
|
+
// takes a token of its own, and a restart or a teardown drops it.
|
|
158
|
+
let latestCall: symbol | null = null;
|
|
159
|
+
// Settles once the open call has reached the session: at once for a resume, and for a start
|
|
160
|
+
// when its context is captured and the start is made. A follow-up waits on it, so the session
|
|
161
|
+
// is never handed a message for a run it has not yet been asked to open. It never rejects.
|
|
162
|
+
let callMade: Promise<void> = Promise.resolve();
|
|
163
|
+
// Where the session a dispose tore down stood in its run, for the session a resume builds:
|
|
164
|
+
// a new session holds no position of its own, and without one it is answered with the run's
|
|
165
|
+
// whole history. A finish, a restart and a start drop it, since each leaves that run.
|
|
166
|
+
let parkedAt: AgentStreamPosition | null = null;
|
|
167
|
+
|
|
168
|
+
const ensureSession = (): AgentEngine => {
|
|
169
|
+
if (!session) {
|
|
170
|
+
session = config.buildSession();
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
return session;
|
|
174
|
+
};
|
|
175
|
+
|
|
176
|
+
const dispose = (): void => {
|
|
177
|
+
// A second dispose finds no session and keeps the position the first one read. The read is
|
|
178
|
+
// optional at the call: a session that stands in for the engine with its lifecycle methods
|
|
179
|
+
// alone answers no position, and the host keeps the one it held.
|
|
180
|
+
parkedAt = session?.streamPosition?.() ?? parkedAt;
|
|
181
|
+
session?.dispose();
|
|
182
|
+
session = null;
|
|
183
|
+
started = false;
|
|
184
|
+
latestCall = null;
|
|
185
|
+
};
|
|
186
|
+
|
|
187
|
+
// beginCall hands a start or a resume the token its settle is judged by, and makes it the
|
|
188
|
+
// call that speaks for the open run.
|
|
189
|
+
const beginCall = (): symbol => {
|
|
190
|
+
const call = Symbol("run");
|
|
191
|
+
latestCall = call;
|
|
192
|
+
|
|
193
|
+
return call;
|
|
194
|
+
};
|
|
195
|
+
|
|
196
|
+
// A session settles start() and resume() when the run it reads is over: on the run's
|
|
197
|
+
// `done`, when it stops reading (the reconnect ceiling), and when the run fails. That run
|
|
198
|
+
// takes no more messages, so the guard clears and the next message opens a new run. A call
|
|
199
|
+
// that settles after another replaced it speaks for a run the conversation already left,
|
|
200
|
+
// whether the replacement came on the same session (the message after a send refused as gone
|
|
201
|
+
// opens a new run there) or on a new one (a Stop, a teardown),
|
|
202
|
+
// so it clears nothing and reports nothing. callSettled reports whether `call` still
|
|
203
|
+
// speaks for the open run, and clears the guard when it does.
|
|
204
|
+
const callSettled = (call: symbol): boolean => {
|
|
205
|
+
if (latestCall !== call) {
|
|
206
|
+
return false;
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
latestCall = null;
|
|
210
|
+
started = false;
|
|
211
|
+
|
|
212
|
+
return true;
|
|
213
|
+
};
|
|
214
|
+
|
|
215
|
+
// closeRun asks the run to finish (POST close) before a teardown aborts the stream, so a
|
|
216
|
+
// closed or stopped conversation ends its run rather than only dropping the connection.
|
|
217
|
+
//
|
|
218
|
+
// The rejection is swallowed HERE rather than inside close(), whose contract is "ask the
|
|
219
|
+
// gateway to finish" and whose failure a caller that ends the conversation explicitly may
|
|
220
|
+
// want to report. Nothing can be done with it on either path: the POST fails when the tab is
|
|
221
|
+
// offline or the run is already gone, by which point the stream is torn down locally, the run
|
|
222
|
+
// expires on the gateway's own timeout, and the session the error would be reported into is
|
|
223
|
+
// disposed on the very next line. Optional chaining short-circuits the whole chain (`.catch`
|
|
224
|
+
// included) when there is no session, so this stays safe with nothing to close.
|
|
225
|
+
const closeRun = (): void => {
|
|
226
|
+
void session?.close().catch(() => undefined);
|
|
227
|
+
};
|
|
228
|
+
|
|
229
|
+
const finish = (): void => {
|
|
230
|
+
closeRun();
|
|
231
|
+
dispose();
|
|
232
|
+
parkedAt = null;
|
|
233
|
+
};
|
|
234
|
+
|
|
235
|
+
// A run that unlocks a surface mid-turn (opening the suggest session, for one)
|
|
236
|
+
// must be told about it before its NEXT provider call, not when the user next
|
|
237
|
+
// types. Routing is advisory and this fires on a tool result, so a rejected
|
|
238
|
+
// update is swallowed: the run keeps the tool set it already had rather than
|
|
239
|
+
// the settle path surfacing a routing error to the user.
|
|
240
|
+
const reroute = (): void => {
|
|
241
|
+
if (!started || !session) {
|
|
242
|
+
return;
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
config.routeForState?.();
|
|
246
|
+
void session.routeTools().catch(() => undefined);
|
|
247
|
+
};
|
|
248
|
+
|
|
249
|
+
const restart = (): void => {
|
|
250
|
+
// A restart is a Stop: the user ending the run, so the run is told before its session goes.
|
|
251
|
+
// Then the fresh session is swapped in eagerly (built now, not on the next submit), so a
|
|
252
|
+
// caller reading the rebuilt session right after a restart sees it, and the next submit
|
|
253
|
+
// opens a clean run rather than posting into the ended consumer.
|
|
254
|
+
closeRun();
|
|
255
|
+
session?.dispose();
|
|
256
|
+
session = config.buildSession();
|
|
257
|
+
started = false;
|
|
258
|
+
latestCall = null;
|
|
259
|
+
parkedAt = null;
|
|
260
|
+
};
|
|
261
|
+
|
|
262
|
+
const resume = (runId: string | null | undefined, onFault: (error: unknown) => void): void => {
|
|
263
|
+
// Build the session even with nothing to reconnect, so the observer is wired
|
|
264
|
+
// the moment the conversation mounts; only a real run id reconnects, and the
|
|
265
|
+
// guard keeps a re-render from reconnecting the same run twice.
|
|
266
|
+
const active = ensureSession();
|
|
267
|
+
if (!runId || started) {
|
|
268
|
+
return;
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
started = true;
|
|
272
|
+
const call = beginCall();
|
|
273
|
+
callMade = Promise.resolve();
|
|
274
|
+
// The position belongs to one run. A session that was not torn down holds its own, and is
|
|
275
|
+
// asked with no position, as a session with none to be handed is.
|
|
276
|
+
const position = parkedAt?.runId === runId ? parkedAt.lastEventId : undefined;
|
|
277
|
+
parkedAt = null;
|
|
278
|
+
const reading = position === undefined ? active.resume(runId) : active.resume(runId, position);
|
|
279
|
+
reading.then(
|
|
280
|
+
() => {
|
|
281
|
+
callSettled(call);
|
|
282
|
+
},
|
|
283
|
+
(error: unknown) => {
|
|
284
|
+
if (callSettled(call)) {
|
|
285
|
+
onFault(error);
|
|
286
|
+
}
|
|
287
|
+
},
|
|
288
|
+
);
|
|
289
|
+
};
|
|
290
|
+
|
|
291
|
+
const submit = (message: string): void => {
|
|
292
|
+
const active = ensureSession();
|
|
293
|
+
config.appendUserMessage(message);
|
|
294
|
+
// Route before the turn is dispatched, so start() seeds the run with the
|
|
295
|
+
// routed set and a follow-up carries it in before the model reads it.
|
|
296
|
+
config.routeForMessage?.(message);
|
|
297
|
+
if (started) {
|
|
298
|
+
// Deliver the routed manifest BEFORE the message rather than alongside it.
|
|
299
|
+
// Both are signals into the same run and the run applies whatever it holds
|
|
300
|
+
// at the next turn boundary, so firing them concurrently would let the
|
|
301
|
+
// message win the race and spend the turn on the previous tool set.
|
|
302
|
+
// Routing is advisory, so a failed update must not block the message: the
|
|
303
|
+
// run simply keeps the tool set it already had.
|
|
304
|
+
//
|
|
305
|
+
// A send that fails raises no `error` event for the observer, so the host reports it
|
|
306
|
+
// rather than wedge the conversation on running. A POST that lost its connection leaves
|
|
307
|
+
// the run where it was, still read by the session, so the guard stays and the next
|
|
308
|
+
// message goes into it. A send refused because the run is gone clears the guard: the
|
|
309
|
+
// next message opens a new run on the session, which replaces that one (see
|
|
310
|
+
// AgentEngine.start). The send speaks for the run open when it went out, as a start
|
|
311
|
+
// or a resume speaks for its own: failing after that run ended, after a later start
|
|
312
|
+
// replaced it, or after a restart, it clears nothing and reports nothing, and a
|
|
313
|
+
// second send refused as gone from the run it recovered finds the conversation moved on.
|
|
314
|
+
//
|
|
315
|
+
// The guard is set before the start it follows has its run id, and before that start
|
|
316
|
+
// is even made, so a follow-up can arrive in between. It waits for the start to reach
|
|
317
|
+
// the session, and the session then holds the update and the message until the run id
|
|
318
|
+
// lands (see AgentEngine.send). When that start opens no run, the session drops the held
|
|
319
|
+
// update and refuses the message that follows it. The start's settle has cleared the call
|
|
320
|
+
// by then, or a restart has replaced the session, so the catch below reports nothing: the
|
|
321
|
+
// start's own settle is the one report and the guard stays the start's to clear.
|
|
322
|
+
const call = latestCall;
|
|
323
|
+
void callMade
|
|
324
|
+
.then(() => active.routeTools())
|
|
325
|
+
.catch(() => undefined)
|
|
326
|
+
.then(() => active.send(message))
|
|
327
|
+
.catch((error: unknown) => {
|
|
328
|
+
if (session !== active || latestCall !== call) {
|
|
329
|
+
return;
|
|
330
|
+
}
|
|
331
|
+
|
|
332
|
+
const runGone = isRunGone(error);
|
|
333
|
+
if (runGone) {
|
|
334
|
+
latestCall = null;
|
|
335
|
+
started = false;
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
config.onSendFault(error, runGone);
|
|
339
|
+
});
|
|
340
|
+
|
|
341
|
+
return;
|
|
342
|
+
}
|
|
343
|
+
|
|
344
|
+
const organizationId = config.resolveOrganizationId();
|
|
345
|
+
if (!organizationId) {
|
|
346
|
+
config.onMissingOrganization();
|
|
347
|
+
|
|
348
|
+
return;
|
|
349
|
+
}
|
|
350
|
+
|
|
351
|
+
started = true;
|
|
352
|
+
parkedAt = null;
|
|
353
|
+
const call = beginCall();
|
|
354
|
+
// Capture the run's context, then open the run on it. A start rejection (a read
|
|
355
|
+
// fault or a gating failure) clears the guard and routes to onStartError, which
|
|
356
|
+
// maps it onto the surface's copy instead of wedging the run on running.
|
|
357
|
+
const context = config.buildContext();
|
|
358
|
+
const running = context.then((captured) => active.start(message, organizationId, captured));
|
|
359
|
+
// Registered after the start above on the same promise, so it settles once the start has
|
|
360
|
+
// been made, and it settles either way: a capture that rejects makes no start, and the
|
|
361
|
+
// follow-up then meets the session's own refusal after the start's failure is reported.
|
|
362
|
+
callMade = context.then(
|
|
363
|
+
() => undefined,
|
|
364
|
+
() => undefined,
|
|
365
|
+
);
|
|
366
|
+
running.then(
|
|
367
|
+
() => {
|
|
368
|
+
callSettled(call);
|
|
369
|
+
},
|
|
370
|
+
(error: unknown) => {
|
|
371
|
+
if (!callSettled(call)) {
|
|
372
|
+
return;
|
|
373
|
+
}
|
|
374
|
+
|
|
375
|
+
// The run this start opened, if its post answered: nothing replaced it on the session,
|
|
376
|
+
// since the call still speaks for the open run. The read is optional at the call, as
|
|
377
|
+
// the position's is, and a session that stands in for the engine with its lifecycle
|
|
378
|
+
// methods alone answers no run.
|
|
379
|
+
const openedRun = active.runId?.() ?? null;
|
|
380
|
+
if (openedRun === null) {
|
|
381
|
+
config.onStartError(organizationId, error);
|
|
382
|
+
} else {
|
|
383
|
+
config.onStartError(organizationId, error, openedRun);
|
|
384
|
+
}
|
|
385
|
+
},
|
|
386
|
+
);
|
|
387
|
+
};
|
|
388
|
+
|
|
389
|
+
return { dispose, finish, reroute, restart, resume, submit };
|
|
390
|
+
};
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import type { AgentClientToolManifest } from "@mountaya/client";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* What the agent loop needs from a tool layer, and nothing more.
|
|
5
|
+
*
|
|
6
|
+
* Typing the loop in `@mountaya/studio`'s own vocabulary (`ToolBus<StudioToolContext>`,
|
|
7
|
+
* `captureStudioState`, `recoveryFor`) would make an AGENT PROTOCOL a function of one product's
|
|
8
|
+
* store. It is not: the run lifecycle, the confirmation gate, the transcript and the wire shapes
|
|
9
|
+
* are the same for a studio, for a host driving their own tools, and for whatever the next
|
|
10
|
+
* surface turns out to be. Only the tools differ.
|
|
11
|
+
*
|
|
12
|
+
* So the loop asks for the two methods it calls and the two questions it asks, structurally.
|
|
13
|
+
* `@mountaya/studio`'s bus satisfies `ToolDispatcher` by having the right shape rather than by
|
|
14
|
+
* importing anything from here, which is what lets the studio depend on the elements and not the
|
|
15
|
+
* other way round. A host wiring their own tools implements these members and gets the same
|
|
16
|
+
* loop.
|
|
17
|
+
*/
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* ToolManifestEntry is the model-facing description of one available tool.
|
|
21
|
+
*
|
|
22
|
+
* `inputSchema` is typed as the wire's own `parameters` rather than as a JSON Schema of our
|
|
23
|
+
* making, because that is the only place it goes: `AgentEngine` maps a manifest straight onto
|
|
24
|
+
* the gateway's client-tool list. A stricter type here would be a second opinion about a shape
|
|
25
|
+
* the API already states.
|
|
26
|
+
*/
|
|
27
|
+
export interface ToolManifestEntry {
|
|
28
|
+
capability: string;
|
|
29
|
+
description: string;
|
|
30
|
+
inputSchema: AgentClientToolManifest["parameters"];
|
|
31
|
+
name: string;
|
|
32
|
+
/**
|
|
33
|
+
* Whether the tool only reads state and changes nothing. Absent means unknown, which every
|
|
34
|
+
* consumer must treat as "may mutate": a run uses it to decide what its transcript may safely
|
|
35
|
+
* drop, and guessing wrong there erases the record of a real change.
|
|
36
|
+
*/
|
|
37
|
+
readOnly?: boolean | undefined;
|
|
38
|
+
requiresConfirmation: boolean;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* ToolDispatchResult is the outcome of one dispatched tool call, as the loop reads it.
|
|
43
|
+
*
|
|
44
|
+
* The structural half of `@mountaya/studio`'s `ToolResult`: a success carries the summary the
|
|
45
|
+
* transcript shows, a failure the technical `error` and, when the layer classified it, a stable
|
|
46
|
+
* `code`. The loop branches on `confirmation-denied` and forwards everything else verbatim.
|
|
47
|
+
*/
|
|
48
|
+
export type ToolDispatchResult =
|
|
49
|
+
| { data?: unknown; ok: true; summary: string }
|
|
50
|
+
| { code?: string | undefined; error: string; ok: false };
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* ToolDispatcher is the tool layer the loop drives: what is on offer, and how to run one.
|
|
54
|
+
*
|
|
55
|
+
* Two members, because two is what the loop calls. `manifest` is asked for the tools a set of
|
|
56
|
+
* capabilities permits, narrowed to a routed surface when the host supplies one;
|
|
57
|
+
* `dispatchFromModel` runs one by name with the model's input and is the SOLE executor: the loop
|
|
58
|
+
* never touches a store, a map or a transport of its own.
|
|
59
|
+
*/
|
|
60
|
+
export interface ToolDispatcher<TContext> {
|
|
61
|
+
manifest(capabilities: ReadonlySet<string>, surface?: ReadonlySet<string>): ToolManifestEntry[];
|
|
62
|
+
dispatchFromModel(context: TContext, name: string, input: unknown): Promise<ToolDispatchResult>;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* AgentToolContext is the part of a host's execution context the loop itself reads.
|
|
67
|
+
*
|
|
68
|
+
* One field. Everything else a tool needs (a client, a store, a map) the host put in the
|
|
69
|
+
* context and the host's own handlers read back out; the loop carries it from `dispatchFromModel`
|
|
70
|
+
* to the handler without looking inside. `capabilities` is the exception because the loop builds
|
|
71
|
+
* the manifest, and what is on offer is a function of what the reader may do.
|
|
72
|
+
*/
|
|
73
|
+
export interface AgentToolContext {
|
|
74
|
+
capabilities: ReadonlySet<string>;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
/**
|
|
78
|
+
* StateDelta is how a host says what its own state did while a tool ran.
|
|
79
|
+
*
|
|
80
|
+
* A seam rather than a call, because "what moved" is a question only the host can answer: a
|
|
81
|
+
* studio compares a fingerprint of its stores, another surface might compare a route or a
|
|
82
|
+
* document revision. The loop captures before, captures after, and forwards whatever `diff`
|
|
83
|
+
* returns to the transcript. It never inspects the value, which is why `TSnapshot` is the
|
|
84
|
+
* host's to choose while the delta is a plain record: the snapshot is private and the delta is
|
|
85
|
+
* uploaded.
|
|
86
|
+
*
|
|
87
|
+
* Absent, a run simply reports no delta, which is the right answer for a host with no state to
|
|
88
|
+
* report rather than an error.
|
|
89
|
+
*/
|
|
90
|
+
export interface StateDelta<TContext, TSnapshot = unknown> {
|
|
91
|
+
capture(context: TContext): TSnapshot;
|
|
92
|
+
diff(before: TSnapshot, after: TSnapshot): Record<string, unknown> | undefined;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
/**
|
|
96
|
+
* RecoveryLookup answers "a call to this tool failed with this code: what should the model try
|
|
97
|
+
* instead?".
|
|
98
|
+
*
|
|
99
|
+
* The studio's routing tables implement it; a host without a recovery policy omits it and the
|
|
100
|
+
* failure is reported bare.
|
|
101
|
+
*/
|
|
102
|
+
export type RecoveryLookup = (tool: string, code?: string) => string | undefined;
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import type { AgentToolErrorCode } from "@mountaya/client";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* The one place the bus's failure vocabulary meets the wire's.
|
|
5
|
+
*
|
|
6
|
+
* Everything else a run says over the wire is generated: the event kinds, the input shapes,
|
|
7
|
+
* the create params. This is the translation between two vocabularies that are
|
|
8
|
+
* deliberately different sizes, which no generator can derive: the bus classifies failures
|
|
9
|
+
* a human surface can act on, and the wire carries the subset a MODEL can.
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* agentToolErrorCodes is every machine-readable failure code the wire carries, keyed off
|
|
14
|
+
* the generated type so it cannot drift from the contract in either direction: a code the
|
|
15
|
+
* contract gains leaves a missing key and one it drops leaves an excess key, and `tsc` fails
|
|
16
|
+
* on both.
|
|
17
|
+
*
|
|
18
|
+
* It is the wire twin of the bus's own `toolErrorCodeSchema`: a run copies the code onto the
|
|
19
|
+
* model's tool result, so the model branches on the KIND of failure rather than parsing a
|
|
20
|
+
* human sentence.
|
|
21
|
+
*/
|
|
22
|
+
const agentToolErrorCodes: Readonly<Record<AgentToolErrorCode, AgentToolErrorCode>> = {
|
|
23
|
+
canceled: "canceled",
|
|
24
|
+
"capability-denied": "capability-denied",
|
|
25
|
+
"collab-locked": "collab-locked",
|
|
26
|
+
"confirmation-denied": "confirmation-denied",
|
|
27
|
+
"confirmation-timeout": "confirmation-timeout",
|
|
28
|
+
conflict: "conflict",
|
|
29
|
+
"draft-open": "draft-open",
|
|
30
|
+
"edit-in-progress": "edit-in-progress",
|
|
31
|
+
forbidden: "forbidden",
|
|
32
|
+
internal: "internal",
|
|
33
|
+
"invalid-input": "invalid-input",
|
|
34
|
+
"limit-reached": "limit-reached",
|
|
35
|
+
"not-found": "not-found",
|
|
36
|
+
"rate-limited": "rate-limited",
|
|
37
|
+
timeout: "timeout",
|
|
38
|
+
unavailable: "unavailable",
|
|
39
|
+
"unknown-tool": "unknown-tool",
|
|
40
|
+
"upgrade-required": "upgrade-required",
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* isWireErrorCode answers whether a code is one the wire carries: an own key of
|
|
45
|
+
* {@link agentToolErrorCodes}. A name every object inherits (`constructor`, `toString`) is no
|
|
46
|
+
* key of the table, so it is a code the wire does not know.
|
|
47
|
+
*/
|
|
48
|
+
const isWireErrorCode = (code: string): code is AgentToolErrorCode =>
|
|
49
|
+
Object.hasOwn(agentToolErrorCodes, code);
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* toWireErrorCode narrows a bus failure code to the vocabulary the wire carries.
|
|
53
|
+
*
|
|
54
|
+
* The bus's own set is the wider of the two by design. Some of its codes describe a POINTER
|
|
55
|
+
* gesture that missed (a split point clicked off the line), and the tools that raise them are
|
|
56
|
+
* hidden from the model. Others describe the STUDIO rather than the request: no map mounted, no
|
|
57
|
+
* data seam, nothing open. Neither kind is something a model can act on, and neither is
|
|
58
|
+
* something this package can enumerate: the bus's vocabulary belongs to `@mountaya/studio`, one
|
|
59
|
+
* level up, and a table of its members here would be the dependency the split exists to refuse.
|
|
60
|
+
*
|
|
61
|
+
* So a code the wire does not know is reported as `internal`, which is what the contract says
|
|
62
|
+
* `internal` is for: "failed for a reason with no more specific code". It is deliberately not
|
|
63
|
+
* `invalid-input`: that one claims the ARGUMENTS were wrong, so a model reading it corrects
|
|
64
|
+
* arguments that were already correct and retries into the same wall.
|
|
65
|
+
*
|
|
66
|
+
* Undefined stays undefined: an unclassified failure carries no code either way.
|
|
67
|
+
*
|
|
68
|
+
* @param code The bus's failure code, or undefined for an unclassified failure.
|
|
69
|
+
* @returns The code when the wire carries it, `internal` for any other code, and undefined for
|
|
70
|
+
* none.
|
|
71
|
+
*/
|
|
72
|
+
export const toWireErrorCode = (code: string | undefined): AgentToolErrorCode | undefined => {
|
|
73
|
+
if (code === undefined) {
|
|
74
|
+
return undefined;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
return isWireErrorCode(code) ? agentToolErrorCodes[code] : "internal";
|
|
78
|
+
};
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* statusOf reads the HTTP status off an error the client raised for an answer, or undefined for
|
|
3
|
+
* an error no answer produced: a connection that failed, a fault in a host seam, a value that
|
|
4
|
+
* is no object.
|
|
5
|
+
*
|
|
6
|
+
* It reads the member structurally and never with `instanceof`. The error is thrown by
|
|
7
|
+
* `@mountaya/client`, which is a peer of this package and of every consumer of it. A tree that
|
|
8
|
+
* resolves two copies of that peer (an ESM and a CJS build, a linked checkout beside an
|
|
9
|
+
* installed one) loads two class objects, and an error thrown through one fails `instanceof`
|
|
10
|
+
* against the other. Every branch on the class then takes its fallback without a word: a member
|
|
11
|
+
* with no access reads a generic failure, and a stream answered 503 is given up on. A numeric
|
|
12
|
+
* `status` is the one fact both copies agree on.
|
|
13
|
+
*
|
|
14
|
+
* It is the one reader of that member in this package: the run engine judges a failed open and a
|
|
15
|
+
* failed start by it, the conversation's fault handling reads a start's refusal through it, and
|
|
16
|
+
* the collaboration session tells an edit signal refused for want of the write role by it.
|
|
17
|
+
*/
|
|
18
|
+
export const statusOf = (error: unknown): number | undefined => {
|
|
19
|
+
if (typeof error !== "object" || error === null || !("status" in error)) {
|
|
20
|
+
return undefined;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
const status: unknown = error.status;
|
|
24
|
+
|
|
25
|
+
return typeof status === "number" ? status : undefined;
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* WAIT_NAMING_STATUSES are the answers whose `Retry-After` an engine waits out before it asks
|
|
30
|
+
* again: 429, a limit that says when its window ends, and 503, the API unable to answer for a
|
|
31
|
+
* moment and saying when to come back.
|
|
32
|
+
*/
|
|
33
|
+
const WAIT_NAMING_STATUSES: readonly number[] = [429, 503];
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* retryAfterMsOf reads the wait a 429 or a 503 names, in milliseconds, off an error the client
|
|
37
|
+
* raised for it, or undefined for any other error and for one that names no wait. A wait of zero
|
|
38
|
+
* seconds is a wait it names, answered as 0, since SPEC §2 has a `Retry-After` replace the schedule
|
|
39
|
+
* whatever seconds it names: the one waited is then the draw above it alone.
|
|
40
|
+
*
|
|
41
|
+
* The client carries `Retry-After` as the seconds of `retryAfter` on the error it raises for an
|
|
42
|
+
* answer, a stream's refused open among them. Read structurally, as {@link statusOf} reads the
|
|
43
|
+
* status and for the same reason. A reopen sooner than a 429's wait is refused again, and counted:
|
|
44
|
+
* the open-streams bound that refuses a fourth tab of the same member answers the same until a
|
|
45
|
+
* stream ends. A 503's is what the API asks of a reader while the events of a stream cannot be
|
|
46
|
+
* reached, as while the store behind them fails over: a second, after which the stream opens
|
|
47
|
+
* again from the last event read and nothing is missed.
|
|
48
|
+
*/
|
|
49
|
+
export const retryAfterMsOf = (error: unknown): number | undefined => {
|
|
50
|
+
const status = statusOf(error);
|
|
51
|
+
if (
|
|
52
|
+
status === undefined ||
|
|
53
|
+
!WAIT_NAMING_STATUSES.includes(status) ||
|
|
54
|
+
typeof error !== "object" ||
|
|
55
|
+
error === null
|
|
56
|
+
) {
|
|
57
|
+
return undefined;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
const seconds: unknown = "retryAfter" in error ? error.retryAfter : undefined;
|
|
61
|
+
|
|
62
|
+
return typeof seconds === "number" && Number.isFinite(seconds) && seconds >= 0
|
|
63
|
+
? seconds * 1_000
|
|
64
|
+
: undefined;
|
|
65
|
+
};
|