@axiom-lattice/gateway 4.1.7 → 4.2.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/dist/chunk-K32XEQLH.mjs +28 -0
- package/dist/chunk-K32XEQLH.mjs.map +1 -0
- package/dist/{chunk-K4XELOSO.mjs → chunk-QKPZWWHH.mjs} +3 -2
- package/dist/{chunk-K4XELOSO.mjs.map → chunk-QKPZWWHH.mjs.map} +1 -1
- package/dist/embed/agent-chat-loader.js +1 -0
- package/dist/embed/embed-page-1c-75E4QIWF.js +1 -0
- package/dist/embed/embed-page-AgentDetailSideApp-6CVXM3P3.js +1 -0
- package/dist/embed/embed-page-AgentDetailSideApp-DRGKJ6C5.css +1 -0
- package/dist/embed/embed-page-AgentGovernanceWorkbench-4B3NJPCY.js +5 -0
- package/dist/embed/embed-page-AgentGovernanceWorkbench-SDS3GBCC.css +1 -0
- package/dist/embed/embed-page-ReactChart-OG5Z43H7.js +1 -0
- package/dist/embed/embed-page-ReactChart-VBM467ER.css +1 -0
- package/dist/embed/embed-page-ReactInfographic-IABAC7DO.js +574 -0
- package/dist/embed/embed-page-SkillFlow-GS4OUCJJ.js +1 -0
- package/dist/embed/embed-page-SkillFlow-VDPP5DFL.css +1 -0
- package/dist/embed/embed-page-TasksSideApp-F4XUHPTG.css +1 -0
- package/dist/embed/embed-page-TasksSideApp-I6Z7BOT2.js +241 -0
- package/dist/embed/embed-page-TeamWorkspace-DXKGNQ3C.css +1 -0
- package/dist/embed/embed-page-TeamWorkspace-LSCUIJDA.js +748 -0
- package/dist/embed/embed-page-TopologyRuntimeView-2NQ3OOYI.css +1 -0
- package/dist/embed/embed-page-TopologyRuntimeView-RY7NOUB7.js +6 -0
- package/dist/embed/embed-page-WorkflowAutomationView-MAYS27YJ.css +1 -0
- package/dist/embed/embed-page-WorkflowAutomationView-RNKIKDUX.js +3 -0
- package/dist/embed/embed-page-abap-QKV7XZRP.js +1 -0
- package/dist/embed/embed-page-abnf-534KGIL5.js +1 -0
- package/dist/embed/embed-page-abnf-NNWX7KPS.js +1 -0
- package/dist/embed/embed-page-accesslog-K5DAETBI.js +1 -0
- package/dist/embed/embed-page-actionscript-MLTGVDIY.js +1 -0
- package/dist/embed/embed-page-actionscript-YXZSI3FP.js +1 -0
- package/dist/embed/embed-page-ada-SMIJQ6T7.js +1 -0
- package/dist/embed/embed-page-ada-Z5BYNU6B.js +1 -0
- package/dist/embed/embed-page-agda-WCRTGDJB.js +1 -0
- package/dist/embed/embed-page-al-2LSX2G2U.js +1 -0
- package/dist/embed/embed-page-all-RTJLYZHS.js +1 -0
- package/dist/embed/embed-page-angelscript-4S3XC2EJ.js +1 -0
- package/dist/embed/embed-page-antlr4-OLOPZLHD.js +1 -0
- package/dist/embed/embed-page-apache-RGO2UM6T.js +1 -0
- package/dist/embed/embed-page-apacheconf-EKQ6F4ZQ.js +1 -0
- package/dist/embed/embed-page-apex-ZJTOIW4M.js +1 -0
- package/dist/embed/embed-page-apl-W7YETB5L.js +1 -0
- package/dist/embed/embed-page-applescript-I4PV6U4X.js +1 -0
- package/dist/embed/embed-page-applescript-M2D2KKDY.js +1 -0
- package/dist/embed/embed-page-aql-V6TCDQAH.js +1 -0
- package/dist/embed/embed-page-arcade-TSPLEDM5.js +1 -0
- package/dist/embed/embed-page-architecture-U656AL7Q-55BYHO3H.js +1 -0
- package/dist/embed/embed-page-architectureDiagram-VXUJARFQ-GDHKRBZH.js +36 -0
- package/dist/embed/embed-page-arduino-7N264XVW.js +1 -0
- package/dist/embed/embed-page-arduino-XUEUIP7S.js +1 -0
- package/dist/embed/embed-page-arff-M7PKJV7Y.js +1 -0
- package/dist/embed/embed-page-armasm-OAQGLAMS.js +1 -0
- package/dist/embed/embed-page-armasm-PTMJUNBD.js +1 -0
- package/dist/embed/embed-page-arturo-VYVR5YRA.js +1 -0
- package/dist/embed/embed-page-asciidoc-6GDV5NP4.js +1 -0
- package/dist/embed/embed-page-asciidoc-PDLRDQNM.js +1 -0
- package/dist/embed/embed-page-asm6502-LVC7KLV5.js +1 -0
- package/dist/embed/embed-page-asmatmel-B4D7TBZY.js +1 -0
- package/dist/embed/embed-page-aspectj-QZFNA4MK.js +1 -0
- package/dist/embed/embed-page-aspnet-4JJQ3PPT.js +1 -0
- package/dist/embed/embed-page-autohotkey-4QUCSDML.js +1 -0
- package/dist/embed/embed-page-autohotkey-SVPZNOL7.js +1 -0
- package/dist/embed/embed-page-autoit-IXYC6T6A.js +1 -0
- package/dist/embed/embed-page-autoit-PFZZYGX5.js +1 -0
- package/dist/embed/embed-page-avisynth-MVQJIFSP.js +1 -0
- package/dist/embed/embed-page-avrasm-XYNKWFKC.js +1 -0
- package/dist/embed/embed-page-avro-idl-4AA2QRRU.js +1 -0
- package/dist/embed/embed-page-awk-JNS3RERS.js +1 -0
- package/dist/embed/embed-page-awk-RMGF56MA.js +1 -0
- package/dist/embed/embed-page-axapta-6U5QN2JT.js +1 -0
- package/dist/embed/embed-page-bash-UJJ4GKW6.js +1 -0
- package/dist/embed/embed-page-bash-VYDNQBY7.js +1 -0
- package/dist/embed/embed-page-basic-6KLN4O27.js +1 -0
- package/dist/embed/embed-page-basic-EJRJ7W4E.js +1 -0
- package/dist/embed/embed-page-batch-AJOBLMJ2.js +1 -0
- package/dist/embed/embed-page-bbcode-CIP6MR7G.js +1 -0
- package/dist/embed/embed-page-bbj-OPFURIS3.js +1 -0
- package/dist/embed/embed-page-bicep-7BI3OTK4.js +1 -0
- package/dist/embed/embed-page-birb-LWSJQUWN.js +1 -0
- package/dist/embed/embed-page-bison-HDVOA2OF.js +1 -0
- package/dist/embed/embed-page-blockDiagram-VD42YOAC-6GQBPG3N.js +122 -0
- package/dist/embed/embed-page-bnf-7O24GKM6.js +1 -0
- package/dist/embed/embed-page-bnf-TCLPD45L.js +1 -0
- package/dist/embed/embed-page-bqn-LADFOREK.js +1 -0
- package/dist/embed/embed-page-brainfuck-B2QDW5Y5.js +1 -0
- package/dist/embed/embed-page-brainfuck-HUZY5LJA.js +1 -0
- package/dist/embed/embed-page-brightscript-4E54PL3L.js +1 -0
- package/dist/embed/embed-page-bro-DEBMJONL.js +1 -0
- package/dist/embed/embed-page-bsl-5HTEKAYP.js +1 -0
- package/dist/embed/embed-page-c-LFRMHVS4.js +1 -0
- package/dist/embed/embed-page-c-X5PJHL4T.js +1 -0
- package/dist/embed/embed-page-c-like-UPVRYRH5.js +1 -0
- package/dist/embed/embed-page-c4Diagram-YG6GDRKO-UBUOGTT3.js +10 -0
- package/dist/embed/embed-page-cal-MS5NKCDW.js +1 -0
- package/dist/embed/embed-page-capnproto-VVJPMDQX.js +1 -0
- package/dist/embed/embed-page-ceylon-TOPAPEAZ.js +1 -0
- package/dist/embed/embed-page-cfscript-P3X63VSB.js +1 -0
- package/dist/embed/embed-page-chaiscript-QZLDHGV3.js +1 -0
- package/dist/embed/embed-page-chunk-2AUFZBHG.js +1 -0
- package/dist/embed/embed-page-chunk-2AX46B4A.js +1 -0
- package/dist/embed/embed-page-chunk-2BEHY2KL.js +1 -0
- package/dist/embed/embed-page-chunk-2CM5KQAO.js +1 -0
- package/dist/embed/embed-page-chunk-2DKYYWQC.js +1 -0
- package/dist/embed/embed-page-chunk-2GFIRW6Z.js +1 -0
- package/dist/embed/embed-page-chunk-2GGHQJ6Z.js +1 -0
- package/dist/embed/embed-page-chunk-2IURSVR2.js +7 -0
- package/dist/embed/embed-page-chunk-2NLG2PBF.js +1 -0
- package/dist/embed/embed-page-chunk-2REOJOLY.js +1 -0
- package/dist/embed/embed-page-chunk-2SKSDKSN.js +1 -0
- package/dist/embed/embed-page-chunk-2V6IHON2.js +1 -0
- package/dist/embed/embed-page-chunk-2VJ7T35I.js +1 -0
- package/dist/embed/embed-page-chunk-2WL6TSEG.js +1 -0
- package/dist/embed/embed-page-chunk-2XLPEIWW.js +1 -0
- package/dist/embed/embed-page-chunk-2YRVPZIU.js +1 -0
- package/dist/embed/embed-page-chunk-33GTW5LX.js +1 -0
- package/dist/embed/embed-page-chunk-33LYY5FY.js +1 -0
- package/dist/embed/embed-page-chunk-342GWWY6.js +1 -0
- package/dist/embed/embed-page-chunk-34RH2U7Z.js +1 -0
- package/dist/embed/embed-page-chunk-37BFU4NL.js +1 -0
- package/dist/embed/embed-page-chunk-3C32LJTO.js +1 -0
- package/dist/embed/embed-page-chunk-3D3RUB6Q.js +1 -0
- package/dist/embed/embed-page-chunk-3DDNDQND.js +1 -0
- package/dist/embed/embed-page-chunk-3FQ3EELN.js +1 -0
- package/dist/embed/embed-page-chunk-3GRDXHWH.js +1 -0
- package/dist/embed/embed-page-chunk-3GTSDITA.js +1 -0
- package/dist/embed/embed-page-chunk-3IP6ESHH.js +1 -0
- package/dist/embed/embed-page-chunk-3J7LPOGR.js +1 -0
- package/dist/embed/embed-page-chunk-3KBA5YLX.js +1 -0
- package/dist/embed/embed-page-chunk-3MESXVLG.js +1 -0
- package/dist/embed/embed-page-chunk-3QOIYWK3.js +1 -0
- package/dist/embed/embed-page-chunk-3WBHNFJP.js +1 -0
- package/dist/embed/embed-page-chunk-3YID7Y73.js +1 -0
- package/dist/embed/embed-page-chunk-43APLD2U.js +1 -0
- package/dist/embed/embed-page-chunk-447KJWVF.js +1 -0
- package/dist/embed/embed-page-chunk-47OYOFAD.js +1 -0
- package/dist/embed/embed-page-chunk-4APB7U5B.js +1 -0
- package/dist/embed/embed-page-chunk-4BIOW547.js +3 -0
- package/dist/embed/embed-page-chunk-4BKXE5ON.js +14 -0
- package/dist/embed/embed-page-chunk-4BRWUEYH.js +1 -0
- package/dist/embed/embed-page-chunk-4C2ZTZLC.js +1 -0
- package/dist/embed/embed-page-chunk-4DT3DP4G.js +3 -0
- package/dist/embed/embed-page-chunk-4FS42IYM.js +1 -0
- package/dist/embed/embed-page-chunk-4JZFQLML.js +1 -0
- package/dist/embed/embed-page-chunk-4LC4UT4R.js +1 -0
- package/dist/embed/embed-page-chunk-4MNX7JDW.js +2 -0
- package/dist/embed/embed-page-chunk-4NIWV5BC.js +1 -0
- package/dist/embed/embed-page-chunk-4O7YNJLI.js +1 -0
- package/dist/embed/embed-page-chunk-4OTU4CRR.js +1 -0
- package/dist/embed/embed-page-chunk-4PR66FMJ.js +1 -0
- package/dist/embed/embed-page-chunk-4R5F5OQK.js +1 -0
- package/dist/embed/embed-page-chunk-4SGVKO3D.js +1 -0
- package/dist/embed/embed-page-chunk-4TEJCUD5.js +1 -0
- package/dist/embed/embed-page-chunk-4WOTSHAW.js +1 -0
- package/dist/embed/embed-page-chunk-4X5XHAMX.js +5 -0
- package/dist/embed/embed-page-chunk-4XVBSVFM.js +1 -0
- package/dist/embed/embed-page-chunk-4ZIJQUGM.js +1 -0
- package/dist/embed/embed-page-chunk-53PYTL4U.js +1 -0
- package/dist/embed/embed-page-chunk-53QS4RRO.js +1 -0
- package/dist/embed/embed-page-chunk-54DGJLXZ.js +1 -0
- package/dist/embed/embed-page-chunk-57BJJSAV.js +1 -0
- package/dist/embed/embed-page-chunk-5DAOHO64.js +1 -0
- package/dist/embed/embed-page-chunk-5HA2MCVW.js +1 -0
- package/dist/embed/embed-page-chunk-5HNRARTT.js +1 -0
- package/dist/embed/embed-page-chunk-5IG7MZQF.js +1 -0
- package/dist/embed/embed-page-chunk-5JDQ456X.js +7 -0
- package/dist/embed/embed-page-chunk-5LKQWBUZ.js +339 -0
- package/dist/embed/embed-page-chunk-5LZHM64O.js +1 -0
- package/dist/embed/embed-page-chunk-5OTSEOBG.js +1 -0
- package/dist/embed/embed-page-chunk-5WMGNRUZ.js +79 -0
- package/dist/embed/embed-page-chunk-5YNTYDFR.js +1 -0
- package/dist/embed/embed-page-chunk-62XZFSLM.js +1 -0
- package/dist/embed/embed-page-chunk-6433URSF.js +1 -0
- package/dist/embed/embed-page-chunk-6633JIZI.js +1 -0
- package/dist/embed/embed-page-chunk-664ZGB66.js +1 -0
- package/dist/embed/embed-page-chunk-66JWK64A.js +1 -0
- package/dist/embed/embed-page-chunk-66PSFC5S.js +1 -0
- package/dist/embed/embed-page-chunk-67RFPBNS.js +1 -0
- package/dist/embed/embed-page-chunk-6A6HYD7S.js +1 -0
- package/dist/embed/embed-page-chunk-6AF3OC6E.js +1 -0
- package/dist/embed/embed-page-chunk-6BL2XYV2.js +1 -0
- package/dist/embed/embed-page-chunk-6BUDTOPG.js +54 -0
- package/dist/embed/embed-page-chunk-6D23MLVG.js +1 -0
- package/dist/embed/embed-page-chunk-6DD7CBYV.js +1 -0
- package/dist/embed/embed-page-chunk-6DYN2PCR.js +1 -0
- package/dist/embed/embed-page-chunk-6E33CLHM.js +1 -0
- package/dist/embed/embed-page-chunk-6FFWZNBJ.js +1 -0
- package/dist/embed/embed-page-chunk-6G24DMH3.js +1 -0
- package/dist/embed/embed-page-chunk-6JFHQ7NQ.js +1 -0
- package/dist/embed/embed-page-chunk-6NWENUQ7.js +1 -0
- package/dist/embed/embed-page-chunk-6OKUWTCF.js +1 -0
- package/dist/embed/embed-page-chunk-6QTEF2NW.js +1 -0
- package/dist/embed/embed-page-chunk-6SFPT5PF.js +1 -0
- package/dist/embed/embed-page-chunk-6VRE3UPC.js +1 -0
- package/dist/embed/embed-page-chunk-6XNKALVC.js +1 -0
- package/dist/embed/embed-page-chunk-6XZZ6A3N.js +1 -0
- package/dist/embed/embed-page-chunk-6Y3UYJ6Z.js +1 -0
- package/dist/embed/embed-page-chunk-6ZXRL3VU.js +1 -0
- package/dist/embed/embed-page-chunk-72JNWX43.js +1 -0
- package/dist/embed/embed-page-chunk-734LUAPQ.js +1 -0
- package/dist/embed/embed-page-chunk-74YMVV5T.js +1 -0
- package/dist/embed/embed-page-chunk-75BP54HX.js +1 -0
- package/dist/embed/embed-page-chunk-76S2KVCN.js +1 -0
- package/dist/embed/embed-page-chunk-77SKWVKH.js +1 -0
- package/dist/embed/embed-page-chunk-7AKQRM6L.js +1 -0
- package/dist/embed/embed-page-chunk-7ASML425.js +1 -0
- package/dist/embed/embed-page-chunk-7BEP247X.js +1 -0
- package/dist/embed/embed-page-chunk-7CFGO35V.js +153 -0
- package/dist/embed/embed-page-chunk-7CW4T6JX.js +1 -0
- package/dist/embed/embed-page-chunk-7GLQRV3J.js +1 -0
- package/dist/embed/embed-page-chunk-7I5CUKLE.js +1 -0
- package/dist/embed/embed-page-chunk-7IYYKQJE.js +1 -0
- package/dist/embed/embed-page-chunk-7JBDPIC6.js +1 -0
- package/dist/embed/embed-page-chunk-7KSOII2E.js +1 -0
- package/dist/embed/embed-page-chunk-7MYHMZR7.js +1 -0
- package/dist/embed/embed-page-chunk-7OYMAA4V.js +1 -0
- package/dist/embed/embed-page-chunk-7Q3EEWYO.js +1 -0
- package/dist/embed/embed-page-chunk-7RPAJAU7.js +1 -0
- package/dist/embed/embed-page-chunk-7TH7FFVA.js +1 -0
- package/dist/embed/embed-page-chunk-7TMVQS3E.js +1 -0
- package/dist/embed/embed-page-chunk-7TY2R7O2.js +1 -0
- package/dist/embed/embed-page-chunk-7XMMIQFH.js +1 -0
- package/dist/embed/embed-page-chunk-A2LQIHX4.js +261 -0
- package/dist/embed/embed-page-chunk-A2QFCP3F.js +1 -0
- package/dist/embed/embed-page-chunk-A2XJ36CA.js +1 -0
- package/dist/embed/embed-page-chunk-A3QFY3IA.js +1 -0
- package/dist/embed/embed-page-chunk-A5CPK26D.js +1 -0
- package/dist/embed/embed-page-chunk-AAU4RSSU.js +1 -0
- package/dist/embed/embed-page-chunk-AB3Q2HOO.js +1 -0
- package/dist/embed/embed-page-chunk-ABFWMLOR.js +1 -0
- package/dist/embed/embed-page-chunk-ABIN3BPL.js +1 -0
- package/dist/embed/embed-page-chunk-ACIRZYZQ.js +1 -0
- package/dist/embed/embed-page-chunk-AEGLPY52.js +1 -0
- package/dist/embed/embed-page-chunk-AJPIJ5Q6.js +1 -0
- package/dist/embed/embed-page-chunk-AKPA6XS3.js +2 -0
- package/dist/embed/embed-page-chunk-ANZXYPYQ.js +1 -0
- package/dist/embed/embed-page-chunk-AO6KUNOD.js +1 -0
- package/dist/embed/embed-page-chunk-APIN6IE2.js +1 -0
- package/dist/embed/embed-page-chunk-AQ7P7MPQ.js +1 -0
- package/dist/embed/embed-page-chunk-AQLFD3FB.js +1 -0
- package/dist/embed/embed-page-chunk-AQTLXHTW.js +1 -0
- package/dist/embed/embed-page-chunk-ARHDAWDT.js +1 -0
- package/dist/embed/embed-page-chunk-ARM7QQNJ.js +1 -0
- package/dist/embed/embed-page-chunk-ARRA262W.js +1 -0
- package/dist/embed/embed-page-chunk-AWTS5ZYY.js +1 -0
- package/dist/embed/embed-page-chunk-AYOVLRHX.js +2167 -0
- package/dist/embed/embed-page-chunk-B43OSKKN.js +1 -0
- package/dist/embed/embed-page-chunk-B537QK4H.js +1 -0
- package/dist/embed/embed-page-chunk-B6767LVL.js +1 -0
- package/dist/embed/embed-page-chunk-BBSIPZIJ.js +2 -0
- package/dist/embed/embed-page-chunk-BDE6VTZO.js +1 -0
- package/dist/embed/embed-page-chunk-BDR2AV4C.js +1 -0
- package/dist/embed/embed-page-chunk-BEZUVEQG.js +1 -0
- package/dist/embed/embed-page-chunk-BHFBNKCC.js +1 -0
- package/dist/embed/embed-page-chunk-BIXWOREM.js +1 -0
- package/dist/embed/embed-page-chunk-BO56ESC4.js +1 -0
- package/dist/embed/embed-page-chunk-BOBSU3BS.js +1 -0
- package/dist/embed/embed-page-chunk-BOEM7RR2.js +1 -0
- package/dist/embed/embed-page-chunk-BOGY5UJK.js +1 -0
- package/dist/embed/embed-page-chunk-BOQ4YJRC.js +1 -0
- package/dist/embed/embed-page-chunk-BR7RHIPR.js +1 -0
- package/dist/embed/embed-page-chunk-BRF3QA4U.js +1 -0
- package/dist/embed/embed-page-chunk-BSHGJSTY.js +1 -0
- package/dist/embed/embed-page-chunk-BTZ6QKA5.js +1 -0
- package/dist/embed/embed-page-chunk-BXUFKFRH.js +1 -0
- package/dist/embed/embed-page-chunk-BYGKM25Z.js +1 -0
- package/dist/embed/embed-page-chunk-BZI3YCE7.js +1 -0
- package/dist/embed/embed-page-chunk-CADGB443.js +1 -0
- package/dist/embed/embed-page-chunk-CCNLQNKX.js +1 -0
- package/dist/embed/embed-page-chunk-CDFDSWNI.js +1 -0
- package/dist/embed/embed-page-chunk-CGMYXHWK.js +1 -0
- package/dist/embed/embed-page-chunk-CIVBRTV6.js +1 -0
- package/dist/embed/embed-page-chunk-CN3CMET4.js +1 -0
- package/dist/embed/embed-page-chunk-CT5EIC3O.js +1 -0
- package/dist/embed/embed-page-chunk-CTA4NVOR.js +1 -0
- package/dist/embed/embed-page-chunk-CTC4RKCL.js +1 -0
- package/dist/embed/embed-page-chunk-CUEEKFI2.js +1 -0
- package/dist/embed/embed-page-chunk-CUHPLIQJ.js +1 -0
- package/dist/embed/embed-page-chunk-CV7IET55.js +1 -0
- package/dist/embed/embed-page-chunk-CYZTUSN2.js +1 -0
- package/dist/embed/embed-page-chunk-CZBGTBTK.js +1 -0
- package/dist/embed/embed-page-chunk-CZXPKAAI.js +1 -0
- package/dist/embed/embed-page-chunk-D2R2NSRR.js +1 -0
- package/dist/embed/embed-page-chunk-D5AJQJD5.js +2 -0
- package/dist/embed/embed-page-chunk-D63UWHSO.js +1 -0
- package/dist/embed/embed-page-chunk-D6DA3A6A.js +1 -0
- package/dist/embed/embed-page-chunk-D73UXOFT.js +1 -0
- package/dist/embed/embed-page-chunk-DCS7FNFS.js +1 -0
- package/dist/embed/embed-page-chunk-DDTPPBJY.js +1 -0
- package/dist/embed/embed-page-chunk-DE7BGENS.js +1 -0
- package/dist/embed/embed-page-chunk-DEHJLLKN.js +1 -0
- package/dist/embed/embed-page-chunk-DHGHAGLL.js +1 -0
- package/dist/embed/embed-page-chunk-DIE6AVGX.js +1 -0
- package/dist/embed/embed-page-chunk-DM5ESF6C.js +1 -0
- package/dist/embed/embed-page-chunk-DQ4UEELI.js +1 -0
- package/dist/embed/embed-page-chunk-DVHOG6AY.js +31 -0
- package/dist/embed/embed-page-chunk-DWJV4T7Q.js +1 -0
- package/dist/embed/embed-page-chunk-DXVMFTPC.js +1 -0
- package/dist/embed/embed-page-chunk-DYBQVRXS.js +1 -0
- package/dist/embed/embed-page-chunk-DYPHXOEP.js +1 -0
- package/dist/embed/embed-page-chunk-DZRJEWQO.js +1 -0
- package/dist/embed/embed-page-chunk-E4OFRMJJ.js +1 -0
- package/dist/embed/embed-page-chunk-E7ECPW5G.js +1 -0
- package/dist/embed/embed-page-chunk-E7MYEYS3.js +1 -0
- package/dist/embed/embed-page-chunk-EAFE4NIS.js +1 -0
- package/dist/embed/embed-page-chunk-EAUQPBSN.js +1 -0
- package/dist/embed/embed-page-chunk-EBXTVXZF.js +1 -0
- package/dist/embed/embed-page-chunk-EG5CLCWE.js +1 -0
- package/dist/embed/embed-page-chunk-EGTJFOFF.js +1 -0
- package/dist/embed/embed-page-chunk-EKYNYNIX.js +1 -0
- package/dist/embed/embed-page-chunk-EPEKIAZP.js +37 -0
- package/dist/embed/embed-page-chunk-ER4O2WLO.js +1 -0
- package/dist/embed/embed-page-chunk-ESAZNCCX.js +1 -0
- package/dist/embed/embed-page-chunk-ESCA5JCS.js +1 -0
- package/dist/embed/embed-page-chunk-ESJEHJ5L.js +140 -0
- package/dist/embed/embed-page-chunk-ESLOGPBN.js +60 -0
- package/dist/embed/embed-page-chunk-ETP6AXEM.js +1 -0
- package/dist/embed/embed-page-chunk-ETY7U4DI.js +1 -0
- package/dist/embed/embed-page-chunk-EUOOO2LS.js +1 -0
- package/dist/embed/embed-page-chunk-EWKLGZMO.js +1 -0
- package/dist/embed/embed-page-chunk-EY64QEHF.js +1 -0
- package/dist/embed/embed-page-chunk-EY7WOIDX.js +1 -0
- package/dist/embed/embed-page-chunk-EYRF75EG.js +1 -0
- package/dist/embed/embed-page-chunk-EYZS7M3F.js +1 -0
- package/dist/embed/embed-page-chunk-F45LQ3RS.js +1 -0
- package/dist/embed/embed-page-chunk-F7IBVBXT.js +1 -0
- package/dist/embed/embed-page-chunk-FBXKGHOH.js +1 -0
- package/dist/embed/embed-page-chunk-FEEJAFK4.js +1 -0
- package/dist/embed/embed-page-chunk-FEOK4OPE.js +1 -0
- package/dist/embed/embed-page-chunk-FJ3EESJB.js +1 -0
- package/dist/embed/embed-page-chunk-FM5K6PQS.js +1 -0
- package/dist/embed/embed-page-chunk-FMMAQPSK.js +1 -0
- package/dist/embed/embed-page-chunk-FSDLV5QO.js +1 -0
- package/dist/embed/embed-page-chunk-FTXNVWT5.js +1 -0
- package/dist/embed/embed-page-chunk-FUIKRW55.js +1 -0
- package/dist/embed/embed-page-chunk-FVK265KY.js +1 -0
- package/dist/embed/embed-page-chunk-FWTICTEC.js +1 -0
- package/dist/embed/embed-page-chunk-FWXSX2W4.js +1 -0
- package/dist/embed/embed-page-chunk-FYBEULVS.js +1 -0
- package/dist/embed/embed-page-chunk-G5HXFDFC.js +1 -0
- package/dist/embed/embed-page-chunk-G5KW2SOV.js +1 -0
- package/dist/embed/embed-page-chunk-GAF3UVZE.js +1 -0
- package/dist/embed/embed-page-chunk-GFOWXZE5.js +1 -0
- package/dist/embed/embed-page-chunk-GH22I3LG.js +1 -0
- package/dist/embed/embed-page-chunk-GJCMO4YN.js +1 -0
- package/dist/embed/embed-page-chunk-GKA7H24K.js +1 -0
- package/dist/embed/embed-page-chunk-GL7A7IDD.js +1 -0
- package/dist/embed/embed-page-chunk-GNEIDEFX.js +1 -0
- package/dist/embed/embed-page-chunk-GPISFLXW.js +1 -0
- package/dist/embed/embed-page-chunk-GSWEZJ66.js +1 -0
- package/dist/embed/embed-page-chunk-GU7JLLYO.js +1 -0
- package/dist/embed/embed-page-chunk-GVZMVAXF.js +70 -0
- package/dist/embed/embed-page-chunk-GZBFDD4Y.js +1 -0
- package/dist/embed/embed-page-chunk-H3HFE6RK.js +1 -0
- package/dist/embed/embed-page-chunk-H3NYTZT4.js +3 -0
- package/dist/embed/embed-page-chunk-H7CZ6EXN.js +1 -0
- package/dist/embed/embed-page-chunk-H7HZ35QN.js +1 -0
- package/dist/embed/embed-page-chunk-H7XTOBKB.js +1 -0
- package/dist/embed/embed-page-chunk-HD5CA5Q2.js +1 -0
- package/dist/embed/embed-page-chunk-HDAHRUIT.js +1 -0
- package/dist/embed/embed-page-chunk-HGSQ4AUI.js +1 -0
- package/dist/embed/embed-page-chunk-HJJHFV6J.js +1 -0
- package/dist/embed/embed-page-chunk-HK4QMNL5.js +1 -0
- package/dist/embed/embed-page-chunk-HNWETJWB.js +1 -0
- package/dist/embed/embed-page-chunk-HQCMCYUS.js +1 -0
- package/dist/embed/embed-page-chunk-HQUXJKTG.js +1 -0
- package/dist/embed/embed-page-chunk-HTEALTO4.js +1 -0
- package/dist/embed/embed-page-chunk-HUKTQVZB.js +1 -0
- package/dist/embed/embed-page-chunk-HVN56UNP.js +1 -0
- package/dist/embed/embed-page-chunk-HVTV25TI.js +1 -0
- package/dist/embed/embed-page-chunk-HWNFA7PS.js +1 -0
- package/dist/embed/embed-page-chunk-I2JNPKJK.js +1 -0
- package/dist/embed/embed-page-chunk-I4BCBOUA.js +1 -0
- package/dist/embed/embed-page-chunk-I55FBKLU.js +3 -0
- package/dist/embed/embed-page-chunk-I5KTSZJX.js +1 -0
- package/dist/embed/embed-page-chunk-I7YQ2TGZ.js +1 -0
- package/dist/embed/embed-page-chunk-ICJOJGQ6.js +1 -0
- package/dist/embed/embed-page-chunk-IDJWNYLR.js +1 -0
- package/dist/embed/embed-page-chunk-IE6O7ZMQ.js +15 -0
- package/dist/embed/embed-page-chunk-IFCJLAOB.js +1 -0
- package/dist/embed/embed-page-chunk-IFEQPNI2.js +1 -0
- package/dist/embed/embed-page-chunk-IGBRMGDS.js +1 -0
- package/dist/embed/embed-page-chunk-IGIFLYCQ.js +1 -0
- package/dist/embed/embed-page-chunk-IGOT476M.js +1 -0
- package/dist/embed/embed-page-chunk-IHNNPY3P.js +1 -0
- package/dist/embed/embed-page-chunk-II6ODJLE.js +1 -0
- package/dist/embed/embed-page-chunk-IIIA5HUO.js +1 -0
- package/dist/embed/embed-page-chunk-IIYOOZDE.js +1 -0
- package/dist/embed/embed-page-chunk-IJPRKD63.js +1 -0
- package/dist/embed/embed-page-chunk-IK2TPQVX.js +1 -0
- package/dist/embed/embed-page-chunk-INGZ5SYE.js +1 -0
- package/dist/embed/embed-page-chunk-INUQ73SI.js +1 -0
- package/dist/embed/embed-page-chunk-IPI53MN3.js +1 -0
- package/dist/embed/embed-page-chunk-IPMWXKCK.js +1 -0
- package/dist/embed/embed-page-chunk-IRP2UOPH.js +1 -0
- package/dist/embed/embed-page-chunk-ISY7S7N6.js +1 -0
- package/dist/embed/embed-page-chunk-IT5VM3N7.js +1 -0
- package/dist/embed/embed-page-chunk-IX4WLWCY.js +28 -0
- package/dist/embed/embed-page-chunk-IYK5VAB3.js +1 -0
- package/dist/embed/embed-page-chunk-IZ6ZGFSG.js +1 -0
- package/dist/embed/embed-page-chunk-J4VBM2JB.js +1 -0
- package/dist/embed/embed-page-chunk-J7KNZGPV.js +1 -0
- package/dist/embed/embed-page-chunk-JADTV5YD.js +1 -0
- package/dist/embed/embed-page-chunk-JEW2Y2ED.js +1 -0
- package/dist/embed/embed-page-chunk-JFK56NZW.js +1 -0
- package/dist/embed/embed-page-chunk-JLWIJ4BP.js +1 -0
- package/dist/embed/embed-page-chunk-JNXBKMN6.js +1 -0
- package/dist/embed/embed-page-chunk-JOJ4VSO5.js +1 -0
- package/dist/embed/embed-page-chunk-JQQ6C3ST.js +1 -0
- package/dist/embed/embed-page-chunk-JUZFORQA.js +1 -0
- package/dist/embed/embed-page-chunk-JYEMOI5G.js +1 -0
- package/dist/embed/embed-page-chunk-JYQTTU7F.js +1 -0
- package/dist/embed/embed-page-chunk-K2NBNWDK.js +1 -0
- package/dist/embed/embed-page-chunk-K7I5Z2RN.js +1 -0
- package/dist/embed/embed-page-chunk-K7JAB46X.js +1 -0
- package/dist/embed/embed-page-chunk-KE32OJIP.js +1 -0
- package/dist/embed/embed-page-chunk-KEKB3BUG.js +1 -0
- package/dist/embed/embed-page-chunk-KG5A66WX.js +525 -0
- package/dist/embed/embed-page-chunk-KGP2RGEC.js +1 -0
- package/dist/embed/embed-page-chunk-KGX7G7XQ.js +1 -0
- package/dist/embed/embed-page-chunk-KM5NL7BL.js +1 -0
- package/dist/embed/embed-page-chunk-KQNRWZKR.js +1 -0
- package/dist/embed/embed-page-chunk-KUTM5AGJ.js +1 -0
- package/dist/embed/embed-page-chunk-KW44NUT4.js +1 -0
- package/dist/embed/embed-page-chunk-KWRAXHKX.js +1 -0
- package/dist/embed/embed-page-chunk-KZWWYO7Z.js +1 -0
- package/dist/embed/embed-page-chunk-L2QFIJ4P.js +1 -0
- package/dist/embed/embed-page-chunk-L3RQ76LD.js +1 -0
- package/dist/embed/embed-page-chunk-L6GX525D.js +1 -0
- package/dist/embed/embed-page-chunk-LDFGGZC6.js +1 -0
- package/dist/embed/embed-page-chunk-LEAHYMKH.js +1 -0
- package/dist/embed/embed-page-chunk-LH2NUQ2C.js +1 -0
- package/dist/embed/embed-page-chunk-LIJVWBYO.js +1 -0
- package/dist/embed/embed-page-chunk-LJBLK3MD.js +1 -0
- package/dist/embed/embed-page-chunk-LJJJJZT7.js +1 -0
- package/dist/embed/embed-page-chunk-LJZ2VDC6.js +1 -0
- package/dist/embed/embed-page-chunk-LKBECLX2.js +1 -0
- package/dist/embed/embed-page-chunk-LL4XKLOG.js +1 -0
- package/dist/embed/embed-page-chunk-LLFEIUVK.js +1 -0
- package/dist/embed/embed-page-chunk-LMLHHN2B.js +1 -0
- package/dist/embed/embed-page-chunk-LOLMAI3V.js +1 -0
- package/dist/embed/embed-page-chunk-LPXAKW7Q.js +1 -0
- package/dist/embed/embed-page-chunk-LRB5IXLV.js +1 -0
- package/dist/embed/embed-page-chunk-LW3LUJEG.js +1 -0
- package/dist/embed/embed-page-chunk-LWERP7BS.js +1 -0
- package/dist/embed/embed-page-chunk-M4ACA43K.js +1 -0
- package/dist/embed/embed-page-chunk-M5HO3OG6.js +1 -0
- package/dist/embed/embed-page-chunk-M7F46E23.js +1 -0
- package/dist/embed/embed-page-chunk-MASNBRHM.js +1 -0
- package/dist/embed/embed-page-chunk-MB65DZAX.js +14 -0
- package/dist/embed/embed-page-chunk-MB77ZI4D.js +1 -0
- package/dist/embed/embed-page-chunk-MEC3JUW7.js +1 -0
- package/dist/embed/embed-page-chunk-MG5LALIS.js +1 -0
- package/dist/embed/embed-page-chunk-MHSEFTKR.js +1 -0
- package/dist/embed/embed-page-chunk-MKV2QNSI.js +1 -0
- package/dist/embed/embed-page-chunk-MMHCEL7E.js +1 -0
- package/dist/embed/embed-page-chunk-MMXDBRLY.js +1 -0
- package/dist/embed/embed-page-chunk-MSYFW3OJ.js +1 -0
- package/dist/embed/embed-page-chunk-MVLHDASB.js +1 -0
- package/dist/embed/embed-page-chunk-N252QSMT.js +1 -0
- package/dist/embed/embed-page-chunk-N7NXBLSR.js +1 -0
- package/dist/embed/embed-page-chunk-NBNJGF7O.js +1 -0
- package/dist/embed/embed-page-chunk-NG7LKEPN.js +1 -0
- package/dist/embed/embed-page-chunk-NHOBB2JQ.js +1 -0
- package/dist/embed/embed-page-chunk-NIFSD4XH.js +1 -0
- package/dist/embed/embed-page-chunk-NJP7LGPJ.js +1 -0
- package/dist/embed/embed-page-chunk-NLMEH7HI.js +1 -0
- package/dist/embed/embed-page-chunk-NLZ6F3ON.js +1 -0
- package/dist/embed/embed-page-chunk-NMUKLFBY.js +1 -0
- package/dist/embed/embed-page-chunk-NMZP7U6I.js +1 -0
- package/dist/embed/embed-page-chunk-NN7VEJ2G.js +1 -0
- package/dist/embed/embed-page-chunk-NNNI4647.js +1 -0
- package/dist/embed/embed-page-chunk-NNZA747K.js +1 -0
- package/dist/embed/embed-page-chunk-NOMBKADH.js +1 -0
- package/dist/embed/embed-page-chunk-NQRVVPLU.js +1 -0
- package/dist/embed/embed-page-chunk-O2YMBFJK.js +1 -0
- package/dist/embed/embed-page-chunk-O6DJHMEC.js +1 -0
- package/dist/embed/embed-page-chunk-OAUK7LXS.js +1 -0
- package/dist/embed/embed-page-chunk-OCFVEAMV.js +1 -0
- package/dist/embed/embed-page-chunk-OEC4EWNI.js +1 -0
- package/dist/embed/embed-page-chunk-OF6SGGWX.js +1 -0
- package/dist/embed/embed-page-chunk-OJ7436DP.js +1 -0
- package/dist/embed/embed-page-chunk-OK6DC5YX.js +1 -0
- package/dist/embed/embed-page-chunk-ONZ74YHS.js +1 -0
- package/dist/embed/embed-page-chunk-OOZDPBUK.js +69 -0
- package/dist/embed/embed-page-chunk-OPME5GF2.js +1 -0
- package/dist/embed/embed-page-chunk-ORPDSJ5S.js +1 -0
- package/dist/embed/embed-page-chunk-ORPUVSKY.js +1 -0
- package/dist/embed/embed-page-chunk-OWGBADV6.js +3880 -0
- package/dist/embed/embed-page-chunk-OWTE7YMF.js +1 -0
- package/dist/embed/embed-page-chunk-OZKVHTL6.js +1 -0
- package/dist/embed/embed-page-chunk-OZUIA6GJ.js +1 -0
- package/dist/embed/embed-page-chunk-P4MXODKA.js +1 -0
- package/dist/embed/embed-page-chunk-P56KTNVT.js +1 -0
- package/dist/embed/embed-page-chunk-PADSMXWH.js +3 -0
- package/dist/embed/embed-page-chunk-PEFXE5Y4.js +1 -0
- package/dist/embed/embed-page-chunk-PHVA2KHO.js +1 -0
- package/dist/embed/embed-page-chunk-PJJPSDVD.js +1 -0
- package/dist/embed/embed-page-chunk-PKNTJERD.js +1 -0
- package/dist/embed/embed-page-chunk-PLAF2Q2L.js +1 -0
- package/dist/embed/embed-page-chunk-PLNJRORR.js +1 -0
- package/dist/embed/embed-page-chunk-PO2WVZC2.js +1 -0
- package/dist/embed/embed-page-chunk-PRYNHKKK.js +1 -0
- package/dist/embed/embed-page-chunk-PSTS2K7H.js +1 -0
- package/dist/embed/embed-page-chunk-PVL27S2O.js +1 -0
- package/dist/embed/embed-page-chunk-PVOA7ARZ.js +1 -0
- package/dist/embed/embed-page-chunk-PXADN2PY.js +1 -0
- package/dist/embed/embed-page-chunk-Q2HL7S3R.js +41 -0
- package/dist/embed/embed-page-chunk-Q2LWO44N.js +1 -0
- package/dist/embed/embed-page-chunk-Q2YEQQJF.js +1 -0
- package/dist/embed/embed-page-chunk-Q32Y7CP2.js +5 -0
- package/dist/embed/embed-page-chunk-Q3AOMIJ7.js +1 -0
- package/dist/embed/embed-page-chunk-Q4NFAO5G.js +1 -0
- package/dist/embed/embed-page-chunk-Q6ZPKMOZ.js +1 -0
- package/dist/embed/embed-page-chunk-QA2R2R55.js +165 -0
- package/dist/embed/embed-page-chunk-QANF3D34.js +1 -0
- package/dist/embed/embed-page-chunk-QBSFVKIB.js +1 -0
- package/dist/embed/embed-page-chunk-QCLLEPYT.js +1 -0
- package/dist/embed/embed-page-chunk-QDBK4ZDE.js +1 -0
- package/dist/embed/embed-page-chunk-QENDQ7H3.js +1 -0
- package/dist/embed/embed-page-chunk-QF7NBK3B.js +1 -0
- package/dist/embed/embed-page-chunk-QFTY233A.js +1 -0
- package/dist/embed/embed-page-chunk-QHV7PE5D.js +3 -0
- package/dist/embed/embed-page-chunk-QIJBDPZP.js +1 -0
- package/dist/embed/embed-page-chunk-QLA2XU73.js +1 -0
- package/dist/embed/embed-page-chunk-QNIB3Q7U.js +1 -0
- package/dist/embed/embed-page-chunk-QQLF4AV6.js +1 -0
- package/dist/embed/embed-page-chunk-QQUV5KZD.js +1 -0
- package/dist/embed/embed-page-chunk-QRKEL65F.js +1 -0
- package/dist/embed/embed-page-chunk-QRPDJVB7.js +1 -0
- package/dist/embed/embed-page-chunk-QVHTN5HT.js +1 -0
- package/dist/embed/embed-page-chunk-R2BGZIR7.js +1 -0
- package/dist/embed/embed-page-chunk-R2K4OIQO.js +1 -0
- package/dist/embed/embed-page-chunk-R4FTAO2H.js +1 -0
- package/dist/embed/embed-page-chunk-R54S6SKK.js +1 -0
- package/dist/embed/embed-page-chunk-R5I2GTYT.js +1 -0
- package/dist/embed/embed-page-chunk-R672RZXS.js +1 -0
- package/dist/embed/embed-page-chunk-RABAC5H3.js +1 -0
- package/dist/embed/embed-page-chunk-RG3BI65W.js +1 -0
- package/dist/embed/embed-page-chunk-RKPK7MLC.js +1 -0
- package/dist/embed/embed-page-chunk-RN7JLKLZ.js +1 -0
- package/dist/embed/embed-page-chunk-RNOETEGH.js +1 -0
- package/dist/embed/embed-page-chunk-RPK5SOLP.js +1 -0
- package/dist/embed/embed-page-chunk-RUOFG3OD.js +1 -0
- package/dist/embed/embed-page-chunk-RV2IAP52.js +1 -0
- package/dist/embed/embed-page-chunk-RXLB27EG.js +1 -0
- package/dist/embed/embed-page-chunk-S4XZPBRM.js +1 -0
- package/dist/embed/embed-page-chunk-SAML73QO.js +1 -0
- package/dist/embed/embed-page-chunk-SEH5ZYHX.js +1 -0
- package/dist/embed/embed-page-chunk-SL4X4KPS.js +1 -0
- package/dist/embed/embed-page-chunk-SMMEMIZS.js +1 -0
- package/dist/embed/embed-page-chunk-SMZUIXFD.js +1 -0
- package/dist/embed/embed-page-chunk-SQ4GANYE.js +1 -0
- package/dist/embed/embed-page-chunk-SRW4AAQ4.js +1 -0
- package/dist/embed/embed-page-chunk-SU5GXLKX.js +467 -0
- package/dist/embed/embed-page-chunk-SV2BM3WO.js +1 -0
- package/dist/embed/embed-page-chunk-SWGBMELE.js +1 -0
- package/dist/embed/embed-page-chunk-SYAPUMNM.js +1 -0
- package/dist/embed/embed-page-chunk-T4AZ556W.js +1 -0
- package/dist/embed/embed-page-chunk-T6QXBMXO.js +1 -0
- package/dist/embed/embed-page-chunk-TAOVZBLV.js +1 -0
- package/dist/embed/embed-page-chunk-TBRAGK3D.js +1 -0
- package/dist/embed/embed-page-chunk-TENLHB44.js +1 -0
- package/dist/embed/embed-page-chunk-TFSDCDJS.js +1 -0
- package/dist/embed/embed-page-chunk-TIGSOALR.js +1 -0
- package/dist/embed/embed-page-chunk-TKOSVUN2.js +1 -0
- package/dist/embed/embed-page-chunk-TLWGSINF.js +1 -0
- package/dist/embed/embed-page-chunk-TMUCZ7XO.js +1 -0
- package/dist/embed/embed-page-chunk-TP7772GL.js +1 -0
- package/dist/embed/embed-page-chunk-TPCI3CNJ.js +1 -0
- package/dist/embed/embed-page-chunk-TPGW6RUI.js +1 -0
- package/dist/embed/embed-page-chunk-TPQGFG2C.js +1 -0
- package/dist/embed/embed-page-chunk-TSZIWR3X.js +1 -0
- package/dist/embed/embed-page-chunk-TUFYJMMA.js +1 -0
- package/dist/embed/embed-page-chunk-TWDJUUXZ.js +1 -0
- package/dist/embed/embed-page-chunk-TWNAGURL.js +4 -0
- package/dist/embed/embed-page-chunk-TWU6UJLL.js +1 -0
- package/dist/embed/embed-page-chunk-TYA3PYZB.js +1 -0
- package/dist/embed/embed-page-chunk-U32PAI3Y.js +1 -0
- package/dist/embed/embed-page-chunk-U3B5KKSV.js +1 -0
- package/dist/embed/embed-page-chunk-U3YIXQYB.js +1 -0
- package/dist/embed/embed-page-chunk-U7OC25B3.js +1 -0
- package/dist/embed/embed-page-chunk-UBWHZLJN.js +1 -0
- package/dist/embed/embed-page-chunk-UCGT4CTV.js +1 -0
- package/dist/embed/embed-page-chunk-UCR4ZILJ.js +1 -0
- package/dist/embed/embed-page-chunk-UGBSF5HI.js +1 -0
- package/dist/embed/embed-page-chunk-UGCW7PZD.js +1 -0
- package/dist/embed/embed-page-chunk-UIZLGSJE.js +1 -0
- package/dist/embed/embed-page-chunk-UJODN4PG.js +1 -0
- package/dist/embed/embed-page-chunk-UPUUWWBK.js +1 -0
- package/dist/embed/embed-page-chunk-UR5VOXA3.js +1 -0
- package/dist/embed/embed-page-chunk-UZNSI2X3.js +1 -0
- package/dist/embed/embed-page-chunk-UZW2LQZV.js +1 -0
- package/dist/embed/embed-page-chunk-V2V73RFB.js +1 -0
- package/dist/embed/embed-page-chunk-V7R2Y72J.js +14 -0
- package/dist/embed/embed-page-chunk-VEYJHY36.js +1 -0
- package/dist/embed/embed-page-chunk-VNK6MED4.js +1 -0
- package/dist/embed/embed-page-chunk-VP2J7NES.js +1 -0
- package/dist/embed/embed-page-chunk-VRDH6A7Z.js +1 -0
- package/dist/embed/embed-page-chunk-VTUD3VPX.js +1 -0
- package/dist/embed/embed-page-chunk-VULBATQG.js +1 -0
- package/dist/embed/embed-page-chunk-VUOXEXHU.js +1 -0
- package/dist/embed/embed-page-chunk-VVTZ23LK.js +1 -0
- package/dist/embed/embed-page-chunk-VW3NF5NT.js +1 -0
- package/dist/embed/embed-page-chunk-VY6MAPHR.js +1 -0
- package/dist/embed/embed-page-chunk-WAANDEAQ.js +1 -0
- package/dist/embed/embed-page-chunk-WCKHIRD5.js +1 -0
- package/dist/embed/embed-page-chunk-WDS66MAN.js +1 -0
- package/dist/embed/embed-page-chunk-WLZW4FEZ.js +1 -0
- package/dist/embed/embed-page-chunk-WNEY2A2R.js +1 -0
- package/dist/embed/embed-page-chunk-WQOZWRIS.js +1 -0
- package/dist/embed/embed-page-chunk-WUYZIBLV.js +1 -0
- package/dist/embed/embed-page-chunk-WYJNNBFP.js +1 -0
- package/dist/embed/embed-page-chunk-X55NDWBH.js +1 -0
- package/dist/embed/embed-page-chunk-XA4KNRQW.js +1 -0
- package/dist/embed/embed-page-chunk-XAJFFWM3.js +1 -0
- package/dist/embed/embed-page-chunk-XIJHCNBW.js +1 -0
- package/dist/embed/embed-page-chunk-XNZ46IEF.js +1 -0
- package/dist/embed/embed-page-chunk-XO5WZF3D.js +1 -0
- package/dist/embed/embed-page-chunk-XPDEOKHX.js +1 -0
- package/dist/embed/embed-page-chunk-XQNO7AN3.js +1 -0
- package/dist/embed/embed-page-chunk-XR3Q4GDZ.js +1 -0
- package/dist/embed/embed-page-chunk-XRRCORI5.js +1 -0
- package/dist/embed/embed-page-chunk-XTMDFHMJ.js +1 -0
- package/dist/embed/embed-page-chunk-XUZKZF3V.js +1 -0
- package/dist/embed/embed-page-chunk-XWAJRAFC.js +1 -0
- package/dist/embed/embed-page-chunk-XWRBMESB.js +1 -0
- package/dist/embed/embed-page-chunk-XXT7RMBT.js +220 -0
- package/dist/embed/embed-page-chunk-XY5NGMFT.js +1 -0
- package/dist/embed/embed-page-chunk-XYCU2ZON.js +1 -0
- package/dist/embed/embed-page-chunk-XZ6CLWS2.js +1 -0
- package/dist/embed/embed-page-chunk-XZYJX7MY.js +1 -0
- package/dist/embed/embed-page-chunk-Y2JWLZJF.js +1 -0
- package/dist/embed/embed-page-chunk-Y4KTS6EE.js +1 -0
- package/dist/embed/embed-page-chunk-YBPVSBMU.js +1 -0
- package/dist/embed/embed-page-chunk-YEHTVTMO.js +1 -0
- package/dist/embed/embed-page-chunk-YFEUMUCL.js +1 -0
- package/dist/embed/embed-page-chunk-YFWCKZW7.js +1 -0
- package/dist/embed/embed-page-chunk-YHEFVON2.js +1 -0
- package/dist/embed/embed-page-chunk-YJBX3AFL.js +1 -0
- package/dist/embed/embed-page-chunk-YJZJFCLP.js +1 -0
- package/dist/embed/embed-page-chunk-YLUGLAWD.js +1 -0
- package/dist/embed/embed-page-chunk-YMMUR7L6.js +1 -0
- package/dist/embed/embed-page-chunk-YNIEMXW5.js +1 -0
- package/dist/embed/embed-page-chunk-YPK6G5D7.js +1 -0
- package/dist/embed/embed-page-chunk-Z26BSJ5Y.js +1 -0
- package/dist/embed/embed-page-chunk-Z2GE34ES.js +1 -0
- package/dist/embed/embed-page-chunk-Z6N3GKM5.js +1 -0
- package/dist/embed/embed-page-chunk-Z6PDLQOB.js +1 -0
- package/dist/embed/embed-page-chunk-ZESVZCWO.js +1 -0
- package/dist/embed/embed-page-chunk-ZITVGQ52.js +1 -0
- package/dist/embed/embed-page-chunk-ZNWEXQQ4.js +1 -0
- package/dist/embed/embed-page-chunk-ZQ6WYVOD.js +1 -0
- package/dist/embed/embed-page-chunk-ZR7ZLGLV.js +1 -0
- package/dist/embed/embed-page-chunk-ZT2EZUXI.js +1 -0
- package/dist/embed/embed-page-chunk-ZZCMWB6F.js +1 -0
- package/dist/embed/embed-page-cil-ZQIVHSN6.js +1 -0
- package/dist/embed/embed-page-cilkc-AJET62TW.js +1 -0
- package/dist/embed/embed-page-cilkcpp-FRBVBYEF.js +1 -0
- package/dist/embed/embed-page-classDiagram-2ON5EDUG-S5GEC2UC.js +1 -0
- package/dist/embed/embed-page-classDiagram-v2-WZHVMYZB-NL3HKXC3.js +1 -0
- package/dist/embed/embed-page-clean-OPHY52MY.js +1 -0
- package/dist/embed/embed-page-clike-5NRFTOCK.js +1 -0
- package/dist/embed/embed-page-clojure-4GC77VYK.js +1 -0
- package/dist/embed/embed-page-clojure-7B3FI7TH.js +1 -0
- package/dist/embed/embed-page-clojure-repl-56WG27Z3.js +1 -0
- package/dist/embed/embed-page-cmake-F3SKZMUJ.js +1 -0
- package/dist/embed/embed-page-cmake-UIBPQIVG.js +1 -0
- package/dist/embed/embed-page-cobol-7TW6OZHG.js +1 -0
- package/dist/embed/embed-page-code-highlighter-TBT4ICNZ.js +1 -0
- package/dist/embed/embed-page-coffeescript-BCKZ4N2E.js +1 -0
- package/dist/embed/embed-page-coffeescript-N2ENFNNR.js +1 -0
- package/dist/embed/embed-page-concurnas-MCN7VYPE.js +1 -0
- package/dist/embed/embed-page-cooklang-JSLOQBDM.js +1 -0
- package/dist/embed/embed-page-coq-WH3J7SKF.js +1 -0
- package/dist/embed/embed-page-coq-XRXAXI5X.js +1 -0
- package/dist/embed/embed-page-core-Q6IGWM4Q.js +1 -0
- package/dist/embed/embed-page-core-TQNBW2MM.js +1 -0
- package/dist/embed/embed-page-cos-MP7YM5FO.js +1 -0
- package/dist/embed/embed-page-cose-bilkent-S5V4N54A-KJMAAFJL.js +1 -0
- package/dist/embed/embed-page-cpp-FFAXKUCJ.js +1 -0
- package/dist/embed/embed-page-cpp-PRCT5QAC.js +1 -0
- package/dist/embed/embed-page-crmsh-PF5MF5PC.js +1 -0
- package/dist/embed/embed-page-crystal-GYFU35L2.js +1 -0
- package/dist/embed/embed-page-crystal-W2TOACW4.js +1 -0
- package/dist/embed/embed-page-csharp-DHR2XRZW.js +1 -0
- package/dist/embed/embed-page-csharp-UNF62ZBO.js +1 -0
- package/dist/embed/embed-page-cshtml-G7ML4LE3.js +1 -0
- package/dist/embed/embed-page-csp-UDQUZUZW.js +1 -0
- package/dist/embed/embed-page-csp-YPF3N7BE.js +1 -0
- package/dist/embed/embed-page-css-774MOM42.js +1 -0
- package/dist/embed/embed-page-css-EHGZALYG.js +1 -0
- package/dist/embed/embed-page-css-extras-SI7Q5IJ6.js +1 -0
- package/dist/embed/embed-page-csv-MT4GPPO7.js +1 -0
- package/dist/embed/embed-page-cue-BMTFVAKL.js +1 -0
- package/dist/embed/embed-page-cypher-QDHM3LFO.js +1 -0
- package/dist/embed/embed-page-d-KHBJT5ZU.js +1 -0
- package/dist/embed/embed-page-d-VF7XFFMN.js +1 -0
- package/dist/embed/embed-page-dagre-6UL2VRFP-QSIK5LGS.js +4 -0
- package/dist/embed/embed-page-dart-3L3U2DJ3.js +1 -0
- package/dist/embed/embed-page-dart-6AOCMAXR.js +1 -0
- package/dist/embed/embed-page-dataweave-LNNDNKWG.js +1 -0
- package/dist/embed/embed-page-dax-J2FYUNXR.js +1 -0
- package/dist/embed/embed-page-delphi-T3RKZ33G.js +1 -0
- package/dist/embed/embed-page-dhall-MGZ2X6D6.js +1 -0
- package/dist/embed/embed-page-diagram-PSM6KHXK-PLOM5KG7.js +24 -0
- package/dist/embed/embed-page-diagram-QEK2KX5R-RUNGK25X.js +43 -0
- package/dist/embed/embed-page-diagram-S2PKOQOG-LWDHM5TL.js +24 -0
- package/dist/embed/embed-page-diff-AZNWSOQ3.js +1 -0
- package/dist/embed/embed-page-diff-BYMKQAM5.js +1 -0
- package/dist/embed/embed-page-django-5BVMXLOO.js +1 -0
- package/dist/embed/embed-page-django-OLTKKRJC.js +1 -0
- package/dist/embed/embed-page-dns-LKEA7NVQ.js +1 -0
- package/dist/embed/embed-page-dns-zone-file-MLDJYBWW.js +1 -0
- package/dist/embed/embed-page-docker-7ZWVGIHF.js +1 -0
- package/dist/embed/embed-page-dockerfile-YJABIQ3Q.js +1 -0
- package/dist/embed/embed-page-dos-CZOUXBDN.js +1 -0
- package/dist/embed/embed-page-dot-USOBKZIN.js +1 -0
- package/dist/embed/embed-page-dsconfig-5E37MQM4.js +1 -0
- package/dist/embed/embed-page-dts-DPBFPVA5.js +1 -0
- package/dist/embed/embed-page-dust-OAZ4NEIP.js +1 -0
- package/dist/embed/embed-page-ebnf-XFC6NV6I.js +1 -0
- package/dist/embed/embed-page-ebnf-XSYP4JUB.js +1 -0
- package/dist/embed/embed-page-echarts-7KZDMH4F.js +1 -0
- package/dist/embed/embed-page-editorconfig-FQHUYGTR.js +1 -0
- package/dist/embed/embed-page-eiffel-Z22STSPG.js +1 -0
- package/dist/embed/embed-page-ejs-VHHMOK6Y.js +1 -0
- package/dist/embed/embed-page-elixir-BGO72I74.js +1 -0
- package/dist/embed/embed-page-elixir-H3KPRECP.js +1 -0
- package/dist/embed/embed-page-elm-HZWFYFUN.js +1 -0
- package/dist/embed/embed-page-elm-IZAWNYFC.js +1 -0
- package/dist/embed/embed-page-erDiagram-Q2GNP2WA-C6CZYEPF.js +60 -0
- package/dist/embed/embed-page-erb-AK646PXX.js +1 -0
- package/dist/embed/embed-page-erb-YBV2NO4W.js +1 -0
- package/dist/embed/embed-page-erlang-6LMYF4BN.js +1 -0
- package/dist/embed/embed-page-erlang-PXGHX7XB.js +1 -0
- package/dist/embed/embed-page-erlang-repl-UJPNMOCE.js +1 -0
- package/dist/embed/embed-page-etlua-XNKJ7UTQ.js +1 -0
- package/dist/embed/embed-page-excel-PCWQ5ZDK.js +1 -0
- package/dist/embed/embed-page-excel-formula-CEZ7KVDN.js +1 -0
- package/dist/embed/embed-page-factor-3PZO4CCJ.js +1 -0
- package/dist/embed/embed-page-false-OX3DNOF4.js +1 -0
- package/dist/embed/embed-page-firestore-security-rules-IQBOB7PZ.js +1 -0
- package/dist/embed/embed-page-fix-Q3F7Z2HQ.js +1 -0
- package/dist/embed/embed-page-flix-LVDGNPRS.js +1 -0
- package/dist/embed/embed-page-flow-4UPRJEF2.js +1 -0
- package/dist/embed/embed-page-flowDiagram-NV44I4VS-DLT3KEOP.js +162 -0
- package/dist/embed/embed-page-fortran-65P3TPQ7.js +1 -0
- package/dist/embed/embed-page-fortran-LWYFHCCB.js +1 -0
- package/dist/embed/embed-page-fsharp-BSA736XP.js +1 -0
- package/dist/embed/embed-page-fsharp-GDIVPYAB.js +1 -0
- package/dist/embed/embed-page-ftl-27Y3T2XT.js +1 -0
- package/dist/embed/embed-page-gams-7UM23CTD.js +1 -0
- package/dist/embed/embed-page-ganttDiagram-JELNMOA3-YXTLQI5X.js +267 -0
- package/dist/embed/embed-page-gap-JNDMTZYG.js +1 -0
- package/dist/embed/embed-page-gauss-4OCQQOQQ.js +1 -0
- package/dist/embed/embed-page-gcode-7ZDB2FDS.js +1 -0
- package/dist/embed/embed-page-gcode-U2UWK2IF.js +1 -0
- package/dist/embed/embed-page-gdscript-UOAGAMMO.js +1 -0
- package/dist/embed/embed-page-gedcom-WSTJUY6R.js +1 -0
- package/dist/embed/embed-page-gettext-BNGNGT6W.js +1 -0
- package/dist/embed/embed-page-gherkin-CPRNYA24.js +1 -0
- package/dist/embed/embed-page-gherkin-IVS5YUAH.js +1 -0
- package/dist/embed/embed-page-git-WWKMYMUR.js +1 -0
- package/dist/embed/embed-page-gitGraph-F6HP7TQM-AT36TKLZ.js +1 -0
- package/dist/embed/embed-page-gitGraphDiagram-NY62KEGX-U36ULO4Y.js +65 -0
- package/dist/embed/embed-page-glsl-2QJTMF6X.js +1 -0
- package/dist/embed/embed-page-glsl-6C6F26XK.js +1 -0
- package/dist/embed/embed-page-gml-67HHHYLB.js +1 -0
- package/dist/embed/embed-page-gml-ZFY32X23.js +1 -0
- package/dist/embed/embed-page-gn-KO2XPJDA.js +1 -0
- package/dist/embed/embed-page-go-HAQ77N2R.js +1 -0
- package/dist/embed/embed-page-go-SYFPAV4X.js +1 -0
- package/dist/embed/embed-page-go-module-XICPRQ5N.js +1 -0
- package/dist/embed/embed-page-golo-KQZ2PQG7.js +1 -0
- package/dist/embed/embed-page-gradle-7PN7DUJT.js +1 -0
- package/dist/embed/embed-page-gradle-GN34ZONG.js +1 -0
- package/dist/embed/embed-page-graphql-CVSK5MA2.js +1 -0
- package/dist/embed/embed-page-groovy-3R2X7GQD.js +1 -0
- package/dist/embed/embed-page-groovy-YCAJV7XB.js +1 -0
- package/dist/embed/embed-page-haml-6VEPXH2O.js +1 -0
- package/dist/embed/embed-page-haml-TYLXIXHD.js +1 -0
- package/dist/embed/embed-page-handlebars-7Y74ECRG.js +1 -0
- package/dist/embed/embed-page-handlebars-WVRARLIY.js +1 -0
- package/dist/embed/embed-page-haskell-7U743UEW.js +1 -0
- package/dist/embed/embed-page-haskell-BATAJHBH.js +1 -0
- package/dist/embed/embed-page-haxe-C234CZTQ.js +1 -0
- package/dist/embed/embed-page-haxe-PYBC3T4M.js +1 -0
- package/dist/embed/embed-page-hcl-BITT4ESF.js +1 -0
- package/dist/embed/embed-page-hlsl-KYOSJMB5.js +1 -0
- package/dist/embed/embed-page-hoon-NTFQ2YYJ.js +1 -0
- package/dist/embed/embed-page-hpkp-KN6XKLGI.js +1 -0
- package/dist/embed/embed-page-hsp-QFZDPSDA.js +1 -0
- package/dist/embed/embed-page-hsts-5COZ5S32.js +1 -0
- package/dist/embed/embed-page-html2canvas-HMTC4TFR.js +1 -0
- package/dist/embed/embed-page-htmlbars-L7NSSG62.js +1 -0
- package/dist/embed/embed-page-http-ALSJXSOJ.js +1 -0
- package/dist/embed/embed-page-http-E4UEITFW.js +1 -0
- package/dist/embed/embed-page-hy-5ROLZHNZ.js +1 -0
- package/dist/embed/embed-page-ichigojam-T6UG6OA7.js +1 -0
- package/dist/embed/embed-page-icon-74CJY73I.js +1 -0
- package/dist/embed/embed-page-icu-message-format-2RX6DV2B.js +1 -0
- package/dist/embed/embed-page-idris-OH6VYNRJ.js +1 -0
- package/dist/embed/embed-page-iecst-SJFFJ4PC.js +1 -0
- package/dist/embed/embed-page-ignore-QLXHF7QX.js +1 -0
- package/dist/embed/embed-page-index.es-N6YIYNKZ.js +23 -0
- package/dist/embed/embed-page-info-NVLQJR56-2XLQRFF4.js +1 -0
- package/dist/embed/embed-page-infoDiagram-WHAUD3N6-2U2VIHJP.js +2 -0
- package/dist/embed/embed-page-inform7-6Y7MAAME.js +1 -0
- package/dist/embed/embed-page-inform7-HZB3RNF4.js +1 -0
- package/dist/embed/embed-page-ini-7C2L4IDF.js +1 -0
- package/dist/embed/embed-page-ini-TMKFFGPD.js +1 -0
- package/dist/embed/embed-page-io-X5SCSO5G.js +1 -0
- package/dist/embed/embed-page-irpf90-A5FIGB26.js +1 -0
- package/dist/embed/embed-page-isbl-Q77V4FXF.js +1 -0
- package/dist/embed/embed-page-j-MA6BTTGA.js +1 -0
- package/dist/embed/embed-page-java-CYPVO64F.js +1 -0
- package/dist/embed/embed-page-java-O37XO6YL.js +1 -0
- package/dist/embed/embed-page-javadoc-LWLUAHHX.js +1 -0
- package/dist/embed/embed-page-javadoclike-BMEJGG2H.js +1 -0
- package/dist/embed/embed-page-javascript-GU26522Z.js +1 -0
- package/dist/embed/embed-page-javascript-M37PIZZC.js +1 -0
- package/dist/embed/embed-page-javastacktrace-ENINDMIF.js +1 -0
- package/dist/embed/embed-page-jboss-cli-Q2WN2KZS.js +1 -0
- package/dist/embed/embed-page-jexl-EU2C4LRG.js +1 -0
- package/dist/embed/embed-page-jolie-WJIQVPRR.js +1 -0
- package/dist/embed/embed-page-journeyDiagram-XKPGCS4Q-D4A2GN62.js +139 -0
- package/dist/embed/embed-page-jq-BRF5PIAN.js +1 -0
- package/dist/embed/embed-page-js-extras-WQMVOPIZ.js +1 -0
- package/dist/embed/embed-page-js-templates-YO6IJU6R.js +1 -0
- package/dist/embed/embed-page-jsdoc-ZKI7O6VF.js +1 -0
- package/dist/embed/embed-page-json-MRFYB7NT.js +1 -0
- package/dist/embed/embed-page-json-PSHSOWQY.js +1 -0
- package/dist/embed/embed-page-json5-VQKDKRNE.js +1 -0
- package/dist/embed/embed-page-jsonp-ANEJBBKD.js +1 -0
- package/dist/embed/embed-page-jsstacktrace-XYAXX4Z3.js +1 -0
- package/dist/embed/embed-page-jsx-FZEE3QI5.js +1 -0
- package/dist/embed/embed-page-julia-5W6JANPT.js +1 -0
- package/dist/embed/embed-page-julia-EY2DW2U2.js +1 -0
- package/dist/embed/embed-page-julia-repl-O5XO6CSL.js +1 -0
- package/dist/embed/embed-page-kanban-definition-3W4ZIXB7-5JTDNV4G.js +89 -0
- package/dist/embed/embed-page-katex-BO63LHUI.js +261 -0
- package/dist/embed/embed-page-keepalived-OPG3P3WJ.js +1 -0
- package/dist/embed/embed-page-keyman-CXJENJBT.js +1 -0
- package/dist/embed/embed-page-kotlin-62Q32YH3.js +1 -0
- package/dist/embed/embed-page-kotlin-V4IBLBDP.js +1 -0
- package/dist/embed/embed-page-kumir-TIJGTYC3.js +1 -0
- package/dist/embed/embed-page-kusto-BXI53DND.js +1 -0
- package/dist/embed/embed-page-lasso-2CPND7XH.js +1 -0
- package/dist/embed/embed-page-latex-F3X5K6QF.js +1 -0
- package/dist/embed/embed-page-latex-MVG52AHA.js +1 -0
- package/dist/embed/embed-page-latte-J3LVOB6S.js +1 -0
- package/dist/embed/embed-page-ldif-5OWTENAQ.js +1 -0
- package/dist/embed/embed-page-leaf-EYR425IG.js +1 -0
- package/dist/embed/embed-page-less-S6CBMQQZ.js +1 -0
- package/dist/embed/embed-page-less-WDPLNQ5B.js +1 -0
- package/dist/embed/embed-page-lilypond-IJV67NKP.js +1 -0
- package/dist/embed/embed-page-linker-script-MIX3HOEH.js +1 -0
- package/dist/embed/embed-page-liquid-CFWS6T2J.js +1 -0
- package/dist/embed/embed-page-lisp-C6XPBZ5U.js +1 -0
- package/dist/embed/embed-page-lisp-IM4ILKS7.js +1 -0
- package/dist/embed/embed-page-livecodeserver-6F3SUK5W.js +1 -0
- package/dist/embed/embed-page-livescript-GNIYPIHH.js +1 -0
- package/dist/embed/embed-page-livescript-HOLSYBIG.js +1 -0
- package/dist/embed/embed-page-llvm-IWL5DLNH.js +1 -0
- package/dist/embed/embed-page-llvm-K2USHCCC.js +1 -0
- package/dist/embed/embed-page-log-BLJX5RSC.js +1 -0
- package/dist/embed/embed-page-lolcode-6COIIRQ6.js +1 -0
- package/dist/embed/embed-page-lsl-KDZSWM6S.js +1 -0
- package/dist/embed/embed-page-lua-5KEV5KHK.js +1 -0
- package/dist/embed/embed-page-lua-F7VBLUI5.js +1 -0
- package/dist/embed/embed-page-magma-TTQUX26J.js +1 -0
- package/dist/embed/embed-page-makefile-4VQZE7FW.js +1 -0
- package/dist/embed/embed-page-makefile-LDN5QGHW.js +1 -0
- package/dist/embed/embed-page-markdown-GU3NFA6A.js +1 -0
- package/dist/embed/embed-page-markdown-ODPEZXUU.js +1 -0
- package/dist/embed/embed-page-markup-W6JMQ64H.js +1 -0
- package/dist/embed/embed-page-markup-templating-RYGNVTG7.js +1 -0
- package/dist/embed/embed-page-mata-D4O4BNGS.js +1 -0
- package/dist/embed/embed-page-mathematica-YSU2VUX4.js +1 -0
- package/dist/embed/embed-page-matlab-6TYO6LKK.js +1 -0
- package/dist/embed/embed-page-matlab-DCIHZIZM.js +1 -0
- package/dist/embed/embed-page-maxima-K2VWPGLA.js +1 -0
- package/dist/embed/embed-page-maxscript-3ARRWLS6.js +1 -0
- package/dist/embed/embed-page-mel-E3F6H7ZF.js +1 -0
- package/dist/embed/embed-page-mel-YGI273IY.js +1 -0
- package/dist/embed/embed-page-mercury-LXCDDOJN.js +1 -0
- package/dist/embed/embed-page-mermaid-4FMYB3TJ.js +1 -0
- package/dist/embed/embed-page-mermaid-TBO3M7GX.js +18 -0
- package/dist/embed/embed-page-metafont-33QDNLJC.js +1 -0
- package/dist/embed/embed-page-mindmap-definition-VGOIOE7T-LVIRJQDW.js +68 -0
- package/dist/embed/embed-page-mipsasm-HSMSNEPP.js +1 -0
- package/dist/embed/embed-page-mizar-OTR4FHWG.js +1 -0
- package/dist/embed/embed-page-mizar-ZDNSLX4H.js +1 -0
- package/dist/embed/embed-page-mojolicious-2VJDUL4M.js +1 -0
- package/dist/embed/embed-page-mongodb-E62Y62DN.js +1 -0
- package/dist/embed/embed-page-monkey-KOVSP7SE.js +1 -0
- package/dist/embed/embed-page-monkey-MWSXB6DH.js +1 -0
- package/dist/embed/embed-page-moonscript-7DWCIDI5.js +1 -0
- package/dist/embed/embed-page-moonscript-AIMMMW7W.js +1 -0
- package/dist/embed/embed-page-n1ql-TKR2PAQ4.js +1 -0
- package/dist/embed/embed-page-n1ql-VSPMFQEE.js +1 -0
- package/dist/embed/embed-page-n4js-VQSAFSQG.js +1 -0
- package/dist/embed/embed-page-nand2tetris-hdl-ZN4LQDMB.js +1 -0
- package/dist/embed/embed-page-naniscript-FX42SAZY.js +1 -0
- package/dist/embed/embed-page-nasm-FGR3ELJL.js +1 -0
- package/dist/embed/embed-page-neon-4JXYQJP3.js +1 -0
- package/dist/embed/embed-page-nevod-2EHVRC32.js +1 -0
- package/dist/embed/embed-page-nginx-3W4BPZZB.js +1 -0
- package/dist/embed/embed-page-nginx-672JEBEN.js +1 -0
- package/dist/embed/embed-page-nim-CNSA5KTJ.js +1 -0
- package/dist/embed/embed-page-nim-CS7GVCRH.js +1 -0
- package/dist/embed/embed-page-nix-H37VR2HL.js +1 -0
- package/dist/embed/embed-page-nix-ODG6AI37.js +1 -0
- package/dist/embed/embed-page-node-repl-F5RCYIN3.js +1 -0
- package/dist/embed/embed-page-nsis-LEW5NHHS.js +1 -0
- package/dist/embed/embed-page-nsis-P73IQUMW.js +1 -0
- package/dist/embed/embed-page-objectivec-GOD2BEHI.js +1 -0
- package/dist/embed/embed-page-objectivec-UO34JBT5.js +1 -0
- package/dist/embed/embed-page-ocaml-ODOKMPKS.js +1 -0
- package/dist/embed/embed-page-ocaml-PW67TSNU.js +1 -0
- package/dist/embed/embed-page-odin-42BCJRMU.js +1 -0
- package/dist/embed/embed-page-opencl-FWU2AVTW.js +1 -0
- package/dist/embed/embed-page-openqasm-D2QQCO47.js +1 -0
- package/dist/embed/embed-page-openscad-LZPRFY2W.js +1 -0
- package/dist/embed/embed-page-oxygene-HZG7OO7G.js +1 -0
- package/dist/embed/embed-page-oz-MQNQCKRU.js +1 -0
- package/dist/embed/embed-page-packet-BFZMPI3H-JUHAABU6.js +1 -0
- package/dist/embed/embed-page-parigp-MAX3X22G.js +1 -0
- package/dist/embed/embed-page-parser-2WFCRGYE.js +1 -0
- package/dist/embed/embed-page-parser3-C3KVU5ZC.js +1 -0
- package/dist/embed/embed-page-pascal-LVXMXCNE.js +1 -0
- package/dist/embed/embed-page-pascaligo-6RIW5OHU.js +1 -0
- package/dist/embed/embed-page-pcaxis-ZO5S5UAO.js +1 -0
- package/dist/embed/embed-page-peoplecode-EAE6M4AF.js +1 -0
- package/dist/embed/embed-page-perl-CAUIKKUT.js +1 -0
- package/dist/embed/embed-page-perl-NCR5YMVT.js +1 -0
- package/dist/embed/embed-page-pf-TXMTVH7H.js +1 -0
- package/dist/embed/embed-page-pgsql-M7L7YRCD.js +1 -0
- package/dist/embed/embed-page-php-IE2N3QI4.js +1 -0
- package/dist/embed/embed-page-php-QCBSAYIC.js +1 -0
- package/dist/embed/embed-page-php-extras-VRZO47SA.js +1 -0
- package/dist/embed/embed-page-php-template-U54UCRKN.js +1 -0
- package/dist/embed/embed-page-phpdoc-ZQWB2OXG.js +1 -0
- package/dist/embed/embed-page-pie-7BOR55EZ-GU56BHQJ.js +1 -0
- package/dist/embed/embed-page-pieDiagram-ADFJNKIX-JXFHXEAJ.js +30 -0
- package/dist/embed/embed-page-plaintext-OINTKMAM.js +1 -0
- package/dist/embed/embed-page-plant-uml-3RVWLPWM.js +1 -0
- package/dist/embed/embed-page-plsql-XQEBXO73.js +1 -0
- package/dist/embed/embed-page-pony-UEK5X7OI.js +1 -0
- package/dist/embed/embed-page-powerquery-DEKKCZY7.js +1 -0
- package/dist/embed/embed-page-powershell-EBW7RZTN.js +1 -0
- package/dist/embed/embed-page-powershell-UMB53SPC.js +1 -0
- package/dist/embed/embed-page-processing-56OIROQG.js +1 -0
- package/dist/embed/embed-page-processing-ZIDQ7SB3.js +1 -0
- package/dist/embed/embed-page-profile-6SSPU7PG.js +1 -0
- package/dist/embed/embed-page-prolog-7JA2UBRP.js +1 -0
- package/dist/embed/embed-page-prolog-L55HYSKT.js +1 -0
- package/dist/embed/embed-page-promql-L4YBO3EF.js +1 -0
- package/dist/embed/embed-page-properties-O3BOEJXJ.js +1 -0
- package/dist/embed/embed-page-properties-VGZTUJ5E.js +1 -0
- package/dist/embed/embed-page-protobuf-F7X2PLJJ.js +1 -0
- package/dist/embed/embed-page-protobuf-GS5HMEMS.js +1 -0
- package/dist/embed/embed-page-psl-HLKSMRWT.js +1 -0
- package/dist/embed/embed-page-pug-MI7HPGUX.js +1 -0
- package/dist/embed/embed-page-puppet-2HD3DPH2.js +1 -0
- package/dist/embed/embed-page-puppet-BRWZHTKL.js +1 -0
- package/dist/embed/embed-page-pure-FVSDVQ2B.js +1 -0
- package/dist/embed/embed-page-purebasic-PPHAGMQH.js +1 -0
- package/dist/embed/embed-page-purebasic-UVZDR2HE.js +1 -0
- package/dist/embed/embed-page-purescript-Q3TGKQZY.js +1 -0
- package/dist/embed/embed-page-purify-QTVE4GEG.js +8 -0
- package/dist/embed/embed-page-python-NO3SIOCK.js +1 -0
- package/dist/embed/embed-page-python-YAPGCWHR.js +1 -0
- package/dist/embed/embed-page-python-repl-EIGKWV4T.js +1 -0
- package/dist/embed/embed-page-q-5YCCZLRO.js +1 -0
- package/dist/embed/embed-page-q-FWJ5L5RH.js +1 -0
- package/dist/embed/embed-page-qml-PNZK27ST.js +1 -0
- package/dist/embed/embed-page-qml-YVZULPLY.js +1 -0
- package/dist/embed/embed-page-qore-QU7W2FQD.js +1 -0
- package/dist/embed/embed-page-qsharp-FNGNB3PK.js +1 -0
- package/dist/embed/embed-page-quadrantDiagram-AYHSOK5B-4BXTDPJ4.js +7 -0
- package/dist/embed/embed-page-r-52DQANKK.js +1 -0
- package/dist/embed/embed-page-r-B2QMYOFX.js +1 -0
- package/dist/embed/embed-page-racket-OA22GPFB.js +1 -0
- package/dist/embed/embed-page-radar-NHE76QYJ-A7QQXLRI.js +1 -0
- package/dist/embed/embed-page-reason-QQ4RYUQI.js +1 -0
- package/dist/embed/embed-page-reasonml-CQAWSREB.js +1 -0
- package/dist/embed/embed-page-regex-5JJLL4V6.js +1 -0
- package/dist/embed/embed-page-rego-OLGGN4OK.js +1 -0
- package/dist/embed/embed-page-renpy-72F6BTO6.js +1 -0
- package/dist/embed/embed-page-requirementDiagram-UZGBJVZJ-WA3XXOP7.js +64 -0
- package/dist/embed/embed-page-rescript-VYN4PAG7.js +1 -0
- package/dist/embed/embed-page-rest-YZNSQW6O.js +1 -0
- package/dist/embed/embed-page-rib-U4ELGIV2.js +1 -0
- package/dist/embed/embed-page-rip-ZA4CVYFN.js +1 -0
- package/dist/embed/embed-page-roboconf-5IGYRDNH.js +1 -0
- package/dist/embed/embed-page-roboconf-HKSGWVI6.js +1 -0
- package/dist/embed/embed-page-robotframework-ARNA4YNR.js +1 -0
- package/dist/embed/embed-page-routeros-DKQKHPKR.js +1 -0
- package/dist/embed/embed-page-rsl-WZYNFUWJ.js +1 -0
- package/dist/embed/embed-page-ruby-DLLZKK7A.js +1 -0
- package/dist/embed/embed-page-ruby-TKJZO362.js +1 -0
- package/dist/embed/embed-page-ruleslanguage-7CSB4CWD.js +1 -0
- package/dist/embed/embed-page-rust-6JUJCSHC.js +1 -0
- package/dist/embed/embed-page-rust-ZZUD5RKM.js +1 -0
- package/dist/embed/embed-page-sankeyDiagram-TZEHDZUN-SAVUI2Q4.js +10 -0
- package/dist/embed/embed-page-sas-6H3LYHVP.js +1 -0
- package/dist/embed/embed-page-sas-EUBD2V4Z.js +1 -0
- package/dist/embed/embed-page-sass-U6G7R7AZ.js +1 -0
- package/dist/embed/embed-page-scala-HFYNBK2U.js +1 -0
- package/dist/embed/embed-page-scala-OJM3677P.js +1 -0
- package/dist/embed/embed-page-scheme-KBT7Z3ND.js +1 -0
- package/dist/embed/embed-page-scheme-QQ2VPTFQ.js +1 -0
- package/dist/embed/embed-page-scilab-LA3HLVKQ.js +1 -0
- package/dist/embed/embed-page-scss-FDEUPWYR.js +1 -0
- package/dist/embed/embed-page-scss-IH2AODYU.js +1 -0
- package/dist/embed/embed-page-sequenceDiagram-WL72ISMW-C2QRTOTL.js +145 -0
- package/dist/embed/embed-page-shell-O7OU7Y7F.js +1 -0
- package/dist/embed/embed-page-shell-session-CPCKA76Q.js +1 -0
- package/dist/embed/embed-page-smali-3HHDEBNE.js +1 -0
- package/dist/embed/embed-page-smali-L7H7BQUY.js +1 -0
- package/dist/embed/embed-page-smalltalk-KQLA6XRI.js +1 -0
- package/dist/embed/embed-page-smalltalk-WMM37MR4.js +1 -0
- package/dist/embed/embed-page-smarty-AF5LZRHA.js +1 -0
- package/dist/embed/embed-page-sml-4ARWLXZU.js +1 -0
- package/dist/embed/embed-page-sml-6BNN3PMR.js +1 -0
- package/dist/embed/embed-page-solidity-5WL56MR7.js +1 -0
- package/dist/embed/embed-page-solution-file-FJJU2R2L.js +1 -0
- package/dist/embed/embed-page-soy-54PPSPCO.js +1 -0
- package/dist/embed/embed-page-sparql-AC7LG2EE.js +1 -0
- package/dist/embed/embed-page-splunk-spl-YBP24JOS.js +1 -0
- package/dist/embed/embed-page-sqf-4E5P576B.js +1 -0
- package/dist/embed/embed-page-sqf-CSHANDQB.js +1 -0
- package/dist/embed/embed-page-sql-MGWNK6FE.js +1 -0
- package/dist/embed/embed-page-sql-ZOJORZUC.js +1 -0
- package/dist/embed/embed-page-sql_more-NACOUKSZ.js +1 -0
- package/dist/embed/embed-page-squirrel-XG35KUR2.js +1 -0
- package/dist/embed/embed-page-stan-GDB32LYB.js +1 -0
- package/dist/embed/embed-page-stan-UJ7WCNJT.js +1 -0
- package/dist/embed/embed-page-stata-DEQ57OIC.js +1 -0
- package/dist/embed/embed-page-stata-WJUFDMUW.js +1 -0
- package/dist/embed/embed-page-stateDiagram-FKZM4ZOC-6LDVHEHS.js +1 -0
- package/dist/embed/embed-page-stateDiagram-v2-4FDKWEC3-UJYGEYF5.js +1 -0
- package/dist/embed/embed-page-step21-6AYDKM5N.js +1 -0
- package/dist/embed/embed-page-stylus-CFL6FZN3.js +1 -0
- package/dist/embed/embed-page-stylus-MLEF22IY.js +1 -0
- package/dist/embed/embed-page-subunit-OZQ2HNNA.js +1 -0
- package/dist/embed/embed-page-supercollider-ZK2ECEDQ.js +1 -0
- package/dist/embed/embed-page-swift-MNLMKF5F.js +1 -0
- package/dist/embed/embed-page-swift-UJP2CPA4.js +1 -0
- package/dist/embed/embed-page-systemd-DQXTIGWD.js +1 -0
- package/dist/embed/embed-page-t4-cs-ZPHNHWPR.js +1 -0
- package/dist/embed/embed-page-t4-templating-OA7FNPXM.js +1 -0
- package/dist/embed/embed-page-t4-vb-XBX2HBI5.js +1 -0
- package/dist/embed/embed-page-taggerscript-XVALJYA3.js +1 -0
- package/dist/embed/embed-page-tap-EMOHKH5F.js +1 -0
- package/dist/embed/embed-page-tap-HZHER7FY.js +1 -0
- package/dist/embed/embed-page-tcl-GN4WSRHR.js +1 -0
- package/dist/embed/embed-page-tcl-T3WWKS3Q.js +1 -0
- package/dist/embed/embed-page-textile-OXFYF2DV.js +1 -0
- package/dist/embed/embed-page-thrift-Q26IKVBC.js +1 -0
- package/dist/embed/embed-page-timeline-definition-IT6M3QCI-OF6FTGVN.js +61 -0
- package/dist/embed/embed-page-toml-ZVNI7WJB.js +1 -0
- package/dist/embed/embed-page-tp-24NWOAQZ.js +1 -0
- package/dist/embed/embed-page-treemap-KMMF4GRG-HPTV3SYE.js +1 -0
- package/dist/embed/embed-page-tremor-443PBNWC.js +1 -0
- package/dist/embed/embed-page-tsx-PX2Z4GDU.js +1 -0
- package/dist/embed/embed-page-tt2-L43LNTGL.js +1 -0
- package/dist/embed/embed-page-turtle-IXYYTHLU.js +1 -0
- package/dist/embed/embed-page-twig-MZBQAWRC.js +1 -0
- package/dist/embed/embed-page-twig-WSAAZNH3.js +1 -0
- package/dist/embed/embed-page-typescript-5UWO3Y3K.js +1 -0
- package/dist/embed/embed-page-typescript-BPIRCQG7.js +1 -0
- package/dist/embed/embed-page-typoscript-UUKPTXPH.js +1 -0
- package/dist/embed/embed-page-unrealscript-G2VHZRFN.js +1 -0
- package/dist/embed/embed-page-uorazor-WYGVL7PT.js +1 -0
- package/dist/embed/embed-page-uri-NRWWZBB7.js +1 -0
- package/dist/embed/embed-page-v-LKVTPKDV.js +1 -0
- package/dist/embed/embed-page-vala-EL5BNKYD.js +1 -0
- package/dist/embed/embed-page-vala-MLIRE3PS.js +1 -0
- package/dist/embed/embed-page-vbnet-5JKSIZ56.js +1 -0
- package/dist/embed/embed-page-vbnet-KOGX2JTL.js +1 -0
- package/dist/embed/embed-page-vbscript-637T6GXI.js +1 -0
- package/dist/embed/embed-page-vbscript-html-YKWMMXG4.js +1 -0
- package/dist/embed/embed-page-velocity-7Q63BBW2.js +1 -0
- package/dist/embed/embed-page-verilog-B6EWQWMJ.js +1 -0
- package/dist/embed/embed-page-verilog-G566LGG4.js +1 -0
- package/dist/embed/embed-page-vhdl-R5JIOJNH.js +1 -0
- package/dist/embed/embed-page-vhdl-RMOYZXLG.js +1 -0
- package/dist/embed/embed-page-vim-47Q56RS4.js +1 -0
- package/dist/embed/embed-page-vim-KBCAYMER.js +1 -0
- package/dist/embed/embed-page-visual-basic-ZYE5FD6G.js +1 -0
- package/dist/embed/embed-page-warpscript-65UOMFFU.js +1 -0
- package/dist/embed/embed-page-wasm-MSBGNWUM.js +1 -0
- package/dist/embed/embed-page-web-idl-7WW5RGOI.js +1 -0
- package/dist/embed/embed-page-wgsl-FG3PI6M7.js +1 -0
- package/dist/embed/embed-page-wiki-DGVS4GPN.js +1 -0
- package/dist/embed/embed-page-wolfram-MOURXWVE.js +1 -0
- package/dist/embed/embed-page-wren-PYL5ZRVR.js +1 -0
- package/dist/embed/embed-page-x86asm-WQ6M3VHZ.js +1 -0
- package/dist/embed/embed-page-xeora-JSPZIDKL.js +1 -0
- package/dist/embed/embed-page-xl-DTY4E7YS.js +1 -0
- package/dist/embed/embed-page-xml-P5QA5BKM.js +1 -0
- package/dist/embed/embed-page-xml-doc-VAJOIYSW.js +1 -0
- package/dist/embed/embed-page-xojo-L2PDU7MC.js +1 -0
- package/dist/embed/embed-page-xquery-EWBQ7NVP.js +1 -0
- package/dist/embed/embed-page-xquery-RUKMMBO2.js +1 -0
- package/dist/embed/embed-page-xychartDiagram-PRI3JC2R-EWLR5Z3I.js +7 -0
- package/dist/embed/embed-page-yaml-76KRB6BP.js +1 -0
- package/dist/embed/embed-page-yaml-RR5MLWRK.js +1 -0
- package/dist/embed/embed-page-yang-J62Y5RPD.js +1 -0
- package/dist/embed/embed-page-zephir-OIOOQGNI.js +1 -0
- package/dist/embed/embed-page-zig-75SL5ZWR.js +1 -0
- package/dist/embed/embed-page.css +1 -0
- package/dist/embed/embed-page.js +6 -0
- package/dist/index.d.mts +19 -40
- package/dist/index.d.ts +19 -40
- package/dist/index.js +1157 -701
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +885 -659
- package/dist/index.mjs.map +1 -1
- package/dist/{mcp-configs-SHRMQHIL.mjs → mcp-configs-IIKQM5GM.mjs} +2 -2
- package/dist/mcpTransportRegistry-XMJ5Y2RG.mjs +13 -0
- package/dist/mcpTransportRegistry-XMJ5Y2RG.mjs.map +1 -0
- package/dist/open-DCAOL5CG.mjs +176 -0
- package/dist/open-DCAOL5CG.mjs.map +1 -0
- package/package.json +11 -8
- /package/dist/{mcp-configs-SHRMQHIL.mjs.map → mcp-configs-IIKQM5GM.mjs.map} +0 -0
package/dist/index.js
CHANGED
|
@@ -35,8 +35,8 @@ function getContentTypeFromFilename(filename) {
|
|
|
35
35
|
const ext = filename.includes(".") ? filename.slice(filename.lastIndexOf(".")).toLowerCase() : "";
|
|
36
36
|
return EXT_TO_MIME[ext] ?? "application/octet-stream";
|
|
37
37
|
}
|
|
38
|
-
function getFilenameFromPath(
|
|
39
|
-
const segments =
|
|
38
|
+
function getFilenameFromPath(path7) {
|
|
39
|
+
const segments = path7.replace(/\/+$/, "").split("/");
|
|
40
40
|
return segments[segments.length - 1] || "download";
|
|
41
41
|
}
|
|
42
42
|
var EXT_TO_MIME;
|
|
@@ -647,7 +647,8 @@ function convertToConnection(config) {
|
|
|
647
647
|
return {
|
|
648
648
|
...baseConfig,
|
|
649
649
|
transport: config.transport === "streamable_http" ? "http" : config.transport,
|
|
650
|
-
url: config.url
|
|
650
|
+
url: config.url,
|
|
651
|
+
headers: config.headers
|
|
651
652
|
};
|
|
652
653
|
}
|
|
653
654
|
}
|
|
@@ -869,17 +870,17 @@ function generateWechatUin() {
|
|
|
869
870
|
buf.writeUInt32BE(Math.floor(Math.random() * 4294967295), 0);
|
|
870
871
|
return buf.toString("base64url");
|
|
871
872
|
}
|
|
872
|
-
async function apiGet(
|
|
873
|
-
const url = `${getBaseUrl()}${
|
|
873
|
+
async function apiGet(path7, extraHeaders) {
|
|
874
|
+
const url = `${getBaseUrl()}${path7}`;
|
|
874
875
|
const headers = { ...extraHeaders };
|
|
875
876
|
const res = await fetch(url, { headers });
|
|
876
877
|
if (!res.ok) {
|
|
877
|
-
throw new Error(`iLink GET ${
|
|
878
|
+
throw new Error(`iLink GET ${path7} failed: ${res.status} ${res.statusText}`);
|
|
878
879
|
}
|
|
879
880
|
return res.json();
|
|
880
881
|
}
|
|
881
|
-
async function apiPost(
|
|
882
|
-
const url = `${getBaseUrl()}${
|
|
882
|
+
async function apiPost(path7, body, botToken, signal) {
|
|
883
|
+
const url = `${getBaseUrl()}${path7}`;
|
|
883
884
|
const headers = {
|
|
884
885
|
"Content-Type": "application/json",
|
|
885
886
|
"AuthorizationType": "ilink_bot_token",
|
|
@@ -893,7 +894,7 @@ async function apiPost(path6, body, botToken, signal) {
|
|
|
893
894
|
signal
|
|
894
895
|
});
|
|
895
896
|
if (!res.ok) {
|
|
896
|
-
throw new Error(`iLink POST ${
|
|
897
|
+
throw new Error(`iLink POST ${path7} failed: ${res.status} ${res.statusText}`);
|
|
897
898
|
}
|
|
898
899
|
return res.json();
|
|
899
900
|
}
|
|
@@ -1040,18 +1041,18 @@ function extractText(msg) {
|
|
|
1040
1041
|
}
|
|
1041
1042
|
return null;
|
|
1042
1043
|
}
|
|
1043
|
-
var
|
|
1044
|
+
var import_zod15, logger5, wechatConfigSchema, MAX_RECONNECT_DELAY_MS, BASE_RECONNECT_DELAY_MS, HEARTBEAT_INTERVAL_MS, MSG_TYPE_USER, MSG_ITEM_TEXT, activeConnections2, seenClientIds, wechatChannelAdapter;
|
|
1044
1045
|
var init_WechatChannelAdapter = __esm({
|
|
1045
1046
|
"src/channels/wechat/WechatChannelAdapter.ts"() {
|
|
1046
1047
|
"use strict";
|
|
1047
|
-
|
|
1048
|
+
import_zod15 = require("zod");
|
|
1048
1049
|
init_wechat_client();
|
|
1049
1050
|
init_context_store();
|
|
1050
1051
|
init_Logger();
|
|
1051
1052
|
logger5 = new Logger({ serviceName: "lattice/gateway/wechat" });
|
|
1052
|
-
wechatConfigSchema =
|
|
1053
|
-
botToken:
|
|
1054
|
-
uin:
|
|
1053
|
+
wechatConfigSchema = import_zod15.z.object({
|
|
1054
|
+
botToken: import_zod15.z.string(),
|
|
1055
|
+
uin: import_zod15.z.string().optional()
|
|
1055
1056
|
});
|
|
1056
1057
|
MAX_RECONNECT_DELAY_MS = 3e4;
|
|
1057
1058
|
BASE_RECONNECT_DELAY_MS = 1e3;
|
|
@@ -1641,11 +1642,11 @@ var init_A2ATaskStoreAdapter = __esm({
|
|
|
1641
1642
|
async recordSnapshot(task, item) {
|
|
1642
1643
|
const incomingSequence = snapshotSequence(task.metadata?.snapshotSequence) ?? 0;
|
|
1643
1644
|
const currentSequence = this.snapshotSequences.get(task.id) ?? 0;
|
|
1644
|
-
const
|
|
1645
|
-
this.snapshotSequences.set(task.id,
|
|
1645
|
+
const sequence = Math.max(incomingSequence, currentSequence) + 1;
|
|
1646
|
+
this.snapshotSequences.set(task.id, sequence);
|
|
1646
1647
|
const sequencedTask = {
|
|
1647
1648
|
...task,
|
|
1648
|
-
metadata: { ...task.metadata ?? {}, snapshotSequence:
|
|
1649
|
+
metadata: { ...task.metadata ?? {}, snapshotSequence: sequence }
|
|
1649
1650
|
};
|
|
1650
1651
|
const eventKey = snapshotEventKey(sequencedTask);
|
|
1651
1652
|
await this.workItemStore.createIfAbsentByEventKey({
|
|
@@ -1655,7 +1656,7 @@ var init_A2ATaskStoreAdapter = __esm({
|
|
|
1655
1656
|
action: "activity",
|
|
1656
1657
|
actor: `a2a:${this.scope.assistantId}`,
|
|
1657
1658
|
summary: "A2A task snapshot",
|
|
1658
|
-
detail: { type: "a2a_task_snapshot", snapshotSequence:
|
|
1659
|
+
detail: { type: "a2a_task_snapshot", snapshotSequence: sequence, eventKey, task: sequencedTask },
|
|
1659
1660
|
eventKey,
|
|
1660
1661
|
...asString(task.metadata?.threadId) ? { threadId: asString(task.metadata?.threadId) } : {},
|
|
1661
1662
|
...item.workspaceId ? { workspaceId: item.workspaceId } : {}
|
|
@@ -1762,10 +1763,10 @@ var init_A2ATaskStoreAdapter = __esm({
|
|
|
1762
1763
|
});
|
|
1763
1764
|
for (const activity of activities) {
|
|
1764
1765
|
if (activity.detail?.type !== "a2a_task_snapshot" || !isA2ATaskSnapshot(activity.detail.task)) continue;
|
|
1765
|
-
const
|
|
1766
|
+
const sequence = snapshotSequence(activity.detail.snapshotSequence) ?? snapshotSequence(activity.detail.task.metadata?.snapshotSequence);
|
|
1766
1767
|
const candidate = {
|
|
1767
1768
|
task: activity.detail.task,
|
|
1768
|
-
sequence
|
|
1769
|
+
sequence,
|
|
1769
1770
|
eventKey: asString(activity.detail.eventKey) ?? activity.eventKey ?? snapshotEventKey(activity.detail.task),
|
|
1770
1771
|
statusTimestamp: Date.parse(activity.detail.task.status.timestamp ?? ""),
|
|
1771
1772
|
createdAt: activity.createdAt,
|
|
@@ -1895,13 +1896,13 @@ function agentMessage(text) {
|
|
|
1895
1896
|
parts: [{ kind: "text", text }]
|
|
1896
1897
|
};
|
|
1897
1898
|
}
|
|
1898
|
-
var import_uuid11, import_core66,
|
|
1899
|
+
var import_uuid11, import_core66, import_protocols29, _AxiomAgentExecutor, AxiomAgentExecutor;
|
|
1899
1900
|
var init_AxiomAgentExecutor = __esm({
|
|
1900
1901
|
"src/services/a2a/AxiomAgentExecutor.ts"() {
|
|
1901
1902
|
"use strict";
|
|
1902
1903
|
import_uuid11 = require("uuid");
|
|
1903
1904
|
import_core66 = require("@axiom-lattice/core");
|
|
1904
|
-
|
|
1905
|
+
import_protocols29 = require("@axiom-lattice/protocols");
|
|
1905
1906
|
init_a2aFileRefs();
|
|
1906
1907
|
init_task_file_refs();
|
|
1907
1908
|
_AxiomAgentExecutor = class _AxiomAgentExecutor {
|
|
@@ -2010,16 +2011,16 @@ ${formatFileRefsSection(inputFiles)}` : text;
|
|
|
2010
2011
|
custom_run_config: { taskId: ctx.taskId }
|
|
2011
2012
|
});
|
|
2012
2013
|
const stream = agent.chunkStream(messageId, [
|
|
2013
|
-
|
|
2014
|
+
import_protocols29.MessageChunkTypes.MESSAGE_COMPLETED
|
|
2014
2015
|
]);
|
|
2015
2016
|
for await (const chunk of stream) {
|
|
2016
2017
|
if (execution.canceled) return;
|
|
2017
2018
|
const chunkType = chunk.type;
|
|
2018
2019
|
const chunkText = chunk.data?.content ?? "";
|
|
2019
|
-
if (chunkType ===
|
|
2020
|
+
if (chunkType === import_protocols29.MessageChunkTypes.INTERRUPT) {
|
|
2020
2021
|
break;
|
|
2021
2022
|
}
|
|
2022
|
-
if (chunkType ===
|
|
2023
|
+
if (chunkType === import_protocols29.MessageChunkTypes.AI || chunkType === import_protocols29.MessageChunkTypes.TOOL) {
|
|
2023
2024
|
if (chunkText) {
|
|
2024
2025
|
bus.publish({
|
|
2025
2026
|
kind: "status-update",
|
|
@@ -2936,6 +2937,236 @@ var init_a2a = __esm({
|
|
|
2936
2937
|
}
|
|
2937
2938
|
});
|
|
2938
2939
|
|
|
2940
|
+
// src/services/open/openCredentials.ts
|
|
2941
|
+
function resolveSpikeCredential(token) {
|
|
2942
|
+
if (!token) return null;
|
|
2943
|
+
return SPIKE_CREDENTIALS.get(token) ?? null;
|
|
2944
|
+
}
|
|
2945
|
+
var SPIKE_CREDENTIALS;
|
|
2946
|
+
var init_openCredentials = __esm({
|
|
2947
|
+
"src/services/open/openCredentials.ts"() {
|
|
2948
|
+
"use strict";
|
|
2949
|
+
SPIKE_CREDENTIALS = /* @__PURE__ */ new Map([
|
|
2950
|
+
[
|
|
2951
|
+
"spike_all",
|
|
2952
|
+
{
|
|
2953
|
+
credentialId: "spike_all",
|
|
2954
|
+
kind: "api_key",
|
|
2955
|
+
tenantId: "spike-tenant",
|
|
2956
|
+
projectId: "spike-project",
|
|
2957
|
+
grants: [{ domain: "kb" }, { domain: "sandbox" }]
|
|
2958
|
+
}
|
|
2959
|
+
],
|
|
2960
|
+
[
|
|
2961
|
+
"spike_kb",
|
|
2962
|
+
{
|
|
2963
|
+
credentialId: "spike_kb",
|
|
2964
|
+
kind: "api_key",
|
|
2965
|
+
tenantId: "spike-tenant",
|
|
2966
|
+
projectId: "spike-project",
|
|
2967
|
+
grants: [{ domain: "kb" }]
|
|
2968
|
+
}
|
|
2969
|
+
]
|
|
2970
|
+
]);
|
|
2971
|
+
}
|
|
2972
|
+
});
|
|
2973
|
+
|
|
2974
|
+
// src/services/open/mcpTransportRegistry.ts
|
|
2975
|
+
var mcpTransportRegistry_exports = {};
|
|
2976
|
+
__export(mcpTransportRegistry_exports, {
|
|
2977
|
+
clearSessions: () => clearSessions,
|
|
2978
|
+
deleteSession: () => deleteSession,
|
|
2979
|
+
getSession: () => getSession,
|
|
2980
|
+
registerSession: () => registerSession
|
|
2981
|
+
});
|
|
2982
|
+
async function registerSession(sessionId, credential, parts) {
|
|
2983
|
+
sessions.set(sessionId, { ...parts, credential });
|
|
2984
|
+
}
|
|
2985
|
+
async function getSession(sessionId) {
|
|
2986
|
+
return sessions.get(sessionId) ?? null;
|
|
2987
|
+
}
|
|
2988
|
+
async function deleteSession(sessionId) {
|
|
2989
|
+
const entry = sessions.get(sessionId);
|
|
2990
|
+
if (!entry) return;
|
|
2991
|
+
sessions.delete(sessionId);
|
|
2992
|
+
await entry.transport.close().catch(() => void 0);
|
|
2993
|
+
await entry.server.close().catch(() => void 0);
|
|
2994
|
+
}
|
|
2995
|
+
async function clearSessions() {
|
|
2996
|
+
for (const sessionId of [...sessions.keys()]) {
|
|
2997
|
+
await deleteSession(sessionId);
|
|
2998
|
+
}
|
|
2999
|
+
}
|
|
3000
|
+
var sessions;
|
|
3001
|
+
var init_mcpTransportRegistry = __esm({
|
|
3002
|
+
"src/services/open/mcpTransportRegistry.ts"() {
|
|
3003
|
+
"use strict";
|
|
3004
|
+
sessions = /* @__PURE__ */ new Map();
|
|
3005
|
+
}
|
|
3006
|
+
});
|
|
3007
|
+
|
|
3008
|
+
// src/services/open/mcpCatalog.ts
|
|
3009
|
+
function textResult(text) {
|
|
3010
|
+
return [{ type: "text", text }];
|
|
3011
|
+
}
|
|
3012
|
+
function filterCatalogByGrants(credential) {
|
|
3013
|
+
const domains = new Set(credential.grants.map((g) => g.domain));
|
|
3014
|
+
return SPIKE_TOOL_CATALOG.filter((tool) => domains.has(tool.domain));
|
|
3015
|
+
}
|
|
3016
|
+
var import_zod16, SPIKE_TOOL_CATALOG;
|
|
3017
|
+
var init_mcpCatalog = __esm({
|
|
3018
|
+
"src/services/open/mcpCatalog.ts"() {
|
|
3019
|
+
"use strict";
|
|
3020
|
+
import_zod16 = require("zod");
|
|
3021
|
+
SPIKE_TOOL_CATALOG = [
|
|
3022
|
+
{
|
|
3023
|
+
toolName: "kb_search",
|
|
3024
|
+
domain: "kb",
|
|
3025
|
+
description: "Spike: pretend knowledge-base search.",
|
|
3026
|
+
schema: {
|
|
3027
|
+
query: import_zod16.z.string(),
|
|
3028
|
+
limit: import_zod16.z.number().int().optional()
|
|
3029
|
+
},
|
|
3030
|
+
annotations: { readOnlyHint: true, destructiveHint: false },
|
|
3031
|
+
execute: async (args) => {
|
|
3032
|
+
const { query } = args;
|
|
3033
|
+
return textResult(`kb_search spike result for: ${query}`);
|
|
3034
|
+
}
|
|
3035
|
+
},
|
|
3036
|
+
{
|
|
3037
|
+
toolName: "echo",
|
|
3038
|
+
domain: "sandbox",
|
|
3039
|
+
description: "Spike: echoes the message back.",
|
|
3040
|
+
schema: { message: import_zod16.z.string() },
|
|
3041
|
+
annotations: { readOnlyHint: true, destructiveHint: false },
|
|
3042
|
+
execute: async (args) => {
|
|
3043
|
+
const { message } = args;
|
|
3044
|
+
return textResult(`echo: ${message}`);
|
|
3045
|
+
}
|
|
3046
|
+
}
|
|
3047
|
+
];
|
|
3048
|
+
}
|
|
3049
|
+
});
|
|
3050
|
+
|
|
3051
|
+
// src/services/open/openMcpServer.ts
|
|
3052
|
+
function registerTools(server, tools) {
|
|
3053
|
+
for (const tool of tools) {
|
|
3054
|
+
server.registerTool(
|
|
3055
|
+
tool.toolName,
|
|
3056
|
+
{
|
|
3057
|
+
description: tool.description,
|
|
3058
|
+
inputSchema: tool.schema,
|
|
3059
|
+
annotations: {
|
|
3060
|
+
readOnlyHint: tool.annotations.readOnlyHint,
|
|
3061
|
+
destructiveHint: tool.annotations.destructiveHint
|
|
3062
|
+
}
|
|
3063
|
+
},
|
|
3064
|
+
async (args) => ({ content: await tool.execute(args) })
|
|
3065
|
+
);
|
|
3066
|
+
}
|
|
3067
|
+
}
|
|
3068
|
+
async function buildSessionServer(credential) {
|
|
3069
|
+
const tools = filterCatalogByGrants(credential);
|
|
3070
|
+
const server = new import_mcp.McpServer(OPEN_MCP_SERVER_INFO);
|
|
3071
|
+
registerTools(server, tools);
|
|
3072
|
+
const transport = new import_streamableHttp.StreamableHTTPServerTransport({
|
|
3073
|
+
sessionIdGenerator: () => {
|
|
3074
|
+
const sessionId = (0, import_crypto12.randomUUID)();
|
|
3075
|
+
void registerSession(
|
|
3076
|
+
sessionId,
|
|
3077
|
+
{ credentialId: credential.credentialId, kind: credential.kind },
|
|
3078
|
+
{ server, transport }
|
|
3079
|
+
);
|
|
3080
|
+
return sessionId;
|
|
3081
|
+
},
|
|
3082
|
+
enableJsonResponse: true,
|
|
3083
|
+
onsessionclosed: (closedId) => {
|
|
3084
|
+
void Promise.resolve().then(() => (init_mcpTransportRegistry(), mcpTransportRegistry_exports)).then(
|
|
3085
|
+
({ deleteSession: deleteSession2 }) => deleteSession2(closedId)
|
|
3086
|
+
);
|
|
3087
|
+
}
|
|
3088
|
+
});
|
|
3089
|
+
await server.connect(transport);
|
|
3090
|
+
return { server, transport, tools };
|
|
3091
|
+
}
|
|
3092
|
+
var import_mcp, import_streamableHttp, import_crypto12, OPEN_MCP_SERVER_INFO;
|
|
3093
|
+
var init_openMcpServer = __esm({
|
|
3094
|
+
"src/services/open/openMcpServer.ts"() {
|
|
3095
|
+
"use strict";
|
|
3096
|
+
import_mcp = require("@modelcontextprotocol/sdk/server/mcp.js");
|
|
3097
|
+
import_streamableHttp = require("@modelcontextprotocol/sdk/server/streamableHttp.js");
|
|
3098
|
+
import_crypto12 = require("crypto");
|
|
3099
|
+
init_mcpTransportRegistry();
|
|
3100
|
+
init_mcpCatalog();
|
|
3101
|
+
OPEN_MCP_SERVER_INFO = {
|
|
3102
|
+
name: "axiom-open",
|
|
3103
|
+
version: "0.1.0"
|
|
3104
|
+
};
|
|
3105
|
+
}
|
|
3106
|
+
});
|
|
3107
|
+
|
|
3108
|
+
// src/routes/open.ts
|
|
3109
|
+
var open_exports = {};
|
|
3110
|
+
__export(open_exports, {
|
|
3111
|
+
registerOpenRoutes: () => registerOpenRoutes
|
|
3112
|
+
});
|
|
3113
|
+
function extractBearer(request) {
|
|
3114
|
+
const header2 = request.headers.authorization;
|
|
3115
|
+
if (!header2?.startsWith("Bearer ")) return void 0;
|
|
3116
|
+
return header2.slice("Bearer ".length).trim() || void 0;
|
|
3117
|
+
}
|
|
3118
|
+
function readSessionId(request) {
|
|
3119
|
+
const raw = request.headers["mcp-session-id"];
|
|
3120
|
+
const value = Array.isArray(raw) ? raw[0] : raw;
|
|
3121
|
+
return typeof value === "string" && value.length > 0 ? value : void 0;
|
|
3122
|
+
}
|
|
3123
|
+
function registerOpenRoutes(app2) {
|
|
3124
|
+
app2.post("/open/mcp", async (request, reply) => {
|
|
3125
|
+
const credential = resolveSpikeCredential(extractBearer(request));
|
|
3126
|
+
if (!credential) {
|
|
3127
|
+
return reply.status(401).send({ error: "AUTH_FAILED" });
|
|
3128
|
+
}
|
|
3129
|
+
const body = request.body;
|
|
3130
|
+
const sessionId = readSessionId(request);
|
|
3131
|
+
if (sessionId) {
|
|
3132
|
+
const session = await getSession(sessionId);
|
|
3133
|
+
if (!session || session.credential.credentialId !== credential.credentialId) {
|
|
3134
|
+
return reply.status(404).send({ error: "SESSION_NOT_FOUND" });
|
|
3135
|
+
}
|
|
3136
|
+
reply.hijack();
|
|
3137
|
+
await session.transport.handleRequest(request.raw, reply.raw, body);
|
|
3138
|
+
return;
|
|
3139
|
+
}
|
|
3140
|
+
if (!(0, import_types.isInitializeRequest)(body)) {
|
|
3141
|
+
return reply.status(400).send({ error: "SESSION_REQUIRED" });
|
|
3142
|
+
}
|
|
3143
|
+
const built = await buildSessionServer(credential);
|
|
3144
|
+
reply.hijack();
|
|
3145
|
+
await built.transport.handleRequest(request.raw, reply.raw, body);
|
|
3146
|
+
});
|
|
3147
|
+
app2.delete(
|
|
3148
|
+
"/open/mcp",
|
|
3149
|
+
async (request, reply) => {
|
|
3150
|
+
const sessionId = readSessionId(request);
|
|
3151
|
+
if (!sessionId) {
|
|
3152
|
+
return reply.status(400).send({ error: "SESSION_REQUIRED" });
|
|
3153
|
+
}
|
|
3154
|
+
await deleteSession(sessionId);
|
|
3155
|
+
return reply.status(204).send();
|
|
3156
|
+
}
|
|
3157
|
+
);
|
|
3158
|
+
}
|
|
3159
|
+
var import_types;
|
|
3160
|
+
var init_open = __esm({
|
|
3161
|
+
"src/routes/open.ts"() {
|
|
3162
|
+
"use strict";
|
|
3163
|
+
import_types = require("@modelcontextprotocol/sdk/types.js");
|
|
3164
|
+
init_openCredentials();
|
|
3165
|
+
init_openMcpServer();
|
|
3166
|
+
init_mcpTransportRegistry();
|
|
3167
|
+
}
|
|
3168
|
+
});
|
|
3169
|
+
|
|
2939
3170
|
// src/controllers/resources.ts
|
|
2940
3171
|
var resources_exports = {};
|
|
2941
3172
|
__export(resources_exports, {
|
|
@@ -3171,8 +3402,8 @@ var init_resources = __esm({
|
|
|
3171
3402
|
return cookie.includes(`share_unlock_${token}=1`);
|
|
3172
3403
|
}
|
|
3173
3404
|
/** Returns true if the path has a file extension indicating it's a file, not a directory */
|
|
3174
|
-
_isFilePath(
|
|
3175
|
-
return /\.[a-zA-Z0-9]+$/.test(
|
|
3405
|
+
_isFilePath(path7) {
|
|
3406
|
+
return /\.[a-zA-Z0-9]+$/.test(path7);
|
|
3176
3407
|
}
|
|
3177
3408
|
/**
|
|
3178
3409
|
* Shared file resolution: directory → index.html, volume FS → sandbox, base tag, response.
|
|
@@ -3314,7 +3545,7 @@ var import_path = __toESM(require("path"));
|
|
|
3314
3545
|
|
|
3315
3546
|
// src/routes/index.ts
|
|
3316
3547
|
var import_node_crypto20 = require("crypto");
|
|
3317
|
-
var
|
|
3548
|
+
var import_protocols26 = require("@axiom-lattice/protocols");
|
|
3318
3549
|
|
|
3319
3550
|
// src/controllers/assistant.ts
|
|
3320
3551
|
var import_core = require("@axiom-lattice/core");
|
|
@@ -7381,9 +7612,9 @@ var ExportImportService = class {
|
|
|
7381
7612
|
if (!files || files.size === 0) return void 0;
|
|
7382
7613
|
const prefix = `files/${entityType}/${entityId}/`;
|
|
7383
7614
|
const result = /* @__PURE__ */ new Map();
|
|
7384
|
-
for (const [
|
|
7385
|
-
if (
|
|
7386
|
-
result.set(
|
|
7615
|
+
for (const [path7, content] of files.entries()) {
|
|
7616
|
+
if (path7.startsWith(prefix)) {
|
|
7617
|
+
result.set(path7.slice(prefix.length), content);
|
|
7387
7618
|
}
|
|
7388
7619
|
}
|
|
7389
7620
|
return result.size > 0 ? result : void 0;
|
|
@@ -9488,21 +9719,21 @@ var WorkspaceController = class {
|
|
|
9488
9719
|
async listPath(request) {
|
|
9489
9720
|
const tenantId = this.getTenantId(request);
|
|
9490
9721
|
const { workspaceId, projectId } = request.params;
|
|
9491
|
-
const
|
|
9722
|
+
const path7 = request.query.path || "/";
|
|
9492
9723
|
const assistantId = request.query.assistantId;
|
|
9493
|
-
console.log(`[listPath] tenantId=${tenantId} workspaceId=${workspaceId} projectId=${projectId} path=${
|
|
9494
|
-
const { backend } = await this.getBackend(tenantId, workspaceId, projectId, assistantId,
|
|
9495
|
-
console.log(`[listPath] backend type=${backend.constructor.name} calling lsInfo(${
|
|
9496
|
-
const files = await backend.lsInfo(
|
|
9724
|
+
console.log(`[listPath] tenantId=${tenantId} workspaceId=${workspaceId} projectId=${projectId} path=${path7} assistantId=${assistantId}`);
|
|
9725
|
+
const { backend } = await this.getBackend(tenantId, workspaceId, projectId, assistantId, path7);
|
|
9726
|
+
console.log(`[listPath] backend type=${backend.constructor.name} calling lsInfo(${path7})`);
|
|
9727
|
+
const files = await backend.lsInfo(path7);
|
|
9497
9728
|
console.log(`[listPath] result count=${files.length}`);
|
|
9498
9729
|
return { success: true, data: files };
|
|
9499
9730
|
}
|
|
9500
9731
|
async readFile(request) {
|
|
9501
9732
|
const tenantId = this.getTenantId(request);
|
|
9502
9733
|
const { workspaceId, projectId } = request.params;
|
|
9503
|
-
const { path:
|
|
9504
|
-
const { backend } = await this.getBackend(tenantId, workspaceId, projectId, assistantId,
|
|
9505
|
-
const content = await backend.read(
|
|
9734
|
+
const { path: path7, offset = 0, limit = 1e3, assistantId } = request.query;
|
|
9735
|
+
const { backend } = await this.getBackend(tenantId, workspaceId, projectId, assistantId, path7);
|
|
9736
|
+
const content = await backend.read(path7, Number(offset), Number(limit));
|
|
9506
9737
|
return { success: true, data: { content, offset, limit } };
|
|
9507
9738
|
}
|
|
9508
9739
|
/**
|
|
@@ -12355,13 +12586,13 @@ function isStaleConsoleSessionCredential(authHeader) {
|
|
|
12355
12586
|
}
|
|
12356
12587
|
}
|
|
12357
12588
|
function bypassesConsoleAuth(request) {
|
|
12358
|
-
const
|
|
12589
|
+
const path7 = request.url.split("?")[0];
|
|
12359
12590
|
const method = request.method;
|
|
12360
|
-
if (method === "GET" && /^\/api\/web-apps\/[^/]+\/runtime\/bootstrap$/.test(
|
|
12361
|
-
if (request.method === "GET" && /^\/api\/a2a\/agents\/[^/]+\/\.well-known\/agent-card\.json$/.test(
|
|
12591
|
+
if (method === "GET" && /^\/api\/web-apps\/[^/]+\/runtime\/bootstrap$/.test(path7) || (method === "GET" || method === "POST") && /^\/api\/web-apps\/[^/]+\/runtime\/threads$/.test(path7) || (method === "PATCH" || method === "DELETE") && /^\/api\/web-apps\/[^/]+\/runtime\/threads\/[^/]+$/.test(path7) || method === "GET" && /^\/api\/web-apps\/[^/]+\/runtime\/threads\/[^/]+\/messages$/.test(path7) || method === "GET" && /^\/api\/web-apps\/[^/]+\/runtime\/files\/(viewfile|downloadfile)$/.test(path7) || method === "GET" && /^\/api\/web-apps\/[^/]+\/runtime\/api\/assistants\/[^/]+\/threads\/[^/]+\/sandbox\/(viewfile|downloadfile)$/.test(path7) || method === "POST" && /^\/api\/web-apps\/[^/]+\/runtime\/threads\/[^/]+\/(messages\/stream|abort|attachments)$/.test(path7) || method === "POST" && /^\/api\/web-apps\/[^/]+\/runtime\/threads\/[^/]+\/interrupts\/[^/]+\/resume$/.test(path7) || method === "GET" && /^\/api\/web-apps\/[^/]+\/chat$/.test(path7) || method === "GET" && /^\/embed\/[^/]+$/.test(path7) || (method === "POST" || method === "DELETE") && path7 === "/open/mcp") return true;
|
|
12592
|
+
if (request.method === "GET" && /^\/api\/a2a\/agents\/[^/]+\/\.well-known\/agent-card\.json$/.test(path7)) {
|
|
12362
12593
|
return true;
|
|
12363
12594
|
}
|
|
12364
|
-
return request.method === "POST" && /^\/api\/a2a\/agents\/[^/]+\/jsonrpc$/.test(
|
|
12595
|
+
return request.method === "POST" && /^\/api\/a2a\/agents\/[^/]+\/jsonrpc$/.test(path7);
|
|
12365
12596
|
}
|
|
12366
12597
|
function registerConsoleAuthHook(app2, options) {
|
|
12367
12598
|
app2.addHook("preHandler", async (request, reply) => {
|
|
@@ -12384,8 +12615,8 @@ function registerConsoleAuthHook(app2, options) {
|
|
|
12384
12615
|
}
|
|
12385
12616
|
if (PUBLIC_ROUTES.some((route) => request.url === route)) return;
|
|
12386
12617
|
if (request.url.startsWith("/s/")) return;
|
|
12387
|
-
const
|
|
12388
|
-
if (request.method === "GET" && /^\/api\/workspaces\/[^/]+\/projects\/[^/]+\/viewfile$/.test(
|
|
12618
|
+
const path7 = request.url.split("?")[0];
|
|
12619
|
+
if (request.method === "GET" && /^\/api\/workspaces\/[^/]+\/projects\/[^/]+\/viewfile$/.test(path7) || request.method === "GET" && /^\/api\/workspaces\/[^/]+\/projects\/[^/]+\/downloadfile$/.test(path7) || request.method === "POST" && /^\/api\/workspaces\/[^/]+\/projects\/[^/]+\/uploadfile$/.test(path7) || path7.startsWith("/f/") || path7 === "/f") {
|
|
12389
12620
|
return;
|
|
12390
12621
|
}
|
|
12391
12622
|
await reply.status(401).send({
|
|
@@ -13511,8 +13742,8 @@ var log = {
|
|
|
13511
13742
|
};
|
|
13512
13743
|
var connections = /* @__PURE__ */ new Map();
|
|
13513
13744
|
var pending = /* @__PURE__ */ new Map();
|
|
13514
|
-
function getAgentIdFromPath(
|
|
13515
|
-
const match =
|
|
13745
|
+
function getAgentIdFromPath(path7) {
|
|
13746
|
+
const match = path7.match(/^\/api\/a2a\/bridge\/proxy\/([^/]+)/);
|
|
13516
13747
|
return match ? match[1] : null;
|
|
13517
13748
|
}
|
|
13518
13749
|
function handleBridgeConnection(socket, _request) {
|
|
@@ -16045,7 +16276,6 @@ function registerAgentWebAppRuntimeRoutes(app2, deps) {
|
|
|
16045
16276
|
});
|
|
16046
16277
|
routes.get("/api/web-apps/:webAppId/runtime/files/viewfile", async (request, reply) => {
|
|
16047
16278
|
const { webAppId } = paramsSchema.parse(request.params);
|
|
16048
|
-
const identity = await resolveRuntimeIdentity(request, webAppId, identities);
|
|
16049
16279
|
const scope = await fileScope(webAppId, fileQuerySchema.parse(request.query));
|
|
16050
16280
|
const query = { ...request.query, assistantId: scope.assistantId };
|
|
16051
16281
|
await workspace.viewFile(scopedRequest(request, scope, { workspaceId: scope.workspaceId, projectId: scope.projectId }, query), reply);
|
|
@@ -16053,7 +16283,6 @@ function registerAgentWebAppRuntimeRoutes(app2, deps) {
|
|
|
16053
16283
|
});
|
|
16054
16284
|
routes.get("/api/web-apps/:webAppId/runtime/files/downloadfile", async (request, reply) => {
|
|
16055
16285
|
const { webAppId } = paramsSchema.parse(request.params);
|
|
16056
|
-
const identity = await resolveRuntimeIdentity(request, webAppId, identities);
|
|
16057
16286
|
const scope = await fileScope(webAppId, fileQuerySchema.parse(request.query));
|
|
16058
16287
|
const query = { ...request.query, assistantId: scope.assistantId };
|
|
16059
16288
|
await workspace.downloadFile(scopedRequest(request, scope, { workspaceId: scope.workspaceId, projectId: scope.projectId }, query), reply);
|
|
@@ -16078,6 +16307,15 @@ function registerAgentWebAppRuntimeRoutes(app2, deps) {
|
|
|
16078
16307
|
};
|
|
16079
16308
|
routes.get("/api/web-apps/:webAppId/runtime/assistants/:assistantId/threads/:threadId/sandbox/downloadfile", delegateGenuiFile(workspace.downloadFile.bind(workspace)));
|
|
16080
16309
|
routes.get("/api/web-apps/:webAppId/runtime/assistants/:assistantId/threads/:threadId/sandbox/viewfile", delegateGenuiFile(workspace.viewFile.bind(workspace)));
|
|
16310
|
+
const delegateAnonGenuiFile = (method) => async (request, reply) => {
|
|
16311
|
+
const { webAppId } = genuiSandboxParams.parse(request.params);
|
|
16312
|
+
const scope = await fileScope(webAppId, fileQuerySchema.parse(request.query));
|
|
16313
|
+
const query = { ...request.query, assistantId: scope.assistantId };
|
|
16314
|
+
await method(scopedRequest(request, scope, { workspaceId: scope.workspaceId, projectId: scope.projectId }, query), reply);
|
|
16315
|
+
return reply;
|
|
16316
|
+
};
|
|
16317
|
+
routes.get("/api/web-apps/:webAppId/runtime/api/assistants/:assistantId/threads/:threadId/sandbox/downloadfile", delegateAnonGenuiFile(workspace.downloadFile.bind(workspace)));
|
|
16318
|
+
routes.get("/api/web-apps/:webAppId/runtime/api/assistants/:assistantId/threads/:threadId/sandbox/viewfile", delegateAnonGenuiFile(workspace.viewFile.bind(workspace)));
|
|
16081
16319
|
}
|
|
16082
16320
|
const mirrorThreadParams = import_zod6.z.object({ webAppId: idSchema, assistantId: idSchema, threadId: idSchema }).strict();
|
|
16083
16321
|
const mirrorBody = import_zod6.z.object({ metadata: import_zod6.z.object({ label: import_zod6.z.string().max(300).optional() }).strict().optional(), projectId: idSchema.optional(), modelKey: idSchema.optional() }).strict();
|
|
@@ -16268,6 +16506,105 @@ function isMultipartRequestError(error) {
|
|
|
16268
16506
|
return typeof error === "object" && error !== null && "code" in error && typeof error.code === "string" && error.code.startsWith("FST_");
|
|
16269
16507
|
}
|
|
16270
16508
|
|
|
16509
|
+
// src/routes/agent-web-app-embed.ts
|
|
16510
|
+
var import_node_fs2 = require("fs");
|
|
16511
|
+
var import_promises2 = require("fs/promises");
|
|
16512
|
+
var import_node_path2 = __toESM(require("path"));
|
|
16513
|
+
var import_zod7 = require("zod");
|
|
16514
|
+
var idSchema2 = import_zod7.z.string().min(1).max(128).regex(/^[A-Za-z0-9._:@-]+$/);
|
|
16515
|
+
var JS_CONTENT_TYPE = "application/javascript; charset=utf-8";
|
|
16516
|
+
var CSS_CONTENT_TYPE = "text/css; charset=utf-8";
|
|
16517
|
+
var EXACT_ASSETS = {
|
|
16518
|
+
"agent-chat-loader.js": { contentType: JS_CONTENT_TYPE },
|
|
16519
|
+
"embed-page.js": { contentType: JS_CONTENT_TYPE },
|
|
16520
|
+
"embed-page.css": { contentType: CSS_CONTENT_TYPE }
|
|
16521
|
+
};
|
|
16522
|
+
var HASHED_CHUNK_PATTERN = /^embed-page-[A-Za-z0-9._-]+\.(js|css)$/;
|
|
16523
|
+
var CHUNK_CSS_PATTERN = /^embed-page-[A-Za-z0-9._-]+\.css$/;
|
|
16524
|
+
function resolveAsset(asset) {
|
|
16525
|
+
if (asset.includes("..")) return null;
|
|
16526
|
+
const exact2 = EXACT_ASSETS[asset];
|
|
16527
|
+
if (exact2 !== void 0) return { contentType: exact2.contentType, immutable: false };
|
|
16528
|
+
const hashed = HASHED_CHUNK_PATTERN.exec(asset);
|
|
16529
|
+
if (hashed) {
|
|
16530
|
+
return { contentType: hashed[1] === "css" ? CSS_CONTENT_TYPE : JS_CONTENT_TYPE, immutable: true };
|
|
16531
|
+
}
|
|
16532
|
+
return null;
|
|
16533
|
+
}
|
|
16534
|
+
async function listChunkCssFiles(assetsDir) {
|
|
16535
|
+
try {
|
|
16536
|
+
return (await (0, import_promises2.readdir)(assetsDir)).filter((name) => CHUNK_CSS_PATTERN.test(name) && !name.includes("..")).sort();
|
|
16537
|
+
} catch {
|
|
16538
|
+
return [];
|
|
16539
|
+
}
|
|
16540
|
+
}
|
|
16541
|
+
var BUNDLED_MARKER = "agent-chat-loader.js";
|
|
16542
|
+
function resolveBundledEmbedDir() {
|
|
16543
|
+
if (typeof __dirname === "string") {
|
|
16544
|
+
const compiled = import_node_path2.default.resolve(__dirname, "embed");
|
|
16545
|
+
if ((0, import_node_fs2.existsSync)(import_node_path2.default.join(compiled, BUNDLED_MARKER))) return compiled;
|
|
16546
|
+
}
|
|
16547
|
+
let dir = import_node_path2.default.dirname(import_node_path2.default.resolve(process.argv[1] ?? process.cwd()));
|
|
16548
|
+
for (let depth = 0; depth < 8; depth += 1) {
|
|
16549
|
+
const candidate = import_node_path2.default.join(dir, "packages", "gateway", "dist", "embed");
|
|
16550
|
+
if ((0, import_node_fs2.existsSync)(import_node_path2.default.join(candidate, BUNDLED_MARKER))) return candidate;
|
|
16551
|
+
const parent = import_node_path2.default.dirname(dir);
|
|
16552
|
+
if (parent === dir) break;
|
|
16553
|
+
dir = parent;
|
|
16554
|
+
}
|
|
16555
|
+
return null;
|
|
16556
|
+
}
|
|
16557
|
+
function renderChatShell(chunkCssFiles) {
|
|
16558
|
+
const chunkCssLinks = chunkCssFiles.map(
|
|
16559
|
+
(name) => ` <link rel="stylesheet" href="/embed/${name}" />`
|
|
16560
|
+
);
|
|
16561
|
+
return [
|
|
16562
|
+
"<!doctype html>",
|
|
16563
|
+
'<html lang="en">',
|
|
16564
|
+
" <head>",
|
|
16565
|
+
' <meta charset="utf-8" />',
|
|
16566
|
+
' <meta name="viewport" content="width=device-width, initial-scale=1" />',
|
|
16567
|
+
" <title>Agent chat</title>",
|
|
16568
|
+
' <link rel="stylesheet" href="/embed/embed-page.css" />',
|
|
16569
|
+
...chunkCssLinks,
|
|
16570
|
+
" </head>",
|
|
16571
|
+
" <body>",
|
|
16572
|
+
' <div id="axiom-embed-root">',
|
|
16573
|
+
" <noscript>This chat requires JavaScript.</noscript>",
|
|
16574
|
+
' <p class="axiom-embed-loading">Loading chat\u2026</p>',
|
|
16575
|
+
" </div>",
|
|
16576
|
+
' <script type="module" src="/embed/embed-page.js"></script>',
|
|
16577
|
+
" </body>",
|
|
16578
|
+
"</html>"
|
|
16579
|
+
].join("\n");
|
|
16580
|
+
}
|
|
16581
|
+
function registerAgentWebAppEmbedRoutes(app2, deps = {}) {
|
|
16582
|
+
const bundledDir = resolveBundledEmbedDir();
|
|
16583
|
+
const assetsDir = deps.assetsDir ?? process.env.AXIOM_EMBED_ASSETS_DIR ?? bundledDir ?? import_node_path2.default.resolve(process.cwd(), "assets/embed");
|
|
16584
|
+
let chunkCssFiles = null;
|
|
16585
|
+
app2.get("/api/web-apps/:webAppId/chat", async (request, reply) => {
|
|
16586
|
+
const parsed = idSchema2.safeParse(request.params.webAppId);
|
|
16587
|
+
if (!parsed.success) {
|
|
16588
|
+
return reply.code(400).send({ success: false, error: { code: "INVALID_REQUEST", message: "Invalid web app id", retryable: false } });
|
|
16589
|
+
}
|
|
16590
|
+
chunkCssFiles ?? (chunkCssFiles = await listChunkCssFiles(assetsDir));
|
|
16591
|
+
return reply.header("content-type", "text/html; charset=utf-8").header("cache-control", "no-store").send(renderChatShell(chunkCssFiles));
|
|
16592
|
+
});
|
|
16593
|
+
app2.get("/embed/:asset", async (request, reply) => {
|
|
16594
|
+
const asset = request.params.asset ?? "";
|
|
16595
|
+
const resolved = resolveAsset(asset);
|
|
16596
|
+
if (resolved === null) {
|
|
16597
|
+
return reply.code(404).send({ success: false, error: { code: "INVALID_REQUEST", message: "Unknown embed asset", retryable: false } });
|
|
16598
|
+
}
|
|
16599
|
+
try {
|
|
16600
|
+
const body = await (0, import_promises2.readFile)(import_node_path2.default.join(assetsDir, asset));
|
|
16601
|
+
return reply.header("content-type", resolved.contentType).header("cache-control", resolved.immutable ? "public, max-age=31536000, immutable" : "public, max-age=300").send(body);
|
|
16602
|
+
} catch {
|
|
16603
|
+
return reply.code(404).send({ success: false, error: { code: "INVALID_REQUEST", message: "Embed asset not built", retryable: false } });
|
|
16604
|
+
}
|
|
16605
|
+
});
|
|
16606
|
+
}
|
|
16607
|
+
|
|
16271
16608
|
// src/services/agent-web-app/AgentWebAppAttachmentRef.ts
|
|
16272
16609
|
var import_node_crypto9 = require("crypto");
|
|
16273
16610
|
var TTL_MS = 15 * 6e4;
|
|
@@ -16353,10 +16690,10 @@ function isAttachmentPayload(value) {
|
|
|
16353
16690
|
init_workspace_file_service();
|
|
16354
16691
|
|
|
16355
16692
|
// src/controllers/capability-bundles.ts
|
|
16356
|
-
var
|
|
16693
|
+
var import_zod9 = require("zod");
|
|
16357
16694
|
|
|
16358
16695
|
// src/services/capability/CapabilityBundleService.ts
|
|
16359
|
-
var
|
|
16696
|
+
var import_zod8 = require("zod");
|
|
16360
16697
|
var import_core43 = require("@axiom-lattice/core");
|
|
16361
16698
|
var CapabilityBundleServiceError = class extends Error {
|
|
16362
16699
|
constructor(code, message, statusCode) {
|
|
@@ -16366,7 +16703,7 @@ var CapabilityBundleServiceError = class extends Error {
|
|
|
16366
16703
|
this.name = "CapabilityBundleServiceError";
|
|
16367
16704
|
}
|
|
16368
16705
|
};
|
|
16369
|
-
var uuid =
|
|
16706
|
+
var uuid = import_zod8.z.string().uuid();
|
|
16370
16707
|
function ownRecord(value) {
|
|
16371
16708
|
if (value === void 0 || value === null) return {};
|
|
16372
16709
|
if (typeof value !== "object" || Array.isArray(value)) throw new CapabilityBundleServiceError("INVALID_BUNDLE_CONFIG", "Project config must be an object", 409);
|
|
@@ -16569,12 +16906,12 @@ var CapabilityBundleService = class {
|
|
|
16569
16906
|
// src/controllers/capability-bundles.ts
|
|
16570
16907
|
init_Logger();
|
|
16571
16908
|
var logger3 = new Logger({ serviceName: "lattice/gateway/capability-bundles" });
|
|
16572
|
-
var capability =
|
|
16573
|
-
var createSchema =
|
|
16574
|
-
var updateSchema = createSchema.partial().extend({ expectedUpdatedAt:
|
|
16575
|
-
var bundleIdSchema =
|
|
16576
|
-
var bundleParamsSchema =
|
|
16577
|
-
var projectSchema =
|
|
16909
|
+
var capability = import_zod9.z.unknown();
|
|
16910
|
+
var createSchema = import_zod9.z.object({ name: import_zod9.z.string(), description: import_zod9.z.string().optional(), capabilities: import_zod9.z.array(capability) }).strict();
|
|
16911
|
+
var updateSchema = createSchema.partial().extend({ expectedUpdatedAt: import_zod9.z.string().optional() });
|
|
16912
|
+
var bundleIdSchema = import_zod9.z.string().uuid();
|
|
16913
|
+
var bundleParamsSchema = import_zod9.z.object({ bundleId: bundleIdSchema });
|
|
16914
|
+
var projectSchema = import_zod9.z.object({ bundleIds: import_zod9.z.array(bundleIdSchema), expectedRevisions: import_zod9.z.record(import_zod9.z.string()).optional() }).strict();
|
|
16578
16915
|
function tenant(request, authRequired2) {
|
|
16579
16916
|
const authenticated = request.user?.tenantId;
|
|
16580
16917
|
const header2 = request.headers["x-tenant-id"];
|
|
@@ -16842,6 +17179,14 @@ var ProjectMembershipService = class {
|
|
|
16842
17179
|
const room = await this.deps.roomStore.getMainRoom(membership.tenantId, membership.projectId);
|
|
16843
17180
|
if (!room) throw new Error("Project main room not found");
|
|
16844
17181
|
this.deps.realtime.membershipChanged({ tenantId: membership.tenantId, roomId: room.id, membership, change, sourceKey });
|
|
17182
|
+
this.deps.realtime.membershipAffected({
|
|
17183
|
+
tenantId: membership.tenantId,
|
|
17184
|
+
userId: membership.userId,
|
|
17185
|
+
change,
|
|
17186
|
+
projectId: membership.projectId,
|
|
17187
|
+
roomId: room.id,
|
|
17188
|
+
sourceKey: `membership-affected:${sourceKey}`
|
|
17189
|
+
});
|
|
16845
17190
|
}).catch((error) => {
|
|
16846
17191
|
this.reportRealtimeFailure(membership.id);
|
|
16847
17192
|
});
|
|
@@ -17445,46 +17790,47 @@ function matchesNormalizedPayload(message, input) {
|
|
|
17445
17790
|
}
|
|
17446
17791
|
|
|
17447
17792
|
// src/routes/project-rooms.ts
|
|
17448
|
-
var
|
|
17793
|
+
var import_zod11 = require("zod");
|
|
17794
|
+
var import_protocols14 = require("@axiom-lattice/protocols");
|
|
17449
17795
|
|
|
17450
17796
|
// src/schemas/project-room.ts
|
|
17451
|
-
var
|
|
17452
|
-
var id2 =
|
|
17453
|
-
var isoDate =
|
|
17454
|
-
var expectedUpdatedAt =
|
|
17455
|
-
var projectRoomParamsSchema =
|
|
17456
|
-
var membershipParamsSchema =
|
|
17457
|
-
var roomMessagesQuerySchema =
|
|
17458
|
-
beforeCreatedAt:
|
|
17797
|
+
var import_zod10 = require("zod");
|
|
17798
|
+
var id2 = import_zod10.z.string().trim().min(1).max(128);
|
|
17799
|
+
var isoDate = import_zod10.z.string().datetime({ offset: true }).transform((value) => new Date(value));
|
|
17800
|
+
var expectedUpdatedAt = import_zod10.z.object({ expectedUpdatedAt: isoDate }).strict();
|
|
17801
|
+
var projectRoomParamsSchema = import_zod10.z.object({ projectId: id2 }).strict();
|
|
17802
|
+
var membershipParamsSchema = import_zod10.z.object({ projectId: id2, membershipId: id2 }).strict();
|
|
17803
|
+
var roomMessagesQuerySchema = import_zod10.z.object({
|
|
17804
|
+
beforeCreatedAt: import_zod10.z.string().datetime({ offset: true }).transform((value) => new Date(value)).optional(),
|
|
17459
17805
|
beforeId: id2.optional(),
|
|
17460
|
-
limit:
|
|
17806
|
+
limit: import_zod10.z.coerce.number().int().min(1).max(100).optional()
|
|
17461
17807
|
}).strict().refine((value) => value.beforeCreatedAt === void 0 === (value.beforeId === void 0), { message: "Both cursor fields are required" });
|
|
17462
|
-
var createRoomMessageSchema =
|
|
17463
|
-
text:
|
|
17464
|
-
mentions:
|
|
17465
|
-
|
|
17466
|
-
|
|
17808
|
+
var createRoomMessageSchema = import_zod10.z.object({
|
|
17809
|
+
text: import_zod10.z.string(),
|
|
17810
|
+
mentions: import_zod10.z.array(import_zod10.z.union([
|
|
17811
|
+
import_zod10.z.object({ type: import_zod10.z.literal("team") }).strict(),
|
|
17812
|
+
import_zod10.z.object({ type: import_zod10.z.literal("bot"), membershipId: id2 }).strict()
|
|
17467
17813
|
])).optional(),
|
|
17468
17814
|
replyToMessageId: id2.optional()
|
|
17469
17815
|
}).strict();
|
|
17470
|
-
var addProjectMemberSchema =
|
|
17471
|
-
var updateProjectMemberSchema =
|
|
17816
|
+
var addProjectMemberSchema = import_zod10.z.object({ userId: id2, role: import_zod10.z.enum(["owner", "admin", "member", "viewer"]) }).strict();
|
|
17817
|
+
var updateProjectMemberSchema = import_zod10.z.object({ role: import_zod10.z.enum(["owner", "admin", "member", "viewer"]), expectedUpdatedAt: isoDate }).strict();
|
|
17472
17818
|
var mutationExpectedUpdatedAtSchema = expectedUpdatedAt;
|
|
17473
|
-
var roomMessageRetryParamsSchema =
|
|
17474
|
-
var emptyObjectSchema =
|
|
17475
|
-
var idempotencyKeySchema =
|
|
17476
|
-
var addProjectBotSchema =
|
|
17819
|
+
var roomMessageRetryParamsSchema = import_zod10.z.object({ projectId: id2, messageId: id2 }).strict();
|
|
17820
|
+
var emptyObjectSchema = import_zod10.z.object({}).strict();
|
|
17821
|
+
var idempotencyKeySchema = import_zod10.z.string().refine((value) => value.trim().length >= 1 && value.trim().length <= 200 && /^[\x20-\x7e]+$/.test(value.trim()), "Invalid idempotency key").transform((value) => value.trim());
|
|
17822
|
+
var addProjectBotSchema = import_zod10.z.object({
|
|
17477
17823
|
assistantId: id2,
|
|
17478
|
-
role:
|
|
17479
|
-
title:
|
|
17480
|
-
responsibility:
|
|
17481
|
-
mentionName:
|
|
17824
|
+
role: import_zod10.z.enum(["coordinator", "specialist"]),
|
|
17825
|
+
title: import_zod10.z.string(),
|
|
17826
|
+
responsibility: import_zod10.z.string().optional(),
|
|
17827
|
+
mentionName: import_zod10.z.string()
|
|
17482
17828
|
}).strict();
|
|
17483
|
-
var updateProjectBotSchema =
|
|
17484
|
-
role:
|
|
17485
|
-
title:
|
|
17486
|
-
responsibility:
|
|
17487
|
-
mentionName:
|
|
17829
|
+
var updateProjectBotSchema = import_zod10.z.object({
|
|
17830
|
+
role: import_zod10.z.enum(["coordinator", "specialist"]).optional(),
|
|
17831
|
+
title: import_zod10.z.string().optional(),
|
|
17832
|
+
responsibility: import_zod10.z.string().optional(),
|
|
17833
|
+
mentionName: import_zod10.z.string().optional(),
|
|
17488
17834
|
expectedUpdatedAt: isoDate
|
|
17489
17835
|
}).strict().refine((value) => value.role !== void 0 || value.title !== void 0 || value.responsibility !== void 0 || value.mentionName !== void 0, { message: "At least one mutable field is required" });
|
|
17490
17836
|
|
|
@@ -17502,7 +17848,8 @@ function registerProjectRoomRoutes(app2, deps) {
|
|
|
17502
17848
|
const params = projectRoomParamsSchema.parse(request.params);
|
|
17503
17849
|
const query = roomMessagesQuerySchema.parse(request.query);
|
|
17504
17850
|
const before = query.beforeCreatedAt === void 0 && query.beforeId === void 0 ? void 0 : { createdAt: query.beforeCreatedAt, id: query.beforeId };
|
|
17505
|
-
|
|
17851
|
+
const messages = await deps.messageService.list(actor(request, params.projectId), { ...before ? { before } : {}, ...query.limit === void 0 ? {} : { limit: query.limit } });
|
|
17852
|
+
return { data: messages.map(toProjectRoomMessage) };
|
|
17506
17853
|
}));
|
|
17507
17854
|
app2.post("/api/projects/:projectId/room/messages", async (request, reply) => run(reply, async () => {
|
|
17508
17855
|
const params = projectRoomParamsSchema.parse(request.params);
|
|
@@ -17513,7 +17860,7 @@ function registerProjectRoomRoutes(app2, deps) {
|
|
|
17513
17860
|
const idempotencyKey = rawIdempotencyKey === void 0 ? void 0 : idempotencyKeySchema.parse(rawIdempotencyKey);
|
|
17514
17861
|
const result = await deps.messageService.createAndDispatch(requestActor, { ...input, ...idempotencyKey === void 0 ? {} : { requestIdempotencyKey: idempotencyKey } });
|
|
17515
17862
|
const allSucceeded = result.dispatch.length > 0 && result.dispatch.every((entry) => entry.success);
|
|
17516
|
-
return { statusCode: allSucceeded ? result.replayed ? 200 : 201 : 202, data: result };
|
|
17863
|
+
return { statusCode: allSucceeded ? result.replayed ? 200 : 201 : 202, data: { message: toProjectRoomMessage(result.message), dispatch: result.dispatch, replayed: result.replayed } };
|
|
17517
17864
|
}));
|
|
17518
17865
|
app2.post("/api/projects/:projectId/room/messages/:messageId/retry", async (request, reply) => run(reply, async () => {
|
|
17519
17866
|
const params = roomMessageRetryParamsSchema.parse(request.params);
|
|
@@ -17522,6 +17869,12 @@ function registerProjectRoomRoutes(app2, deps) {
|
|
|
17522
17869
|
const dispatch = await deps.messageService.retry(actor(request, params.projectId), params.messageId);
|
|
17523
17870
|
return { statusCode: dispatch.length > 0 && dispatch.every((entry) => entry.success) ? 200 : 202, data: dispatch };
|
|
17524
17871
|
}));
|
|
17872
|
+
app2.post("/api/projects/:projectId/room/read-state", async (request, reply) => run(reply, async () => {
|
|
17873
|
+
const params = projectRoomParamsSchema.parse(request.params);
|
|
17874
|
+
emptyObjectSchema.parse(request.body ?? {});
|
|
17875
|
+
await deps.readStateService.mark(actor(request, params.projectId));
|
|
17876
|
+
return { data: { marked: true } };
|
|
17877
|
+
}));
|
|
17525
17878
|
app2.get("/api/projects/:projectId/members", async (request, reply) => run(reply, async () => ({ data: await deps.membershipService.list(actor(request, projectRoomParamsSchema.parse(request.params).projectId)) })));
|
|
17526
17879
|
app2.post("/api/projects/:projectId/members", async (request, reply) => run(reply, async () => {
|
|
17527
17880
|
const p = projectRoomParamsSchema.parse(request.params);
|
|
@@ -17544,19 +17897,24 @@ function actor(request, projectId) {
|
|
|
17544
17897
|
projectRoomParamsSchema.parse({ projectId });
|
|
17545
17898
|
return { tenantId: user.tenantId, userId: user.id, projectId };
|
|
17546
17899
|
}
|
|
17900
|
+
function toProjectRoomMessage(message) {
|
|
17901
|
+
const publicMessage = (0, import_protocols14.toProjectRoomPublicMessage)(message);
|
|
17902
|
+
if (publicMessage === void 0) throw new Error("Room message could not be mapped to its public DTO");
|
|
17903
|
+
return publicMessage;
|
|
17904
|
+
}
|
|
17547
17905
|
async function run(reply, operation) {
|
|
17548
17906
|
try {
|
|
17549
17907
|
const result = await operation();
|
|
17550
17908
|
return reply.code(result.statusCode ?? 200).send({ success: true, data: result.data });
|
|
17551
17909
|
} catch (error) {
|
|
17552
|
-
if (error instanceof
|
|
17910
|
+
if (error instanceof import_zod11.ZodError) return reply.code(400).send({ success: false, error: { code: "INVALID_REQUEST", message: "Invalid request", retryable: false } });
|
|
17553
17911
|
if (error instanceof ProjectRoomAuthError || error instanceof ProjectCollaborationError || error instanceof ProjectMembershipServiceError || error instanceof ProjectRosterServiceError || error instanceof RoomMessageServiceError) return reply.code(error.statusCode).send({ success: false, error: { code: error.code, message: error.message, retryable: error instanceof RoomMessageServiceError && error.retryable } });
|
|
17554
17912
|
return reply.code(500).send({ success: false, error: { code: "INTERNAL_ERROR", message: "Internal server error", retryable: false } });
|
|
17555
17913
|
}
|
|
17556
17914
|
}
|
|
17557
17915
|
|
|
17558
17916
|
// src/routes/project-roster.ts
|
|
17559
|
-
var
|
|
17917
|
+
var import_zod12 = require("zod");
|
|
17560
17918
|
var ProjectRosterAuthError = class extends Error {
|
|
17561
17919
|
constructor() {
|
|
17562
17920
|
super(...arguments);
|
|
@@ -17596,7 +17954,7 @@ async function execute(reply, operation) {
|
|
|
17596
17954
|
const result = await operation();
|
|
17597
17955
|
return reply.code(result.statusCode ?? 200).send({ success: true, data: result.data });
|
|
17598
17956
|
} catch (error) {
|
|
17599
|
-
if (error instanceof
|
|
17957
|
+
if (error instanceof import_zod12.ZodError) return reply.code(400).send({ success: false, error: { code: "INVALID_REQUEST", message: "Invalid request", retryable: false } });
|
|
17600
17958
|
if (error instanceof ProjectRosterAuthError || error instanceof ProjectCollaborationError || error instanceof ProjectRosterServiceError) return reply.code(error.statusCode).send({ success: false, error: { code: error.code, message: error.message, retryable: false } });
|
|
17601
17959
|
return reply.code(500).send({ success: false, error: { code: "INTERNAL_ERROR", message: "Internal server error", retryable: false } });
|
|
17602
17960
|
}
|
|
@@ -17604,8 +17962,9 @@ async function execute(reply, operation) {
|
|
|
17604
17962
|
|
|
17605
17963
|
// src/routes/cospace.ts
|
|
17606
17964
|
var import_node_crypto14 = require("crypto");
|
|
17607
|
-
var
|
|
17965
|
+
var import_zod13 = require("zod");
|
|
17608
17966
|
var import_core44 = require("@axiom-lattice/core");
|
|
17967
|
+
var import_protocols15 = require("@axiom-lattice/protocols");
|
|
17609
17968
|
var CoSpaceAuthError = class extends Error {
|
|
17610
17969
|
constructor() {
|
|
17611
17970
|
super(...arguments);
|
|
@@ -17620,6 +17979,18 @@ function getActor2(request) {
|
|
|
17620
17979
|
}
|
|
17621
17980
|
return { tenantId: user.tenantId, userId: user.id };
|
|
17622
17981
|
}
|
|
17982
|
+
async function computeUnread(deps, tenantId, userId, roomId, lastMessage) {
|
|
17983
|
+
if (!lastMessage) return 0;
|
|
17984
|
+
const readState = await deps.readStateStore.get(tenantId, roomId, userId);
|
|
17985
|
+
const horizon = readState?.lastReadAt;
|
|
17986
|
+
if (horizon && lastMessage.createdAt.getTime() <= horizon.getTime()) return 0;
|
|
17987
|
+
return deps.messageStore.countAfter({
|
|
17988
|
+
tenantId,
|
|
17989
|
+
roomId,
|
|
17990
|
+
after: horizon ?? /* @__PURE__ */ new Date(0),
|
|
17991
|
+
excludeAuthorUserId: userId
|
|
17992
|
+
});
|
|
17993
|
+
}
|
|
17623
17994
|
function registerCoSpaceRoutes(app2, deps) {
|
|
17624
17995
|
const idFactory = deps.idFactory ?? (() => (0, import_node_crypto14.randomUUID)());
|
|
17625
17996
|
app2.get(
|
|
@@ -17670,6 +18041,7 @@ function registerCoSpaceRoutes(app2, deps) {
|
|
|
17670
18041
|
limit: 1
|
|
17671
18042
|
});
|
|
17672
18043
|
const lastMessage = messages[0];
|
|
18044
|
+
const publicLastMessage = lastMessage === void 0 ? void 0 : (0, import_protocols15.toProjectRoomPublicMessage)(lastMessage);
|
|
17673
18045
|
const memberships = await deps.membershipStore.list(
|
|
17674
18046
|
actor2.tenantId,
|
|
17675
18047
|
project.id
|
|
@@ -17685,19 +18057,26 @@ function registerCoSpaceRoutes(app2, deps) {
|
|
|
17685
18057
|
rooms.push({
|
|
17686
18058
|
project,
|
|
17687
18059
|
room,
|
|
17688
|
-
lastMessage,
|
|
18060
|
+
lastMessage: publicLastMessage,
|
|
17689
18061
|
participantCount: memberships.filter(
|
|
17690
18062
|
(m) => m.status === "active"
|
|
17691
18063
|
).length,
|
|
17692
|
-
participantNames
|
|
18064
|
+
participantNames,
|
|
18065
|
+
unreadCount: await computeUnread(
|
|
18066
|
+
deps,
|
|
18067
|
+
actor2.tenantId,
|
|
18068
|
+
actor2.userId,
|
|
18069
|
+
room.id,
|
|
18070
|
+
lastMessage
|
|
18071
|
+
)
|
|
17693
18072
|
});
|
|
17694
18073
|
} catch (e) {
|
|
17695
18074
|
console.error("[CoSpace] Failed to process room for project:", project.id, e);
|
|
17696
18075
|
}
|
|
17697
18076
|
}
|
|
17698
18077
|
rooms.sort((a, b) => {
|
|
17699
|
-
const aTime = a.lastMessage
|
|
17700
|
-
const bTime = b.lastMessage
|
|
18078
|
+
const aTime = a.lastMessage ? Date.parse(a.lastMessage.createdAt) : 0;
|
|
18079
|
+
const bTime = b.lastMessage ? Date.parse(b.lastMessage.createdAt) : 0;
|
|
17701
18080
|
return bTime - aTime;
|
|
17702
18081
|
});
|
|
17703
18082
|
const publicRoom = await deps.publicRoom.ensure(actor2.tenantId, params.workspaceId);
|
|
@@ -17707,6 +18086,7 @@ function registerCoSpaceRoutes(app2, deps) {
|
|
|
17707
18086
|
roomId: publicRoom.room.id,
|
|
17708
18087
|
limit: 1
|
|
17709
18088
|
});
|
|
18089
|
+
const publicLastMessage = publicMessages[0];
|
|
17710
18090
|
const publicMemberships = await deps.membershipStore.list(
|
|
17711
18091
|
actor2.tenantId,
|
|
17712
18092
|
publicRoom.project.id
|
|
@@ -17722,10 +18102,17 @@ function registerCoSpaceRoutes(app2, deps) {
|
|
|
17722
18102
|
rooms.unshift({
|
|
17723
18103
|
project: publicRoom.project,
|
|
17724
18104
|
room: publicRoom.room,
|
|
17725
|
-
lastMessage:
|
|
18105
|
+
lastMessage: publicLastMessage === void 0 ? void 0 : (0, import_protocols15.toProjectRoomPublicMessage)(publicLastMessage),
|
|
17726
18106
|
participantCount: publicMemberships.filter((m) => m.status === "active").length,
|
|
17727
18107
|
participantNames: publicParticipantNames,
|
|
17728
|
-
isPublic: true
|
|
18108
|
+
isPublic: true,
|
|
18109
|
+
unreadCount: await computeUnread(
|
|
18110
|
+
deps,
|
|
18111
|
+
actor2.tenantId,
|
|
18112
|
+
actor2.userId,
|
|
18113
|
+
publicRoom.room.id,
|
|
18114
|
+
publicLastMessage
|
|
18115
|
+
)
|
|
17729
18116
|
});
|
|
17730
18117
|
}
|
|
17731
18118
|
return { data: { rooms } };
|
|
@@ -18090,7 +18477,7 @@ function registerCoSpaceRoutes(app2, deps) {
|
|
|
18090
18477
|
data: result.data
|
|
18091
18478
|
});
|
|
18092
18479
|
} catch (error) {
|
|
18093
|
-
if (error instanceof
|
|
18480
|
+
if (error instanceof import_zod13.ZodError) {
|
|
18094
18481
|
return reply.code(400).send({
|
|
18095
18482
|
success: false,
|
|
18096
18483
|
error: {
|
|
@@ -18361,7 +18748,7 @@ var RoomTargetResolver = class {
|
|
|
18361
18748
|
};
|
|
18362
18749
|
|
|
18363
18750
|
// src/services/collaboration/RoomDispatchService.ts
|
|
18364
|
-
var
|
|
18751
|
+
var import_protocols16 = require("@axiom-lattice/protocols");
|
|
18365
18752
|
|
|
18366
18753
|
// src/router/InternalRoomDispatch.ts
|
|
18367
18754
|
var INTERNAL_ROOM_DISPATCH = Symbol("internal-room-dispatch");
|
|
@@ -18459,7 +18846,7 @@ function snapshotDispatchSource(value) {
|
|
|
18459
18846
|
};
|
|
18460
18847
|
}
|
|
18461
18848
|
function snapshotMentions(value) {
|
|
18462
|
-
const rows = (0,
|
|
18849
|
+
const rows = (0, import_protocols16.snapshotExactArray)(value);
|
|
18463
18850
|
if (!rows) return void 0;
|
|
18464
18851
|
const result = [];
|
|
18465
18852
|
for (const row of rows) {
|
|
@@ -18477,7 +18864,7 @@ function snapshotMentions(value) {
|
|
|
18477
18864
|
function exactValues(value, required, optional = []) {
|
|
18478
18865
|
try {
|
|
18479
18866
|
if (typeof value !== "object" || value === null || Array.isArray(value)) return void 0;
|
|
18480
|
-
return (0,
|
|
18867
|
+
return (0, import_protocols16.snapshotExactRecord)(value, required, optional);
|
|
18481
18868
|
} catch {
|
|
18482
18869
|
return void 0;
|
|
18483
18870
|
}
|
|
@@ -18486,7 +18873,7 @@ function exactValues(value, required, optional = []) {
|
|
|
18486
18873
|
// src/services/collaboration/CoordinatorWakeNotifier.ts
|
|
18487
18874
|
var import_node_crypto15 = require("crypto");
|
|
18488
18875
|
var import_core45 = require("@axiom-lattice/core");
|
|
18489
|
-
var
|
|
18876
|
+
var import_protocols17 = require("@axiom-lattice/protocols");
|
|
18490
18877
|
var SYNTHETIC_WAKE_AUTHOR = "coordinator-wake";
|
|
18491
18878
|
var CoordinatorWakeNotifier = class {
|
|
18492
18879
|
/** Creates a bounded Project Task lifecycle observer that wakes the Room Coordinator. */
|
|
@@ -18640,7 +19027,7 @@ var CoordinatorWakeNotifier = class {
|
|
|
18640
19027
|
}
|
|
18641
19028
|
}
|
|
18642
19029
|
parse(value) {
|
|
18643
|
-
const row = (0,
|
|
19030
|
+
const row = (0, import_protocols17.snapshotExactRecord)(value, ["tenantId", "workspaceId", "projectId", "taskId", "status", "action", "eventKey", "updatedAt"], ["threadId"]);
|
|
18644
19031
|
const actions = ["in_progress", "interrupted", "failed", "completed", "cancelled", "reassigned"];
|
|
18645
19032
|
const statuses = ["pending", "in_progress", "review", "failed", "interrupted", "completed", "cancelled"];
|
|
18646
19033
|
if (!row || !actions.includes(String(row.action)) || !statuses.includes(String(row.status)) || !["tenantId", "workspaceId", "projectId", "taskId", "eventKey", "updatedAt"].every((key) => typeof row[key] === "string" && row[key].length > 0) || !Number.isFinite(Date.parse(row.updatedAt)) || row.threadId !== void 0 && typeof row.threadId !== "string") return void 0;
|
|
@@ -18678,9 +19065,9 @@ function safeId(value) {
|
|
|
18678
19065
|
}
|
|
18679
19066
|
|
|
18680
19067
|
// src/services/collaboration/ProjectTaskExecutionMutex.ts
|
|
18681
|
-
var
|
|
19068
|
+
var import_protocols18 = require("@axiom-lattice/protocols");
|
|
18682
19069
|
function machineKey(scope) {
|
|
18683
|
-
const snapshot = (0,
|
|
19070
|
+
const snapshot = (0, import_protocols18.snapshotExactRecord)(scope, ["tenantId", "assistantId", "projectId"]);
|
|
18684
19071
|
if (!snapshot) throw new Error("Invalid Project task machine scope");
|
|
18685
19072
|
const values = [snapshot.tenantId, snapshot.assistantId, snapshot.projectId];
|
|
18686
19073
|
for (const value of values) {
|
|
@@ -18757,7 +19144,7 @@ var ProjectTaskExecutionMutex = class {
|
|
|
18757
19144
|
|
|
18758
19145
|
// src/services/collaboration/ProjectTaskExecutionService.ts
|
|
18759
19146
|
var import_core46 = require("@axiom-lattice/core");
|
|
18760
|
-
var
|
|
19147
|
+
var import_protocols19 = require("@axiom-lattice/protocols");
|
|
18761
19148
|
var SYSTEM_ACTOR = "system";
|
|
18762
19149
|
var QUEUE_CLASSIFICATION_ATTEMPTS = 3;
|
|
18763
19150
|
var ProjectTaskExecutionError = class extends Error {
|
|
@@ -19312,7 +19699,7 @@ function buildTrustedTaskContext(task, thread, inputMessageId) {
|
|
|
19312
19699
|
};
|
|
19313
19700
|
}
|
|
19314
19701
|
function taskThreadMetadata(thread) {
|
|
19315
|
-
const row = (0,
|
|
19702
|
+
const row = (0, import_protocols19.snapshotExactRecord)(thread.metadata, [
|
|
19316
19703
|
"source",
|
|
19317
19704
|
"kind",
|
|
19318
19705
|
"workspaceId",
|
|
@@ -19353,7 +19740,7 @@ function classifyRecoveryRows(task, thread, pending2, processingBefore, processi
|
|
|
19353
19740
|
}
|
|
19354
19741
|
function validRecoveryRow(row, task, thread) {
|
|
19355
19742
|
try {
|
|
19356
|
-
const trusted = (0,
|
|
19743
|
+
const trusted = (0, import_protocols19.parseTrustedRunContext)(row.trusted_run_context).projectTask;
|
|
19357
19744
|
const metadata = taskThreadMetadata(thread);
|
|
19358
19745
|
return row.execution_mode === "followup" && !!trusted && trusted.tenantId === task.tenantId && trusted.workspaceId === task.workspaceId && trusted.projectId === task.projectId && trusted.assistantId === task.ownerId && trusted.taskId === task.id && trusted.threadId === thread.id && trusted.inputMessageId === row.id && !!metadata && trusted.roomId === metadata.roomId && trusted.membershipId === metadata.membershipId && metadata.assistantId === task.ownerId && metadata.taskId === task.id;
|
|
19359
19746
|
} catch {
|
|
@@ -20069,7 +20456,7 @@ function combineSignals(left, right) {
|
|
|
20069
20456
|
// src/services/collaboration/RoomProjectionService.ts
|
|
20070
20457
|
var import_node_crypto17 = require("crypto");
|
|
20071
20458
|
var import_core48 = require("@axiom-lattice/core");
|
|
20072
|
-
var
|
|
20459
|
+
var import_protocols20 = require("@axiom-lattice/protocols");
|
|
20073
20460
|
var RoomProjectionService = class {
|
|
20074
20461
|
/** @param deps Message, lifecycle-event, Task, warning, logging, and ID dependencies. */
|
|
20075
20462
|
constructor(deps) {
|
|
@@ -20129,7 +20516,7 @@ var RoomProjectionService = class {
|
|
|
20129
20516
|
tenantId: input.tenantId,
|
|
20130
20517
|
workspaceId: input.workspaceId,
|
|
20131
20518
|
projectId: input.projectId,
|
|
20132
|
-
actions: [...
|
|
20519
|
+
actions: [...import_protocols20.PROJECT_TASK_LIFECYCLE_ACTIONS],
|
|
20133
20520
|
before,
|
|
20134
20521
|
limit: input.pageSize
|
|
20135
20522
|
});
|
|
@@ -20251,7 +20638,7 @@ function parseProjectionInput(taskValue, itemValue) {
|
|
|
20251
20638
|
}
|
|
20252
20639
|
}
|
|
20253
20640
|
function snapshotProjectableWorkItem(value) {
|
|
20254
|
-
const row = (0,
|
|
20641
|
+
const row = (0, import_protocols20.snapshotExactRecord)(value, ["id", "taskId", "tenantId", "action", "actor", "createdAt"], [
|
|
20255
20642
|
"workspaceId",
|
|
20256
20643
|
"projectId",
|
|
20257
20644
|
"threadId",
|
|
@@ -20261,7 +20648,7 @@ function snapshotProjectableWorkItem(value) {
|
|
|
20261
20648
|
"eventKey"
|
|
20262
20649
|
]);
|
|
20263
20650
|
const createdAt = cloneExactDate(row?.createdAt);
|
|
20264
|
-
if (!row || !createdAt || typeof row.id !== "string" || !row.id || typeof row.taskId !== "string" || !row.taskId || typeof row.tenantId !== "string" || !row.tenantId || typeof row.workspaceId !== "string" || !row.workspaceId || typeof row.projectId !== "string" || !row.projectId || typeof row.actor !== "string" || !row.actor || typeof row.eventKey !== "string" || !row.eventKey || !
|
|
20651
|
+
if (!row || !createdAt || typeof row.id !== "string" || !row.id || typeof row.taskId !== "string" || !row.taskId || typeof row.tenantId !== "string" || !row.tenantId || typeof row.workspaceId !== "string" || !row.workspaceId || typeof row.projectId !== "string" || !row.projectId || typeof row.actor !== "string" || !row.actor || typeof row.eventKey !== "string" || !row.eventKey || !import_protocols20.PROJECT_TASK_LIFECYCLE_ACTIONS.includes(row.action) || row.threadId !== void 0 && typeof row.threadId !== "string" || row.summary !== void 0 && typeof row.summary !== "string" || row.attempt !== void 0 && (typeof row.attempt !== "number" || !Number.isFinite(row.attempt))) return void 0;
|
|
20265
20652
|
try {
|
|
20266
20653
|
const detail = row.detail === void 0 ? void 0 : snapshotJsonValue(row.detail);
|
|
20267
20654
|
if (detail !== void 0 && !isRecord3(detail)) return void 0;
|
|
@@ -20288,12 +20675,12 @@ function parseIso(value) {
|
|
|
20288
20675
|
return typeof value === "string" && value.length > 0 && Number.isFinite(Date.parse(value));
|
|
20289
20676
|
}
|
|
20290
20677
|
function parseInterruption(value) {
|
|
20291
|
-
const common = (0,
|
|
20678
|
+
const common = (0, import_protocols20.snapshotExactRecord)(value, ["type", "summary", "requestedAt"]);
|
|
20292
20679
|
if (common && (common.type === "missing_input" || common.type === "user_decision") && typeof common.summary === "string" && common.summary.length > 0 && parseIso(common.requestedAt)) {
|
|
20293
20680
|
return { type: common.type, summary: common.summary, requestedAt: common.requestedAt };
|
|
20294
20681
|
}
|
|
20295
|
-
const external = (0,
|
|
20296
|
-
const ids = (0,
|
|
20682
|
+
const external = (0, import_protocols20.snapshotExactRecord)(value, ["type", "summary", "requestedAt", "dependencyTaskIds"]);
|
|
20683
|
+
const ids = (0, import_protocols20.snapshotExactArray)(external?.dependencyTaskIds);
|
|
20297
20684
|
if (external?.type === "external_dependency" && typeof external.summary === "string" && external.summary.length > 0 && parseIso(external.requestedAt) && ids && ids.length > 0 && ids.every((id3) => typeof id3 === "string" && id3.length > 0) && new Set(ids).size === ids.length) {
|
|
20298
20685
|
return {
|
|
20299
20686
|
type: "external_dependency",
|
|
@@ -20302,58 +20689,58 @@ function parseInterruption(value) {
|
|
|
20302
20689
|
dependencyTaskIds: [...ids]
|
|
20303
20690
|
};
|
|
20304
20691
|
}
|
|
20305
|
-
const review = (0,
|
|
20692
|
+
const review = (0, import_protocols20.snapshotExactRecord)(value, ["type", "evidenceId"]);
|
|
20306
20693
|
return review?.type === "review_required" && typeof review.evidenceId === "string" && review.evidenceId.length > 0 ? { type: "review_required", evidenceId: review.evidenceId } : void 0;
|
|
20307
20694
|
}
|
|
20308
20695
|
function parseBeliefImpact(value) {
|
|
20309
|
-
const rows = (0,
|
|
20696
|
+
const rows = (0, import_protocols20.snapshotExactArray)(value);
|
|
20310
20697
|
if (!rows) return void 0;
|
|
20311
20698
|
const impacts = [];
|
|
20312
20699
|
for (const row of rows) {
|
|
20313
|
-
const entry = (0,
|
|
20700
|
+
const entry = (0, import_protocols20.snapshotExactRecord)(row, ["key", "after", "basis"]);
|
|
20314
20701
|
if (!entry || typeof entry.key !== "string" || !entry.key || typeof entry.after !== "number" || !Number.isFinite(entry.after) || typeof entry.basis !== "string" || !entry.basis) return void 0;
|
|
20315
20702
|
impacts.push({ key: entry.key, after: entry.after, basis: entry.basis });
|
|
20316
20703
|
}
|
|
20317
20704
|
return impacts;
|
|
20318
20705
|
}
|
|
20319
20706
|
function parseCompletion(item) {
|
|
20320
|
-
const row = (0,
|
|
20707
|
+
const row = (0, import_protocols20.snapshotExactRecord)(item.detail, ["evidenceId", "eventKey", "result", "beliefImpact"]);
|
|
20321
20708
|
const beliefImpact = parseBeliefImpact(row?.beliefImpact);
|
|
20322
20709
|
if (!row || typeof row.evidenceId !== "string" || !row.evidenceId || typeof row.eventKey !== "string" || !row.eventKey || item.eventKey !== `${row.eventKey}:completed` || typeof row.result !== "string" || !beliefImpact) return void 0;
|
|
20323
20710
|
return { evidenceId: row.evidenceId, eventKey: row.eventKey, result: row.result, beliefImpact };
|
|
20324
20711
|
}
|
|
20325
20712
|
function parseProjection(item) {
|
|
20326
20713
|
if (item.action === "in_progress") {
|
|
20327
|
-
const started = (0,
|
|
20714
|
+
const started = (0, import_protocols20.snapshotExactRecord)(item.detail, ["previousStatus"]);
|
|
20328
20715
|
if (started?.previousStatus === "pending") return { kind: "started", text: "Task started" };
|
|
20329
|
-
const resumed = (0,
|
|
20716
|
+
const resumed = (0, import_protocols20.snapshotExactRecord)(item.detail, ["type", "previousInterruption"]);
|
|
20330
20717
|
if (resumed?.type === "interruption_resume" && parseInterruption(resumed.previousInterruption)) {
|
|
20331
20718
|
return { kind: "resumed", text: "Task resumed" };
|
|
20332
20719
|
}
|
|
20333
|
-
const rejected = (0,
|
|
20720
|
+
const rejected = (0, import_protocols20.snapshotExactRecord)(item.detail, ["type", "evidenceId", "note"]);
|
|
20334
20721
|
if (rejected?.type === "review_rejected" && typeof rejected.evidenceId === "string" && rejected.evidenceId && typeof rejected.note === "string" && rejected.note) {
|
|
20335
20722
|
return { kind: "resumed", text: "Task resumed after review rejection" };
|
|
20336
20723
|
}
|
|
20337
|
-
const stale = (0,
|
|
20724
|
+
const stale = (0, import_protocols20.snapshotExactRecord)(item.detail, ["type", "evidenceId"]);
|
|
20338
20725
|
return stale?.type === "review_stale" && typeof stale.evidenceId === "string" && stale.evidenceId ? { kind: "resumed", text: "Task resumed after stale review" } : void 0;
|
|
20339
20726
|
}
|
|
20340
20727
|
if (item.action === "interrupted") {
|
|
20341
20728
|
return parseInterruption(item.detail) ? { kind: "interrupted", text: "Task interrupted" } : void 0;
|
|
20342
20729
|
}
|
|
20343
20730
|
if (item.action === "failed") {
|
|
20344
|
-
const row = (0,
|
|
20731
|
+
const row = (0, import_protocols20.snapshotExactRecord)(item.detail, ["failureReason"]);
|
|
20345
20732
|
return typeof row?.failureReason === "string" && row.failureReason ? { kind: "failed", text: "Task failed" } : void 0;
|
|
20346
20733
|
}
|
|
20347
20734
|
if (item.action === "completed") {
|
|
20348
20735
|
return parseCompletion(item) ? { kind: "completed", text: "Task completed" } : void 0;
|
|
20349
20736
|
}
|
|
20350
20737
|
if (item.action === "cancelled") {
|
|
20351
|
-
const empty = (0,
|
|
20352
|
-
const summarized = (0,
|
|
20738
|
+
const empty = (0, import_protocols20.snapshotExactRecord)(item.detail, []);
|
|
20739
|
+
const summarized = (0, import_protocols20.snapshotExactRecord)(item.detail, ["summary"]);
|
|
20353
20740
|
return empty || typeof summarized?.summary === "string" && summarized.summary ? { kind: "cancelled", text: "Task cancelled" } : void 0;
|
|
20354
20741
|
}
|
|
20355
20742
|
if (item.action === "reassigned") {
|
|
20356
|
-
const row = (0,
|
|
20743
|
+
const row = (0, import_protocols20.snapshotExactRecord)(
|
|
20357
20744
|
item.detail,
|
|
20358
20745
|
["previousOwnerId", "previousThreadId", "ownerId", "membershipId", "threadId"]
|
|
20359
20746
|
);
|
|
@@ -20362,7 +20749,7 @@ function parseProjection(item) {
|
|
|
20362
20749
|
return void 0;
|
|
20363
20750
|
}
|
|
20364
20751
|
function assertCanonicalProjection(value, expected) {
|
|
20365
|
-
const row = (0,
|
|
20752
|
+
const row = (0, import_protocols20.snapshotExactRecord)(value, [
|
|
20366
20753
|
"id",
|
|
20367
20754
|
"tenantId",
|
|
20368
20755
|
"workspaceId",
|
|
@@ -20376,9 +20763,9 @@ function assertCanonicalProjection(value, expected) {
|
|
|
20376
20763
|
"idempotencyKey",
|
|
20377
20764
|
"createdAt"
|
|
20378
20765
|
]);
|
|
20379
|
-
const author = (0,
|
|
20380
|
-
const content = (0,
|
|
20381
|
-
const mentions = (0,
|
|
20766
|
+
const author = (0, import_protocols20.snapshotExactRecord)(row?.author, ["type"]);
|
|
20767
|
+
const content = (0, import_protocols20.snapshotExactRecord)(row?.content, ["type", "text"]);
|
|
20768
|
+
const mentions = (0, import_protocols20.snapshotExactArray)(row?.mentions);
|
|
20382
20769
|
const createdAt = cloneExactDate(row?.createdAt);
|
|
20383
20770
|
if (!row || !createdAt || author?.type !== "system" || content?.type !== "text" || content.text !== expected.content.text || !mentions || mentions.length !== 0 || typeof row.id !== "string" || !row.id || row.tenantId !== expected.tenantId || row.workspaceId !== expected.workspaceId || row.projectId !== expected.projectId || row.roomId !== expected.roomId || row.source !== "task" || row.sourceId !== expected.sourceId || row.idempotencyKey !== expected.idempotencyKey) {
|
|
20384
20771
|
throw new Error("Invalid canonical task projection");
|
|
@@ -20399,7 +20786,7 @@ function assertCanonicalProjection(value, expected) {
|
|
|
20399
20786
|
};
|
|
20400
20787
|
}
|
|
20401
20788
|
function snapshotLifecycleCursor(value) {
|
|
20402
|
-
const row = (0,
|
|
20789
|
+
const row = (0, import_protocols20.snapshotExactRecord)(value, ["id", "taskId", "tenantId", "action", "actor", "createdAt"], [
|
|
20403
20790
|
"workspaceId",
|
|
20404
20791
|
"projectId",
|
|
20405
20792
|
"threadId",
|
|
@@ -20420,7 +20807,7 @@ var import_core50 = require("@axiom-lattice/core");
|
|
|
20420
20807
|
|
|
20421
20808
|
// src/services/collaboration/ProjectRoomEventBroker.ts
|
|
20422
20809
|
var import_node_crypto18 = require("crypto");
|
|
20423
|
-
var
|
|
20810
|
+
var import_protocols21 = require("@axiom-lattice/protocols");
|
|
20424
20811
|
var DEFAULT_MAX_EVENTS_PER_ROOM = 1e3;
|
|
20425
20812
|
var DEFAULT_MAX_EVENT_AGE_MS = 10 * 60 * 1e3;
|
|
20426
20813
|
var DEFAULT_MAX_ROOMS = 1e3;
|
|
@@ -20483,7 +20870,7 @@ var ProjectRoomEventBroker = class {
|
|
|
20483
20870
|
const canonicalScope = snapshotScope(scope);
|
|
20484
20871
|
const key = scopeKey2(canonicalScope);
|
|
20485
20872
|
const now = this.currentTime();
|
|
20486
|
-
if (this.sequence >= Number.MAX_SAFE_INTEGER) throw new
|
|
20873
|
+
if (this.sequence >= Number.MAX_SAFE_INTEGER) throw new import_protocols21.ProjectRoomBrokerCapacityError();
|
|
20487
20874
|
const nextSequence = this.sequence + 1;
|
|
20488
20875
|
const event = snapshotJson({
|
|
20489
20876
|
...snapshotDraft(draft),
|
|
@@ -20666,11 +21053,11 @@ var ProjectRoomEventBroker = class {
|
|
|
20666
21053
|
}
|
|
20667
21054
|
resolveCursor(key, afterEventId, plan) {
|
|
20668
21055
|
if (afterEventId === void 0) return void 0;
|
|
20669
|
-
const cursor = (0,
|
|
20670
|
-
if (!cursor) throw new
|
|
20671
|
-
if (cursor.epoch !== this.epoch) throw new
|
|
21056
|
+
const cursor = (0, import_protocols21.parseProjectRoomEventId)(afterEventId);
|
|
21057
|
+
if (!cursor) throw new import_protocols21.ProjectRoomCursorError("CURSOR_EXPIRED");
|
|
21058
|
+
if (cursor.epoch !== this.epoch) throw new import_protocols21.ProjectRoomCursorError("SERVER_RESTART");
|
|
20672
21059
|
if (plan.sequences.has(cursor.sequence) || this.sequenceScopes.get(cursor.sequence) !== key) {
|
|
20673
|
-
throw new
|
|
21060
|
+
throw new import_protocols21.ProjectRoomCursorError("CURSOR_EXPIRED");
|
|
20674
21061
|
}
|
|
20675
21062
|
return cursor.sequence;
|
|
20676
21063
|
}
|
|
@@ -20763,7 +21150,7 @@ function snapshotJson(value, ancestors = /* @__PURE__ */ new Set()) {
|
|
|
20763
21150
|
|
|
20764
21151
|
// src/services/collaboration/ProjectRoomRealtimePublisher.ts
|
|
20765
21152
|
var import_node_crypto19 = require("crypto");
|
|
20766
|
-
var
|
|
21153
|
+
var import_protocols22 = require("@axiom-lattice/protocols");
|
|
20767
21154
|
var BrokerProjectRoomRealtimePublisher = class {
|
|
20768
21155
|
/** Creates a publisher around a broker and structured warning logger. */
|
|
20769
21156
|
constructor(deps) {
|
|
@@ -20777,7 +21164,7 @@ var BrokerProjectRoomRealtimePublisher = class {
|
|
|
20777
21164
|
/** Publishes a canonical message after projecting it to its public shape. */
|
|
20778
21165
|
messageCreated(message) {
|
|
20779
21166
|
this.publish("message.created", () => {
|
|
20780
|
-
const projection = (0,
|
|
21167
|
+
const projection = (0, import_protocols22.snapshotProjectRoomMessageRealtime)(message);
|
|
20781
21168
|
if (!projection) return void 0;
|
|
20782
21169
|
return {
|
|
20783
21170
|
sourceKey: `message:${projection.publicMessage.id}`,
|
|
@@ -20792,7 +21179,7 @@ var BrokerProjectRoomRealtimePublisher = class {
|
|
|
20792
21179
|
this.publish("roster.changed", () => {
|
|
20793
21180
|
const membership = snapshotInput(input, "roster");
|
|
20794
21181
|
if (membership.membership.tenantId !== membership.tenantId || membership.membership.roomId !== membership.roomId || !safeId2(membership.membership.projectId)) throw new TypeError("Invalid roster scope");
|
|
20795
|
-
const projection = (0,
|
|
21182
|
+
const projection = (0, import_protocols22.snapshotProjectRoomBotMembershipRealtime)(membership.membership);
|
|
20796
21183
|
if (!projection) return void 0;
|
|
20797
21184
|
return {
|
|
20798
21185
|
sourceKey: membership.sourceKey,
|
|
@@ -20807,7 +21194,7 @@ var BrokerProjectRoomRealtimePublisher = class {
|
|
|
20807
21194
|
this.publish("membership.changed", () => {
|
|
20808
21195
|
const membership = snapshotInput(input, "membership");
|
|
20809
21196
|
if (membership.membership.tenantId !== membership.tenantId || !safeId2(membership.membership.projectId)) throw new TypeError("Invalid membership scope");
|
|
20810
|
-
const projection = (0,
|
|
21197
|
+
const projection = (0, import_protocols22.snapshotProjectRoomMembershipRealtime)(membership.membership);
|
|
20811
21198
|
if (!projection) return void 0;
|
|
20812
21199
|
return {
|
|
20813
21200
|
sourceKey: membership.sourceKey,
|
|
@@ -20833,6 +21220,46 @@ var BrokerProjectRoomRealtimePublisher = class {
|
|
|
20833
21220
|
};
|
|
20834
21221
|
});
|
|
20835
21222
|
}
|
|
21223
|
+
/** Publishes a membership notice onto the affected user's channel scope. */
|
|
21224
|
+
membershipAffected(input) {
|
|
21225
|
+
this.publish("membership.affected", () => {
|
|
21226
|
+
const value = (0, import_protocols22.snapshotExactRecord)(input, ["tenantId", "userId", "change", "projectId", "roomId", "sourceKey"]);
|
|
21227
|
+
if (!value || !safeId2(value.tenantId) || !safeId2(value.userId) || !safeId2(value.projectId) || !safeId2(value.roomId) || !safeSourceKey(value.sourceKey) || !["added", "removed", "role_changed"].includes(value.change)) {
|
|
21228
|
+
throw new TypeError("Invalid membership input");
|
|
21229
|
+
}
|
|
21230
|
+
const scope = (0, import_protocols22.projectRoomUserEventScope)(value.tenantId, value.userId);
|
|
21231
|
+
return {
|
|
21232
|
+
sourceKey: value.sourceKey,
|
|
21233
|
+
id: value.sourceKey,
|
|
21234
|
+
scope,
|
|
21235
|
+
draft: {
|
|
21236
|
+
type: "membership.affected",
|
|
21237
|
+
occurredAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
21238
|
+
data: { change: value.change, projectId: value.projectId, roomId: value.roomId }
|
|
21239
|
+
}
|
|
21240
|
+
};
|
|
21241
|
+
});
|
|
21242
|
+
}
|
|
21243
|
+
/** Publishes a read-marker update onto the acting user's channel scope. */
|
|
21244
|
+
readChanged(input) {
|
|
21245
|
+
this.publish("read.changed", () => {
|
|
21246
|
+
const value = (0, import_protocols22.snapshotExactRecord)(input, ["tenantId", "userId", "projectId", "roomId", "lastReadAt", "sourceKey"]);
|
|
21247
|
+
if (!value || !safeId2(value.tenantId) || !safeId2(value.userId) || !safeId2(value.projectId) || !safeId2(value.roomId) || !safeSourceKey(value.sourceKey) || typeof value.lastReadAt !== "string" || !Number.isFinite(Date.parse(value.lastReadAt))) {
|
|
21248
|
+
throw new TypeError("Invalid read input");
|
|
21249
|
+
}
|
|
21250
|
+
const scope = (0, import_protocols22.projectRoomUserEventScope)(value.tenantId, value.userId);
|
|
21251
|
+
return {
|
|
21252
|
+
sourceKey: value.sourceKey,
|
|
21253
|
+
id: value.sourceKey,
|
|
21254
|
+
scope,
|
|
21255
|
+
draft: {
|
|
21256
|
+
type: "read.changed",
|
|
21257
|
+
occurredAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
21258
|
+
data: { projectId: value.projectId, roomId: value.roomId, lastReadAt: new Date(Date.parse(value.lastReadAt)).toISOString() }
|
|
21259
|
+
}
|
|
21260
|
+
};
|
|
21261
|
+
});
|
|
21262
|
+
}
|
|
20836
21263
|
publish(type, build) {
|
|
20837
21264
|
let event;
|
|
20838
21265
|
try {
|
|
@@ -20861,13 +21288,13 @@ var BrokerProjectRoomRealtimePublisher = class {
|
|
|
20861
21288
|
};
|
|
20862
21289
|
function snapshotInput(input, kind) {
|
|
20863
21290
|
const keys2 = kind === "message" ? ["tenantId", "roomId", "message", "sourceKey"] : kind === "roster" ? ["tenantId", "roomId", "membership", "sourceKey"] : ["tenantId", "roomId", "membership", "sourceKey"];
|
|
20864
|
-
const value = (0,
|
|
21291
|
+
const value = (0, import_protocols22.snapshotExactRecord)(input, [...keys2, "change"]);
|
|
20865
21292
|
const validChange = kind === "roster" ? ["added", "updated", "paused", "resumed", "removed"].includes(value?.change) : ["added", "role_changed", "removed"].includes(value?.change);
|
|
20866
21293
|
if (!value || !safeId2(value.tenantId) || !safeId2(value.roomId) || !safeSourceKey(value.sourceKey) || !validChange) throw new TypeError(`Invalid ${kind} input`);
|
|
20867
21294
|
return value;
|
|
20868
21295
|
}
|
|
20869
21296
|
function snapshotTaskInput(input) {
|
|
20870
|
-
const value = (0,
|
|
21297
|
+
const value = (0, import_protocols22.snapshotExactRecord)(input, ["tenantId", "roomId", "projectId", "taskId", "status", "ownerMembershipId", "updatedAt", "sourceKey"]);
|
|
20871
21298
|
if (!value || !safeId2(value.tenantId) || !safeId2(value.roomId) || !safeSourceKey(value.sourceKey)) throw new TypeError("Invalid task input");
|
|
20872
21299
|
if (!safeId2(value.projectId) || !safeId2(value.taskId) || !safeId2(value.ownerMembershipId) || !["pending", "in_progress", "review", "failed", "interrupted", "completed", "cancelled"].includes(value.status)) throw new TypeError("Invalid task input");
|
|
20873
21300
|
if (typeof value.updatedAt !== "string") throw new TypeError("Invalid task timestamp");
|
|
@@ -20891,61 +21318,269 @@ function safeErrorCode(error) {
|
|
|
20891
21318
|
return error instanceof Error && error.name === "Error" ? "Error" : "UnknownError";
|
|
20892
21319
|
}
|
|
20893
21320
|
|
|
20894
|
-
// src/services/collaboration/
|
|
20895
|
-
var
|
|
20896
|
-
|
|
20897
|
-
|
|
20898
|
-
|
|
20899
|
-
|
|
20900
|
-
|
|
20901
|
-
|
|
20902
|
-
|
|
20903
|
-
|
|
20904
|
-
data: ${JSON.stringify(event)}
|
|
20905
|
-
|
|
20906
|
-
`;
|
|
20907
|
-
}
|
|
20908
|
-
function serializeControl(event) {
|
|
20909
|
-
return `event: ${event.type}
|
|
20910
|
-
data: ${JSON.stringify(event.data)}
|
|
20911
|
-
|
|
20912
|
-
`;
|
|
20913
|
-
}
|
|
20914
|
-
var ProjectRoomSseWriter = class {
|
|
20915
|
-
/** Creates a writer over a raw HTTP response/socket. */
|
|
20916
|
-
constructor(raw, options = {}) {
|
|
20917
|
-
this.raw = raw;
|
|
20918
|
-
this.frames = [];
|
|
20919
|
-
this.queuedBytes = 0;
|
|
20920
|
-
this.blockedBytes = 0;
|
|
20921
|
-
this.writing = false;
|
|
21321
|
+
// src/services/collaboration/ProjectRoomTaskEventSubscriber.ts
|
|
21322
|
+
var import_core49 = require("@axiom-lattice/core");
|
|
21323
|
+
var import_protocols23 = require("@axiom-lattice/protocols");
|
|
21324
|
+
var ProjectRoomTaskEventSubscriber = class {
|
|
21325
|
+
/** Creates a bounded Project task lifecycle observer. */
|
|
21326
|
+
constructor(deps) {
|
|
21327
|
+
this.deps = deps;
|
|
21328
|
+
this.queues = /* @__PURE__ */ new Map();
|
|
21329
|
+
this.pendingCount = 0;
|
|
21330
|
+
this.accepting = true;
|
|
20922
21331
|
this.closed = false;
|
|
20923
|
-
this.
|
|
20924
|
-
this.
|
|
20925
|
-
this.
|
|
20926
|
-
this.errorListener = () => this.close();
|
|
20927
|
-
this.drainListener = () => {
|
|
20928
|
-
if (this.closed || !this.writing) return;
|
|
20929
|
-
this.clearDrainTimer();
|
|
20930
|
-
this.blockedBytes = 0;
|
|
20931
|
-
this.writing = false;
|
|
20932
|
-
this.flush();
|
|
20933
|
-
};
|
|
20934
|
-
this.maxFrames = positive(options.maxFrames ?? DEFAULT_MAX_FRAMES, "maxFrames");
|
|
20935
|
-
this.maxBytes = positive(options.maxBytes ?? DEFAULT_MAX_BYTES, "maxBytes");
|
|
20936
|
-
this.drainTimeoutMs = positive(options.drainTimeoutMs ?? DEFAULT_DRAIN_TIMEOUT_MS, "drainTimeoutMs");
|
|
20937
|
-
this.onClose = options.onClose;
|
|
20938
|
-
raw.on("close", this.closeListener).on("error", this.errorListener).on("drain", this.drainListener);
|
|
21332
|
+
this.accepted = /* @__PURE__ */ new Set();
|
|
21333
|
+
this.maxPending = deps.maxPending ?? 1024;
|
|
21334
|
+
if (!Number.isSafeInteger(this.maxPending) || this.maxPending < 1) throw new RangeError("maxPending must be a positive safe integer");
|
|
20939
21335
|
}
|
|
20940
|
-
/**
|
|
20941
|
-
|
|
20942
|
-
this.
|
|
21336
|
+
/** Admits one notification without awaiting any store operation. */
|
|
21337
|
+
handle(value) {
|
|
21338
|
+
const event = this.parse(value);
|
|
21339
|
+
if (!event) {
|
|
21340
|
+
this.warn("Project task realtime notification rejected", { code: "INVALID_TASK_REALTIME_EVENT" });
|
|
21341
|
+
return Promise.resolve();
|
|
21342
|
+
}
|
|
21343
|
+
if (!this.accepting || this.closed) return Promise.resolve();
|
|
21344
|
+
const scopeKey3 = JSON.stringify([event.tenantId, event.workspaceId, event.projectId, event.taskId]);
|
|
21345
|
+
const eventKey = event.eventKey;
|
|
21346
|
+
let queue = this.queues.get(scopeKey3);
|
|
21347
|
+
if (!queue) {
|
|
21348
|
+
if (this.pendingCount >= this.maxPending) return this.overflow(event.taskId);
|
|
21349
|
+
queue = { events: [], keys: /* @__PURE__ */ new Set(), tail: Promise.resolve() };
|
|
21350
|
+
this.queues.set(scopeKey3, queue);
|
|
21351
|
+
}
|
|
21352
|
+
if (queue.keys.has(eventKey)) return queue.tail;
|
|
21353
|
+
if (this.pendingCount >= this.maxPending) return this.overflow(event.taskId);
|
|
21354
|
+
queue.keys.add(eventKey);
|
|
21355
|
+
queue.events.push(event);
|
|
21356
|
+
this.pendingCount += 1;
|
|
21357
|
+
const previousTail = queue.tail;
|
|
21358
|
+
queue.tail = previousTail.then(() => this.processQueue(scopeKey3, queue)).catch((error) => {
|
|
21359
|
+
this.warn("project-room:task-realtime-failed", { code: "TASK_REALTIME_NOTIFICATION_FAILED", error: error instanceof Error ? error.name : "UnknownError" });
|
|
21360
|
+
});
|
|
21361
|
+
const accepted = queue.tail;
|
|
21362
|
+
this.accepted.add(accepted);
|
|
21363
|
+
void accepted.finally(() => this.accepted.delete(accepted));
|
|
21364
|
+
return accepted;
|
|
20943
21365
|
}
|
|
20944
|
-
/**
|
|
20945
|
-
|
|
20946
|
-
this.
|
|
21366
|
+
/** Closes admission without interrupting accepted work. */
|
|
21367
|
+
closeAdmission() {
|
|
21368
|
+
this.accepting = false;
|
|
20947
21369
|
}
|
|
20948
|
-
/**
|
|
21370
|
+
/** Drains accepted work, closing permanently if the bound expires. */
|
|
21371
|
+
async drain(timeoutMs = 5e3) {
|
|
21372
|
+
const work = Promise.allSettled([...this.accepted]).then(() => void 0);
|
|
21373
|
+
let timer;
|
|
21374
|
+
const timeout = new Promise((resolve4) => {
|
|
21375
|
+
timer = setTimeout(() => resolve4("timeout"), timeoutMs);
|
|
21376
|
+
timer.unref?.();
|
|
21377
|
+
});
|
|
21378
|
+
const outcome = await Promise.race([work.then(() => "drained"), timeout]);
|
|
21379
|
+
if (timer) clearTimeout(timer);
|
|
21380
|
+
this.closed = true;
|
|
21381
|
+
if (outcome === "timeout") this.queues.clear();
|
|
21382
|
+
}
|
|
21383
|
+
/** Closes admission and drains accepted work. */
|
|
21384
|
+
async dispose() {
|
|
21385
|
+
this.closeAdmission();
|
|
21386
|
+
await this.drain();
|
|
21387
|
+
this.closed = true;
|
|
21388
|
+
}
|
|
21389
|
+
async processQueue(scopeKey3, queue) {
|
|
21390
|
+
while (queue.events.length > 0) {
|
|
21391
|
+
const event = queue.events.shift();
|
|
21392
|
+
try {
|
|
21393
|
+
if (!this.closed) await this.publish(event);
|
|
21394
|
+
} finally {
|
|
21395
|
+
queue.keys.delete(event.eventKey);
|
|
21396
|
+
this.pendingCount -= 1;
|
|
21397
|
+
}
|
|
21398
|
+
}
|
|
21399
|
+
if (queue.events.length === 0 && this.queues.get(scopeKey3) === queue) this.queues.delete(scopeKey3);
|
|
21400
|
+
}
|
|
21401
|
+
async publish(event) {
|
|
21402
|
+
try {
|
|
21403
|
+
const taskValue = await this.deps.tasks.getById(event.tenantId, event.taskId);
|
|
21404
|
+
const task = taskValue === null ? void 0 : snapshotTaskItem(taskValue);
|
|
21405
|
+
if (this.closed) return;
|
|
21406
|
+
if (!task || !(0, import_core49.isProjectLifecycleTask)(task) || task.tenantId !== event.tenantId || task.workspaceId !== event.workspaceId || task.projectId !== event.projectId || task.status !== event.status || task.updatedAt.toISOString() !== event.updatedAt || event.threadId !== void 0 && task.context?.thread_id !== event.threadId) {
|
|
21407
|
+
this.warn("project-room:task-event-stale", { taskId: safeId3(event.taskId), eventKey: safeId3(event.eventKey) });
|
|
21408
|
+
return;
|
|
21409
|
+
}
|
|
21410
|
+
const roomValue = await this.deps.rooms.getMainRoom(event.tenantId, event.projectId);
|
|
21411
|
+
const room = snapshotProjectRoom(roomValue);
|
|
21412
|
+
if (this.closed) return;
|
|
21413
|
+
if (!room || room.tenantId !== event.tenantId || room.workspaceId !== event.workspaceId || room.projectId !== event.projectId) return;
|
|
21414
|
+
const membershipValue = await this.deps.memberships.findByAssistant(event.tenantId, event.projectId, task.ownerId);
|
|
21415
|
+
const membership = snapshotProjectBotMembership(membershipValue);
|
|
21416
|
+
if (this.closed) return;
|
|
21417
|
+
if (!membership || membership.tenantId !== event.tenantId || membership.workspaceId !== event.workspaceId || membership.projectId !== event.projectId || membership.roomId !== room.id || membership.assistantId !== task.ownerId) return;
|
|
21418
|
+
this.deps.realtime.taskChanged({
|
|
21419
|
+
tenantId: event.tenantId,
|
|
21420
|
+
roomId: room.id,
|
|
21421
|
+
projectId: event.projectId,
|
|
21422
|
+
taskId: task.id,
|
|
21423
|
+
status: task.status,
|
|
21424
|
+
ownerMembershipId: membership.id,
|
|
21425
|
+
updatedAt: task.updatedAt.toISOString(),
|
|
21426
|
+
sourceKey: `task:${task.id}:${event.eventKey}`
|
|
21427
|
+
});
|
|
21428
|
+
} catch (error) {
|
|
21429
|
+
this.warn("project-room:task-realtime-failed", { code: "TASK_REALTIME_NOTIFICATION_FAILED", taskId: safeId3(event.taskId), error: error instanceof Error ? error.name : "UnknownError" });
|
|
21430
|
+
}
|
|
21431
|
+
}
|
|
21432
|
+
parse(value) {
|
|
21433
|
+
const row = (0, import_protocols23.snapshotExactRecord)(value, ["tenantId", "workspaceId", "projectId", "taskId", "status", "action", "eventKey", "updatedAt"], ["threadId"]);
|
|
21434
|
+
const actions = ["in_progress", "interrupted", "failed", "completed", "cancelled", "reassigned"];
|
|
21435
|
+
const statuses = ["pending", "in_progress", "review", "failed", "interrupted", "completed", "cancelled"];
|
|
21436
|
+
if (!row || !actions.includes(String(row.action)) || !statuses.includes(String(row.status)) || !["tenantId", "workspaceId", "projectId", "taskId", "eventKey", "updatedAt"].every((key) => typeof row[key] === "string" && row[key].length > 0) || !Number.isFinite(Date.parse(row.updatedAt)) || row.threadId !== void 0 && typeof row.threadId !== "string") return void 0;
|
|
21437
|
+
return row;
|
|
21438
|
+
}
|
|
21439
|
+
warn(message, context) {
|
|
21440
|
+
try {
|
|
21441
|
+
this.deps.log.warn(message, context);
|
|
21442
|
+
} catch {
|
|
21443
|
+
}
|
|
21444
|
+
}
|
|
21445
|
+
overflow(taskId) {
|
|
21446
|
+
this.warn("project-room:task-realtime-overflow", { code: "TASK_REALTIME_QUEUE_FULL", taskId });
|
|
21447
|
+
return Promise.resolve();
|
|
21448
|
+
}
|
|
21449
|
+
};
|
|
21450
|
+
function safeId3(value) {
|
|
21451
|
+
return typeof value === "string" && value.length > 0 ? value : void 0;
|
|
21452
|
+
}
|
|
21453
|
+
|
|
21454
|
+
// src/services/collaboration/ProjectRoomRealtimeRuntime.ts
|
|
21455
|
+
var ProjectRoomRealtimeRuntime = class {
|
|
21456
|
+
constructor(deps) {
|
|
21457
|
+
this.deps = deps;
|
|
21458
|
+
this.accepted = /* @__PURE__ */ new Set();
|
|
21459
|
+
this.broker = deps.broker;
|
|
21460
|
+
this.publisher = deps.publisher;
|
|
21461
|
+
this.shutdownTimeoutMs = deps.shutdownTimeoutMs ?? 5e3;
|
|
21462
|
+
this.unsubscribe = deps.subscribe(((event) => {
|
|
21463
|
+
let work;
|
|
21464
|
+
try {
|
|
21465
|
+
work = Promise.resolve(deps.subscriber.handle(event));
|
|
21466
|
+
} catch (error) {
|
|
21467
|
+
work = Promise.reject(error);
|
|
21468
|
+
}
|
|
21469
|
+
const accepted = work.catch((error) => {
|
|
21470
|
+
deps.log.warn("project-room:task-subscriber-failed", { error: error instanceof Error ? error.name : "UnknownError" });
|
|
21471
|
+
});
|
|
21472
|
+
this.accepted.add(accepted);
|
|
21473
|
+
void accepted.finally(() => this.accepted.delete(accepted));
|
|
21474
|
+
}));
|
|
21475
|
+
}
|
|
21476
|
+
/** Stops admission, drains accepted work, and closes transport resources exactly once. */
|
|
21477
|
+
close() {
|
|
21478
|
+
this.closing ?? (this.closing = this.dispose());
|
|
21479
|
+
return this.closing;
|
|
21480
|
+
}
|
|
21481
|
+
async dispose() {
|
|
21482
|
+
this.unsubscribe();
|
|
21483
|
+
this.deps.subscriber.closeAdmission();
|
|
21484
|
+
const accepted = [...this.accepted];
|
|
21485
|
+
const drained = await boundedAllSettled(accepted, this.shutdownTimeoutMs);
|
|
21486
|
+
if (!drained) this.deps.log.warn("project-room:runtime-drain-timeout", {
|
|
21487
|
+
timeoutMs: this.shutdownTimeoutMs,
|
|
21488
|
+
pending: accepted.length
|
|
21489
|
+
});
|
|
21490
|
+
await this.deps.subscriber.drain(drained ? this.shutdownTimeoutMs : 0);
|
|
21491
|
+
this.broker.close();
|
|
21492
|
+
}
|
|
21493
|
+
};
|
|
21494
|
+
function createProjectRoomRealtimeRuntime(deps) {
|
|
21495
|
+
const broker = new ProjectRoomEventBroker({ log: deps.log });
|
|
21496
|
+
const publisher = new BrokerProjectRoomRealtimePublisher({ broker, log: deps.log });
|
|
21497
|
+
const subscriber = new ProjectRoomTaskEventSubscriber({
|
|
21498
|
+
tasks: deps.tasks,
|
|
21499
|
+
rooms: deps.rooms,
|
|
21500
|
+
memberships: deps.memberships,
|
|
21501
|
+
realtime: publisher,
|
|
21502
|
+
log: deps.log
|
|
21503
|
+
});
|
|
21504
|
+
return new ProjectRoomRealtimeRuntime({
|
|
21505
|
+
broker,
|
|
21506
|
+
publisher,
|
|
21507
|
+
subscriber,
|
|
21508
|
+
subscribe: (listener) => import_core50.taskLifecycleNotifier.subscribe(listener),
|
|
21509
|
+
log: deps.log,
|
|
21510
|
+
shutdownTimeoutMs: deps.shutdownTimeoutMs
|
|
21511
|
+
});
|
|
21512
|
+
}
|
|
21513
|
+
async function boundedAllSettled(promises, timeoutMs) {
|
|
21514
|
+
if (promises.length === 0) return true;
|
|
21515
|
+
let timer;
|
|
21516
|
+
const timeout = new Promise((resolve4) => {
|
|
21517
|
+
timer = setTimeout(() => resolve4(false), timeoutMs);
|
|
21518
|
+
timer.unref?.();
|
|
21519
|
+
});
|
|
21520
|
+
const result = await Promise.race([Promise.allSettled(promises).then(() => true), timeout]);
|
|
21521
|
+
if (timer) clearTimeout(timer);
|
|
21522
|
+
return result;
|
|
21523
|
+
}
|
|
21524
|
+
|
|
21525
|
+
// src/services/collaboration/WorkspaceRoomEventsService.ts
|
|
21526
|
+
var import_protocols24 = require("@axiom-lattice/protocols");
|
|
21527
|
+
|
|
21528
|
+
// src/services/collaboration/ProjectRoomSseWriter.ts
|
|
21529
|
+
var DEFAULT_MAX_FRAMES = 256;
|
|
21530
|
+
var DEFAULT_MAX_BYTES = 1024 * 1024;
|
|
21531
|
+
var DEFAULT_DRAIN_TIMEOUT_MS = 1e4;
|
|
21532
|
+
function serializeBusiness(event) {
|
|
21533
|
+
return `id: ${event.id}
|
|
21534
|
+
event: ${event.type}
|
|
21535
|
+
data: ${JSON.stringify(event)}
|
|
21536
|
+
|
|
21537
|
+
`;
|
|
21538
|
+
}
|
|
21539
|
+
function serializeControl(event) {
|
|
21540
|
+
return `event: ${event.type}
|
|
21541
|
+
data: ${JSON.stringify(event.data)}
|
|
21542
|
+
|
|
21543
|
+
`;
|
|
21544
|
+
}
|
|
21545
|
+
var ProjectRoomSseWriter = class {
|
|
21546
|
+
/** Creates a writer over a raw HTTP response/socket. */
|
|
21547
|
+
constructor(raw, options = {}) {
|
|
21548
|
+
this.raw = raw;
|
|
21549
|
+
this.frames = [];
|
|
21550
|
+
this.queuedBytes = 0;
|
|
21551
|
+
this.blockedBytes = 0;
|
|
21552
|
+
this.writing = false;
|
|
21553
|
+
this.closed = false;
|
|
21554
|
+
this.terminal = false;
|
|
21555
|
+
this.slowConsumerAttempted = false;
|
|
21556
|
+
this.closeListener = () => this.close();
|
|
21557
|
+
this.errorListener = () => this.close();
|
|
21558
|
+
this.drainListener = () => {
|
|
21559
|
+
if (this.closed || !this.writing) return;
|
|
21560
|
+
this.clearDrainTimer();
|
|
21561
|
+
this.blockedBytes = 0;
|
|
21562
|
+
this.writing = false;
|
|
21563
|
+
this.flush();
|
|
21564
|
+
};
|
|
21565
|
+
this.maxFrames = positive(options.maxFrames ?? DEFAULT_MAX_FRAMES, "maxFrames");
|
|
21566
|
+
this.maxBytes = positive(options.maxBytes ?? DEFAULT_MAX_BYTES, "maxBytes");
|
|
21567
|
+
this.drainTimeoutMs = positive(options.drainTimeoutMs ?? DEFAULT_DRAIN_TIMEOUT_MS, "drainTimeoutMs");
|
|
21568
|
+
this.onClose = options.onClose;
|
|
21569
|
+
raw.on("close", this.closeListener).on("error", this.errorListener).on("drain", this.drainListener);
|
|
21570
|
+
}
|
|
21571
|
+
/** Enqueues one public business event. */
|
|
21572
|
+
enqueueBusiness(event) {
|
|
21573
|
+
this.enqueue(serializeBusiness(event));
|
|
21574
|
+
}
|
|
21575
|
+
/** Enqueues one connection control event. */
|
|
21576
|
+
enqueueControl(event) {
|
|
21577
|
+
this.enqueue(serializeControl(event));
|
|
21578
|
+
}
|
|
21579
|
+
/** Enqueues a pre-serialized SSE frame (used by scoped multi-room streams). */
|
|
21580
|
+
enqueueRaw(frame) {
|
|
21581
|
+
this.enqueue(frame);
|
|
21582
|
+
}
|
|
21583
|
+
/** Writes a heartbeat comment when the socket is not currently blocked. */
|
|
20949
21584
|
heartbeat() {
|
|
20950
21585
|
if (!this.closed && !this.writing) this.writeFrame(": heartbeat\n\n");
|
|
20951
21586
|
}
|
|
@@ -21030,458 +21665,274 @@ var ProjectRoomSseWriter = class {
|
|
|
21030
21665
|
if (!this.raw.write(frame)) {
|
|
21031
21666
|
this.writing = true;
|
|
21032
21667
|
this.blockedBytes = Buffer.byteLength(frame, "utf8");
|
|
21033
|
-
} else {
|
|
21034
|
-
this.writing = false;
|
|
21035
|
-
this.blockedBytes = 0;
|
|
21036
|
-
(finish ?? (() => this.close()))();
|
|
21037
|
-
}
|
|
21038
|
-
} catch {
|
|
21039
|
-
this.close();
|
|
21040
|
-
}
|
|
21041
|
-
}
|
|
21042
|
-
armTerminalDeadline(deadlineMs, finish) {
|
|
21043
|
-
this.terminalTimer = setTimeout(finish, deadlineMs);
|
|
21044
|
-
this.terminalTimer.unref?.();
|
|
21045
|
-
}
|
|
21046
|
-
writeFrame(frame) {
|
|
21047
|
-
if (this.closed) return;
|
|
21048
|
-
try {
|
|
21049
|
-
if (!this.raw.write(frame)) {
|
|
21050
|
-
this.writing = true;
|
|
21051
|
-
this.blockedBytes = Buffer.byteLength(frame, "utf8");
|
|
21052
|
-
this.drainTimer = setTimeout(() => {
|
|
21053
|
-
this.drainTimer = void 0;
|
|
21054
|
-
this.failSlowConsumer();
|
|
21055
|
-
}, this.drainTimeoutMs);
|
|
21056
|
-
this.drainTimer.unref?.();
|
|
21057
|
-
} else {
|
|
21058
|
-
this.writing = false;
|
|
21059
|
-
this.blockedBytes = 0;
|
|
21060
|
-
this.flush();
|
|
21061
|
-
}
|
|
21062
|
-
} catch {
|
|
21063
|
-
this.close();
|
|
21064
|
-
}
|
|
21065
|
-
}
|
|
21066
|
-
clearDrainTimer() {
|
|
21067
|
-
if (this.drainTimer !== void 0) clearTimeout(this.drainTimer);
|
|
21068
|
-
this.drainTimer = void 0;
|
|
21069
|
-
}
|
|
21070
|
-
failSlowConsumer() {
|
|
21071
|
-
if (this.closed) return;
|
|
21072
|
-
this.frames.length = 0;
|
|
21073
|
-
this.queuedBytes = 0;
|
|
21074
|
-
if (!this.slowConsumerAttempted) {
|
|
21075
|
-
this.slowConsumerAttempted = true;
|
|
21076
|
-
try {
|
|
21077
|
-
this.raw.write(serializeControl({ type: "resync", data: { reason: "SLOW_CONSUMER" } }));
|
|
21078
|
-
} catch {
|
|
21079
|
-
}
|
|
21080
|
-
}
|
|
21081
|
-
this.close();
|
|
21082
|
-
}
|
|
21083
|
-
};
|
|
21084
|
-
function positive(value, name) {
|
|
21085
|
-
if (!Number.isSafeInteger(value) || value <= 0) throw new RangeError(`${name} must be positive`);
|
|
21086
|
-
return value;
|
|
21087
|
-
}
|
|
21088
|
-
|
|
21089
|
-
// src/services/collaboration/ProjectRoomRealtimeService.ts
|
|
21090
|
-
var MAX_REPLAY_EVENTS = 1e4;
|
|
21091
|
-
var MAX_NODE_TIMER_DELAY = 2147e6;
|
|
21092
|
-
var ProjectRoomRealtimeService = class {
|
|
21093
|
-
/** Creates a service using one process-local broker and read-only authorizer. */
|
|
21094
|
-
constructor(deps) {
|
|
21095
|
-
this.deps = deps;
|
|
21096
|
-
this.connections = /* @__PURE__ */ new Set();
|
|
21097
|
-
this.closed = false;
|
|
21098
|
-
this.activeConnections = /* @__PURE__ */ new Map();
|
|
21099
|
-
this.now = deps.now ?? Date.now;
|
|
21100
|
-
this.authRecheckMs = deps.authRecheckMs ?? 15e3;
|
|
21101
|
-
this.heartbeatMs = deps.heartbeatMs ?? 15e3;
|
|
21102
|
-
}
|
|
21103
|
-
/** Returns whether the actor's tenant/user/project stream quota has capacity. */
|
|
21104
|
-
canConnect(actor2) {
|
|
21105
|
-
if (this.closed) return false;
|
|
21106
|
-
return (this.activeConnections.get(connectionKey(actor2)) ?? 0) < (this.deps.maxConnectionsPerUserProject ?? 5);
|
|
21107
|
-
}
|
|
21108
|
-
/** Starts a connection; authorization is assumed to have been performed by the route. */
|
|
21109
|
-
connect(input) {
|
|
21110
|
-
if (!this.canConnect(input.actor)) {
|
|
21111
|
-
input.raw.end();
|
|
21112
|
-
return;
|
|
21113
|
-
}
|
|
21114
|
-
const quotaKey = connectionKey(input.actor);
|
|
21115
|
-
this.activeConnections.set(quotaKey, (this.activeConnections.get(quotaKey) ?? 0) + 1);
|
|
21116
|
-
const writer = new ProjectRoomSseWriter(input.raw, { onClose: () => connection.close() });
|
|
21117
|
-
let phase = "initializing";
|
|
21118
|
-
let subscription;
|
|
21119
|
-
let accessTimer;
|
|
21120
|
-
let heartbeatTimer;
|
|
21121
|
-
let expiryTimer;
|
|
21122
|
-
const lifetimeAbort = new AbortController();
|
|
21123
|
-
let accessAbort;
|
|
21124
|
-
let closed = false;
|
|
21125
|
-
const buffered = [];
|
|
21126
|
-
const clearTimer = (timer) => {
|
|
21127
|
-
if (timer !== void 0) clearTimeout(timer);
|
|
21128
|
-
};
|
|
21129
|
-
const cleanup = () => {
|
|
21130
|
-
if (closed) return;
|
|
21131
|
-
closed = true;
|
|
21132
|
-
phase = "closed";
|
|
21133
|
-
clearTimer(accessTimer);
|
|
21134
|
-
clearTimer(heartbeatTimer);
|
|
21135
|
-
clearTimer(expiryTimer);
|
|
21136
|
-
lifetimeAbort.abort();
|
|
21137
|
-
accessAbort?.abort();
|
|
21138
|
-
subscription?.unsubscribe();
|
|
21139
|
-
writer.close();
|
|
21140
|
-
this.connections.delete(connection);
|
|
21141
|
-
const remainingConnections = (this.activeConnections.get(quotaKey) ?? 1) - 1;
|
|
21142
|
-
if (remainingConnections === 0) this.activeConnections.delete(quotaKey);
|
|
21143
|
-
else this.activeConnections.set(quotaKey, remainingConnections);
|
|
21144
|
-
};
|
|
21145
|
-
const revoke = (reason) => {
|
|
21146
|
-
if (closed) return;
|
|
21147
|
-
void writer.closeWithControl({ type: "access.revoked", data: { reason } }).then(cleanup, cleanup);
|
|
21148
|
-
};
|
|
21149
|
-
const scheduleAccessCheck = () => {
|
|
21150
|
-
if (closed) return;
|
|
21151
|
-
accessTimer = setTimeout(() => {
|
|
21152
|
-
accessTimer = void 0;
|
|
21153
|
-
if (closed) return;
|
|
21154
|
-
accessAbort = new AbortController();
|
|
21155
|
-
const combined = combineSignals2(lifetimeAbort.signal, accessAbort.signal);
|
|
21156
|
-
Promise.resolve().then(() => this.deps.requireReadAccess(input.actor, combined.signal)).then(() => {
|
|
21157
|
-
combined.cleanup();
|
|
21158
|
-
accessAbort = void 0;
|
|
21159
|
-
scheduleAccessCheck();
|
|
21160
|
-
}, (_error) => {
|
|
21161
|
-
combined.cleanup();
|
|
21162
|
-
accessAbort = void 0;
|
|
21163
|
-
if (!closed) revoke("PROJECT_ACCESS_REVOKED");
|
|
21164
|
-
});
|
|
21165
|
-
}, this.authRecheckMs);
|
|
21166
|
-
accessTimer.unref?.();
|
|
21167
|
-
};
|
|
21168
|
-
const connection = { close: cleanup };
|
|
21169
|
-
this.connections.add(connection);
|
|
21170
|
-
const scheduleHeartbeat = () => {
|
|
21171
|
-
if (closed) return;
|
|
21172
|
-
heartbeatTimer = setTimeout(() => {
|
|
21173
|
-
heartbeatTimer = void 0;
|
|
21174
|
-
if (closed) return;
|
|
21175
|
-
writer.heartbeat();
|
|
21176
|
-
scheduleHeartbeat();
|
|
21177
|
-
}, this.heartbeatMs);
|
|
21178
|
-
heartbeatTimer.unref?.();
|
|
21179
|
-
};
|
|
21180
|
-
scheduleHeartbeat();
|
|
21181
|
-
const remaining = input.actor.tokenExpiresAt - this.now();
|
|
21182
|
-
if (remaining <= 0) {
|
|
21183
|
-
revoke("TOKEN_EXPIRED");
|
|
21184
|
-
return;
|
|
21185
|
-
}
|
|
21186
|
-
const maxTimerDelay = this.deps.maxTimerDelay ?? MAX_NODE_TIMER_DELAY;
|
|
21187
|
-
const scheduleExpiry = () => {
|
|
21188
|
-
if (closed) return;
|
|
21189
|
-
const delay2 = input.actor.tokenExpiresAt - this.now();
|
|
21190
|
-
if (delay2 <= 0) {
|
|
21191
|
-
revoke("TOKEN_EXPIRED");
|
|
21192
|
-
return;
|
|
21193
|
-
}
|
|
21194
|
-
expiryTimer = setTimeout(() => {
|
|
21195
|
-
expiryTimer = void 0;
|
|
21196
|
-
scheduleExpiry();
|
|
21197
|
-
}, Math.min(delay2, maxTimerDelay));
|
|
21198
|
-
expiryTimer.unref?.();
|
|
21199
|
-
};
|
|
21200
|
-
scheduleExpiry();
|
|
21201
|
-
try {
|
|
21202
|
-
subscription = this.deps.broker.subscribe(
|
|
21203
|
-
{ tenantId: input.actor.tenantId, roomId: input.roomId, projectId: input.actor.projectId },
|
|
21204
|
-
input.lastEventId,
|
|
21205
|
-
(event) => {
|
|
21206
|
-
if (phase === "initializing") buffered.push(event);
|
|
21207
|
-
else if (phase === "direct") writer.enqueueBusiness(event);
|
|
21208
|
-
}
|
|
21209
|
-
);
|
|
21210
|
-
if (subscription.replay.length > MAX_REPLAY_EVENTS) {
|
|
21211
|
-
void writer.closeWithControl({ type: "resync", data: { reason: "CURSOR_EXPIRED" } }).then(cleanup, cleanup);
|
|
21212
|
-
return;
|
|
21213
|
-
}
|
|
21214
|
-
let lastSequence = sequence(subscription.headEventId);
|
|
21215
|
-
for (const event of subscription.replay) {
|
|
21216
|
-
writer.enqueueBusiness(event);
|
|
21217
|
-
lastSequence = sequence(event.id);
|
|
21218
|
-
}
|
|
21219
|
-
writer.enqueueControl({ type: "ready", data: { epoch: this.deps.broker.epoch, headEventId: subscription.headEventId } });
|
|
21220
|
-
while (buffered.length > 0) {
|
|
21221
|
-
for (const event of buffered.splice(0).sort((left, right) => sequence(left.id) - sequence(right.id))) {
|
|
21222
|
-
if (sequence(event.id) > lastSequence) {
|
|
21223
|
-
writer.enqueueBusiness(event);
|
|
21224
|
-
lastSequence = sequence(event.id);
|
|
21225
|
-
}
|
|
21226
|
-
}
|
|
21227
|
-
}
|
|
21228
|
-
phase = "direct";
|
|
21229
|
-
scheduleAccessCheck();
|
|
21230
|
-
} catch (error) {
|
|
21231
|
-
if (error instanceof import_protocols21.ProjectRoomCursorError) void writer.closeWithControl({ type: "resync", data: { reason: error.code } }).then(cleanup, cleanup);
|
|
21232
|
-
else cleanup();
|
|
21233
|
-
}
|
|
21234
|
-
}
|
|
21235
|
-
/** Closes every connection and prevents new connections. */
|
|
21236
|
-
close() {
|
|
21237
|
-
if (this.closed) return;
|
|
21238
|
-
this.closed = true;
|
|
21239
|
-
for (const connection of [...this.connections]) connection.close();
|
|
21240
|
-
}
|
|
21241
|
-
};
|
|
21242
|
-
function sequence(id3) {
|
|
21243
|
-
return id3 === null ? 0 : Number(id3.slice(id3.lastIndexOf(":") + 1));
|
|
21244
|
-
}
|
|
21245
|
-
function connectionKey(actor2) {
|
|
21246
|
-
return JSON.stringify([actor2.tenantId, actor2.userId, actor2.projectId]);
|
|
21247
|
-
}
|
|
21248
|
-
function combineSignals2(first, second) {
|
|
21249
|
-
const controller = new AbortController();
|
|
21250
|
-
const abort = () => controller.abort();
|
|
21251
|
-
if (first.aborted || second.aborted) abort();
|
|
21252
|
-
else {
|
|
21253
|
-
first.addEventListener("abort", abort, { once: true });
|
|
21254
|
-
second.addEventListener("abort", abort, { once: true });
|
|
21255
|
-
}
|
|
21256
|
-
return { signal: controller.signal, cleanup: () => {
|
|
21257
|
-
first.removeEventListener("abort", abort);
|
|
21258
|
-
second.removeEventListener("abort", abort);
|
|
21259
|
-
} };
|
|
21260
|
-
}
|
|
21261
|
-
|
|
21262
|
-
// src/services/collaboration/ProjectRoomTaskEventSubscriber.ts
|
|
21263
|
-
var import_core49 = require("@axiom-lattice/core");
|
|
21264
|
-
var import_protocols22 = require("@axiom-lattice/protocols");
|
|
21265
|
-
var ProjectRoomTaskEventSubscriber = class {
|
|
21266
|
-
/** Creates a bounded Project task lifecycle observer. */
|
|
21267
|
-
constructor(deps) {
|
|
21268
|
-
this.deps = deps;
|
|
21269
|
-
this.queues = /* @__PURE__ */ new Map();
|
|
21270
|
-
this.pendingCount = 0;
|
|
21271
|
-
this.accepting = true;
|
|
21272
|
-
this.closed = false;
|
|
21273
|
-
this.accepted = /* @__PURE__ */ new Set();
|
|
21274
|
-
this.maxPending = deps.maxPending ?? 1024;
|
|
21275
|
-
if (!Number.isSafeInteger(this.maxPending) || this.maxPending < 1) throw new RangeError("maxPending must be a positive safe integer");
|
|
21276
|
-
}
|
|
21277
|
-
/** Admits one notification without awaiting any store operation. */
|
|
21278
|
-
handle(value) {
|
|
21279
|
-
const event = this.parse(value);
|
|
21280
|
-
if (!event) {
|
|
21281
|
-
this.warn("Project task realtime notification rejected", { code: "INVALID_TASK_REALTIME_EVENT" });
|
|
21282
|
-
return Promise.resolve();
|
|
21283
|
-
}
|
|
21284
|
-
if (!this.accepting || this.closed) return Promise.resolve();
|
|
21285
|
-
const scopeKey3 = JSON.stringify([event.tenantId, event.workspaceId, event.projectId, event.taskId]);
|
|
21286
|
-
const eventKey = event.eventKey;
|
|
21287
|
-
let queue = this.queues.get(scopeKey3);
|
|
21288
|
-
if (!queue) {
|
|
21289
|
-
if (this.pendingCount >= this.maxPending) return this.overflow(event.taskId);
|
|
21290
|
-
queue = { events: [], keys: /* @__PURE__ */ new Set(), tail: Promise.resolve() };
|
|
21291
|
-
this.queues.set(scopeKey3, queue);
|
|
21292
|
-
}
|
|
21293
|
-
if (queue.keys.has(eventKey)) return queue.tail;
|
|
21294
|
-
if (this.pendingCount >= this.maxPending) return this.overflow(event.taskId);
|
|
21295
|
-
queue.keys.add(eventKey);
|
|
21296
|
-
queue.events.push(event);
|
|
21297
|
-
this.pendingCount += 1;
|
|
21298
|
-
const previousTail = queue.tail;
|
|
21299
|
-
queue.tail = previousTail.then(() => this.processQueue(scopeKey3, queue)).catch((error) => {
|
|
21300
|
-
this.warn("project-room:task-realtime-failed", { code: "TASK_REALTIME_NOTIFICATION_FAILED", error: error instanceof Error ? error.name : "UnknownError" });
|
|
21301
|
-
});
|
|
21302
|
-
const accepted = queue.tail;
|
|
21303
|
-
this.accepted.add(accepted);
|
|
21304
|
-
void accepted.finally(() => this.accepted.delete(accepted));
|
|
21305
|
-
return accepted;
|
|
21306
|
-
}
|
|
21307
|
-
/** Closes admission without interrupting accepted work. */
|
|
21308
|
-
closeAdmission() {
|
|
21309
|
-
this.accepting = false;
|
|
21310
|
-
}
|
|
21311
|
-
/** Drains accepted work, closing permanently if the bound expires. */
|
|
21312
|
-
async drain(timeoutMs = 5e3) {
|
|
21313
|
-
const work = Promise.allSettled([...this.accepted]).then(() => void 0);
|
|
21314
|
-
let timer;
|
|
21315
|
-
const timeout = new Promise((resolve4) => {
|
|
21316
|
-
timer = setTimeout(() => resolve4("timeout"), timeoutMs);
|
|
21317
|
-
timer.unref?.();
|
|
21318
|
-
});
|
|
21319
|
-
const outcome = await Promise.race([work.then(() => "drained"), timeout]);
|
|
21320
|
-
if (timer) clearTimeout(timer);
|
|
21321
|
-
this.closed = true;
|
|
21322
|
-
if (outcome === "timeout") this.queues.clear();
|
|
21323
|
-
}
|
|
21324
|
-
/** Closes admission and drains accepted work. */
|
|
21325
|
-
async dispose() {
|
|
21326
|
-
this.closeAdmission();
|
|
21327
|
-
await this.drain();
|
|
21328
|
-
this.closed = true;
|
|
21329
|
-
}
|
|
21330
|
-
async processQueue(scopeKey3, queue) {
|
|
21331
|
-
while (queue.events.length > 0) {
|
|
21332
|
-
const event = queue.events.shift();
|
|
21333
|
-
try {
|
|
21334
|
-
if (!this.closed) await this.publish(event);
|
|
21335
|
-
} finally {
|
|
21336
|
-
queue.keys.delete(event.eventKey);
|
|
21337
|
-
this.pendingCount -= 1;
|
|
21338
|
-
}
|
|
21339
|
-
}
|
|
21340
|
-
if (queue.events.length === 0 && this.queues.get(scopeKey3) === queue) this.queues.delete(scopeKey3);
|
|
21341
|
-
}
|
|
21342
|
-
async publish(event) {
|
|
21343
|
-
try {
|
|
21344
|
-
const taskValue = await this.deps.tasks.getById(event.tenantId, event.taskId);
|
|
21345
|
-
const task = taskValue === null ? void 0 : snapshotTaskItem(taskValue);
|
|
21346
|
-
if (this.closed) return;
|
|
21347
|
-
if (!task || !(0, import_core49.isProjectLifecycleTask)(task) || task.tenantId !== event.tenantId || task.workspaceId !== event.workspaceId || task.projectId !== event.projectId || task.status !== event.status || task.updatedAt.toISOString() !== event.updatedAt || event.threadId !== void 0 && task.context?.thread_id !== event.threadId) {
|
|
21348
|
-
this.warn("project-room:task-event-stale", { taskId: safeId3(event.taskId), eventKey: safeId3(event.eventKey) });
|
|
21349
|
-
return;
|
|
21350
|
-
}
|
|
21351
|
-
const roomValue = await this.deps.rooms.getMainRoom(event.tenantId, event.projectId);
|
|
21352
|
-
const room = snapshotProjectRoom(roomValue);
|
|
21353
|
-
if (this.closed) return;
|
|
21354
|
-
if (!room || room.tenantId !== event.tenantId || room.workspaceId !== event.workspaceId || room.projectId !== event.projectId) return;
|
|
21355
|
-
const membershipValue = await this.deps.memberships.findByAssistant(event.tenantId, event.projectId, task.ownerId);
|
|
21356
|
-
const membership = snapshotProjectBotMembership(membershipValue);
|
|
21357
|
-
if (this.closed) return;
|
|
21358
|
-
if (!membership || membership.tenantId !== event.tenantId || membership.workspaceId !== event.workspaceId || membership.projectId !== event.projectId || membership.roomId !== room.id || membership.assistantId !== task.ownerId) return;
|
|
21359
|
-
this.deps.realtime.taskChanged({
|
|
21360
|
-
tenantId: event.tenantId,
|
|
21361
|
-
roomId: room.id,
|
|
21362
|
-
projectId: event.projectId,
|
|
21363
|
-
taskId: task.id,
|
|
21364
|
-
status: task.status,
|
|
21365
|
-
ownerMembershipId: membership.id,
|
|
21366
|
-
updatedAt: task.updatedAt.toISOString(),
|
|
21367
|
-
sourceKey: `task:${task.id}:${event.eventKey}`
|
|
21368
|
-
});
|
|
21369
|
-
} catch (error) {
|
|
21370
|
-
this.warn("project-room:task-realtime-failed", { code: "TASK_REALTIME_NOTIFICATION_FAILED", taskId: safeId3(event.taskId), error: error instanceof Error ? error.name : "UnknownError" });
|
|
21668
|
+
} else {
|
|
21669
|
+
this.writing = false;
|
|
21670
|
+
this.blockedBytes = 0;
|
|
21671
|
+
(finish ?? (() => this.close()))();
|
|
21672
|
+
}
|
|
21673
|
+
} catch {
|
|
21674
|
+
this.close();
|
|
21371
21675
|
}
|
|
21372
21676
|
}
|
|
21373
|
-
|
|
21374
|
-
|
|
21375
|
-
|
|
21376
|
-
const statuses = ["pending", "in_progress", "review", "failed", "interrupted", "completed", "cancelled"];
|
|
21377
|
-
if (!row || !actions.includes(String(row.action)) || !statuses.includes(String(row.status)) || !["tenantId", "workspaceId", "projectId", "taskId", "eventKey", "updatedAt"].every((key) => typeof row[key] === "string" && row[key].length > 0) || !Number.isFinite(Date.parse(row.updatedAt)) || row.threadId !== void 0 && typeof row.threadId !== "string") return void 0;
|
|
21378
|
-
return row;
|
|
21677
|
+
armTerminalDeadline(deadlineMs, finish) {
|
|
21678
|
+
this.terminalTimer = setTimeout(finish, deadlineMs);
|
|
21679
|
+
this.terminalTimer.unref?.();
|
|
21379
21680
|
}
|
|
21380
|
-
|
|
21681
|
+
writeFrame(frame) {
|
|
21682
|
+
if (this.closed) return;
|
|
21381
21683
|
try {
|
|
21382
|
-
this.
|
|
21684
|
+
if (!this.raw.write(frame)) {
|
|
21685
|
+
this.writing = true;
|
|
21686
|
+
this.blockedBytes = Buffer.byteLength(frame, "utf8");
|
|
21687
|
+
this.drainTimer = setTimeout(() => {
|
|
21688
|
+
this.drainTimer = void 0;
|
|
21689
|
+
this.failSlowConsumer();
|
|
21690
|
+
}, this.drainTimeoutMs);
|
|
21691
|
+
this.drainTimer.unref?.();
|
|
21692
|
+
} else {
|
|
21693
|
+
this.writing = false;
|
|
21694
|
+
this.blockedBytes = 0;
|
|
21695
|
+
this.flush();
|
|
21696
|
+
}
|
|
21383
21697
|
} catch {
|
|
21698
|
+
this.close();
|
|
21384
21699
|
}
|
|
21385
21700
|
}
|
|
21386
|
-
|
|
21387
|
-
this.
|
|
21388
|
-
|
|
21701
|
+
clearDrainTimer() {
|
|
21702
|
+
if (this.drainTimer !== void 0) clearTimeout(this.drainTimer);
|
|
21703
|
+
this.drainTimer = void 0;
|
|
21704
|
+
}
|
|
21705
|
+
failSlowConsumer() {
|
|
21706
|
+
if (this.closed) return;
|
|
21707
|
+
this.frames.length = 0;
|
|
21708
|
+
this.queuedBytes = 0;
|
|
21709
|
+
if (!this.slowConsumerAttempted) {
|
|
21710
|
+
this.slowConsumerAttempted = true;
|
|
21711
|
+
try {
|
|
21712
|
+
this.raw.write(serializeControl({ type: "resync", data: { reason: "SLOW_CONSUMER" } }));
|
|
21713
|
+
} catch {
|
|
21714
|
+
}
|
|
21715
|
+
}
|
|
21716
|
+
this.close();
|
|
21389
21717
|
}
|
|
21390
21718
|
};
|
|
21391
|
-
function
|
|
21392
|
-
|
|
21719
|
+
function positive(value, name) {
|
|
21720
|
+
if (!Number.isSafeInteger(value) || value <= 0) throw new RangeError(`${name} must be positive`);
|
|
21721
|
+
return value;
|
|
21393
21722
|
}
|
|
21394
21723
|
|
|
21395
|
-
// src/services/collaboration/
|
|
21396
|
-
var
|
|
21724
|
+
// src/services/collaboration/WorkspaceRoomEventsService.ts
|
|
21725
|
+
var MAX_NODE_TIMER_DELAY = 2147e6;
|
|
21726
|
+
var WorkspaceRoomEventsService = class {
|
|
21727
|
+
/** Creates a service over the shared process-local broker. */
|
|
21397
21728
|
constructor(deps) {
|
|
21398
21729
|
this.deps = deps;
|
|
21399
|
-
this.
|
|
21400
|
-
this.
|
|
21401
|
-
this.
|
|
21402
|
-
this.
|
|
21403
|
-
this.
|
|
21404
|
-
this.
|
|
21405
|
-
|
|
21406
|
-
try {
|
|
21407
|
-
work = Promise.resolve(deps.subscriber.handle(event));
|
|
21408
|
-
} catch (error) {
|
|
21409
|
-
work = Promise.reject(error);
|
|
21410
|
-
}
|
|
21411
|
-
const accepted = work.catch((error) => {
|
|
21412
|
-
deps.log.warn("project-room:task-subscriber-failed", { error: error instanceof Error ? error.name : "UnknownError" });
|
|
21413
|
-
});
|
|
21414
|
-
this.accepted.add(accepted);
|
|
21415
|
-
void accepted.finally(() => this.accepted.delete(accepted));
|
|
21416
|
-
}));
|
|
21730
|
+
this.connections = /* @__PURE__ */ new Map();
|
|
21731
|
+
this.closed = false;
|
|
21732
|
+
this.now = deps.now ?? Date.now;
|
|
21733
|
+
this.heartbeatMs = deps.heartbeatMs ?? 15e3;
|
|
21734
|
+
this.authRecheckMs = deps.authRecheckMs ?? 15e3;
|
|
21735
|
+
this.maxConnectionsPerUser = deps.maxConnectionsPerUser ?? 2;
|
|
21736
|
+
this.maxTimerDelay = deps.maxTimerDelay ?? MAX_NODE_TIMER_DELAY;
|
|
21417
21737
|
}
|
|
21418
|
-
/**
|
|
21738
|
+
/** Starts a live-only connection; the route performs authentication beforehand. */
|
|
21739
|
+
connect(input) {
|
|
21740
|
+
if (this.closed) {
|
|
21741
|
+
input.raw.end();
|
|
21742
|
+
return;
|
|
21743
|
+
}
|
|
21744
|
+
const userKey = JSON.stringify([input.actor.tenantId, input.actor.userId]);
|
|
21745
|
+
const active = this.connections.get(userKey) ?? /* @__PURE__ */ new Set();
|
|
21746
|
+
if (active.size >= this.maxConnectionsPerUser) {
|
|
21747
|
+
const oldest = [...active].sort((left, right) => left.startedAt - right.startedAt)[0];
|
|
21748
|
+
oldest?.supersede();
|
|
21749
|
+
}
|
|
21750
|
+
const connection = this.buildConnection(input.actor, input.workspaceId, input.raw);
|
|
21751
|
+
active.add(connection);
|
|
21752
|
+
this.connections.set(userKey, active);
|
|
21753
|
+
}
|
|
21754
|
+
/** Closes every connection and stops admitting new ones. */
|
|
21419
21755
|
close() {
|
|
21420
|
-
|
|
21421
|
-
|
|
21756
|
+
if (this.closed) return;
|
|
21757
|
+
this.closed = true;
|
|
21758
|
+
for (const active of [...this.connections.values()]) for (const connection of [...active]) connection.close();
|
|
21759
|
+
this.connections.clear();
|
|
21422
21760
|
}
|
|
21423
|
-
|
|
21424
|
-
|
|
21425
|
-
|
|
21426
|
-
|
|
21427
|
-
|
|
21428
|
-
|
|
21429
|
-
|
|
21430
|
-
|
|
21761
|
+
buildConnection(actor2, workspaceId, raw) {
|
|
21762
|
+
let phase = "initializing";
|
|
21763
|
+
const subscriptions = /* @__PURE__ */ new Map();
|
|
21764
|
+
let heartbeatTimer;
|
|
21765
|
+
let accessTimer;
|
|
21766
|
+
let expiryTimer;
|
|
21767
|
+
let closed = false;
|
|
21768
|
+
const recordRef = {};
|
|
21769
|
+
let rebuildTail = Promise.resolve(true);
|
|
21770
|
+
const lifetimeAbort = new AbortController();
|
|
21771
|
+
const clear = (timer) => {
|
|
21772
|
+
if (timer !== void 0) clearTimeout(timer);
|
|
21773
|
+
};
|
|
21774
|
+
const userScope = (0, import_protocols24.projectRoomUserEventScope)(actor2.tenantId, actor2.userId);
|
|
21775
|
+
const userScopeKey = JSON.stringify([userScope.tenantId, userScope.roomId, userScope.projectId]);
|
|
21776
|
+
const roomScopeKey = (scope) => JSON.stringify([scope.tenantId, scope.roomId, scope.projectId]);
|
|
21777
|
+
const serializeScoped = (scope, event) => scope === null ? `id: ${event.id}
|
|
21778
|
+
event: ${event.type}
|
|
21779
|
+
data: ${JSON.stringify(event)}
|
|
21780
|
+
|
|
21781
|
+
` : `id: ${event.id}
|
|
21782
|
+
event: ${event.type}
|
|
21783
|
+
data: ${JSON.stringify({ ...event, scope })}
|
|
21784
|
+
|
|
21785
|
+
`;
|
|
21786
|
+
const writer = new ProjectRoomSseWriter(raw, { onClose: () => cleanup() });
|
|
21787
|
+
const cleanup = () => {
|
|
21788
|
+
if (closed) return;
|
|
21789
|
+
closed = true;
|
|
21790
|
+
phase = "closed";
|
|
21791
|
+
clear(heartbeatTimer);
|
|
21792
|
+
clear(accessTimer);
|
|
21793
|
+
clear(expiryTimer);
|
|
21794
|
+
lifetimeAbort.abort();
|
|
21795
|
+
for (const entry of subscriptions.values()) entry.unsubscribe();
|
|
21796
|
+
subscriptions.clear();
|
|
21797
|
+
writer.close();
|
|
21798
|
+
const userKey = JSON.stringify([actor2.tenantId, actor2.userId]);
|
|
21799
|
+
const active = this.connections.get(userKey);
|
|
21800
|
+
if (active && recordRef.current !== void 0) {
|
|
21801
|
+
active.delete(recordRef.current);
|
|
21802
|
+
if (active.size === 0) this.connections.delete(userKey);
|
|
21803
|
+
}
|
|
21804
|
+
};
|
|
21805
|
+
const revoke = (reason) => {
|
|
21806
|
+
if (closed) return;
|
|
21807
|
+
void writer.closeWithControl({ type: "access.revoked", data: { reason } }).then(cleanup, cleanup);
|
|
21808
|
+
};
|
|
21809
|
+
const record = {
|
|
21810
|
+
startedAt: this.now(),
|
|
21811
|
+
supersede: () => revoke("CONNECTION_SUPERSEDED"),
|
|
21812
|
+
close: cleanup
|
|
21813
|
+
};
|
|
21814
|
+
recordRef.current = record;
|
|
21815
|
+
const rebuildSubscriptions = async () => {
|
|
21816
|
+
try {
|
|
21817
|
+
const rooms = await this.deps.listMemberRooms({ tenantId: actor2.tenantId, userId: actor2.userId, workspaceId });
|
|
21818
|
+
if (closed) return true;
|
|
21819
|
+
const wanted = /* @__PURE__ */ new Map();
|
|
21820
|
+
for (const room of rooms) {
|
|
21821
|
+
const scope = { tenantId: actor2.tenantId, roomId: room.roomId, projectId: room.projectId };
|
|
21822
|
+
wanted.set(roomScopeKey(scope), scope);
|
|
21823
|
+
}
|
|
21824
|
+
for (const [key, entry] of [...subscriptions]) {
|
|
21825
|
+
if (key === userScopeKey || wanted.has(key)) continue;
|
|
21826
|
+
entry.unsubscribe();
|
|
21827
|
+
subscriptions.delete(key);
|
|
21828
|
+
}
|
|
21829
|
+
for (const [key, scope] of wanted) {
|
|
21830
|
+
if (subscriptions.has(key)) continue;
|
|
21831
|
+
const subscription = this.deps.broker.subscribe(scope, void 0, roomListener(scope));
|
|
21832
|
+
subscriptions.set(key, { scope, unsubscribe: subscription.unsubscribe });
|
|
21833
|
+
}
|
|
21834
|
+
if (!subscriptions.has(userScopeKey)) {
|
|
21835
|
+
const subscription = this.deps.broker.subscribe(userScope, void 0, userListener);
|
|
21836
|
+
subscriptions.set(userScopeKey, { scope: userScope, unsubscribe: subscription.unsubscribe });
|
|
21837
|
+
}
|
|
21838
|
+
return true;
|
|
21839
|
+
} catch (error) {
|
|
21840
|
+
this.deps.log.warn("workspace-room-events:resubscribe-failed", {
|
|
21841
|
+
error: error instanceof Error ? error.message : String(error)
|
|
21842
|
+
});
|
|
21843
|
+
return false;
|
|
21844
|
+
}
|
|
21845
|
+
};
|
|
21846
|
+
const enqueueRebuild = () => {
|
|
21847
|
+
rebuildTail = rebuildTail.then(rebuildSubscriptions, rebuildSubscriptions);
|
|
21848
|
+
};
|
|
21849
|
+
const userListener = (event) => {
|
|
21850
|
+
if (phase === "live") writer.enqueueRaw(serializeScoped(null, event));
|
|
21851
|
+
if (event.type === "membership.affected") enqueueRebuild();
|
|
21852
|
+
};
|
|
21853
|
+
const roomListener = (scope) => (event) => {
|
|
21854
|
+
if (phase === "live") writer.enqueueRaw(serializeScoped(scope, event));
|
|
21855
|
+
};
|
|
21856
|
+
const scheduleExpiry = () => {
|
|
21857
|
+
if (closed) return;
|
|
21858
|
+
const delay2 = actor2.tokenExpiresAt - this.now();
|
|
21859
|
+
if (delay2 <= 0) {
|
|
21860
|
+
revoke("TOKEN_EXPIRED");
|
|
21861
|
+
return;
|
|
21862
|
+
}
|
|
21863
|
+
expiryTimer = setTimeout(() => {
|
|
21864
|
+
expiryTimer = void 0;
|
|
21865
|
+
scheduleExpiry();
|
|
21866
|
+
}, Math.min(delay2, this.maxTimerDelay));
|
|
21867
|
+
expiryTimer.unref?.();
|
|
21868
|
+
};
|
|
21869
|
+
const scheduleHeartbeat = () => {
|
|
21870
|
+
if (closed) return;
|
|
21871
|
+
heartbeatTimer = setTimeout(() => {
|
|
21872
|
+
heartbeatTimer = void 0;
|
|
21873
|
+
if (closed) return;
|
|
21874
|
+
writer.heartbeat();
|
|
21875
|
+
scheduleHeartbeat();
|
|
21876
|
+
}, this.heartbeatMs);
|
|
21877
|
+
heartbeatTimer.unref?.();
|
|
21878
|
+
};
|
|
21879
|
+
const scheduleAccessCheck = () => {
|
|
21880
|
+
if (closed) return;
|
|
21881
|
+
accessTimer = setTimeout(() => {
|
|
21882
|
+
accessTimer = void 0;
|
|
21883
|
+
if (closed) return;
|
|
21884
|
+
const projectIds = [...subscriptions.values()].map((entry) => entry.scope.projectId).filter((projectId) => projectId !== import_protocols24.PROJECT_ROOM_USER_CHANNEL_PROJECT);
|
|
21885
|
+
Promise.all(projectIds.map((projectId) => Promise.resolve().then(() => this.deps.requireReadAccess({ tenantId: actor2.tenantId, userId: actor2.userId, projectId })))).then(() => {
|
|
21886
|
+
if (!closed) scheduleAccessCheck();
|
|
21887
|
+
}, () => {
|
|
21888
|
+
if (!closed) revoke("PROJECT_ACCESS_REVOKED");
|
|
21889
|
+
});
|
|
21890
|
+
}, this.authRecheckMs);
|
|
21891
|
+
accessTimer.unref?.();
|
|
21892
|
+
};
|
|
21893
|
+
scheduleHeartbeat();
|
|
21894
|
+
enqueueRebuild();
|
|
21895
|
+
const initialRebuild = rebuildTail;
|
|
21896
|
+
void initialRebuild.then((ok) => {
|
|
21897
|
+
if (closed) return;
|
|
21898
|
+
if (!ok) {
|
|
21899
|
+
cleanup();
|
|
21900
|
+
return;
|
|
21901
|
+
}
|
|
21902
|
+
writer.enqueueControl({ type: "ready", data: { epoch: this.deps.broker.epoch, headEventId: null } });
|
|
21903
|
+
phase = "live";
|
|
21904
|
+
scheduleExpiry();
|
|
21905
|
+
scheduleAccessCheck();
|
|
21431
21906
|
});
|
|
21432
|
-
|
|
21433
|
-
this.service.close();
|
|
21434
|
-
this.broker.close();
|
|
21907
|
+
return record;
|
|
21435
21908
|
}
|
|
21436
21909
|
};
|
|
21437
|
-
|
|
21438
|
-
|
|
21439
|
-
|
|
21440
|
-
|
|
21441
|
-
|
|
21442
|
-
|
|
21443
|
-
|
|
21444
|
-
|
|
21445
|
-
|
|
21446
|
-
|
|
21447
|
-
|
|
21448
|
-
|
|
21449
|
-
|
|
21450
|
-
|
|
21451
|
-
service: service2,
|
|
21452
|
-
subscriber,
|
|
21453
|
-
subscribe: (listener) => import_core50.taskLifecycleNotifier.subscribe(listener),
|
|
21454
|
-
log: deps.log,
|
|
21455
|
-
shutdownTimeoutMs: deps.shutdownTimeoutMs
|
|
21456
|
-
});
|
|
21457
|
-
}
|
|
21458
|
-
async function boundedAllSettled(promises, timeoutMs) {
|
|
21459
|
-
if (promises.length === 0) return true;
|
|
21460
|
-
let timer;
|
|
21461
|
-
const timeout = new Promise((resolve4) => {
|
|
21462
|
-
timer = setTimeout(() => resolve4(false), timeoutMs);
|
|
21463
|
-
timer.unref?.();
|
|
21464
|
-
});
|
|
21465
|
-
const result = await Promise.race([Promise.allSettled(promises).then(() => true), timeout]);
|
|
21466
|
-
if (timer) clearTimeout(timer);
|
|
21467
|
-
return result;
|
|
21910
|
+
|
|
21911
|
+
// src/services/collaboration/WorkspaceMemberRoomLister.ts
|
|
21912
|
+
function createWorkspaceMemberRoomLister(deps) {
|
|
21913
|
+
return async (input) => {
|
|
21914
|
+
const projects = await deps.projects.getProjectsByWorkspace(input.tenantId, input.workspaceId);
|
|
21915
|
+
const memberRooms = [];
|
|
21916
|
+
for (const project of projects) {
|
|
21917
|
+
const membership = await deps.memberships.findByUser(input.tenantId, project.id, input.userId);
|
|
21918
|
+
if (!membership || membership.status !== "active") continue;
|
|
21919
|
+
const room = await deps.rooms.getMainRoom(input.tenantId, project.id);
|
|
21920
|
+
if (room) memberRooms.push({ projectId: project.id, roomId: room.id });
|
|
21921
|
+
}
|
|
21922
|
+
return memberRooms;
|
|
21923
|
+
};
|
|
21468
21924
|
}
|
|
21469
21925
|
|
|
21470
|
-
// src/routes/
|
|
21471
|
-
var
|
|
21472
|
-
function
|
|
21473
|
-
app2.get("/api/
|
|
21926
|
+
// src/routes/workspace-room-events.ts
|
|
21927
|
+
var import_protocols25 = require("@axiom-lattice/protocols");
|
|
21928
|
+
function registerWorkspaceRoomEventRoutes(app2, deps) {
|
|
21929
|
+
app2.get("/api/workspaces/:workspaceId/room-events", async (request, reply) => {
|
|
21474
21930
|
try {
|
|
21475
|
-
const
|
|
21476
|
-
const headers = strictHeaders(request
|
|
21931
|
+
const params = exactParams(request.params);
|
|
21932
|
+
const headers = strictHeaders(request);
|
|
21477
21933
|
if (request.body !== void 0 || Object.keys(request.query).length !== 0) return invalid(reply);
|
|
21478
21934
|
const session = verifyConsoleSessionAuthHeader(headers.authorization, deps.tokenSecret);
|
|
21479
21935
|
if (!session?.tenantId) return unauthorized(reply);
|
|
21480
|
-
await deps.access.requireExistingProjectAccess({ tenantId: session.tenantId, userId: session.id, projectId, capability: "read" });
|
|
21481
|
-
const room = exactRoom(await deps.rooms.getMainRoom(session.tenantId, projectId), session.tenantId, projectId);
|
|
21482
|
-
if (!room) return reply.code(404).send({ success: false, error: { code: "PROJECT_ROOM_NOT_FOUND", message: "Project room not found", retryable: false } });
|
|
21483
|
-
const actor2 = { tenantId: session.tenantId, userId: session.id, projectId, tokenExpiresAt: session.expiresAt };
|
|
21484
|
-
if (!deps.realtime.canConnect(actor2)) return reply.code(429).send({ success: false, error: { code: "PROJECT_ROOM_STREAM_LIMIT", message: "Project room stream limit reached", retryable: true } });
|
|
21485
21936
|
reply.hijack();
|
|
21486
21937
|
reply.raw.writeHead(200, {
|
|
21487
21938
|
"Content-Type": "text/event-stream",
|
|
@@ -21490,53 +21941,35 @@ function registerProjectRoomEventRoutes(app2, deps) {
|
|
|
21490
21941
|
"X-Accel-Buffering": "no",
|
|
21491
21942
|
"Access-Control-Allow-Origin": "*"
|
|
21492
21943
|
});
|
|
21493
|
-
deps.
|
|
21494
|
-
|
|
21495
|
-
|
|
21496
|
-
|
|
21497
|
-
|
|
21498
|
-
app2.get("/api/projects/:projectId/room/realtime-mode", async (request, reply) => {
|
|
21499
|
-
try {
|
|
21500
|
-
const projectId = exactProjectId(request.params);
|
|
21501
|
-
const headers = strictHeaders(request, false);
|
|
21502
|
-
if (request.body !== void 0 || Object.keys(request.query).length !== 0) return invalid(reply);
|
|
21503
|
-
const session = verifyConsoleSessionAuthHeader(headers.authorization, deps.tokenSecret);
|
|
21504
|
-
if (!session?.tenantId) return unauthorized(reply);
|
|
21505
|
-
await deps.access.requireExistingProjectAccess({ tenantId: session.tenantId, userId: session.id, projectId, capability: "read" });
|
|
21506
|
-
return reply.send({ success: true, data: { mode: "single-gateway", supportedGatewayProcesses: 1, durableReplay: false, epoch: deps.broker.epoch } });
|
|
21944
|
+
deps.service.connect({
|
|
21945
|
+
actor: { tenantId: session.tenantId, userId: session.id, tokenExpiresAt: session.expiresAt },
|
|
21946
|
+
workspaceId: params.workspaceId,
|
|
21947
|
+
raw: reply.raw
|
|
21948
|
+
});
|
|
21507
21949
|
} catch (error) {
|
|
21508
21950
|
return routeError(reply, error);
|
|
21509
21951
|
}
|
|
21510
21952
|
});
|
|
21511
21953
|
}
|
|
21512
|
-
function
|
|
21954
|
+
function exactParams(params) {
|
|
21955
|
+
const value = (0, import_protocols25.snapshotExactRecord)(params, ["workspaceId"]);
|
|
21956
|
+
if (!value || typeof value.workspaceId !== "string" || !value.workspaceId.trim()) throw new InvalidRealtimeRequestError();
|
|
21957
|
+
return { workspaceId: value.workspaceId };
|
|
21958
|
+
}
|
|
21959
|
+
function strictHeaders(request) {
|
|
21513
21960
|
const raw = request.raw.rawHeaders;
|
|
21514
21961
|
const values = (name) => raw.flatMap((value, index) => index % 2 === 0 && value.toLowerCase() === name ? [raw[index + 1]] : []);
|
|
21515
21962
|
const authorization = values("authorization");
|
|
21516
21963
|
const accept = values("accept");
|
|
21517
21964
|
const cursor = values("last-event-id");
|
|
21518
|
-
if (authorization.length !== 1 || authorization[0].includes(",") || cursor.length >
|
|
21519
|
-
|
|
21520
|
-
}
|
|
21521
|
-
const lastEventId = cursor[0]?.trim();
|
|
21522
|
-
if (lastEventId !== void 0 && (!lastEventId || !(0, import_protocols23.isProjectRoomEventId)(lastEventId))) throw new InvalidRealtimeRequestError();
|
|
21523
|
-
return { authorization: authorization[0], ...lastEventId ? { lastEventId } : {} };
|
|
21965
|
+
if (authorization.length !== 1 || authorization[0].includes(",") || cursor.length > 0 || accept.length !== 1 || !isSseAccept(accept[0])) throw new InvalidRealtimeRequestError();
|
|
21966
|
+
return { authorization: authorization[0] };
|
|
21524
21967
|
}
|
|
21525
21968
|
function isSseAccept(value) {
|
|
21526
21969
|
if (value.includes(",")) return false;
|
|
21527
21970
|
const [mediaType, ...parameters] = value.split(";");
|
|
21528
21971
|
return mediaType.trim() === "text/event-stream" && parameters.every((parameter) => /^[!#$%&'*+.^_`|~0-9A-Za-z-]+\s*=\s*(?:[!#$%&'*+.^_`|~0-9A-Za-z-]+|"[^"]*")$/.test(parameter.trim()));
|
|
21529
21972
|
}
|
|
21530
|
-
function exactProjectId(params) {
|
|
21531
|
-
const value = (0, import_protocols23.snapshotExactRecord)(params, ["projectId"]);
|
|
21532
|
-
if (!value || typeof value.projectId !== "string" || !value.projectId.trim()) throw new InvalidRealtimeRequestError();
|
|
21533
|
-
return value.projectId;
|
|
21534
|
-
}
|
|
21535
|
-
function exactRoom(value, tenantId, projectId) {
|
|
21536
|
-
if (!value || typeof value !== "object") return void 0;
|
|
21537
|
-
const room = value;
|
|
21538
|
-
return typeof room.id === "string" && room.id && room.tenantId === tenantId && room.projectId === projectId ? { id: room.id } : void 0;
|
|
21539
|
-
}
|
|
21540
21973
|
var InvalidRealtimeRequestError = class extends Error {
|
|
21541
21974
|
};
|
|
21542
21975
|
function invalid(reply) {
|
|
@@ -21547,7 +21980,6 @@ function unauthorized(reply) {
|
|
|
21547
21980
|
}
|
|
21548
21981
|
function routeError(reply, error) {
|
|
21549
21982
|
if (error instanceof InvalidRealtimeRequestError) return invalid(reply);
|
|
21550
|
-
if (error instanceof ProjectCollaborationError) return reply.code(error.statusCode).send({ success: false, error: { code: error.code, message: error.message, retryable: false } });
|
|
21551
21983
|
return reply.code(500).send({ success: false, error: { code: "INTERNAL_ERROR", message: "Internal server error", retryable: false } });
|
|
21552
21984
|
}
|
|
21553
21985
|
|
|
@@ -21648,7 +22080,7 @@ function snapshotDataRecord(value) {
|
|
|
21648
22080
|
for (const key of Reflect.ownKeys(descriptors)) {
|
|
21649
22081
|
if (typeof key !== "string") return void 0;
|
|
21650
22082
|
const descriptor = descriptors[key];
|
|
21651
|
-
const data = (0,
|
|
22083
|
+
const data = (0, import_protocols26.descriptorDataValue)(descriptor);
|
|
21652
22084
|
if (!data) return void 0;
|
|
21653
22085
|
result[key] = data.value;
|
|
21654
22086
|
}
|
|
@@ -21663,7 +22095,7 @@ function isPublicRoomAddress(message) {
|
|
|
21663
22095
|
}
|
|
21664
22096
|
async function validateReassignmentThread(threads, input) {
|
|
21665
22097
|
const thread = snapshotThread(await threads.getThreadById(input.tenantId, input.newThreadId));
|
|
21666
|
-
const metadata = (0,
|
|
22098
|
+
const metadata = (0, import_protocols26.snapshotExactRecord)(thread?.metadata, [
|
|
21667
22099
|
"source",
|
|
21668
22100
|
"kind",
|
|
21669
22101
|
"workspaceId",
|
|
@@ -21686,6 +22118,7 @@ var registerLatticeRoutes = (app2, channelDeps, options = {}) => {
|
|
|
21686
22118
|
const projectRoomStore = (0, import_core51.getStoreLattice)("default", "projectRoom").store;
|
|
21687
22119
|
const projectBotMembershipStore = (0, import_core51.getStoreLattice)("default", "projectBotMembership").store;
|
|
21688
22120
|
const projectRoomMessageStore = (0, import_core51.getStoreLattice)("default", "projectRoomMessage").store;
|
|
22121
|
+
const projectRoomReadStateStore = (0, import_core51.getStoreLattice)("default", "projectRoomReadState").store;
|
|
21689
22122
|
const threadStore = (0, import_core51.getStoreLattice)("default", "thread").store;
|
|
21690
22123
|
const taskStore = (0, import_core51.getStoreLattice)("default", "task").store;
|
|
21691
22124
|
const taskWorkItemStore = (0, import_core51.getStoreLattice)("default", "taskWorkItem").store;
|
|
@@ -21697,23 +22130,30 @@ var registerLatticeRoutes = (app2, channelDeps, options = {}) => {
|
|
|
21697
22130
|
tasks: taskStore,
|
|
21698
22131
|
rooms: projectRoomStore,
|
|
21699
22132
|
memberships: projectBotMembershipStore,
|
|
21700
|
-
log: realtimeLog
|
|
21701
|
-
requireReadAccess: async (actor2) => {
|
|
21702
|
-
await accessService.requireExistingProjectAccess({
|
|
21703
|
-
tenantId: actor2.tenantId,
|
|
21704
|
-
userId: actor2.userId,
|
|
21705
|
-
projectId: actor2.projectId,
|
|
21706
|
-
capability: "read"
|
|
21707
|
-
});
|
|
21708
|
-
}
|
|
22133
|
+
log: realtimeLog
|
|
21709
22134
|
}) : void 0;
|
|
21710
22135
|
if (projectRoomRealtimeRuntime) {
|
|
21711
22136
|
app2.addHook("onClose", async () => projectRoomRealtimeRuntime?.close());
|
|
21712
|
-
|
|
21713
|
-
access: accessService,
|
|
21714
|
-
rooms: projectRoomStore,
|
|
21715
|
-
realtime: projectRoomRealtimeRuntime.service,
|
|
22137
|
+
const workspaceRoomEventsService = new WorkspaceRoomEventsService({
|
|
21716
22138
|
broker: projectRoomRealtimeRuntime.broker,
|
|
22139
|
+
listMemberRooms: createWorkspaceMemberRoomLister({
|
|
22140
|
+
projects: projectStore,
|
|
22141
|
+
memberships: projectMembershipStore,
|
|
22142
|
+
rooms: projectRoomStore
|
|
22143
|
+
}),
|
|
22144
|
+
requireReadAccess: async (input) => {
|
|
22145
|
+
await accessService.requireExistingProjectAccess({
|
|
22146
|
+
tenantId: input.tenantId,
|
|
22147
|
+
userId: input.userId,
|
|
22148
|
+
projectId: input.projectId,
|
|
22149
|
+
capability: "read"
|
|
22150
|
+
});
|
|
22151
|
+
},
|
|
22152
|
+
log: realtimeLog
|
|
22153
|
+
});
|
|
22154
|
+
app2.addHook("onClose", async () => workspaceRoomEventsService.close());
|
|
22155
|
+
registerWorkspaceRoomEventRoutes(app2, {
|
|
22156
|
+
service: workspaceRoomEventsService,
|
|
21717
22157
|
tokenSecret: resolveConsoleTokenSecret(process.env.AUTH_REQUIRED === "true")
|
|
21718
22158
|
});
|
|
21719
22159
|
}
|
|
@@ -21795,7 +22235,24 @@ var registerLatticeRoutes = (app2, channelDeps, options = {}) => {
|
|
|
21795
22235
|
saveBot: projectBotMembershipStore.save.bind(projectBotMembershipStore),
|
|
21796
22236
|
ensureCoordinator: (tenantId) => coordinatorProvisioner.ensure(tenantId)
|
|
21797
22237
|
});
|
|
21798
|
-
|
|
22238
|
+
const readStateService = {
|
|
22239
|
+
mark: async (actorRef) => {
|
|
22240
|
+
await accessService.requireExistingProjectAccess({ ...actorRef, capability: "read" });
|
|
22241
|
+
const room = await projectRoomStore.getMainRoom(actorRef.tenantId, actorRef.projectId);
|
|
22242
|
+
if (!room) return;
|
|
22243
|
+
const lastReadAt = /* @__PURE__ */ new Date();
|
|
22244
|
+
await projectRoomReadStateStore.markRead({ tenantId: actorRef.tenantId, roomId: room.id, userId: actorRef.userId, lastReadAt });
|
|
22245
|
+
projectRoomRealtimeRuntime?.publisher.readChanged({
|
|
22246
|
+
tenantId: actorRef.tenantId,
|
|
22247
|
+
userId: actorRef.userId,
|
|
22248
|
+
projectId: actorRef.projectId,
|
|
22249
|
+
roomId: room.id,
|
|
22250
|
+
lastReadAt: lastReadAt.toISOString(),
|
|
22251
|
+
sourceKey: `read:${actorRef.userId}:${room.id}:${lastReadAt.getTime()}`
|
|
22252
|
+
});
|
|
22253
|
+
}
|
|
22254
|
+
};
|
|
22255
|
+
registerProjectRoomRoutes(app2, { roomService, membershipService, messageService, readStateService });
|
|
21799
22256
|
registerProjectRosterRoutes(app2, { service: rosterService });
|
|
21800
22257
|
registerCoSpaceRoutes(app2, {
|
|
21801
22258
|
projectStore: {
|
|
@@ -21817,7 +22274,11 @@ var registerLatticeRoutes = (app2, channelDeps, options = {}) => {
|
|
|
21817
22274
|
},
|
|
21818
22275
|
messageStore: {
|
|
21819
22276
|
list: projectRoomMessageStore.list.bind(projectRoomMessageStore),
|
|
21820
|
-
create: projectRoomMessageStore.create.bind(projectRoomMessageStore)
|
|
22277
|
+
create: projectRoomMessageStore.create.bind(projectRoomMessageStore),
|
|
22278
|
+
countAfter: projectRoomMessageStore.countAfter.bind(projectRoomMessageStore)
|
|
22279
|
+
},
|
|
22280
|
+
readStateStore: {
|
|
22281
|
+
get: projectRoomReadStateStore.get.bind(projectRoomReadStateStore)
|
|
21821
22282
|
},
|
|
21822
22283
|
userTenantLinkStore: {
|
|
21823
22284
|
getUsersByTenant: userTenantLinkStore.getUsersByTenant.bind(userTenantLinkStore)
|
|
@@ -21950,6 +22411,7 @@ var registerLatticeRoutes = (app2, channelDeps, options = {}) => {
|
|
|
21950
22411
|
}
|
|
21951
22412
|
})
|
|
21952
22413
|
});
|
|
22414
|
+
registerAgentWebAppEmbedRoutes(app2, {});
|
|
21953
22415
|
registerA2ABridgeRoutes(app2);
|
|
21954
22416
|
registerSTTRoutes(app2);
|
|
21955
22417
|
app2.get("/api/local-a2a", getLocalA2AStatus);
|
|
@@ -22274,9 +22736,9 @@ var registerLatticeRoutes = (app2, channelDeps, options = {}) => {
|
|
|
22274
22736
|
function tryCreateProjectTaskRuntime(input) {
|
|
22275
22737
|
let projectWorkItems;
|
|
22276
22738
|
try {
|
|
22277
|
-
projectWorkItems = (0,
|
|
22739
|
+
projectWorkItems = (0, import_protocols26.requireProjectTaskWorkItemStore)(input.taskWorkItemStore);
|
|
22278
22740
|
} catch (error) {
|
|
22279
|
-
if (error instanceof
|
|
22741
|
+
if (error instanceof import_protocols26.ProjectTaskStoreUnsupportedError) {
|
|
22280
22742
|
input.log?.warn("project-task:runtime-unavailable", {
|
|
22281
22743
|
code: error.code,
|
|
22282
22744
|
missingMethods: error.missingMethods
|
|
@@ -24185,7 +24647,7 @@ var import_core65 = require("@axiom-lattice/core");
|
|
|
24185
24647
|
|
|
24186
24648
|
// src/router/MessageRouter.ts
|
|
24187
24649
|
var import_core64 = require("@axiom-lattice/core");
|
|
24188
|
-
var
|
|
24650
|
+
var import_protocols27 = require("@axiom-lattice/protocols");
|
|
24189
24651
|
var import_crypto11 = require("crypto");
|
|
24190
24652
|
var BindingNotFoundError = class extends Error {
|
|
24191
24653
|
constructor(message) {
|
|
@@ -24215,10 +24677,10 @@ var CORRELATED_REPLY_REQUIRED_KEYS = [
|
|
|
24215
24677
|
"state"
|
|
24216
24678
|
];
|
|
24217
24679
|
function exactDataValues(value, required, optional = []) {
|
|
24218
|
-
return (0,
|
|
24680
|
+
return (0, import_protocols27.snapshotExactRecord)(value, required, optional);
|
|
24219
24681
|
}
|
|
24220
24682
|
function uniqueNonemptyStrings(value) {
|
|
24221
|
-
const snapshot = (0,
|
|
24683
|
+
const snapshot = (0, import_protocols27.snapshotExactArray)(value);
|
|
24222
24684
|
if (!snapshot || snapshot.length === 0 || snapshot.some((entry) => typeof entry !== "string" || entry.length === 0)) return void 0;
|
|
24223
24685
|
const values = snapshot;
|
|
24224
24686
|
return new Set(values).size === values.length ? values : void 0;
|
|
@@ -24655,9 +25117,9 @@ var MessageRouter = class {
|
|
|
24655
25117
|
};
|
|
24656
25118
|
|
|
24657
25119
|
// src/channels/room/RoomChannelAdapter.ts
|
|
24658
|
-
var
|
|
24659
|
-
var
|
|
24660
|
-
var roomConfigSchema =
|
|
25120
|
+
var import_zod14 = require("zod");
|
|
25121
|
+
var import_protocols28 = require("@axiom-lattice/protocols");
|
|
25122
|
+
var roomConfigSchema = import_zod14.z.object({}).strict();
|
|
24661
25123
|
function createRoomChannelAdapter(writer) {
|
|
24662
25124
|
return {
|
|
24663
25125
|
channel: "room",
|
|
@@ -24700,7 +25162,7 @@ function exactStrings(value, keys2) {
|
|
|
24700
25162
|
function exactValues2(value, required, optional = []) {
|
|
24701
25163
|
try {
|
|
24702
25164
|
if (typeof value !== "object" || value === null || Array.isArray(value)) return void 0;
|
|
24703
|
-
return (0,
|
|
25165
|
+
return (0, import_protocols28.snapshotExactRecord)(value, required, optional);
|
|
24704
25166
|
} catch {
|
|
24705
25167
|
return void 0;
|
|
24706
25168
|
}
|
|
@@ -24745,14 +25207,14 @@ async function prepareProjectTaskRuntime(runtime, log2) {
|
|
|
24745
25207
|
}
|
|
24746
25208
|
|
|
24747
25209
|
// src/index.ts
|
|
24748
|
-
var
|
|
25210
|
+
var import_protocols30 = require("@axiom-lattice/protocols");
|
|
24749
25211
|
process.on("unhandledRejection", (reason, promise) => {
|
|
24750
25212
|
console.error("\u672A\u5904\u7406\u7684Promise\u62D2\u7EDD:", reason);
|
|
24751
25213
|
});
|
|
24752
25214
|
var DEFAULT_LOGGER_CONFIG = {
|
|
24753
25215
|
name: "default",
|
|
24754
25216
|
description: "Default logger for lattice-gateway service",
|
|
24755
|
-
type:
|
|
25217
|
+
type: import_protocols30.LoggerType.PINO,
|
|
24756
25218
|
serviceName: "lattice/gateway",
|
|
24757
25219
|
loggerName: "lattice/gateway"
|
|
24758
25220
|
};
|
|
@@ -24925,26 +25387,11 @@ var start = async (config) => {
|
|
|
24925
25387
|
const projectRoomRealtimeMode = resolveProjectRoomRealtimeMode();
|
|
24926
25388
|
let projectRoomRealtimeRuntime;
|
|
24927
25389
|
if (projectRoomRealtimeMode === "single-gateway") {
|
|
24928
|
-
const projectStore = (0, import_core70.getStoreLattice)("default", "project").store;
|
|
24929
|
-
const membershipStore = (0, import_core70.getStoreLattice)("default", "projectMembership").store;
|
|
24930
|
-
const access = new ProjectAccessService({
|
|
24931
|
-
projectStore,
|
|
24932
|
-
membershipStore,
|
|
24933
|
-
userTenantLinkStore: (0, import_core70.getStoreLattice)("default", "userTenantLink").store
|
|
24934
|
-
});
|
|
24935
25390
|
projectRoomRealtimeRuntime = createProjectRoomRealtimeRuntime({
|
|
24936
25391
|
tasks: (0, import_core70.getStoreLattice)("default", "task").store,
|
|
24937
25392
|
rooms: (0, import_core70.getStoreLattice)("default", "projectRoom").store,
|
|
24938
25393
|
memberships: (0, import_core70.getStoreLattice)("default", "projectBotMembership").store,
|
|
24939
|
-
log: { warn: (message, context) => logger6.warn(message, context) }
|
|
24940
|
-
requireReadAccess: async (actor2) => {
|
|
24941
|
-
await access.requireExistingProjectAccess({
|
|
24942
|
-
tenantId: actor2.tenantId,
|
|
24943
|
-
userId: actor2.userId,
|
|
24944
|
-
projectId: actor2.projectId,
|
|
24945
|
-
capability: "read"
|
|
24946
|
-
});
|
|
24947
|
-
}
|
|
25394
|
+
log: { warn: (message, context) => logger6.warn(message, context) }
|
|
24948
25395
|
});
|
|
24949
25396
|
}
|
|
24950
25397
|
let channelDeps;
|
|
@@ -25031,6 +25478,15 @@ var start = async (config) => {
|
|
|
25031
25478
|
error: err instanceof Error ? err.message : String(err)
|
|
25032
25479
|
});
|
|
25033
25480
|
}
|
|
25481
|
+
try {
|
|
25482
|
+
const { registerOpenRoutes: registerOpenRoutes2 } = await Promise.resolve().then(() => (init_open(), open_exports));
|
|
25483
|
+
registerOpenRoutes2(app);
|
|
25484
|
+
logger6.info("Open MCP spike routes registered");
|
|
25485
|
+
} catch (err) {
|
|
25486
|
+
logger6.warn("Open MCP spike routes unavailable", {
|
|
25487
|
+
error: err instanceof Error ? err.message : String(err)
|
|
25488
|
+
});
|
|
25489
|
+
}
|
|
25034
25490
|
if (!import_core70.sandboxLatticeManager.hasLattice("default")) {
|
|
25035
25491
|
import_core70.sandboxLatticeManager.registerLattice("default", getConfiguredSandboxProvider());
|
|
25036
25492
|
logger6.info("Registered sandbox manager from env configuration");
|