@myagentroam/node 0.9.38 → 0.9.40
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/runner/mar-agent/generated-images.js +1 -1
- package/dist/runner/mar-agent/hosted-conversation-runtime.js +1 -1
- package/dist/service/bubblewrap-sandbox-executor.js +1 -1
- package/dist/service/hosted-conversation-node-service.js +1 -1
- package/dist/service/workspace-change-service.js +1 -1
- package/dist/service/workspace-file-service.js +1 -1
- package/dist/service/workspace-workbench-service.js +1 -1
- package/dist/workspace.js +1 -1
- package/package.json +3 -3
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* mar-release-protected */
|
|
2
|
-
const _0xf958e3=_0x5cc2;function _0x2d73(){const _0x55a825=['uLvox1rfuK1jtKfm','C3rHDhvZ','C291CMnLv29YA3nWywnLugf0Aa','C2vZC2LVBKHHC2G','se9tvevex0nptLzfuLnbveLptL9tvefurv9jtLzbteLe','se9tvevex0nptLzfuLnbveLptL9gsuXfx1jbtKDfx0LovKfmsuq','rKLmrq','l2jPBG','BMv4DfDVCMTIzw5JAev2zw50','l3rTCa','DgvTCg9Yyxj5ugf0Aa','ywnJzxb0zwrxyxrJAa','vvnfuG','AgvHzgvYCW','Aw1Hz2vjBMrLEa','DgL0BgvtB3vYy2u','DgLTzxi','BgLUA1rHCMDLDa','CMvJB25JAwXLrMLSzxm','ywXSB3DLze1VzgvSCW','zMLSzuLK','Dg9tDhjPBMC','vgHLieHVC3qGzw5MB3jJzxmGDgHPCYbMAwXLigjVDw5Kyxj5lcbHBMqGBg9JywWGChjVy2vZC2vZihj1BIbPBNnPzguGyw4GB3bLCMf0Aw5Nlxn5C3rLBsbZyw5KyM94lG','zMLSzxm','C2f2zu1LC3nHz2vby2nLChrHBMnL','zw4Tvvm','yMvNAw5dB252zxjZyxrPB25dBgvHBNvW','ChvIBgLZAeHVC3rLzev2zw50','se9tvevex0nptLzfuLnbveLptL9tve9squDfx0LovKfmsuq','u1vdq0vfreve','C2f2zuf1Dg9TyxrPy1rPDgXL','q09orKXjq1q','B3v0Chv0','D2f0y2Hjza','DxbSB2fKswq','C2nOzw1HvMvYC2LVBG','CMvXDwLYzuf0DgfJAg1LBNq','DhjPBq','DxbSB2fKuhjLzMXPz2H0u3rHDhvZ','CMvUzxC','C2XPy2u','zgLZywjSzvbYzxbHCMvK','BwLU','tMv0D29YAYbHy2nLC3mGAxmGzgLZywjSzwqUieXVy2fSihbYB2nLC3nLCYWGv2vIifnLyxjJAcWGv2vIiezLDgnOlcbTB2rLBc1OB3n0zwqGD2vIlcbHBMqGCMvTB3rLieHuvfaGtunqignHBM5VDcb1C2uGDgHLig5LDhDVCMSU','l3nIAw4','ChjLDMLVDxnwzxjZAw9Uswq','DxnLzej5DgvZ','CNvUswq','CgvYBwfUzw50rgvSzxrLq29UDMvYC2f0Aw9U','CMvSzwfZzvnLC3nPB24','Bw9KzwXqB2XPy3K','B3jPz2LU','DgvZDa','C2vYDMvYtMfTzq','CMvTB3zLv2f0y2HmzwfZzq','Bg9JywWTDgvZDc1Nzw5LCMf0Aw9U','Dw5Yzwy','DxnLCKLK','y29TCgXLDgvvCgXVywq','CgvUzgLUz0nYzwf0zxm','y2fUy2vSq29UDMvYC2f0Aw9UvxbSB2fKCW','C3rHCNrZv2L0Aa','l3DVCMTZCgfJzq','vu5srvnuuKLdveve','zgvSzxrLrMLSzq','se9tvevex0nptLzfuLnbveLptL9vueXpqurFsu5dt01qtevurq','yM9VBgvHBG','y3jLyxrLtwvZC2fNzq','DgL0Bgu','AxntywzLsw50zwDLCG','zMLSzv9JB3vUDa','BM9KzuDLBMvYyxrPB24','Aw50zxjYDxb0','q09orKLhvvjbveLptL9jra','Aw5JBhvKzxm','se9tvevex0nptLzfuLnbveLptL9vueXpqurFtK9ux0zpvu5e','DxbKyxrLzef0','qxr0ywnOBwvUDhm6cG','BwfUAwzLC3rFAgfZAa','CMvZCg9UC2vZvhjHBNnWB3j0','ChvZAa','C2vZC2LVBLDHDgnOu2XVDhm','C25HChnOB3q','Aw5WDxrdyxbHyMLSAxrPzxm','DgfYz2v0s2LUza','C3bSAxq','C3rVCMu','yxjNDw1LBNrZ','y29UDMvYC2f0Aw9U','ru5pru5u','DgvTCgXHDgvezwXLDgvK','D2f0y2HmzwfZzxm','se9tvevex0nptLzfuLnbveLptL9nt0rftf9ot1rFqvzbsuXbqKXf','DMvYC2LVBG','AxneAxjLy3rVCNK','CMvWBgfJzq','igfUzca','B3v0Chv0rgLYzwn0B3j5','su5urvjsvvburuq','y29Kzq','BMXPBMS','B3DUCW','DMvYC2LVBKLK','DgvTCgXHDgu','CMvZB2X2zq','se9tvevex0nptLzfuLnbveLptL9vueDsqurfx0zbsuXfra','ywn0AxzLuNvUCW','zxHLy3v0ywjSzq','CMvXDwLYzunVBNzLCNnHDgLVBG','l3vZCG','BgLZDenVBNzLCNnHDgLVBNm','BwnWx2nVBMzPz19OyxnO','DgvTCgXHDgvwzxjZAw9UrgLYzwn0B3j5','y29UDgvUDeHHC2G','uLvotKLorW','zMLSzvbYB2PLy3rPB25jza','AxnbCNjHEq','BgLZDa','CMvXDwLYzvvWBg9Hza','yNL0zxnszwfK','CMvHC29UAw5NrwzMB3j0CW','ChvIBgLZAfj1BNrPBwvfDMvUDa','q09ovKvsu0fusu9ox1rftvbmqvrfx1zfuLnjt05Fq09suLvqveve','DgfYz2v0vMvYC2LVBKLK','DxbKyxrLtwv0ywrHDge','ywn0AxzLvMvYC2LVBKLK','vvbmt0fe','B3b0Aw9UCW','B3bLCMf0Aw9UCW','BgfZDefJDgL2Axr5qxq','CMvNAxn0zxjgAwXL','y2XVC2u','uKvuquLoruq','ChjLCgfYzq','DgvTCgXHDgvjza','zw50CMLLCW','AxrLBxm','C2XVDfrVA2vU','Bg9HzfrLBxbSyxrLvMvYC2LVBG','D2f0y2GUzMfPBgvK','zw5KC1DPDgG','DxrMoa','CNvU','AgLZDg9YEq','ChjVy2vZC0v4zwn1Dg9YrMfJDg9YEq','B2zMC2v0','y29UzMLNDxjHDgLVBG','mtG4mtC1m0Hkuhftua','igfZigeGy29TCgf0AwjPBgL0EsbHBgLHCZSGAxqGAxmGDgHLihnHBwuGAw1TDxrHyMXLihnUyxbZAg90lcbUB3qGDgHLigXPDMuGC291CMnLifDVCMTZCgfJzs4G','C29YDa','ChvIBgLZAfDVCMTIzw5JAev2zw50','ywn0AxzPDgLLCW','C3vJy2vZCW','CgfYC2u','y2f0y2G','DgfYz2v0ugf0Aa','C2fMzvbHCNnL','ywn0AxzPDhK','mtKWndm1AgHeyLDp','AwrLBNrPDhK','CMvQzwn0','zw1PDfDHDgnOrxzLBNq','Ag9ZDgvKv2vIu2vHCMnO','BM93','y29UDMvYC2f0Aw9Uu3rVCMfNzuTLEq','rvHfq1vusu9o','ChjVy2vZC0v4zwn1Dg9Y','Ag9ZDgvKlwnVBNzLCNnHDgLVBG','CMvZB2X2zwruyxjNzxq','y29TCgXLDgvKqxq','Ag9ZDfbVBgLJEvzLCNnPB24','l3DVCMTZCgfJzs9VDxrWDxq','q09nueXfveve','q1vtve9n','zMLUze1LC3nHz2u','yxbWBhLbDxrVBwf0AwnuAxrSzq','A2v5CW','l2rLDG','y2XPzw50uMvXDwvZDeLK','BwLTzvr5Cgu','Bgf0zxn0qxzHAwXHyMXLvgvTCgXHDgvwzxjZAw9Uswq','Aw5PDgLHBgL6zvDHDgnOtgvHC2u','Bwf4qNL0zxm','zMLUzenVBNzLCNnHDgLVBKj5q2XPzw50uMvXDwvZDa','yxjNCW','uLvox0LnquDfx05pvf9gt1vora','z2v0','AgfZtM9Urw1WDhLvC2vYtwvZC2fNzq','y29UDMvYC2f0Aw9Uswq','DgL0BgvdAgfUz2vK','tK9orq','DxjS','q0foq0vmteve','zgLYzwn0B3jPzxm','ChjLCgfYzunVBNzLCNnHDgLVBKvUDMLYB25Tzw50','y2f0zwDVCNK','Cgf0AhngB3jdB252zxjZyxrPB24','y2fUy2vSvxbSB2fK','q0foq0vmteLorW','zMLSzvbHDgG','BwfW','A2LUza','C3rHCNrLzef0','u0vtu0LptL9xqvrdsf9ot1rFrK9vtKq','Ag9ZDf9WB2XPy3LFDMvYC2LVBG','Cgf0AhngB3jnyw5PzMvZDa','uKvbrfK','se9tvevex0nptLzfuLnbveLptL9vueXpqurFt0zgu0vux0LovKfmsuq','l3DVCMTZCgfJzs9PBMjVEa','yMfZzty0','sfruua','qunusvzf','D3jPDgvvCgXVywrdAhvUAW','Bw9Kzq','DxnLCLn0B3jHz2vlzxK','CMv0ywLUq29UDMvYC2f0Aw9UvgvTCgXHDgu','D2f0y2G','CMvKDwnL','ChjVBxb0','C2vJCMv0tMfTzq','yxjYyxK','C3LUyW','se9tvevex0nptLzfuLnbveLptL9xqvrdsf9gquLmruq','mZGWnJi2nwPeBvLZtW','zgvSzxrL','vvbtvfjfqu1Ftu9eruXFsuq','y3jLyxrL','zgLZCg9Zzq','BgLZDezPBgvZ','CMvSzwfZzq','CNvUDgLTzq','surmrq','AxndB252zxjZyxrPB25jBLvZzq','se9tvevex0nptLzfuLnbveLptL9ot1rFqvvuse9ssvPfra','y29UDgvUDf9OyxnO','y2XLyw51CeXVy2TZ','C3vTBwfYEq','DxbSB2fKC0rPCMvJDg9YEq','yxnZzxj0q2fUq3jLyxrL','otHkv3DlBu8','yMfZzvvYBa','l2XPyJy0','l3j1BNrPBwu','BwfUAwzLC3qUANnVBG','igfYzsbHBgLHC2vZig9MihrOzsbZyw1LihDYAxrHyMXLig92zxjSyxLZlG','zxHWzwn0zwrjBNrLCNj1ChrPB25Z','zgf0yujHC2u2na','yxzHAwXHyMXL','D29YA2jLBMnOu2vXDwvUy2u','zMLUza','zw1PDfDHDgnOtgvHC2vfDMvUDa','CMvHza','zMLUAxnOtwvZC2fNzq','C3rVCMfNzv9RzxK','DxbKyxrLq29UzMLNDxjHDgLVBG','C3vIyxjYyxK','CgLUBMvKqxq','CNvUoG','CMvSyxrPDMvqyxrO','ywXSu2v0DgXLza','y3jLyxrLvxbSB2fK','D2fPDezVCLbLBMrPBMDnzxnZywDLu3rHCNrZ','zhjHzNq','CxvVDgfZ','ywr2yw5JzuXHC3rby3rPDML0Eq','u05bufnit1q','CMvXDwLYzvDYAxrHyMXLq29UDMvYC2f0Aw9U','CMvZCg9UC2vZuhjLDMLVDxnszxnWB25ZzuLK','yNL0zuXLBMD0Aa','mtyYndm5mMrSu25MtW','se9tvevex0nptLzfuLnbveLptG','se9tvevex0nptLzfuLnbveLptL9rvu9uqv9fwenfrurfra','ChvIBgLZAfrLCM1PBMfStM90AwzPy2f0Aw9U','CNvUlq','ChjLzMXPz2H0vxbSB2fK','AgfZ','vgHPCYbPCYbHie5VzguTAg9ZDgvKignVBNzLCNnHDgLVBI4GvhjLyxqGl3DVCMTZCgfJzsbHCYb0AguGy29TCgXLDguGzMLSzsbIB3vUzgfYEs4','C3rHCNrsDw4','y29TCgXLDgLVBG','vgHLignVBNzLCNnHDgLVBIb0zw1WBgf0zsb1CgDYywrLigzHAwXLzc4','Cgf0Ae1VDw50CW','se9tvevex0nptLzfuLnbveLptL9bvfrbq0Hnru5ux0LovKfmsuq','BgLTAxq','tK9erq','ChjVDg9JB2W','DxbKyxrLq29UDMvYC2f0Aw9U','u1resu8','BMfTzq','l2XPyG','zgf0yq','l3bYB2m','se9tvevex0nptLzfuLnbveLptL9gsuXfx1jfq09oq0Lmrv9gquLmruq','BwnWu2vYDMvYCW','y2XPzw50twvZC2fNzuLK','lNvWBg9Hza','AxntEw1IB2XPy0XPBMS','DgHLBG','D2f0y2GUAg9ZDgvKlwnVBNzLCNnHDgLVBI5LDMvUDa','C2vZC2LVBKLK','rKfjteve','C291CMnLugf0Aa','BwfUAwzLC3q','ognbD1L1Ca','se9tvevex0nptLzfuLnbveLptL9vueXpqurFu1rbvevFsu5wquXjra','sg9ZDgvKignVBNzLCNnHDgLVBIbMAwXLihbYB2PLy3rPB24GzMfPBgvKlG','ywXSB3DLzeLKCW','CMvJzwL2zwrcExrLCW','D2f0y2HmzwfZzvrPBwvY','C3rYAw5NAwz5','se9tvevex0nptLzfuLnbveLptL9uru1qtefurv9vtKfwquLmqujmrq','y3jLyxrLu2vZC2LVBG','q09ovKvsu0fusu9ox0Hpu1rjtKDFvu5bvKfjtefcteu','ywXSB2m','zw5HyMXLza','BM9KzuLK','C3rYAw5N','vgHLihb1yMXPC2HLzcb3B3jRC3bHy2uGCM9VDcbPCYbYzwfKlw9UBhKUie9UBhKGl3DVCMTZCgfJzs9PBMjVEcbHBMqGl3DVCMTZCgfJzs9VDxrWDxqGyxjLihDYAxrHyMXLlG','zMLSzq','Aw5IB3G','DxbSB2fKC0j5uMvXDwvZDa','zxHWAxjLC0f0','uvvpvefFrvHdruveruq','zgLZCgXHEu5HBwu','u1LnteLosW','ChvIBgLZAfvWz3jHzgvgywLSDxjL','y3vYCMvUDfzLCNnPB25jza','DxbNCMfKzq','sg9ZDgvKignVBNzLCNnHDgLVBIb3yxrJAcbZBMfWC2HVDcbMywLSzwqU','Bwf4t3v0Chv0vg9Rzw5Z','zw1PDfDVCMTIzw5JAev2zw50','revmrvrfra','u1rbuLrjtKC','se9tvevex0nptLzfuLnbveLptL9gsuXfx0nptKzmsunu','DgvTCgXHDgveAxjLy3rVCNK','uMvHzcb1C2vYihvWBg9HzhmGzNjVBsaVD29YA3nWywnLl2LUyM94igfUzcbWBgfJzsb1C2vYlxzPC2LIBguGzgvSAxzLCMfIBgvZigLUic93B3jRC3bHy2uVB3v0Chv0lG','nty5mtq0rhzmzwT2','y29UDgv4DfDPBMrVD1rVA2vUCW','zMXHDe1HCa','B3DUzxjlzxK','BgvUz3rO','BMv0D29YA01Vzgu','CMvHzezPBgu','zgvMyxvSDeLK','zw52AxjVBM1LBNq','mtq0mdGXmfnpsLPSAa','y3jLyxrLzef0','CxvVDge','Bg9JywXLq29TCgfYzq','D2f0y2GUAg9ZDgvKlwnVBNzLCNnHDgLVBI5ZBMfWC2HVDa','C2v0','CgvUzgLUz0v2zw50CW','vgHLihb1yMXPC2HLzcb3B3jRC3bHy2uGAxmGywXZBYbTB3vUDgvKihjLywqTB25SEsbHDca','tg9JywWGChjVy2vZC2vZlcboB2rLlwXVy2fSifDLyIbgzxrJAcWGyxzHAwXHyMXLifDLyIbtzwfYy2GSig1VzgvSlwHVC3rLzcb3zwiSigfUzcbWDwjSAxnOzwqGCMvTB3rLieHuvfaGtunqig1HEsbHy2nLC3mGBMv0D29YA3mGCMvHy2HHyMXLigzYB20GDgHPCYboB2rLlG','BwvZC2fNzq','Agv4','Dg90ywXFyNL0zxm','CMvHzeLTywDL','DgvTCg9Yyxj5uM9VDerPCMvJDg9YEq','Cgf0Ahm','D3jPDgu','B3v0Chv0q2fWywjPBgL0AwvZ','ve9px0XbuKDf','ywXSB3DLze1VzgvSswrZ','zMLUAxnOuNvU','mJGYmZGXmNHeEgf4yG','C25HChnOB3rtzxf1zw5Jzq','C2L6zq','C29Tzq','vvbmt0fesu5h','v09ss1nqqunf','CMvTB3zLq29UDMvYC2f0Aw9Uv2f0y2HmzwfZzxm','zgvZy3jPChrPB24','CMvXDwLYzuzPBgu','CMvSzwfZzunVBNzLCNnHDgLVBKzVCKnSzwfUDxa','Bw9KzwXjza','zMLSDgvY','Bwf4','qvvutW','D29YA2jLBMnOq29UBMvJDgLVBKLK','y3vYC29Y','l2DLBMvYyxrLzc1PBwfNzxm','Bwf4u3rVCMfNzuj5DgvZ','yxr0ywnOBwvUDeLKCW','y29UDMvYC2f0Aw9UrgLYzwn0B3j5','B2jQzwn0','l3j1BG','CMf3','AM9PBG','y2fUy2vS','Bwf4vxbSB2fKqNL0zxm','lsaVD29YA3nWywnLl2LUyM94lW','zNvSBc1Hy2nLC3m','q09ovKvsu0fusu9ox1rftvbmqvrfx01duf9jtLzbteLe','se9tvevex0nptLzfuLnbveLptL9vueXpqurFu0LArv9jtLzbteLe','DxbKyxrL','AxngAwXL','BNvTyMvY','ywrK','zgLNzxn0','y29UzMLNDxjHDgLVBIXKAxnWBgf5tMfTzsXPzcXVCMLNAw4SCNvUDgLTzsXZzxj2zxjoyw1LlhrYyw5ZCg9YDcX2zxjZAw9U','l2HVBwuVBwfY','Bw9KzwXZ','y3jLyxrLq29UDMvYC2f0Aw9U','C2HHmJu2','C3rHCNrnzxnZywDL','CNvUDgLTzvnJB3bLswq','CgLUBMvK','BM90AwzPy2f0Aw9U','zMLUywXSEq','zMLSzurLBgv0zxm','DgvTCgXHDgvoyw1L','BwnWq29UzMLNsgfZAa','DxbSB2fKCW','DMfSDwvZ','CNvUu2v0DgXLBwvUDhm','ChjLCgfYzuzVCKrPC2fIBgu','u0vmrunuigLKlhrLBxbSyxrLx2LKlhn0yxr1CYXZDg9YywDLx2TLEsXTyw5PzMvZDcXJB250zw50x2HHC2GSBwfUAwzLC3rFAgfZAcXTy3bFy29UzMLNx2HHC2GScIaGicaGicaGicaGicaGicbMAwXLx2nVDw50lhrVDgfSx2j5DgvZlgHVC3rFCg9SAwn5x3zLCNnPB24kicaGicaGicaGrLjptsbJB252zxjZyxrPB25FDgvTCgXHDgvFDMvYC2LVBNmGv0HfuKuGAwq9pYbbtKqGDgvTCgXHDgvFAwq9pW','uLvoveLnrq','u0vmrunuigLKiezst00Gy29UDMvYC2f0Aw9Ux3rLBxbSyxrLx3zLCNnPB25ZcIaGicaGicaGifDirvjfihrLBxbSyxrLx2LKpt8Gqu5eihn0yxr1CZ0NqvzbsuXbqKXfjWOGicaGicaGicbpuKrfuIbcwsb2zxjZAw9Ux251BwjLCIbervndlhb1yMXPC2HLzf9HDcbervndlgLKierfu0mkicaGicaGicaGteLnsvqGmq','se9tvevex0nptLzfuLnbveLptL9svu5Fqunusvzf','qvzbsuXbqKXf','reLsrunut1jzaa','DhjHBNnWB3j0','zNjVBq','CgvUzgLUz01LC3nHz2vZ','Ag9TzurPCMvJDg9YEq','y29UDgvUDa','DxbSB2fKu3rHDhvZ','y29TBwfUza','Dw53yxrJAa','se9tvevex0nptLzfuLnbveLptL9gsuXfx0LovKfmsuq','zgf0ywjHC2u','C2vJCMv0rw52AxjVBM1LBNq','ywXS','CMvHzhK','ChvIBgLZAefJDgL2Axr5'];_0x2d73=function(){return _0x55a825;};return _0x2d73();}(function(_0x283329,_0xafe571){const _0x70f60c=_0x5cc2,_0x253778=_0x283329();while(!![]){try{const _0x5419e0=-parseInt(_0x70f60c(0x293))/(0x123*0x21+-0x1*-0x18f7+-0x3e79)*(-parseInt(_0x70f60c(0x16f))/(-0x1afa+0x1bb*-0xa+0x1*0x2c4a))+-parseInt(_0x70f60c(0x288))/(0x48*0x7+-0x1a65+0x61c*0x4)+parseInt(_0x70f60c(0x1ad))/(-0x2481+0x270d*-0x1+0x2*0x25c9)+parseInt(_0x70f60c(0x120))/(-0xa9*0xc+0x1075+-0x884)+parseInt(_0x70f60c(0x199))/(-0x1*-0x8ad+-0x402+0x29*-0x1d)+parseInt(_0x70f60c(0x130))/(0x3*-0x8e4+-0xab5*-0x3+-0x56c)*(-parseInt(_0x70f60c(0x190))/(-0x2512+-0x1d32+0x424c))+-parseInt(_0x70f60c(0x14e))/(0x1*0x1837+-0xf02+0x2*-0x496);if(_0x5419e0===_0xafe571)break;else _0x253778['push'](_0x253778['shift']());}catch(_0x265a07){_0x253778['push'](_0x253778['shift']());}}}(_0x2d73,-0xe7848+-0x1060d8+0x25e*0x1152));import{createHash,randomUUID}from'node:crypto';import{lstat,mkdir,open,readFile,readlink,readdir,realpath,rename,rm,utimes}from'node:fs/promises';import{isAbsolute,join,relative,resolve,sep}from'node:path';import{conversationTemplateDraftSchema,conversationTemplateSummarySchema,hostedConversationConfigUpdateInputSchema,hostedConversationCreateInputSchema,hostedConversationDeleteResultSchema,hostedConversationFileDeleteInputSchema,hostedConversationFileDeleteResultSchema,hostedConversationFileReadInputSchema,hostedConversationFileReadResultSchema,hostedConversationFilesSchema,hostedConversationIdInputSchema,hostedConversationImageReadInputSchema,hostedConversationListInputSchema,hostedConversationListPageSchema,hostedConversationMessageInputSchema,hostedConversationMetadataUpdateInputSchema,hostedConversationSnapshotSchema,hostedConversationSummarySchema,hostedConversationUnwatchInputSchema,hostedConversationUploadChunkInputSchema,hostedConversationUploadControlInputSchema,hostedConversationUploadCreateInputSchema,hostedConversationUploadPreflightInputSchema,hostedConversationUploadPreflightResultSchema,hostedConversationUploadSchema,hostedConversationWatchInputSchema,marAgentRuntimeModelConfigurationSchema,mcpInstallationConfigurationSchema,mcpRuntimeDescriptorSchema}from'@myagentroam/protocol';import{hostedConversationImageRunId,marAgentGeneratedImagesDirectory}from'../runner/mar-agent/generated-images.js';import{sessionTitleFromFirstMessage}from'../util/node-operation-parsers.js';import{safeErrorCode}from'../util/safe-error.js';import{SessionWatchSlotCoordinator}from'./session-watch-slot-coordinator.js';const HOST_POLICY_VERSION=-0x5*-0x176+0x14b7+-0x1c04,MAX_FILE_READ_BYTES=(-0x2279*-0x1+-0x1*-0x1779+-0x37f2)*(0xfcb*0x1+-0x17d5+0xc0a),WATCH_TTL_MS=-0x296*0x33+-0x9d*0x12a+0x1ea6c,RUNTIME_LINK_ROOTS=[_0xf958e3(0x262),_0xf958e3(0x1fc),_0xf958e3(0x221),_0xf958e3(0x161),_0xf958e3(0x132)],RESERVED_SANDBOX_ROOTS=[_0xf958e3(0x233),_0xf958e3(0x1d1),_0xf958e3(0x133),_0xf958e3(0x262),_0xf958e3(0x1fc),_0xf958e3(0x221),_0xf958e3(0x161),_0xf958e3(0x132),_0xf958e3(0x163),_0xf958e3(0x2a6),_0xf958e3(0x1c2),_0xf958e3(0x1fe)];export class HostedConversationNodeService{[_0xf958e3(0x274)];[_0xf958e3(0x298)];['id'];[_0xf958e3(0x230)]=new Map();[_0xf958e3(0x1e9)]=new Map();[_0xf958e3(0x25f)]=new Map();[_0xf958e3(0x1df)]=new Map();[_0xf958e3(0x28c)]=new Map();[_0xf958e3(0x136)]=new Set();[_0xf958e3(0x1dd)]=new Map();[_0xf958e3(0x180)]=new Map();[_0xf958e3(0x1da)]=new Set();[_0xf958e3(0x250)]=new Map();[_0xf958e3(0x12c)]=new Set();[_0xf958e3(0x246)];[_0xf958e3(0x21e)]=![];[_0xf958e3(0x1ae)]=-0x1099+-0x2187+0x3220;[_0xf958e3(0x139)]=0x5*0x3be+-0x1181+-0x135;constructor(_0x5d789d){const _0x1898a8=_0xf958e3;this[_0x1898a8(0x274)]=_0x5d789d,this[_0x1898a8(0x298)]=_0x5d789d[_0x1898a8(0x298)]??Date[_0x1898a8(0x298)],this['id']=_0x5d789d['id']??randomUUID,this[_0x1898a8(0x246)]=_0x5d789d[_0x1898a8(0x246)]??new SessionWatchSlotCoordinator();}[_0xf958e3(0x275)](){const _0x1c59b2=_0xf958e3;return{'conversation.hosted.list':_0x14b1cb=>this[_0x1c59b2(0x26a)](_0x14b1cb),'conversation.hosted.create':_0x10ed99=>this[_0x1c59b2(0x123)](_0x10ed99),'conversation.hosted.get':_0x4e751e=>this[_0x1c59b2(0xfb)](_0x4e751e),'conversation.hosted.watch':_0x2d0c3c=>this[_0x1c59b2(0x119)](_0x2d0c3c),'conversation.hosted.unwatch':_0x1bcaa2=>this[_0x1c59b2(0x1ee)](_0x1bcaa2),'conversation.hosted.message':_0x472182=>this[_0x1c59b2(0x1a2)](_0x472182),'conversation.hosted.interrupt':_0x233460=>this[_0x1c59b2(0x23d)](_0x233460),'conversation.hosted.config.update':_0x51128c=>this[_0x1c59b2(0x13f)](_0x51128c),'conversation.hosted.metadata.update':_0x7de478=>this[_0x1c59b2(0x271)](_0x7de478),'conversation.hosted.image.read':_0x5333e5=>this[_0x1c59b2(0x1a5)](_0x5333e5),'conversation.hosted.files.list':_0x58dc41=>this[_0x1c59b2(0x125)](_0x58dc41),'conversation.hosted.file.read':_0x4d6672=>this[_0x1c59b2(0x196)](_0x4d6672),'conversation.hosted.file.delete':_0x309845=>this[_0x1c59b2(0x235)](_0x309845),'conversation.hosted.files.upload.preflight':_0x34b2d5=>this[_0x1c59b2(0x153)](_0x34b2d5),'conversation.hosted.files.upload.create':_0x2581d6=>this[_0x1c59b2(0x145)](_0x2581d6),'conversation.hosted.files.upload.chunk':_0x456b48=>this[_0x1c59b2(0x115)](_0x456b48),'conversation.hosted.files.upload.status':_0xf039d0=>this[_0x1c59b2(0x1ec)](_0xf039d0),'conversation.hosted.files.upload.complete':_0x68a86c=>this[_0x1c59b2(0x22f)](_0x68a86c),'conversation.hosted.files.upload.cancel':_0x590a82=>this[_0x1c59b2(0x106)](_0x590a82),'conversation.hosted.delete':_0x229cf6=>this[_0x1c59b2(0x121)](_0x229cf6)};}[_0xf958e3(0x1e0)](){const _0x15463b=_0xf958e3;if(this[_0x15463b(0x21e)]||this[_0x15463b(0x1e9)][_0x15463b(0x1af)]>0x6b3*-0x4+-0x6*0x638+0x401c||this[_0x15463b(0x25f)][_0x15463b(0x1af)]>-0x1*-0x189b+-0x17*-0x5+-0x190e||this[_0x15463b(0x1df)][_0x15463b(0x1af)]>-0x65f*-0x2+0x19f4+-0x26b2*0x1)return undefined;return this[_0x15463b(0x21e)]=!![],()=>{const _0x33c26b=_0x15463b;this[_0x33c26b(0x21e)]=![];};}[_0xf958e3(0x26a)](_0x67290f){const _0x574446=_0xf958e3,_0xea6b15=hostedRequest(_0x67290f),_0x149c09=hostedConversationListInputSchema[_0x574446(0x28e)](_0xea6b15[_0x574446(0x162)]),_0x493341=this[_0x574446(0x274)][_0x574446(0x24b)][_0x574446(0x263)]({'userId':_0xea6b15[_0x574446(0x22e)],'limit':_0x149c09[_0x574446(0x15b)],..._0x149c09[_0x574446(0x1bc)]===undefined?{}:{'cursor':_0x149c09[_0x574446(0x1bc)]}});return hostedConversationListPageSchema[_0x574446(0x28e)]({..._0x493341,'items':_0x493341[_0x574446(0x27d)][_0x574446(0x109)](_0x41f025=>({..._0x41f025,'activity':this[_0x574446(0x292)](_0x41f025['id'])}))});}[_0xf958e3(0x123)](_0x19c1e9){const _0x48e784=_0xf958e3;if(this[_0x48e784(0x21e)])return Promise[_0x48e784(0x295)](new Error(_0x48e784(0x178)));const _0x32b062=hostedRequest(_0x19c1e9),_0x310a3d=hostedConversationCreateInputSchema[_0x48e784(0x28e)](_0x32b062[_0x48e784(0x162)]),_0x522f56=conversationTemplateSummarySchema[_0x48e784(0x28e)](_0x32b062[_0x48e784(0x25c)]),_0x39aa92=runtimeModels(_0x32b062[_0x48e784(0x1d2)]);if(_0x522f56['id']!==_0x310a3d[_0x48e784(0x27b)]||_0x522f56[_0x48e784(0x17b)]!==this[_0x48e784(0x274)][_0x48e784(0x17b)]()||!_0x522f56[_0x48e784(0x138)]||_0x522f56[_0x48e784(0x1f6)]!==_0x48e784(0x114)||_0x522f56[_0x48e784(0x186)]===null)throw new Error(_0x48e784(0x176));const _0x2e8623=_0x32b062[_0x48e784(0x22e)]+'\x00'+_0x310a3d[_0x48e784(0xf3)],_0x4b4535=this[_0x48e784(0x230)][_0x48e784(0xfb)](_0x2e8623);if(_0x4b4535!==undefined)return _0x4b4535;const _0x139e0d=this[_0x48e784(0x274)][_0x48e784(0x24b)][_0x48e784(0xf8)](_0x32b062[_0x48e784(0x22e)],_0x310a3d[_0x48e784(0xf3)]);if(_0x139e0d!==undefined)return this[_0x48e784(0x247)](_0x32b062[_0x48e784(0x22e)],_0x139e0d['id'],_0x39aa92);const _0x3a75a4=this[_0x48e784(0x1d3)](_0x32b062[_0x48e784(0x22e)],_0x310a3d[_0x48e784(0xf3)],_0x522f56,_0x39aa92,_0x32b062[_0x48e784(0x1d6)]);return this[_0x48e784(0x230)][_0x48e784(0x19e)](_0x2e8623,_0x3a75a4),void _0x3a75a4[_0x48e784(0x1d9)](()=>this[_0x48e784(0x230)][_0x48e784(0x121)](_0x2e8623))[_0x48e784(0x28f)](()=>undefined),_0x3a75a4;}async[_0xf958e3(0x1d3)](_0x368dc8,_0x1eac6e,_0x502913,_0x3a63e4,_0x5afd3c){const _0x3dca02=_0xf958e3;await this[_0x3dca02(0x274)][_0x3dca02(0x12f)]?.();const _0x2ea597=await this[_0x3dca02(0x27f)](_0x502913[_0x3dca02(0x186)],_0x502913['id'],!![]),_0x1d70fe=selectModel(_0x2ea597,_0x3a63e4,_0x2ea597[_0x3dca02(0x227)][_0x3dca02(0x197)]),_0x48581d=this['id'](),_0x144763=await this[_0x3dca02(0x274)][_0x3dca02(0x24b)][_0x3dca02(0x103)](_0x368dc8,_0x48581d),_0x1ecbc0=this[_0x3dca02(0x159)](_0x144763[_0x3dca02(0x1a7)],_0x2ea597),_0x4ee65a=this[_0x3dca02(0x29b)](_0x144763[_0x3dca02(0x1a7)],_0x2ea597);let _0x4d81e6;try{const _0x284493=await this[_0x3dca02(0x274)][_0x3dca02(0x127)][_0x3dca02(0x177)]({'conversationId':_0x48581d,'homeDirectory':_0x144763[_0x3dca02(0x1a7)][_0x3dca02(0x1ea)],'workspaceDirectory':_0x2ea597[_0x3dca02(0x18e)],'systemInstruction':systemInstruction(_0x2ea597),'defaultModelId':_0x1d70fe['id'],'models':networkModels(allowedModels(_0x2ea597,_0x3a63e4),_0x2ea597[_0x3dca02(0x147)][_0x3dca02(0x195)]),..._0x5afd3c===undefined?{}:{'runtimeScopeId':_0x5afd3c},'pathMounts':_0x1ecbc0,'processExecutor':_0x4ee65a});_0x4d81e6=_0x284493[_0x3dca02(0x16b)];const _0x144cb6=this[_0x3dca02(0x298)](),_0x25c478={'id':_0x48581d,'nodeId':this[_0x3dca02(0x274)][_0x3dca02(0x17b)](),'sessionId':_0x4d81e6,'templateId':_0x502913['id'],'templateName':_0x502913[_0x3dca02(0x160)],'activeVersionId':_0x2ea597['id'],'title':_0x502913[_0x3dca02(0x160)],'titleSource':_0x3dca02(0x1ba),'pinnedAt':null,'status':_0x3dca02(0x114),'modelId':_0x1d70fe['id'],'createdAt':_0x144cb6,'updatedAt':_0x144cb6,'lastActivityAt':_0x144cb6,'userStorageKey':_0x144763[_0x3dca02(0x117)],'conversationStorageKey':_0x144763[_0x3dca02(0x299)],'clientRequestId':_0x1eac6e,'templateDeleted':![],'quota':{'usedBytes':0x0,'maxBytes':_0x2ea597[_0x3dca02(0x147)][_0x3dca02(0x148)][_0x3dca02(0x1be)]}},_0x3eb50f=await this[_0x3dca02(0x274)][_0x3dca02(0x24b)][_0x3dca02(0x1d3)](_0x25c478);return _0x3eb50f['id']!==_0x48581d&&(await this[_0x3dca02(0x274)][_0x3dca02(0x127)][_0x3dca02(0x226)]({'conversationId':_0x48581d,'sessionId':_0x4d81e6,'homeDirectory':_0x144763[_0x3dca02(0x1a7)][_0x3dca02(0x1ea)]})[_0x3dca02(0x28f)](()=>undefined),await rm(_0x144763[_0x3dca02(0x1a7)][_0x3dca02(0x1c0)],{'recursive':!![],'force':!![]})),this[_0x3dca02(0x247)](_0x368dc8,_0x3eb50f['id'],_0x3a63e4);}catch(_0xa151ba){if(_0x4d81e6!==undefined)await this[_0x3dca02(0x274)][_0x3dca02(0x127)][_0x3dca02(0x226)]({'conversationId':_0x48581d,'sessionId':_0x4d81e6,'homeDirectory':_0x144763[_0x3dca02(0x1a7)][_0x3dca02(0x1ea)]})[_0x3dca02(0x28f)](()=>undefined);await rm(_0x144763[_0x3dca02(0x1a7)][_0x3dca02(0x1c0)],{'recursive':!![],'force':!![]})[_0x3dca02(0x28f)](()=>undefined);throw _0xa151ba;}}async[_0xf958e3(0xfb)](_0xdb929d){const _0x49c0e4=_0xf958e3,_0x54cec7=hostedRequest(_0xdb929d),_0x4bed9a=hostedConversationIdInputSchema[_0x49c0e4(0x28e)](_0x54cec7[_0x49c0e4(0x162)]);return this[_0x49c0e4(0x247)](_0x54cec7[_0x49c0e4(0x22e)],_0x4bed9a[_0x49c0e4(0xfd)],runtimeModels(_0x54cec7[_0x49c0e4(0x1d2)]),_0x54cec7[_0x49c0e4(0x24f)]);}async[_0xf958e3(0x247)](_0x24d7a4,_0x1e4427,_0x43c9eb,_0x43f9d5=![]){const _0x48188b=_0xf958e3;let _0x460aa0=this[_0x48188b(0x274)][_0x48188b(0x24b)][_0x48188b(0x261)](_0x24d7a4,_0x1e4427);if(_0x43f9d5)_0x460aa0=await this[_0x48188b(0x274)][_0x48188b(0x24b)][_0x48188b(0x118)](_0x24d7a4,_0x1e4427,this[_0x48188b(0x298)]());const _0x13550d=await this[_0x48188b(0x27f)](_0x460aa0[_0x48188b(0x272)],_0x460aa0[_0x48188b(0x27b)]),_0x220eaa=networkModels(allowedModels(_0x13550d,_0x43c9eb),_0x13550d[_0x48188b(0x147)][_0x48188b(0x195)]),_0x22868d=this[_0x48188b(0x274)][_0x48188b(0x24b)][_0x48188b(0x105)](_0x24d7a4,_0x460aa0['id']),_0x37d7ac=await this[_0x48188b(0x274)][_0x48188b(0x127)][_0x48188b(0x284)]({'conversationId':_0x460aa0['id'],'sessionId':_0x460aa0[_0x48188b(0x16b)],'homeDirectory':_0x22868d[_0x48188b(0x1ea)],'modelId':_0x460aa0[_0x48188b(0x1b7)]});return hostedConversationSnapshotSchema[_0x48188b(0x28e)]({'conversation':this[_0x48188b(0x12d)](_0x460aa0),'template':templateSummary(_0x460aa0,_0x13550d[_0x48188b(0x147)]),'run':this[_0x48188b(0x25f)][_0x48188b(0xfb)](_0x460aa0['id'])?.[_0x48188b(0x283)]??null,'turns':_0x37d7ac,'files':this[_0x48188b(0x274)][_0x48188b(0x24b)][_0x48188b(0x125)](_0x24d7a4,_0x460aa0['id']),'models':_0x220eaa[_0x48188b(0x109)](modelSummary),'error':null,'snapshotSequence':0x0});}async[_0xf958e3(0x119)](_0x4a1b3c){const _0x1aa319=_0xf958e3,_0x10ab66=hostedRequest(_0x4a1b3c),_0x3ad9a9=hostedConversationWatchInputSchema[_0x1aa319(0x28e)](_0x10ab66[_0x1aa319(0x162)]),_0x13730f=this[_0x1aa319(0x274)][_0x1aa319(0x24b)][_0x1aa319(0x261)](_0x10ab66[_0x1aa319(0x22e)],_0x3ad9a9[_0x1aa319(0xfd)]);if(this[_0x1aa319(0x12c)][_0x1aa319(0x154)](_0x13730f['id']))throw new Error(_0x1aa319(0x1f9));const _0x46a230=requireWatchSessionHash(_0x10ab66[_0x1aa319(0x1f8)]),_0x100c08=watchOwnerKey(_0x46a230,_0x3ad9a9[_0x1aa319(0x1bb)]);if(_0x3ad9a9[_0x1aa319(0x116)]===_0x1aa319(0x21c)){const _0xdf9cda=this[_0x1aa319(0x250)][_0x1aa319(0xfb)](_0x100c08);if(_0xdf9cda===undefined||!this[_0x1aa319(0x246)][_0x1aa319(0x25a)](_0x100c08,_0xdf9cda[_0x1aa319(0x27e)])||_0xdf9cda[_0x1aa319(0x216)]!==_0x3ad9a9[_0x1aa319(0x216)]||_0xdf9cda[_0x1aa319(0xfd)]!==_0x3ad9a9[_0x1aa319(0xfd)]||_0xdf9cda[_0x1aa319(0x22e)]!==_0x10ab66[_0x1aa319(0x22e)]||_0xdf9cda[_0x1aa319(0x181)]<=Date[_0x1aa319(0x298)]()){this[_0x1aa319(0x22b)](_0x100c08);throw new Error(_0x1aa319(0x10c));}return _0xdf9cda[_0x1aa319(0x181)]=Date[_0x1aa319(0x298)]()+WATCH_TTL_MS,clearTimeout(_0xdf9cda[_0x1aa319(0x205)]),_0xdf9cda[_0x1aa319(0x205)]=this[_0x1aa319(0x174)](_0x100c08),this[_0x1aa319(0x200)](_0xdf9cda);}const _0x58e869=runtimeModels(_0x10ab66[_0x1aa319(0x1d2)]),_0x1610f9=this[_0x1aa319(0x250)][_0x1aa319(0xfb)](_0x100c08);if(_0x1610f9!==undefined&&this[_0x1aa319(0x246)][_0x1aa319(0x25a)](_0x100c08,_0x1610f9[_0x1aa319(0x27e)])&&_0x1610f9[_0x1aa319(0x216)]===_0x3ad9a9[_0x1aa319(0x216)]&&_0x1610f9[_0x1aa319(0xfd)]===_0x3ad9a9[_0x1aa319(0xfd)]&&_0x1610f9[_0x1aa319(0x22e)]===_0x10ab66[_0x1aa319(0x22e)]&&_0x1610f9[_0x1aa319(0x181)]>Date[_0x1aa319(0x298)]())return _0x1610f9[_0x1aa319(0x181)]=Date[_0x1aa319(0x298)]()+WATCH_TTL_MS,clearTimeout(_0x1610f9[_0x1aa319(0x205)]),_0x1610f9[_0x1aa319(0x205)]=this[_0x1aa319(0x174)](_0x100c08),this[_0x1aa319(0x200)](_0x1610f9);this[_0x1aa319(0x22b)](_0x100c08);const _0x38a2d7=this[_0x1aa319(0x246)][_0x1aa319(0x254)](_0x100c08,_0x1aa319(0x29c),()=>this[_0x1aa319(0x22b)](_0x100c08)),_0x58be2c={'ownerKey':_0x100c08,'slotToken':_0x38a2d7,'sessionHash':_0x46a230,'workbenchConnectionId':_0x3ad9a9[_0x1aa319(0x1bb)],'watchId':_0x3ad9a9[_0x1aa319(0x216)],'conversationId':_0x3ad9a9[_0x1aa319(0xfd)],'templateId':_0x13730f[_0x1aa319(0x27b)],'userId':_0x10ab66[_0x1aa319(0x22e)],'models':_0x58e869,'nodeGeneration':this[_0x1aa319(0x274)][_0x1aa319(0x23c)]?.()??_0x1aa319(0x22c),'pendingEvents':[],'expiresAt':Date[_0x1aa319(0x298)]()+WATCH_TTL_MS,'ready':![],'timer':undefined};return _0x58be2c[_0x1aa319(0x205)]=this[_0x1aa319(0x174)](_0x100c08),this[_0x1aa319(0x250)][_0x1aa319(0x19e)](_0x100c08,_0x58be2c),void this[_0x1aa319(0xf6)](_0x58be2c),this[_0x1aa319(0x200)](_0x58be2c);}[_0xf958e3(0x1ee)](_0x19146c){const _0x37efab=_0xf958e3,_0x339d29=hostedRequest(_0x19146c),_0x1844b2=hostedConversationUnwatchInputSchema[_0x37efab(0x28e)](_0x339d29[_0x37efab(0x162)]);this[_0x37efab(0x274)][_0x37efab(0x24b)][_0x37efab(0x261)](_0x339d29[_0x37efab(0x22e)],_0x1844b2[_0x37efab(0xfd)]);const _0x3c25b9=watchOwnerKey(requireWatchSessionHash(_0x339d29[_0x37efab(0x1f8)]),_0x1844b2[_0x37efab(0x1bb)]),_0x1d58c3=this[_0x37efab(0x250)][_0x37efab(0xfb)](_0x3c25b9);if(_0x1d58c3?.[_0x37efab(0x216)]===_0x1844b2[_0x37efab(0x216)]&&_0x1d58c3[_0x37efab(0xfd)]===_0x1844b2[_0x37efab(0xfd)]&&_0x1d58c3[_0x37efab(0x22e)]===_0x339d29[_0x37efab(0x22e)])this[_0x37efab(0x22b)](_0x3c25b9);return{'unwatched':!![]};}[_0xf958e3(0x26e)](_0x4082db,_0xc6168d){const _0xd595cb=_0xf958e3;return this[_0xd595cb(0x210)](_0x4082db,{'conversationId':_0x4082db,'kind':_0xd595cb(0x127),'runtimeEvent':_0xc6168d});}[_0xf958e3(0x129)](_0x3a82cf){const _0x5d5cfd=_0xf958e3;return this[_0x5d5cfd(0x12c)][_0x5d5cfd(0x154)](_0x3a82cf)||this[_0x5d5cfd(0x25f)][_0x5d5cfd(0x154)](_0x3a82cf)||this[_0x5d5cfd(0x1df)][_0x5d5cfd(0x154)](_0x3a82cf)||[...this[_0x5d5cfd(0x250)][_0x5d5cfd(0x1de)]()][_0x5d5cfd(0x1b0)](_0x5ebfc4=>_0x5ebfc4[_0x5d5cfd(0xfd)]===_0x3a82cf)||[...this[_0x5d5cfd(0x1dd)][_0x5d5cfd(0x1de)]()][_0x5d5cfd(0x1b0)](_0x538882=>_0x538882[_0x5d5cfd(0xfd)]===_0x3a82cf&&_0x538882[_0x5d5cfd(0x1f6)]===_0x5d5cfd(0x1b1))||[...this[_0x5d5cfd(0x1e9)][_0x5d5cfd(0x2a5)]()][_0x5d5cfd(0x1b0)](_0x331672=>_0x331672[_0x5d5cfd(0x232)](_0x3a82cf+'\x00'));}[_0xf958e3(0x20f)](_0x5ad32f){const _0x9da773=_0xf958e3;if(this[_0x9da773(0x129)](_0x5ad32f))return undefined;return this[_0x9da773(0x12c)][_0x9da773(0x1ce)](_0x5ad32f),()=>{const _0x1dd42b=_0x9da773;this[_0x1dd42b(0x12c)][_0x1dd42b(0x121)](_0x5ad32f);};}async[_0xf958e3(0x1b6)](_0x119478){const _0x4657f4=_0xf958e3,_0x18bef8=this[_0x4657f4(0x274)][_0x4657f4(0x24b)][_0x4657f4(0x10e)](_0x119478);await this[_0x4657f4(0x274)][_0x4657f4(0x127)][_0x4657f4(0x226)]({'conversationId':_0x119478['id'],'sessionId':_0x119478[_0x4657f4(0x16b)],'homeDirectory':_0x18bef8[_0x4657f4(0x1ea)]})[_0x4657f4(0x28f)](()=>undefined);}[_0xf958e3(0x124)](){const _0x1ea7f6=_0xf958e3;for(const [_0x5c4553,_0x43c6a9]of this[_0x1ea7f6(0x25f)]){const _0x25c3e2=runInterruptionKey(_0x5c4553,_0x43c6a9[_0x1ea7f6(0x283)]['id']);this[_0x1ea7f6(0x136)][_0x1ea7f6(0x1ce)](_0x25c3e2);if(!_0x43c6a9[_0x1ea7f6(0x1c5)]())this[_0x1ea7f6(0x136)][_0x1ea7f6(0x121)](_0x25c3e2);}for(const _0x5311a9 of[...this[_0x1ea7f6(0x250)][_0x1ea7f6(0x2a5)]()])this[_0x1ea7f6(0x22b)](_0x5311a9);}[_0xf958e3(0x1a2)](_0x160862){const _0x1af9e2=_0xf958e3;if(this[_0x1af9e2(0x21e)])return Promise[_0x1af9e2(0x295)](new Error(_0x1af9e2(0x178)));const _0x28df81=hostedRequest(_0x160862),_0x5eddd3=hostedConversationMessageInputSchema[_0x1af9e2(0x28e)](_0x28df81[_0x1af9e2(0x162)]),_0x81de61=_0x5eddd3[_0x1af9e2(0xfd)]+'\x00'+_0x5eddd3[_0x1af9e2(0x166)],_0x41b782=this[_0x1af9e2(0x1e9)][_0x1af9e2(0xfb)](_0x81de61);if(_0x41b782!==undefined)return _0x41b782;const _0x426ad4=this[_0x1af9e2(0x274)][_0x1af9e2(0x24b)][_0x1af9e2(0x2a3)](_0x28df81[_0x1af9e2(0x22e)],_0x5eddd3[_0x1af9e2(0xfd)],_0x5eddd3[_0x1af9e2(0x166)]);if(_0x426ad4!==undefined){const _0x403932=this[_0x1af9e2(0x274)][_0x1af9e2(0x24b)][_0x1af9e2(0x261)](_0x28df81[_0x1af9e2(0x22e)],_0x5eddd3[_0x1af9e2(0xfd)]);return Promise[_0x1af9e2(0x25d)]({'conversation':this[_0x1af9e2(0x12d)](_0x403932),'run':runFromMessage(_0x426ad4)});}if([...this[_0x1af9e2(0x1e9)][_0x1af9e2(0x2a5)]()][_0x1af9e2(0x1b0)](_0x321522=>_0x321522[_0x1af9e2(0x232)](_0x5eddd3[_0x1af9e2(0xfd)]+'\x00')))return Promise[_0x1af9e2(0x295)](new Error(_0x1af9e2(0x1e4)));const _0x17ecf5=this[_0x1af9e2(0x1d5)](_0x28df81,_0x5eddd3);return this[_0x1af9e2(0x1e9)][_0x1af9e2(0x19e)](_0x81de61,_0x17ecf5),void _0x17ecf5[_0x1af9e2(0x1d9)](()=>this[_0x1af9e2(0x1e9)][_0x1af9e2(0x121)](_0x81de61))[_0x1af9e2(0x28f)](()=>undefined),_0x17ecf5;}async[_0xf958e3(0x1d5)](_0x1bd5ef,_0x4c69b6){const _0x4ec5ed=_0xf958e3;let _0x31d480=this[_0x4ec5ed(0x274)][_0x4ec5ed(0x24b)][_0x4ec5ed(0x261)](_0x1bd5ef[_0x4ec5ed(0x22e)],_0x4c69b6[_0x4ec5ed(0xfd)]);if(this[_0x4ec5ed(0x12c)][_0x4ec5ed(0x154)](_0x31d480['id']))throw new Error(_0x4ec5ed(0x1f9));if(_0x31d480[_0x4ec5ed(0x1f6)]!==_0x4ec5ed(0x114))throw new Error(_0x4ec5ed(0x1f9));if(this[_0x4ec5ed(0x25f)][_0x4ec5ed(0x154)](_0x31d480['id']))throw new Error(_0x4ec5ed(0x1e4));const _0xe3a8b2=sessionTitleFromFirstMessage(_0x4c69b6[_0x4ec5ed(0x11b)]),_0x2949e2=_0xe3a8b2[_0x4ec5ed(0x194)]>-0x60+0x144f*0x1+0x6a5*-0x3&&!this[_0x4ec5ed(0x274)][_0x4ec5ed(0x24b)][_0x4ec5ed(0xfc)](_0x1bd5ef[_0x4ec5ed(0x22e)],_0x31d480['id']),_0x2e3541=runtimeModels(_0x1bd5ef[_0x4ec5ed(0x1d2)]),_0x4cd865=this[_0x4ec5ed(0x274)][_0x4ec5ed(0x24b)][_0x4ec5ed(0x105)](_0x1bd5ef[_0x4ec5ed(0x22e)],_0x31d480['id']);let _0x1f1181,_0x16891e,_0x4c759f,_0x3c1773;const _0x1ceb0e=_0x31d480[_0x4ec5ed(0x24f)]?undefined:this[_0x4ec5ed(0xf5)](_0x31d480[_0x4ec5ed(0x27b)]);if(_0x1ceb0e!==undefined&&_0x1ceb0e!==_0x31d480[_0x4ec5ed(0x272)]){const _0x32295d=_0x31d480[_0x4ec5ed(0x272)],_0x82f02=_0x1ceb0e;try{_0x1f1181=await this[_0x4ec5ed(0x27f)](_0x82f02,_0x31d480[_0x4ec5ed(0x27b)],!![]),_0x16891e=selectModel(_0x1f1181,_0x2e3541,_0x4c69b6[_0x4ec5ed(0x1b7)]??_0x1f1181[_0x4ec5ed(0x227)][_0x4ec5ed(0x197)]),_0x4c759f=resolveMcpServers(_0x1f1181,this[_0x4ec5ed(0x274)][_0x4ec5ed(0x1f1)]??process.env),this[_0x4ec5ed(0x159)](_0x4cd865,_0x1f1181),this[_0x4ec5ed(0x29b)](_0x4cd865,_0x1f1181),_0x3c1773={'previousVersionId':_0x32295d,'targetVersionId':_0x82f02};}catch(_0xd65be7){this[_0x4ec5ed(0x185)](_0x31d480,_0x32295d,_0x82f02,_0xd65be7);throw new Error(_0x4ec5ed(0x25e));}}else _0x1f1181=await this[_0x4ec5ed(0x27f)](_0x31d480[_0x4ec5ed(0x272)],_0x31d480[_0x4ec5ed(0x27b)],!![]),_0x16891e=selectModel(_0x1f1181,_0x2e3541,_0x4c69b6[_0x4ec5ed(0x1b7)]??_0x31d480[_0x4ec5ed(0x1b7)]);const _0x2164b2=await Promise[_0x4ec5ed(0x1f2)](_0x4c69b6[_0x4ec5ed(0x1bf)][_0x4ec5ed(0x109)](_0x25a1a7=>this[_0x4ec5ed(0x219)](_0x1bd5ef[_0x4ec5ed(0x22e)],_0x31d480['id'],_0x25a1a7))),_0xbb0005=attachmentPrompt(_0x4c69b6[_0x4ec5ed(0x11b)],_0x2164b2),_0x31aae1=marAgentGeneratedImagesDirectory(_0x4cd865[_0x4ec5ed(0x1ea)],_0x31d480[_0x4ec5ed(0x16b)]);if(_0x31aae1===undefined)throw new Error(_0x4ec5ed(0x211));await mkdir(_0x31aae1,{'recursive':!![],'mode':0x1c0});const _0x19682d=this[_0x4ec5ed(0x159)](_0x4cd865,_0x1f1181,_0x31aae1),_0x390d7c=join(_0x4cd865[_0x4ec5ed(0x1a6)],_0x4ec5ed(0x152)+randomUUID());await mkdir(_0x390d7c,{'mode':0x1c0}),this[_0x4ec5ed(0x1f4)](_0x1bd5ef[_0x4ec5ed(0x22e)],_0x31d480,_0x4ec5ed(0x18c),this[_0x4ec5ed(0x298)]());const _0x148c51=[];let _0x4a38e1=![];const _0x2fe5ea=await this[_0x4ec5ed(0x274)][_0x4ec5ed(0x127)][_0x4ec5ed(0x156)]({'conversationId':_0x31d480['id'],'sessionId':_0x31d480[_0x4ec5ed(0x16b)],'clientMessageId':_0x4c69b6[_0x4ec5ed(0x166)],'userPrompt':_0x4c69b6[_0x4ec5ed(0x11b)],'prompt':_0xbb0005,'attachmentIds':_0x4c69b6[_0x4ec5ed(0x1bf)],'access':_0x4ec5ed(0x1c8),'modelId':_0x16891e['id'],'models':networkModels(allowedModels(_0x1f1181,_0x2e3541),_0x1f1181[_0x4ec5ed(0x147)][_0x4ec5ed(0x195)]),..._0x1bd5ef[_0x4ec5ed(0x1d6)]===undefined?{}:{'runtimeScopeId':_0x1bd5ef[_0x4ec5ed(0x1d6)]},'systemInstruction':systemInstruction(_0x1f1181),'homeDirectory':_0x4cd865[_0x4ec5ed(0x1ea)],'workspaceDirectory':_0x1f1181[_0x4ec5ed(0x18e)],'temporaryDirectory':_0x390d7c,'pathMounts':_0x19682d,'processExecutor':this[_0x4ec5ed(0x29b)](_0x4cd865,_0x1f1181,_0x390d7c,_0x31aae1),'mcpServers':_0x4c759f??resolveMcpServers(_0x1f1181,this[_0x4ec5ed(0x274)][_0x4ec5ed(0x1f1)]??process.env),'webAccess':_0x1f1181[_0x4ec5ed(0x147)][_0x4ec5ed(0x195)]!==_0x4ec5ed(0xff),'onEvent':_0x589da3=>{const _0x4a39ef=_0x4ec5ed;if(_0x4a38e1)this[_0x4a39ef(0x26e)](_0x31d480['id'],_0x589da3);else _0x148c51[_0x4a39ef(0x245)](_0x589da3);}})[_0x4ec5ed(0x28f)](async _0x4cc704=>{const _0x383a0e=_0x4ec5ed;this[_0x383a0e(0x1f4)](_0x1bd5ef[_0x383a0e(0x22e)],_0x31d480,_0x383a0e(0x128),this[_0x383a0e(0x298)]()),await rm(_0x390d7c,{'recursive':!![],'force':!![]})[_0x383a0e(0x28f)](()=>undefined);if(_0x3c1773!==undefined){this[_0x383a0e(0x185)](_0x31d480,_0x3c1773[_0x383a0e(0x222)],_0x3c1773[_0x383a0e(0x270)],_0x4cc704);throw new Error(_0x383a0e(0x25e));}throw _0x4cc704;}),_0x5c244b=_0x2fe5ea[_0x4ec5ed(0x283)][_0x4ec5ed(0x10b)];let _0x11fbff=![],_0x418e63;try{this[_0x4ec5ed(0x274)][_0x4ec5ed(0x24b)][_0x4ec5ed(0x238)]({'conversationId':_0x31d480['id'],'clientMessageId':_0x4c69b6[_0x4ec5ed(0x166)],'runId':_0x2fe5ea[_0x4ec5ed(0x283)]['id'],'userTextPresent':_0xe3a8b2[_0x4ec5ed(0x194)]>-0x439+0x25*0xc0+0x13*-0x13d,'status':_0x4ec5ed(0x267),'createdAt':_0x5c244b,'updatedAt':_0x5c244b}),_0x11fbff=!![];const _0x461f56=this[_0x4ec5ed(0x298)]();_0x418e63=await this[_0x4ec5ed(0x274)][_0x4ec5ed(0x24b)][_0x4ec5ed(0x20d)]({'conversationId':_0x31d480['id'],'modelId':_0x16891e['id'],'activityAt':_0x461f56,..._0x3c1773===undefined?{}:{'templateVersion':{'expectedActiveVersionId':_0x3c1773[_0x4ec5ed(0x222)],'activeVersionId':_0x3c1773[_0x4ec5ed(0x270)],'maxStorageBytes':_0x1f1181[_0x4ec5ed(0x147)][_0x4ec5ed(0x148)][_0x4ec5ed(0x1be)]}},..._0x2949e2?{'automaticTitle':_0xe3a8b2}:{}});}catch(_0x5cacf5){try{_0x2fe5ea[_0x4ec5ed(0x1c5)]();}catch{}const _0x25120a=await _0x2fe5ea[_0x4ec5ed(0x157)][_0x4ec5ed(0x28f)](()=>({'status':_0x4ec5ed(0x16c),'completedAt':this[_0x4ec5ed(0x298)]()}));if(_0x11fbff)try{this[_0x4ec5ed(0x274)][_0x4ec5ed(0x24b)][_0x4ec5ed(0x13d)](_0x31d480['id'],_0x4c69b6[_0x4ec5ed(0x166)],_0x25120a[_0x4ec5ed(0x1f6)],_0x25120a[_0x4ec5ed(0x29e)]);}catch{}await rm(_0x390d7c,{'recursive':!![],'force':!![]})[_0x4ec5ed(0x28f)](()=>undefined),this[_0x4ec5ed(0x1f4)](_0x1bd5ef[_0x4ec5ed(0x22e)],_0x31d480,_0x4ec5ed(0x128),_0x25120a[_0x4ec5ed(0x29e)]);if(_0x3c1773!==undefined)this[_0x4ec5ed(0x185)](_0x31d480,_0x3c1773[_0x4ec5ed(0x222)],_0x3c1773[_0x4ec5ed(0x270)],_0x5cacf5);throw _0x5cacf5;}_0x31d480=_0x418e63[_0x4ec5ed(0x24d)];if(_0x3c1773!==undefined)this[_0x4ec5ed(0x210)](_0x31d480['id'],{'conversationId':_0x31d480['id'],'kind':_0x4ec5ed(0x187),'upgrade':{'status':_0x4ec5ed(0x212),'previousVersionId':_0x3c1773[_0x4ec5ed(0x222)],'targetVersionId':_0x3c1773[_0x4ec5ed(0x270)],'activeVersionId':_0x31d480[_0x4ec5ed(0x272)],'conversation':this[_0x4ec5ed(0x12d)](_0x31d480),'error':null}});this[_0x4ec5ed(0x25f)][_0x4ec5ed(0x19e)](_0x31d480['id'],_0x2fe5ea),this[_0x4ec5ed(0x1f4)](_0x1bd5ef[_0x4ec5ed(0x22e)],_0x31d480,_0x4ec5ed(0x267),_0x2fe5ea[_0x4ec5ed(0x283)][_0x4ec5ed(0x10b)]);if(_0x418e63[_0x4ec5ed(0xfe)])this[_0x4ec5ed(0x210)](_0x31d480['id'],{'conversationId':_0x31d480['id'],'kind':_0x4ec5ed(0x24d),'conversation':this[_0x4ec5ed(0x12d)](_0x31d480)});this[_0x4ec5ed(0x210)](_0x31d480['id'],{'conversationId':_0x31d480['id'],'kind':_0x4ec5ed(0x283),'run':_0x2fe5ea[_0x4ec5ed(0x283)]}),_0x4a38e1=!![];for(const _0x217f57 of _0x148c51)this[_0x4ec5ed(0x26e)](_0x31d480['id'],_0x217f57);_0x148c51[_0x4ec5ed(0x194)]=0x27*-0x82+0x9*0xb8+0xd56;const _0x4966f8=_0x2fe5ea[_0x4ec5ed(0x157)][_0x4ec5ed(0x169)](_0x223e62=>this[_0x4ec5ed(0x1ac)](_0x1bd5ef[_0x4ec5ed(0x22e)],_0x31d480['id'],_0x4c69b6[_0x4ec5ed(0x166)],_0x2fe5ea[_0x4ec5ed(0x283)],_0x223e62),()=>this[_0x4ec5ed(0x1ac)](_0x1bd5ef[_0x4ec5ed(0x22e)],_0x31d480['id'],_0x4c69b6[_0x4ec5ed(0x166)],_0x2fe5ea[_0x4ec5ed(0x283)],{'status':_0x4ec5ed(0x16c),'completedAt':this[_0x4ec5ed(0x298)]()}))[_0x4ec5ed(0x28f)](()=>undefined)[_0x4ec5ed(0x1d9)](async()=>{const _0xa7a099=_0x4ec5ed;this[_0xa7a099(0x136)][_0xa7a099(0x121)](runInterruptionKey(_0x31d480['id'],_0x2fe5ea[_0xa7a099(0x283)]['id']));if(this[_0xa7a099(0x25f)][_0xa7a099(0xfb)](_0x31d480['id'])===_0x2fe5ea)this[_0xa7a099(0x25f)][_0xa7a099(0x121)](_0x31d480['id']);if(this[_0xa7a099(0x1df)][_0xa7a099(0xfb)](_0x31d480['id'])===_0x4966f8)this[_0xa7a099(0x1df)][_0xa7a099(0x121)](_0x31d480['id']);await rm(_0x390d7c,{'recursive':!![],'force':!![]})[_0xa7a099(0x28f)](()=>undefined);});return this[_0x4ec5ed(0x1df)][_0x4ec5ed(0x19e)](_0x31d480['id'],_0x4966f8),void _0x4966f8,{'conversation':this[_0x4ec5ed(0x12d)](_0x31d480),'run':_0x2fe5ea[_0x4ec5ed(0x283)]};}async[_0xf958e3(0x1ac)](_0x33c275,_0x123cb9,_0x36d3ed,_0x3d5a12,_0x188319){const _0x32d5c0=_0xf958e3,_0x3c826b=runInterruptionKey(_0x123cb9,_0x3d5a12['id']),_0x2181a5=this[_0x32d5c0(0x136)][_0x32d5c0(0x154)](_0x3c826b);let _0x1da475;try{this[_0x32d5c0(0x274)][_0x32d5c0(0x24b)][_0x32d5c0(0x13d)](_0x123cb9,_0x36d3ed,_0x188319[_0x32d5c0(0x1f6)],_0x188319[_0x32d5c0(0x29e)]);try{const _0x7aad46=await this[_0x32d5c0(0x274)][_0x32d5c0(0x24b)][_0x32d5c0(0x207)](_0x33c275,_0x123cb9);this[_0x32d5c0(0x210)](_0x123cb9,{'conversationId':_0x123cb9,'kind':_0x32d5c0(0x20c),'files':_0x7aad46,'error':null});}catch(_0x6733c0){this[_0x32d5c0(0x210)](_0x123cb9,{'conversationId':_0x123cb9,'kind':_0x32d5c0(0x20c),'files':this[_0x32d5c0(0x274)][_0x32d5c0(0x24b)][_0x32d5c0(0x125)](_0x33c275,_0x123cb9),'error':{'code':safeErrorCode(_0x6733c0,_0x32d5c0(0x164)),'message':_0x32d5c0(0x171)}});}await this[_0x32d5c0(0x274)][_0x32d5c0(0x24b)][_0x32d5c0(0x149)](_0x123cb9,_0x188319[_0x32d5c0(0x29e)]),this[_0x32d5c0(0x210)](_0x123cb9,{'conversationId':_0x123cb9,'kind':_0x32d5c0(0x283),'run':{'id':_0x3d5a12['id'],'status':_0x188319[_0x32d5c0(0x1f6)],'startedAt':_0x3d5a12[_0x32d5c0(0x10b)],'completedAt':_0x188319[_0x32d5c0(0x29e)]}}),await this[_0x32d5c0(0x2a4)](_0x123cb9,_0x188319[_0x32d5c0(0x239)],_0x188319[_0x32d5c0(0x29e)])[_0x32d5c0(0x28f)](()=>undefined),_0x1da475=this[_0x32d5c0(0x274)][_0x32d5c0(0x24b)][_0x32d5c0(0x261)](_0x33c275,_0x123cb9);}finally{this[_0x32d5c0(0x136)][_0x32d5c0(0x121)](_0x3c826b);if(_0x1da475===undefined)try{_0x1da475=this[_0x32d5c0(0x274)][_0x32d5c0(0x24b)][_0x32d5c0(0x261)](_0x33c275,_0x123cb9);}catch{}if(_0x1da475!==undefined)this[_0x32d5c0(0x1f4)](_0x33c275,_0x1da475,_0x32d5c0(0x128),_0x188319[_0x32d5c0(0x29e)]);}if(_0x1da475!==undefined&&(_0x188319[_0x32d5c0(0x1f6)]!==_0x32d5c0(0x257)||!_0x2181a5))this[_0x32d5c0(0x151)](_0x33c275,_0x1da475,_0x3d5a12['id'],_0x188319);}async[_0xf958e3(0x2a4)](_0x296dd0,_0x2c0507,_0x321589){const _0x2ea6a2=_0xf958e3,_0x4082a7=automaticHostedConversationTitle(_0x2c0507);if(_0x4082a7===undefined)return;const _0xc369b8=await this[_0x2ea6a2(0x274)][_0x2ea6a2(0x24b)][_0x2ea6a2(0x213)](_0x296dd0,_0x4082a7,_0x321589);if(_0xc369b8===undefined)return;this[_0x2ea6a2(0x210)](_0x296dd0,{'conversationId':_0x296dd0,'kind':_0x2ea6a2(0x24d),'conversation':this[_0x2ea6a2(0x12d)](_0xc369b8)});}[_0xf958e3(0x23d)](_0x4daa58){const _0x24b888=_0xf958e3,_0x737d8d=hostedRequest(_0x4daa58),_0x43093d=hostedConversationIdInputSchema[_0x24b888(0x28e)](_0x737d8d[_0x24b888(0x162)]),_0x5286c9=this[_0x24b888(0x274)][_0x24b888(0x24b)][_0x24b888(0x261)](_0x737d8d[_0x24b888(0x22e)],_0x43093d[_0x24b888(0xfd)]),_0x2cafd3=this[_0x24b888(0x25f)][_0x24b888(0xfb)](_0x43093d[_0x24b888(0xfd)]);if(_0x2cafd3===undefined)return{'interrupted':![]};const _0x2678aa=runInterruptionKey(_0x5286c9['id'],_0x2cafd3[_0x24b888(0x283)]['id']);this[_0x24b888(0x136)][_0x24b888(0x1ce)](_0x2678aa);try{const _0x1ff842=_0x2cafd3[_0x24b888(0x1c5)]();if(!_0x1ff842)return this[_0x24b888(0x136)][_0x24b888(0x121)](_0x2678aa),{'interrupted':![]};return this[_0x24b888(0x1f4)](_0x737d8d[_0x24b888(0x22e)],_0x5286c9,_0x24b888(0x107),this[_0x24b888(0x298)]()),{'interrupted':!![]};}catch(_0x3aff4f){this[_0x24b888(0x136)][_0x24b888(0x121)](_0x2678aa);throw _0x3aff4f;}}async[_0xf958e3(0x13f)](_0x3afb9f){const _0x4e23fa=_0xf958e3,_0x3f504f=hostedRequest(_0x3afb9f),_0x1fc6b3=hostedConversationConfigUpdateInputSchema[_0x4e23fa(0x28e)](_0x3f504f[_0x4e23fa(0x162)]),_0x26227f=this[_0x4e23fa(0x274)][_0x4e23fa(0x24b)][_0x4e23fa(0x261)](_0x3f504f[_0x4e23fa(0x22e)],_0x1fc6b3[_0x4e23fa(0xfd)]);if(this[_0x4e23fa(0x12c)][_0x4e23fa(0x154)](_0x26227f['id']))throw new Error(_0x4e23fa(0x1f9));const _0x166dea=await this[_0x4e23fa(0x27f)](_0x26227f[_0x4e23fa(0x272)],_0x26227f[_0x4e23fa(0x27b)]),_0x472026=runtimeModels(_0x3f504f[_0x4e23fa(0x1d2)]),_0x418846=selectModel(_0x166dea,_0x472026,_0x1fc6b3[_0x4e23fa(0x1b7)]??_0x26227f[_0x4e23fa(0x1b7)]),_0xbe13ea=this[_0x4e23fa(0x298)](),_0x26ba5c=await this[_0x4e23fa(0x274)][_0x4e23fa(0x24b)][_0x4e23fa(0x15e)](_0x26227f['id'],_0x37c007=>({..._0x37c007,'modelId':_0x418846['id'],'updatedAt':_0xbe13ea,'lastActivityAt':_0xbe13ea}));return this[_0x4e23fa(0x210)](_0x26227f['id'],{'conversationId':_0x26227f['id'],'kind':_0x4e23fa(0x287),'conversation':this[_0x4e23fa(0x12d)](_0x26ba5c)}),{'conversation':this[_0x4e23fa(0x12d)](_0x26ba5c)};}async[_0xf958e3(0x271)](_0x51d3fa){const _0x45963a=_0xf958e3,_0x422af7=hostedRequest(_0x51d3fa),_0x43a561=hostedConversationMetadataUpdateInputSchema[_0x45963a(0x28e)](_0x422af7[_0x45963a(0x162)]),_0x1874d3=this[_0x45963a(0x274)][_0x45963a(0x24b)][_0x45963a(0x261)](_0x422af7[_0x45963a(0x22e)],_0x43a561[_0x45963a(0xfd)]);if(this[_0x45963a(0x12c)][_0x45963a(0x154)](_0x1874d3['id']))throw new Error(_0x45963a(0x1f9));const _0x1b2e82=this[_0x45963a(0x298)](),_0x4d0086=await this[_0x45963a(0x274)][_0x45963a(0x24b)][_0x45963a(0x15e)](_0x1874d3['id'],_0x8c7c21=>({..._0x8c7c21,'title':_0x43a561[_0x45963a(0x239)]??_0x8c7c21[_0x45963a(0x239)],'titleSource':_0x43a561[_0x45963a(0x239)]===undefined?_0x8c7c21[_0x45963a(0x204)]:_0x45963a(0x2a2),'pinnedAt':_0x43a561[_0x45963a(0x1d7)]===undefined?_0x8c7c21[_0x45963a(0x141)]:_0x43a561[_0x45963a(0x1d7)]?_0x1b2e82:null,'updatedAt':_0x1b2e82,'lastActivityAt':_0x8c7c21[_0x45963a(0x276)]}));return this[_0x45963a(0x210)](_0x1874d3['id'],{'conversationId':_0x1874d3['id'],'kind':_0x45963a(0x287),'conversation':this[_0x45963a(0x12d)](_0x4d0086)}),{'conversation':this[_0x45963a(0x12d)](_0x4d0086)};}async[_0xf958e3(0x125)](_0x2ddf5d){const _0x14988f=_0xf958e3,_0x2f836d=hostedRequest(_0x2ddf5d),_0x575f62=hostedConversationIdInputSchema[_0x14988f(0x28e)](_0x2f836d[_0x14988f(0x162)]);return hostedConversationFilesSchema[_0x14988f(0x28e)]({'files':this[_0x14988f(0x274)][_0x14988f(0x24b)][_0x14988f(0x125)](_0x2f836d[_0x14988f(0x22e)],_0x575f62[_0x14988f(0xfd)])});}async[_0xf958e3(0x1a5)](_0x4d17f5){const _0xd10ac9=_0xf958e3,_0x1496ee=hostedRequest(_0x4d17f5),_0x503a6f=hostedConversationImageReadInputSchema[_0xd10ac9(0x28e)](_0x1496ee[_0xd10ac9(0x162)]);this[_0xd10ac9(0x274)][_0xd10ac9(0x24b)][_0xd10ac9(0x261)](_0x1496ee[_0xd10ac9(0x22e)],_0x503a6f[_0xd10ac9(0xfd)]);if(_0x503a6f[_0xd10ac9(0x224)]!==hostedConversationImageRunId(_0x503a6f[_0xd10ac9(0xfd)]))throw new Error(_0xd10ac9(0x12a));const _0xab5df6=await this[_0xd10ac9(0x274)][_0xd10ac9(0x1a5)](_0x503a6f[_0xd10ac9(0x224)],_0x503a6f[_0xd10ac9(0x203)]);if(_0xab5df6===undefined)throw new Error(_0xd10ac9(0xfa));return{'image':_0xab5df6};}async[_0xf958e3(0x196)](_0x52cdb6){const _0x599904=_0xf958e3,_0x26f5d3=hostedRequest(_0x52cdb6),_0x47f8c1=hostedConversationFileReadInputSchema[_0x599904(0x28e)](_0x26f5d3[_0x599904(0x162)]),_0x2fe6c8=this[_0x599904(0x274)][_0x599904(0x24b)][_0x599904(0x1b5)](_0x26f5d3[_0x599904(0x22e)],_0x47f8c1[_0x599904(0xfd)],_0x47f8c1[_0x599904(0x209)]),_0x13973f=this[_0x599904(0x274)][_0x599904(0x24b)][_0x599904(0x108)](_0x26f5d3[_0x599904(0x22e)],_0x2fe6c8);await assertRegularFile(_0x13973f,_0x2fe6c8[_0x599904(0x1af)]);const _0x4009bb=_0x47f8c1[_0x599904(0x286)]??0xc*0x164+0x1*-0x1faf+-0xb*-0x15d;if(_0x4009bb>_0x2fe6c8[_0x599904(0x1af)])throw new Error(_0x599904(0x1fa));const _0x13619d=Math[_0x599904(0x21f)](_0x47f8c1[_0x599904(0x15b)]??MAX_FILE_READ_BYTES,MAX_FILE_READ_BYTES),_0x2cb4ad=await open(_0x13973f,'r');try{const _0x481221=Buffer[_0x599904(0x179)](Math[_0x599904(0x21f)](_0x13619d,Math[_0x599904(0x1b9)](-0x23a7+-0x202b+0x43d2*0x1,_0x2fe6c8[_0x599904(0x1af)]-_0x4009bb))),_0x599352=await _0x2cb4ad[_0x599904(0x13c)](_0x481221,0x2067+-0xca6*-0x1+0x25f*-0x13,_0x481221[_0x599904(0x194)],_0x4009bb),_0x3723b2=_0x4009bb+_0x599352[_0x599904(0x26c)],_0x549df7=_0x3723b2>=_0x2fe6c8[_0x599904(0x1af)];return hostedConversationFileReadResultSchema[_0x599904(0x28e)]({'file':_0x2fe6c8,'encoding':_0x599904(0x112),'content':_0x481221[_0x599904(0x140)](-0x105a+0x1*-0x851+0x18ab,_0x599352[_0x599904(0x26c)])[_0x599904(0x20a)](_0x599904(0x112)),'offset':_0x4009bb,'nextOffset':_0x549df7?null:_0x3723b2,'eof':_0x549df7});}finally{await _0x2cb4ad[_0x599904(0x278)]();}}async[_0xf958e3(0x235)](_0x586ec2){const _0x18558f=_0xf958e3,_0x288a81=hostedRequest(_0x586ec2),_0x84e76c=hostedConversationFileDeleteInputSchema[_0x18558f(0x28e)](_0x288a81[_0x18558f(0x162)]);this[_0x18558f(0x14b)](_0x288a81[_0x18558f(0x22e)],_0x84e76c[_0x18558f(0xfd)]);const _0x3c709c=_0x84e76c[_0x18558f(0xfd)]+'\x00'+_0x84e76c[_0x18558f(0x209)];if(this[_0x18558f(0x1da)][_0x18558f(0x154)](_0x3c709c))throw new Error(_0x18558f(0x18d));this[_0x18558f(0x1da)][_0x18558f(0x1ce)](_0x3c709c);try{const _0x3afdd7=await this[_0x18558f(0x274)][_0x18558f(0x24b)][_0x18558f(0x235)](_0x288a81[_0x18558f(0x22e)],_0x84e76c[_0x18558f(0xfd)],_0x84e76c[_0x18558f(0x209)],this[_0x18558f(0x298)]()),_0x541a32=hostedConversationFileDeleteResultSchema[_0x18558f(0x28e)]({'deletedFileId':_0x84e76c[_0x18558f(0x209)],'files':_0x3afdd7});return this[_0x18558f(0x210)](_0x84e76c[_0x18558f(0xfd)],{'conversationId':_0x84e76c[_0x18558f(0xfd)],'kind':_0x18558f(0x20c),'files':_0x541a32[_0x18558f(0x20c)],'error':null}),_0x541a32;}finally{this[_0x18558f(0x1da)][_0x18558f(0x121)](_0x3c709c);}}async[_0xf958e3(0x153)](_0x41329f){const _0x5d4d66=_0xf958e3,_0xcc63aa=hostedRequest(_0x41329f),_0x2d7a63=hostedConversationUploadPreflightInputSchema[_0x5d4d66(0x28e)](_0xcc63aa[_0x5d4d66(0x162)]),_0x1a3604=this[_0x5d4d66(0x14b)](_0xcc63aa[_0x5d4d66(0x22e)],_0x2d7a63[_0x5d4d66(0xfd)]),_0x1ac517=await this[_0x5d4d66(0x27f)](_0x1a3604[_0x5d4d66(0x272)],_0x1a3604[_0x5d4d66(0x27b)]),_0x93242c=this[_0x5d4d66(0x274)][_0x5d4d66(0x24b)][_0x5d4d66(0x105)](_0xcc63aa[_0x5d4d66(0x22e)],_0x1a3604['id']),_0x59aad7=await Promise[_0x5d4d66(0x1f2)](_0x2d7a63[_0x5d4d66(0x20c)][_0x5d4d66(0x109)](async _0x27e307=>({'name':_0x27e307[_0x5d4d66(0x160)],'status':await this[_0x5d4d66(0x21b)](_0x93242c,_0x1a3604,_0x1ac517[_0x5d4d66(0x147)],_0x27e307[_0x5d4d66(0x160)],_0x27e307[_0x5d4d66(0x1af)])})));return hostedConversationUploadPreflightResultSchema[_0x5d4d66(0x28e)]({'files':_0x59aad7});}async[_0xf958e3(0x145)](_0xdcab98){const _0x439660=_0xf958e3,_0x31ca19=hostedRequest(_0xdcab98),_0x5b0300=hostedConversationUploadCreateInputSchema[_0x439660(0x28e)](_0x31ca19[_0x439660(0x162)]),_0xc351=this[_0x439660(0x14b)](_0x31ca19[_0x439660(0x22e)],_0x5b0300[_0x439660(0xfd)]),_0x56bc49=_0x31ca19[_0x439660(0x22e)]+'\x00'+_0xc351['id']+'\x00'+_0x5b0300[_0x439660(0xf3)],_0x3ee302=this[_0x439660(0x180)][_0x439660(0xfb)](_0x56bc49);if(_0x3ee302!==undefined){const _0x47c252=this[_0x439660(0x1dd)][_0x439660(0xfb)](_0x3ee302);if(_0x47c252!==undefined)return{'upload':hostedConversationUploadSchema[_0x439660(0x28e)](uploadProjection(_0x47c252))};}const _0x2ceefd=await this[_0x439660(0x27f)](_0xc351[_0x439660(0x272)],_0xc351[_0x439660(0x27b)]),_0x33aaf6=this[_0x439660(0x274)][_0x439660(0x24b)][_0x439660(0x105)](_0x31ca19[_0x439660(0x22e)],_0xc351['id']),_0x5925ad=await this[_0x439660(0x21b)](_0x33aaf6,_0xc351,_0x2ceefd[_0x439660(0x147)],_0x5b0300[_0x439660(0x160)],_0x5b0300[_0x439660(0x1af)]);if(_0x5925ad===_0x439660(0x182)||_0x5925ad===_0x439660(0x1aa))throw new Error(_0x439660(0x150));if(_0x5925ad!==_0x439660(0x10f))throw new Error(_0x439660(0x1ef));const _0x1c225f=this['id'](),_0x2b4c84=join(_0x33aaf6[_0x439660(0x12e)],'.'+_0x1c225f+_0x439660(0x167)),_0x219174=join(_0x33aaf6[_0x439660(0x12e)],_0x5b0300[_0x439660(0x160)]),_0x159048=await open(_0x2b4c84,'wx',0x7ae*0x2+0x458+-0x1234);await _0x159048[_0x439660(0x278)]();const _0x2640a1={'uploadId':_0x1c225f,'conversationId':_0xc351['id'],'userId':_0x31ca19[_0x439660(0x22e)],'clientRequestId':_0x5b0300[_0x439660(0xf3)],'name':_0x5b0300[_0x439660(0x160)],'mimeType':_0x5b0300[_0x439660(0xf4)],'size':_0x5b0300[_0x439660(0x1af)],'temporaryPath':_0x2b4c84,'targetPath':_0x219174,'receivedBytes':0x0,'status':_0x439660(0x1b1)};return this[_0x439660(0x1dd)][_0x439660(0x19e)](_0x1c225f,_0x2640a1),this[_0x439660(0x180)][_0x439660(0x19e)](_0x56bc49,_0x1c225f),{'upload':hostedConversationUploadSchema[_0x439660(0x28e)](uploadProjection(_0x2640a1))};}async[_0xf958e3(0x115)](_0x17ec4e){const _0x4282ea=_0xf958e3,_0x2a7947=hostedRequest(_0x17ec4e),_0x2389f3=hostedConversationUploadChunkInputSchema[_0x4282ea(0x28e)](_0x2a7947[_0x4282ea(0x162)]),_0x9e422=this[_0x4282ea(0x26b)](_0x2a7947[_0x4282ea(0x22e)],_0x2389f3[_0x4282ea(0xfd)],_0x2389f3[_0x4282ea(0x217)]);if(_0x9e422[_0x4282ea(0x1f6)]!==_0x4282ea(0x1b1))throw new Error(_0x4282ea(0x170));if(_0x2389f3[_0x4282ea(0x286)]!==_0x9e422[_0x4282ea(0x173)])throw new Error(_0x4282ea(0x110));const _0x5973fd=Buffer[_0x4282ea(0x1e8)](_0x2389f3[_0x4282ea(0x137)],_0x4282ea(0x112));if(_0x9e422[_0x4282ea(0x173)]+_0x5973fd[_0x4282ea(0x14d)]>_0x9e422[_0x4282ea(0x1af)])throw new Error(_0x4282ea(0x1ca));await assertUploadTemporaryFile(_0x9e422[_0x4282ea(0x1ff)],_0x9e422[_0x4282ea(0x173)]);const _0x4e605c=await open(_0x9e422[_0x4282ea(0x1ff)],'r+');try{await _0x4e605c[_0x4282ea(0x1a8)](_0x5973fd,-0xbd1+-0xb*-0x29f+-0x1104,_0x5973fd[_0x4282ea(0x14d)],_0x9e422[_0x4282ea(0x173)]);}finally{await _0x4e605c[_0x4282ea(0x278)]();}return _0x9e422[_0x4282ea(0x173)]+=_0x5973fd[_0x4282ea(0x14d)],{'upload':hostedConversationUploadSchema[_0x4282ea(0x28e)](uploadProjection(_0x9e422))};}[_0xf958e3(0x1ec)](_0xe27f78){const _0xd457b3=_0xf958e3,_0x5ebe76=hostedRequest(_0xe27f78),_0x5a367e=hostedConversationUploadControlInputSchema[_0xd457b3(0x28e)](_0x5ebe76[_0xd457b3(0x162)]),_0x288a25=this[_0xd457b3(0x26b)](_0x5ebe76[_0xd457b3(0x22e)],_0x5a367e[_0xd457b3(0xfd)],_0x5a367e[_0xd457b3(0x217)]);return{'upload':hostedConversationUploadSchema[_0xd457b3(0x28e)](uploadProjection(_0x288a25))};}async[_0xf958e3(0x22f)](_0x3c5f91){const _0x3612c0=_0xf958e3,_0xf10918=hostedRequest(_0x3c5f91),_0x189757=hostedConversationUploadControlInputSchema[_0x3612c0(0x28e)](_0xf10918[_0x3612c0(0x162)]),_0x367454=this[_0x3612c0(0x26b)](_0xf10918[_0x3612c0(0x22e)],_0x189757[_0x3612c0(0xfd)],_0x189757[_0x3612c0(0x217)]);if(_0x367454[_0x3612c0(0x1f6)]===_0x3612c0(0x2a1))return{'upload':hostedConversationUploadSchema[_0x3612c0(0x28e)](uploadProjection(_0x367454))};if(_0x367454[_0x3612c0(0x1f6)]!==_0x3612c0(0x1b1)||_0x367454[_0x3612c0(0x173)]!==_0x367454[_0x3612c0(0x1af)])throw new Error(_0x3612c0(0x236));const _0x425ab9=this[_0x3612c0(0x14b)](_0xf10918[_0x3612c0(0x22e)],_0x367454[_0x3612c0(0xfd)]),_0x52eeec=await this[_0x3612c0(0x27f)](_0x425ab9[_0x3612c0(0x272)],_0x425ab9[_0x3612c0(0x27b)]);if(_0x367454[_0x3612c0(0x1af)]>_0x52eeec[_0x3612c0(0x147)][_0x3612c0(0x148)][_0x3612c0(0x1c6)]||_0x425ab9[_0x3612c0(0x19b)][_0x3612c0(0x223)]+_0x367454[_0x3612c0(0x1af)]>_0x425ab9[_0x3612c0(0x19b)][_0x3612c0(0xf7)])throw new Error(_0x3612c0(0x150));await assertUploadTemporaryFile(_0x367454[_0x3612c0(0x1ff)],_0x367454[_0x3612c0(0x1af)]);const _0x20f167=await lstat(_0x367454[_0x3612c0(0x290)])[_0x3612c0(0x28f)](_0x492dc2=>{const _0x2ceb9e=_0x3612c0;if(_0x492dc2[_0x2ceb9e(0x258)]===_0x2ceb9e(0x24e))return undefined;throw _0x492dc2;});if(_0x20f167!==undefined)throw new Error(_0x3612c0(0x1ef));const _0x26ce10=await open(_0x367454[_0x3612c0(0x1ff)],'r+');try{await _0x26ce10[_0x3612c0(0x11e)]();}finally{await _0x26ce10[_0x3612c0(0x278)]();}await rename(_0x367454[_0x3612c0(0x1ff)],_0x367454[_0x3612c0(0x290)]);const _0x4de637=this[_0x3612c0(0x298)]();try{await utimes(_0x367454[_0x3612c0(0x290)],new Date(_0x4de637),new Date(_0x4de637));const _0x5451a3={'id':this[_0x3612c0(0x274)][_0x3612c0(0x24b)][_0x3612c0(0x268)](_0x367454[_0x3612c0(0xfd)],_0x3612c0(0x273),_0x367454[_0x3612c0(0x160)]),'conversationId':_0x367454[_0x3612c0(0xfd)],'category':_0x3612c0(0x273),'relativePath':_0x367454[_0x3612c0(0x160)],'displayName':_0x367454[_0x3612c0(0x160)],'mimeType':_0x367454[_0x3612c0(0xf4)],'size':_0x367454[_0x3612c0(0x1af)],'source':_0x3612c0(0x201),'createdAt':_0x4de637,'updatedAt':_0x4de637};return _0x367454[_0x3612c0(0x17e)]=await this[_0x3612c0(0x274)][_0x3612c0(0x24b)][_0x3612c0(0x277)](_0xf10918[_0x3612c0(0x22e)],_0x5451a3),_0x367454[_0x3612c0(0x1f6)]=_0x3612c0(0x2a1),this[_0x3612c0(0x210)](_0x367454[_0x3612c0(0xfd)],{'conversationId':_0x367454[_0x3612c0(0xfd)],'kind':_0x3612c0(0x20c),'files':this[_0x3612c0(0x274)][_0x3612c0(0x24b)][_0x3612c0(0x125)](_0xf10918[_0x3612c0(0x22e)],_0x367454[_0x3612c0(0xfd)]),'error':null}),{'upload':hostedConversationUploadSchema[_0x3612c0(0x28e)](uploadProjection(_0x367454))};}catch(_0x3bf458){await rename(_0x367454[_0x3612c0(0x290)],_0x367454[_0x3612c0(0x1ff)])[_0x3612c0(0x28f)](()=>undefined);throw _0x3bf458;}}async[_0xf958e3(0x106)](_0x4fb5b1){const _0x3b6caa=_0xf958e3,_0x4d14e8=hostedRequest(_0x4fb5b1),_0x3f0e74=hostedConversationUploadControlInputSchema[_0x3b6caa(0x28e)](_0x4d14e8[_0x3b6caa(0x162)]),_0x561e56=this[_0x3b6caa(0x26b)](_0x4d14e8[_0x3b6caa(0x22e)],_0x3f0e74[_0x3b6caa(0xfd)],_0x3f0e74[_0x3b6caa(0x217)]);if(_0x561e56[_0x3b6caa(0x1f6)]===_0x3b6caa(0x2a1))throw new Error(_0x3b6caa(0x170));return _0x561e56[_0x3b6caa(0x1f6)]=_0x3b6caa(0x101),await rm(_0x561e56[_0x3b6caa(0x1ff)],{'force':!![]}),{'upload':hostedConversationUploadSchema[_0x3b6caa(0x28e)](uploadProjection(_0x561e56))};}async[_0xf958e3(0x121)](_0x4b1c7b){const _0x27b305=_0xf958e3,_0x3d739a=hostedRequest(_0x4b1c7b),_0x4d9a6b=hostedConversationIdInputSchema[_0x27b305(0x28e)](_0x3d739a[_0x27b305(0x162)]),_0x5e6071=this[_0x27b305(0x274)][_0x27b305(0x24b)][_0x27b305(0x261)](_0x3d739a[_0x27b305(0x22e)],_0x4d9a6b[_0x27b305(0xfd)]);if(this[_0x27b305(0x12c)][_0x27b305(0x154)](_0x5e6071['id']))throw new Error(_0x27b305(0x1f9));this[_0x27b305(0x12c)][_0x27b305(0x1ce)](_0x5e6071['id']);try{await this[_0x27b305(0x146)](_0x5e6071['id']);const _0xfe5436=this[_0x27b305(0x25f)][_0x27b305(0xfb)](_0x5e6071['id']);if(_0xfe5436!==undefined){const _0x3e5d4c=runInterruptionKey(_0x5e6071['id'],_0xfe5436[_0x27b305(0x283)]['id']);this[_0x27b305(0x136)][_0x27b305(0x1ce)](_0x3e5d4c);if(!_0xfe5436[_0x27b305(0x1c5)]())this[_0x27b305(0x136)][_0x27b305(0x121)](_0x3e5d4c);}await this[_0x27b305(0x231)](_0x3d739a[_0x27b305(0x22e)],_0x5e6071['id']);const _0x4562f4=this[_0x27b305(0x274)][_0x27b305(0x24b)][_0x27b305(0x105)](_0x3d739a[_0x27b305(0x22e)],_0x5e6071['id']);return await this[_0x27b305(0x274)][_0x27b305(0x127)][_0x27b305(0x226)]({'conversationId':_0x5e6071['id'],'sessionId':_0x5e6071[_0x27b305(0x16b)],'homeDirectory':_0x4562f4[_0x27b305(0x1ea)]})[_0x27b305(0x28f)](()=>undefined),await this[_0x27b305(0x1df)][_0x27b305(0xfb)](_0x5e6071['id'])?.[_0x27b305(0x28f)](()=>undefined),this[_0x27b305(0x1b3)](_0x5e6071['id']),await this[_0x27b305(0x274)][_0x27b305(0x24b)][_0x27b305(0x225)](_0x5e6071['id']),this[_0x27b305(0x28c)][_0x27b305(0x121)](_0x5e6071['id']),hostedConversationDeleteResultSchema[_0x27b305(0x28e)]({'deletedConversationId':_0x5e6071['id']});}finally{this[_0x27b305(0x12c)][_0x27b305(0x121)](_0x5e6071['id']);}}async[_0xf958e3(0x146)](_0x12b306){const _0x535792=_0xf958e3,_0x329a01=_0x12b306+'\x00',_0x5a4dec=[...this[_0x535792(0x1e9)][_0x535792(0x27c)]()][_0x535792(0x1b8)](([_0x5c4abd])=>_0x5c4abd[_0x535792(0x232)](_0x329a01))[_0x535792(0x109)](([,_0x2e5fe5])=>_0x2e5fe5);await Promise[_0x535792(0x144)](_0x5a4dec);}async[_0xf958e3(0xf6)](_0x4bd7cf){const _0x8b242c=_0xf958e3;try{const _0x2b677b=await this[_0x8b242c(0xfb)]({'conversationId':_0x4bd7cf[_0x8b242c(0xfd)],'__requestUserId':_0x4bd7cf[_0x8b242c(0x22e)],'__marAgentModels':_0x4bd7cf[_0x8b242c(0x1d2)]});if(this[_0x8b242c(0x250)][_0x8b242c(0xfb)](_0x4bd7cf[_0x8b242c(0x193)])!==_0x4bd7cf)return;this[_0x8b242c(0x274)][_0x8b242c(0x296)]?.({'type':_0x8b242c(0x19d),'workbenchConnectionId':_0x4bd7cf[_0x8b242c(0x1bb)],'watchId':_0x4bd7cf[_0x8b242c(0x216)],'nodeGeneration':_0x4bd7cf[_0x8b242c(0x23c)],'nodeId':this[_0x8b242c(0x274)][_0x8b242c(0x17b)](),'templateId':_0x4bd7cf[_0x8b242c(0x27b)],'conversationId':_0x4bd7cf[_0x8b242c(0xfd)],'revision':0x1,'snapshotSequence':++this[_0x8b242c(0x1ae)],'expiresAt':_0x4bd7cf[_0x8b242c(0x181)],'payload':_0x2b677b}),_0x4bd7cf[_0x8b242c(0x1f3)]=!![];for(const _0x3d17c2 of _0x4bd7cf[_0x8b242c(0x19f)])this[_0x8b242c(0x13b)](_0x4bd7cf,_0x3d17c2);_0x4bd7cf[_0x8b242c(0x19f)][_0x8b242c(0x194)]=-0x221b*0x1+-0x3*0x79+0x2386;}catch(_0x676628){if(this[_0x8b242c(0x250)][_0x8b242c(0xfb)](_0x4bd7cf[_0x8b242c(0x193)])!==_0x4bd7cf)return;this[_0x8b242c(0x274)][_0x8b242c(0x296)]?.({'type':_0x8b242c(0x280),'workbenchConnectionId':_0x4bd7cf[_0x8b242c(0x1bb)],'watchType':_0x8b242c(0x29c),'watchId':_0x4bd7cf[_0x8b242c(0x216)],'nodeGeneration':_0x4bd7cf[_0x8b242c(0x23c)],'nodeId':this[_0x8b242c(0x274)][_0x8b242c(0x17b)](),'templateId':_0x4bd7cf[_0x8b242c(0x27b)],'conversationId':_0x4bd7cf[_0x8b242c(0xfd)],'code':safeErrorCode(_0x676628,_0x8b242c(0x11f)),'message':_0x8b242c(0x188)}),this[_0x8b242c(0x22b)](_0x4bd7cf[_0x8b242c(0x193)]);}}[_0xf958e3(0x292)](_0x443998){const _0x2c5bac=_0xf958e3;return this[_0x2c5bac(0x28c)][_0x2c5bac(0xfb)](_0x443998)??{'status':_0x2c5bac(0x128),'version':0x0,'updatedAt':0x0};}[_0xf958e3(0x12d)](_0x32160b){const _0x3ff5db=_0xf958e3;return hostedConversationSummary(_0x32160b,this[_0x3ff5db(0x292)](_0x32160b['id']));}[_0xf958e3(0x1f4)](_0x3bdb11,_0x210a3e,_0x57894c,_0x268a31){const _0x39c7e3=_0xf958e3,_0x479320=this[_0x39c7e3(0x292)](_0x210a3e['id']),_0x511d3c={'status':_0x57894c,'version':_0x479320[_0x39c7e3(0x252)]+(-0x47*-0x51+0x1b0e+-0x3184),'updatedAt':_0x268a31};this[_0x39c7e3(0x28c)][_0x39c7e3(0x19e)](_0x210a3e['id'],_0x511d3c),this[_0x39c7e3(0x28b)]({'kind':_0x39c7e3(0x292),'userId':_0x3bdb11,'templateId':_0x210a3e[_0x39c7e3(0x27b)],'conversationId':_0x210a3e['id'],'activity':_0x511d3c});}[_0xf958e3(0x151)](_0x1fb088,_0x140329,_0x28d3c4,_0x985b14){const _0x7e0045=_0xf958e3;this[_0x7e0045(0x28b)]({'kind':_0x7e0045(0x1d8),'event':{'runId':_0x28d3c4,'sequence':0x1,'eventType':_0x7e0045(0x1d8),'payload':{'targetType':_0x7e0045(0x14f),'userId':_0x1fb088,'templateId':_0x140329[_0x7e0045(0x27b)],'conversationId':_0x140329['id'],'conversationTitle':_0x140329[_0x7e0045(0x239)],'runId':_0x28d3c4,'notificationId':_0x7e0045(0x142)+this[_0x7e0045(0x274)][_0x7e0045(0x17b)]()+':'+_0x140329['id']+':'+_0x28d3c4,'kind':_0x7e0045(0x1f5),'outcome':_0x985b14[_0x7e0045(0x1f6)],'occurredAt':_0x985b14[_0x7e0045(0x29e)]},'createdAt':_0x985b14[_0x7e0045(0x29e)]}});}[_0xf958e3(0x28b)](_0x20d600){const _0x2efc20=_0xf958e3,_0x16475e=this[_0x2efc20(0x274)][_0x2efc20(0x1fd)]?.(_0x20d600)??{'sequence':++this[_0x2efc20(0x139)],'category':_0x2efc20(0x29c),'payload':_0x20d600};if(_0x16475e!==undefined)this[_0x2efc20(0x274)][_0x2efc20(0x18a)]?.(_0x16475e);}[_0xf958e3(0x185)](_0x9c779f,_0x4c0685,_0x3ace67,_0x16eed7){const _0x38b2b5=_0xf958e3;this[_0x38b2b5(0x210)](_0x9c779f['id'],{'conversationId':_0x9c779f['id'],'kind':_0x38b2b5(0x187),'upgrade':{'status':_0x38b2b5(0x16c),'previousVersionId':_0x4c0685,'targetVersionId':_0x3ace67,'activeVersionId':_0x9c779f[_0x38b2b5(0x272)],'conversation':this[_0x38b2b5(0x12d)](_0x9c779f),'error':{'code':safeErrorCode(_0x16eed7,_0x38b2b5(0x25e)),'message':_0x38b2b5(0x158)}}});}[_0xf958e3(0x210)](_0x7a8bbc,_0x3d3151){const _0x65cd44=_0xf958e3,_0x28b669=[...this[_0x65cd44(0x250)][_0x65cd44(0x1de)]()][_0x65cd44(0x1b8)](_0x29903=>_0x29903[_0x65cd44(0xfd)]===_0x7a8bbc);if(_0x28b669[_0x65cd44(0x194)]===0x1cca+0x21ec+0x15d*-0x2e)return![];const _0x112dc3=this[_0x65cd44(0x274)][_0x65cd44(0x1fd)]?.(_0x3d3151)??{'sequence':++this[_0x65cd44(0x139)],'category':_0x65cd44(0x29c),'payload':_0x3d3151};if(_0x112dc3===undefined)return![];for(const _0x239ee8 of _0x28b669){if(!_0x239ee8[_0x65cd44(0x1f3)])_0x239ee8[_0x65cd44(0x19f)][_0x65cd44(0x245)](_0x112dc3);else this[_0x65cd44(0x13b)](_0x239ee8,_0x112dc3);}return!![];}[_0xf958e3(0x13b)](_0x99f881,_0x567ee4){const _0x107132=_0xf958e3;this[_0x107132(0x274)][_0x107132(0x296)]?.({'type':_0x107132(0x16a),'workbenchConnectionId':_0x99f881[_0x107132(0x1bb)],'watchId':_0x99f881[_0x107132(0x216)],'nodeGeneration':_0x99f881[_0x107132(0x23c)],'nodeId':this[_0x107132(0x274)][_0x107132(0x17b)](),'templateId':_0x99f881[_0x107132(0x27b)],'conversationId':_0x99f881[_0x107132(0xfd)],'expiresAt':_0x99f881[_0x107132(0x181)],'event':_0x567ee4});}[_0xf958e3(0x200)](_0x5d730c){const _0x5ddfaf=_0xf958e3;return{'accepted':!![],'watchId':_0x5d730c[_0x5ddfaf(0x216)],'nodeGeneration':_0x5d730c[_0x5ddfaf(0x23c)],'expiresAt':_0x5d730c[_0x5ddfaf(0x181)]};}[_0xf958e3(0x1b3)](_0x581282){const _0x25faca=_0xf958e3;for(const _0x4e314c of[...this[_0x25faca(0x250)][_0x25faca(0x1de)]()])if(_0x4e314c[_0x25faca(0xfd)]===_0x581282)this[_0x25faca(0x22b)](_0x4e314c[_0x25faca(0x193)]);}[_0xf958e3(0x22b)](_0x2a6ccd){const _0x2c901c=_0xf958e3,_0x4f59c7=this[_0x2c901c(0x250)][_0x2c901c(0xfb)](_0x2a6ccd);if(_0x4f59c7===undefined)return;clearTimeout(_0x4f59c7[_0x2c901c(0x205)]),this[_0x2c901c(0x250)][_0x2c901c(0x121)](_0x2a6ccd),this[_0x2c901c(0x246)][_0x2c901c(0x126)](_0x2a6ccd,_0x4f59c7[_0x2c901c(0x27e)]);}[_0xf958e3(0x174)](_0x28426d){const _0x152c0c=_0xf958e3,_0x4bcfff=setTimeout(()=>this[_0x152c0c(0x22b)](_0x28426d),WATCH_TTL_MS);return _0x4bcfff[_0x152c0c(0x22d)](),_0x4bcfff;}[_0xf958e3(0x14b)](_0x56c0c4,_0x1f33b0){const _0x8690d0=_0xf958e3,_0x4eb1d9=this[_0x8690d0(0x274)][_0x8690d0(0x24b)][_0x8690d0(0x261)](_0x56c0c4,_0x1f33b0);if(this[_0x8690d0(0x12c)][_0x8690d0(0x154)](_0x4eb1d9['id']))throw new Error(_0x8690d0(0x1f9));if(_0x4eb1d9[_0x8690d0(0x1f6)]!==_0x8690d0(0x114))throw new Error(_0x8690d0(0x1f9));return _0x4eb1d9;}[_0xf958e3(0x26b)](_0x3191ff,_0x4b4cb8,_0x253eb3){const _0x422e00=_0xf958e3;this[_0x422e00(0x274)][_0x422e00(0x24b)][_0x422e00(0x261)](_0x3191ff,_0x4b4cb8);const _0x35e630=this[_0x422e00(0x1dd)][_0x422e00(0xfb)](_0x253eb3);if(_0x35e630===undefined||_0x35e630[_0x422e00(0x22e)]!==_0x3191ff||_0x35e630[_0x422e00(0xfd)]!==_0x4b4cb8)throw new Error(_0x422e00(0x240));return _0x35e630;}async[_0xf958e3(0x231)](_0x1d8e43,_0x2d2e98){const _0x34b1ae=_0xf958e3;for(const _0x4a245f of this[_0x34b1ae(0x1dd)][_0x34b1ae(0x1de)]()){if(_0x4a245f[_0x34b1ae(0x22e)]!==_0x1d8e43||_0x4a245f[_0x34b1ae(0xfd)]!==_0x2d2e98)continue;_0x4a245f[_0x34b1ae(0x1f6)]===_0x34b1ae(0x1b1)&&(_0x4a245f[_0x34b1ae(0x1f6)]=_0x34b1ae(0x101),await rm(_0x4a245f[_0x34b1ae(0x1ff)],{'force':!![]})[_0x34b1ae(0x28f)](()=>undefined));}}async[_0xf958e3(0x219)](_0x1e2e24,_0x49e3fc,_0x32b169){const _0x203817=_0xf958e3,_0x9a85c5=this[_0x203817(0x274)][_0x203817(0x24b)][_0x203817(0x1b5)](_0x1e2e24,_0x49e3fc,_0x32b169);if(_0x9a85c5[_0x203817(0x104)]!==_0x203817(0x273))throw new Error(_0x203817(0x15a));return await assertRegularFile(this[_0x203817(0x274)][_0x203817(0x24b)][_0x203817(0x108)](_0x1e2e24,_0x9a85c5),_0x9a85c5[_0x203817(0x1af)]),_0x9a85c5;}async[_0xf958e3(0x21b)](_0x311404,_0x37639f,_0x3e261e,_0x12b01d,_0x50c84c){const _0x1fde44=_0xf958e3;if(_0x50c84c>_0x3e261e[_0x1fde44(0x148)][_0x1fde44(0x1c6)])return _0x1fde44(0x1aa);if(_0x37639f[_0x1fde44(0x19b)][_0x1fde44(0x223)]+_0x50c84c>_0x37639f[_0x1fde44(0x19b)][_0x1fde44(0xf7)])return _0x1fde44(0x182);const _0x470916=await lstat(join(_0x311404[_0x1fde44(0x12e)],_0x12b01d))[_0x1fde44(0x28f)](_0x257fd4=>{const _0x29fef5=_0x1fde44;if(_0x257fd4[_0x29fef5(0x258)]===_0x29fef5(0x24e))return undefined;throw _0x257fd4;});return _0x470916===undefined?_0x1fde44(0x10f):_0x1fde44(0x214);}[_0xf958e3(0x159)](_0x3e7671,_0x5cf299,_0x524318){const _0x2c2f36=_0xf958e3,_0x51c735=[{'logicalPath':_0x2c2f36(0x233),'physicalPath':_0x5cf299[_0x2c2f36(0x18e)],'writable':![]},{'logicalPath':_0x2c2f36(0x111),'physicalPath':_0x3e7671[_0x2c2f36(0x12e)],'writable':!![]},{'logicalPath':_0x2c2f36(0x2a0),'physicalPath':_0x3e7671[_0x2c2f36(0x256)],'writable':!![]}];if(_0x524318!==undefined)_0x51c735[_0x2c2f36(0x245)]({'logicalPath':_0x2c2f36(0x1bd),'physicalPath':_0x524318,'writable':![]});if(_0x5cf299[_0x2c2f36(0x1f7)]!==undefined)_0x51c735[_0x2c2f36(0x245)]({'logicalPath':_0x5cf299[_0x2c2f36(0x1f7)],'physicalPath':_0x5cf299[_0x2c2f36(0x18e)],'writable':![]},{'logicalPath':join(_0x5cf299[_0x2c2f36(0x1f7)],_0x2c2f36(0x17f)),'physicalPath':_0x3e7671[_0x2c2f36(0x12e)],'writable':!![]},{'logicalPath':join(_0x5cf299[_0x2c2f36(0x1f7)],_0x2c2f36(0x215)),'physicalPath':_0x3e7671[_0x2c2f36(0x256)],'writable':!![]});return _0x51c735;}[_0xf958e3(0x29b)](_0x139af8,_0x3f7f7d,_0x3fcbec=_0x139af8[_0xf958e3(0x1a6)],_0x1a0125){const _0x3bcb49=_0xf958e3;return this[_0x3bcb49(0x274)][_0x3bcb49(0x285)]({'policyVersion':HOST_POLICY_VERSION,'workspaceDirectory':_0x3f7f7d[_0x3bcb49(0x18e)],..._0x3f7f7d[_0x3bcb49(0x1f7)]===undefined?{}:{'sourceWorkspacePath':_0x3f7f7d[_0x3bcb49(0x1f7)]},'inboxDirectory':_0x139af8[_0x3bcb49(0x12e)],'outputDirectory':_0x139af8[_0x3bcb49(0x256)],..._0x1a0125===undefined?{}:{'generatedImagesDirectory':_0x1a0125},'temporaryDirectory':_0x3fcbec,'networkMode':_0x3f7f7d[_0x3bcb49(0x147)][_0x3bcb49(0x195)]});}[_0xf958e3(0xf5)](_0x15210f){const _0x5d9de1=_0xf958e3,_0x8ba81f=this[_0x5d9de1(0x274)][_0x5d9de1(0x1f0)][_0x5d9de1(0x1c3)][_0x5d9de1(0x27a)](_0x5d9de1(0x1e3))[_0x5d9de1(0xfb)](_0x15210f);if(_0x8ba81f===undefined)return undefined;if(typeof _0x8ba81f['id']!==_0x5d9de1(0x17c))throw new Error(_0x5d9de1(0x26f));return _0x8ba81f['id'];}async[_0xf958e3(0x27f)](_0x30ff82,_0x2ac2d1,_0x1006c1=![]){const _0x14b3cf=_0xf958e3,_0x121792=this[_0x14b3cf(0x274)][_0x14b3cf(0x1f0)][_0x14b3cf(0x1c3)][_0x14b3cf(0x27a)](_0x14b3cf(0x1e1))[_0x14b3cf(0xfb)](_0x30ff82,_0x2ac2d1);if(_0x121792===undefined||_0x121792[_0x14b3cf(0x1f6)]!==_0x14b3cf(0x1e5)&&_0x121792[_0x14b3cf(0x1f6)]!==_0x14b3cf(0x279)||_0x121792[_0x14b3cf(0x10d)]!==HOST_POLICY_VERSION||typeof _0x121792[_0x14b3cf(0x13e)]!==_0x14b3cf(0x17c)||typeof _0x121792[_0x14b3cf(0x16e)]!==_0x14b3cf(0x17c)||typeof _0x121792[_0x14b3cf(0x12b)]!==_0x14b3cf(0x17c)||typeof _0x121792[_0x14b3cf(0x243)]!==_0x14b3cf(0x17c)||typeof _0x121792[_0x14b3cf(0x264)]!==_0x14b3cf(0x17c))throw new Error(_0x14b3cf(0x26f));const _0x374614=this[_0x14b3cf(0x274)][_0x14b3cf(0x24b)][_0x14b3cf(0x265)](_0x121792[_0x14b3cf(0x13e)]),_0x3b6a2b=join(_0x374614,_0x14b3cf(0x134)),_0x4d1412=join(_0x374614,_0x14b3cf(0x1eb)),_0x336af9=await lstat(_0x3b6a2b)[_0x14b3cf(0x28f)](()=>undefined),_0x201632=await lstat(_0x4d1412)[_0x14b3cf(0x28f)](()=>undefined);if(_0x336af9===undefined||!_0x336af9[_0x14b3cf(0x1cc)]()||_0x336af9[_0x14b3cf(0x168)]()||_0x201632===undefined||!_0x201632[_0x14b3cf(0x253)]()||_0x201632[_0x14b3cf(0x168)]())throw new Error(_0x14b3cf(0x26f));let _0x2311e1;try{const _0x474e90=await readFile(_0x3b6a2b,_0x14b3cf(0x282)),_0xfe2654=_0x474e90[_0x14b3cf(0x281)]('\x0a')?_0x474e90[_0x14b3cf(0x21d)](-0xf*-0x174+0x268d+-0x3c59,-(-0x138a+-0xbd7+-0xfb1*-0x2)):_0x474e90;if(_0xfe2654!==_0x121792[_0x14b3cf(0x16e)]||createHash(_0x14b3cf(0x1d4))[_0x14b3cf(0x1cb)](_0xfe2654)[_0x14b3cf(0x1cf)](_0x14b3cf(0x1a3))!==_0x121792[_0x14b3cf(0x243)])throw new Error(_0x14b3cf(0x26f));_0x2311e1=JSON[_0x14b3cf(0x28e)](_0xfe2654);}catch{throw new Error(_0x14b3cf(0x26f));}if(!record(_0x2311e1))throw new Error(_0x14b3cf(0x26f));const _0x31effa=publishedTemplateSnapshot(_0x2311e1),_0x58790c=publishedTemplateDraft(_0x31effa[_0x14b3cf(0x218)],_0x2311e1[_0x14b3cf(0x147)]),_0x18cdf8=_0x58790c[_0x14b3cf(0x147)],_0x35211a=publishedMcpServers(_0x2311e1[_0x14b3cf(0x165)]),_0x523f2f=publishedTemplateContentHash(_0x31effa[_0x14b3cf(0x102)],_0x31effa[_0x14b3cf(0x27c)],_0x31effa[_0x14b3cf(0x218)]),_0x579377=_0x31effa[_0x14b3cf(0x27c)][_0x14b3cf(0x11a)]((_0x2861c9,_0x21af6f)=>_0x2861c9+_0x21af6f[_0x14b3cf(0x1af)],-0x24f9+0x599*0x1+0x1f60);if(_0x2311e1[_0x14b3cf(0x1dc)]!==_0x121792[_0x14b3cf(0x264)]||createHash(_0x14b3cf(0x1d4))[_0x14b3cf(0x1cb)](JSON[_0x14b3cf(0x175)](_0x35211a))[_0x14b3cf(0x1cf)](_0x14b3cf(0x1a3))!==_0x121792[_0x14b3cf(0x264)]||_0x2311e1[_0x14b3cf(0x266)]!==_0x121792[_0x14b3cf(0x12b)]||_0x523f2f!==_0x121792[_0x14b3cf(0x12b)]||_0x121792[_0x14b3cf(0x23b)]!==_0x31effa[_0x14b3cf(0x27c)][_0x14b3cf(0x194)]||_0x121792[_0x14b3cf(0x1a4)]!==_0x579377)throw new Error(_0x14b3cf(0x26f));if(_0x2311e1[_0x14b3cf(0x25b)]!==_0x30ff82||_0x2311e1[_0x14b3cf(0x27b)]!==_0x2ac2d1||_0x2311e1[_0x14b3cf(0x29f)]!==HOST_POLICY_VERSION||_0x18cdf8[_0x14b3cf(0x27b)]!==_0x2ac2d1||_0x18cdf8[_0x14b3cf(0x17b)]!==this[_0x14b3cf(0x274)][_0x14b3cf(0x17b)]())throw new Error(_0x14b3cf(0x26f));if(_0x1006c1)await verifyPublishedTemplateContent(_0x4d1412,_0x31effa[_0x14b3cf(0x102)],_0x31effa[_0x14b3cf(0x27c)]);return{'id':_0x30ff82,'templateId':_0x2ac2d1,'storageKey':_0x121792[_0x14b3cf(0x13e)],'templateDirectory':_0x4d1412,..._0x31effa[_0x14b3cf(0x1f7)]===undefined?{}:{'sourceWorkspacePath':_0x31effa[_0x14b3cf(0x1f7)]},'draft':_0x18cdf8,'modelPolicy':_0x58790c[_0x14b3cf(0x227)],'mcpServers':_0x35211a};}}function hostedRequest(_0x317f7c){const _0x4b2c80=_0xf958e3;if(!record(_0x317f7c))throw new Error(_0x4b2c80(0x12a));const {__requestUserId:_0x1c79a7,__template:_0x22064a,__marAgentModel:_0x29ccbb,__marAgentModels:_0x11db4c,__marAgentRuntimeScopeId:_0x33e08b,__workspaceWatchSessionHash:_0x4f963f,__templateDeleted:_0x190a27,..._0x4a2f4a}=_0x317f7c;if(typeof _0x1c79a7!==_0x4b2c80(0x1cd)||!Number[_0x4b2c80(0x23a)](_0x1c79a7)||_0x1c79a7<=0x29*0x84+-0x3*0x2db+0x1*-0xc93)throw new Error(_0x4b2c80(0x12a));if(_0x190a27!==undefined&&_0x190a27!==!![])throw new Error(_0x4b2c80(0x12a));if(_0x33e08b!==undefined&&(typeof _0x33e08b!==_0x4b2c80(0x17c)||_0x33e08b[_0x4b2c80(0x194)]===0x3*-0x757+0x2277+0x639*-0x2))throw new Error(_0x4b2c80(0x12a));return{'data':_0x4a2f4a,'userId':_0x1c79a7,..._0x22064a===undefined?{}:{'template':_0x22064a},..._0x29ccbb===undefined?{}:{'model':_0x29ccbb},..._0x11db4c===undefined?{}:{'models':_0x11db4c},..._0x33e08b===undefined?{}:{'runtimeScopeId':_0x33e08b},..._0x4f963f===undefined?{}:{'sessionHash':_0x4f963f},..._0x190a27===!![]?{'templateDeleted':!![]}:{}};}function requireWatchSessionHash(_0x35d9f4){const _0x42d037=_0xf958e3;if(typeof _0x35d9f4!==_0x42d037(0x17c)||_0x35d9f4[_0x42d037(0x194)]===0x24f7*-0x1+-0x599+-0x8*-0x552)throw new Error(_0x42d037(0x12a));return _0x35d9f4;}function watchOwnerKey(_0x3683e1,_0x58d9bd){return _0x3683e1+':'+_0x58d9bd;}function runtimeModels(_0x2a5b88){const _0x3f64da=_0xf958e3;return marAgentRuntimeModelConfigurationSchema[_0x3f64da(0x11d)]()[_0x3f64da(0x28e)](_0x2a5b88);}function allowedModels(_0x4e8110,_0x175346){const _0x1fa914=_0xf958e3,_0x19b43f=new Set(_0x4e8110[_0x1fa914(0x227)][_0x1fa914(0x172)]);return _0x175346[_0x1fa914(0x1b8)](_0x4d3a97=>_0x4d3a97[_0x1fa914(0x17a)]&&_0x19b43f[_0x1fa914(0x154)](_0x4e8110[_0x1fa914(0x227)][_0x1fa914(0x294)]===_0x1fa914(0x122)?_0x4d3a97[_0x1fa914(0x1b7)]:_0x4d3a97['id']));}function selectModel(_0x55ebd0,_0x3c998d,_0x142599){const _0x321f0e=_0xf958e3,_0x47120a=allowedModels(_0x55ebd0,_0x3c998d),_0xd6d1e7=_0x47120a[_0x321f0e(0x13a)](_0x4d00d4=>_0x4d00d4['id']===_0x142599);if(_0xd6d1e7!==undefined)return _0xd6d1e7;const _0x240009=_0x47120a[_0x321f0e(0x13a)](_0x4a5d16=>(_0x55ebd0[_0x321f0e(0x227)][_0x321f0e(0x294)]===_0x321f0e(0x122)?_0x4a5d16[_0x321f0e(0x1b7)]:_0x4a5d16['id'])===_0x55ebd0[_0x321f0e(0x227)][_0x321f0e(0x197)]);if(_0x240009!==undefined)return _0x240009;const _0x54b4d0=_0x55ebd0[_0x321f0e(0x227)][_0x321f0e(0x172)][_0x321f0e(0x109)](_0x4d3561=>_0x47120a[_0x321f0e(0x13a)](_0x1b0d38=>(_0x55ebd0[_0x321f0e(0x227)][_0x321f0e(0x294)]===_0x321f0e(0x122)?_0x1b0d38[_0x321f0e(0x1b7)]:_0x1b0d38['id'])===_0x4d3561))[_0x321f0e(0x13a)](_0x9e2900=>_0x9e2900!==undefined);if(_0x54b4d0===undefined)throw new Error(_0x321f0e(0x251));return _0x54b4d0;}function publishedTemplateDraft(_0x32f225,_0x4f868d){const _0x36fe02=_0xf958e3,_0x39f035=conversationTemplateDraftSchema[_0x36fe02(0x291)](_0x4f868d);if(_0x39f035[_0x36fe02(0x28d)]){const {allowedModels:_0x211441,defaultModelId:_0x3c1d44,..._0x9644b0}=_0x39f035[_0x36fe02(0x162)];return{'draft':_0x9644b0,'modelPolicy':{'identity':_0x36fe02(0x122),'allowedIds':_0x211441[_0x36fe02(0x109)](_0xbdf3f3=>_0xbdf3f3[_0x36fe02(0x1b7)]),'defaultId':_0x3c1d44}};}if(_0x32f225!==-0xbe3*0x3+-0x153b+0x3*0x12f7||!record(_0x4f868d)||_0x36fe02(0x208)in _0x4f868d||!Array[_0x36fe02(0x269)](_0x4f868d[_0x36fe02(0x1ab)]))throw new Error(_0x36fe02(0x26f));const _0x597c69=_0x4f868d[_0x36fe02(0x1ab)],_0x2827d={..._0x4f868d};delete _0x2827d[_0x36fe02(0x1ab)];const _0x3ff9d5=conversationTemplateDraftSchema[_0x36fe02(0x291)]({..._0x2827d,'allowedModels':_0x597c69[_0x36fe02(0x109)](_0x24368c=>({'modelId':_0x24368c,'name':_0x24368c}))});if(!_0x3ff9d5[_0x36fe02(0x28d)])throw new Error(_0x36fe02(0x26f));const {allowedModels:_0x319095,defaultModelId:_0x8ead95,..._0x405526}=_0x3ff9d5[_0x36fe02(0x162)];return{'draft':_0x405526,'modelPolicy':{'identity':_0x36fe02(0x23e),'allowedIds':_0x319095[_0x36fe02(0x109)](_0x3f28cb=>_0x3f28cb[_0x36fe02(0x1b7)]),'defaultId':_0x8ead95}};}function networkModels(_0x48c45a,_0x36e7f1){const _0x3c82e1=_0xf958e3;if(_0x36e7f1!==_0x3c82e1(0xff))return _0x48c45a;return _0x48c45a[_0x3c82e1(0x109)](_0x5064c6=>_0x5064c6[_0x3c82e1(0x297)]?{..._0x5064c6,'hostedWebSearch':![]}:_0x5064c6);}function publishedMcpServers(_0x3f9292){const _0x4698c2=_0xf958e3;if(!Array[_0x4698c2(0x269)](_0x3f9292))throw new Error(_0x4698c2(0x26f));return _0x3f9292[_0x4698c2(0x109)](_0x9d1734=>{const _0xca421=_0x4698c2;if(!record(_0x9d1734))throw new Error(_0xca421(0x26f));const _0x560e48=Object[_0xca421(0x2a5)](_0x9d1734)[_0xca421(0x28a)]()[_0xca421(0x1c4)](',');if(_0x560e48!==_0xca421(0x1d0))throw new Error(_0xca421(0x26f));const _0x12e6de=mcpRuntimeDescriptorSchema[_0xca421(0x28e)](_0x9d1734[_0xca421(0x127)]),_0x9bd9fc=mcpInstallationConfigurationSchema[_0xca421(0x28e)](_0x9d1734[_0xca421(0x287)]);if(typeof _0x9d1734['id']!==_0xca421(0x17c)||typeof _0x9d1734[_0xca421(0x22a)]!==_0xca421(0x17c)||typeof _0x9d1734[_0xca421(0x183)]!==_0xca421(0x17c)||typeof _0x9d1734[_0xca421(0x252)]!==_0xca421(0x17c)||_0x9d1734[_0xca421(0x228)]!==_0xca421(0x15c)&&_0x9d1734[_0xca421(0x228)]!==_0xca421(0x1b2)||_0x9d1734[_0xca421(0x1e7)]!==_0x12e6de[_0xca421(0x1e7)])throw new Error(_0xca421(0x26f));return{'id':_0x9d1734['id'],'serverName':_0x9d1734[_0xca421(0x22a)],'displayName':_0x9d1734[_0xca421(0x183)],'version':_0x9d1734[_0xca421(0x252)],'origin':_0x9d1734[_0xca421(0x228)],'transport':_0x12e6de[_0xca421(0x1e7)],'runtime':_0x12e6de,'configuration':_0x9bd9fc};});}function publishedTemplateSnapshot(_0x4ed957){const _0xc12bc7=_0xf958e3;if(_0x4ed957[_0xc12bc7(0x218)]===0x17e9+0x15*-0x153+0x1b*0x25){const _0x17fbd5=publishedTemplateFiles(_0x4ed957[_0xc12bc7(0x20c)]);return{'schemaVersion':0x1,'directories':legacyPublishedTemplateDirectories(_0x17fbd5),'entries':_0x17fbd5};}if(_0x4ed957[_0xc12bc7(0x218)]!==0x59d*0x2+0x2103+-0xa9*0x43||typeof _0x4ed957[_0xc12bc7(0x1f7)]!==_0xc12bc7(0x17c)||!Array[_0xc12bc7(0x269)](_0x4ed957[_0xc12bc7(0x102)])||!Array[_0xc12bc7(0x269)](_0x4ed957[_0xc12bc7(0x27c)]))throw new Error(_0xc12bc7(0x26f));validatePublishedSourceWorkspacePath(_0x4ed957[_0xc12bc7(0x1f7)]);const _0x1ffe4e=_0x4ed957[_0xc12bc7(0x102)][_0xc12bc7(0x109)](safePublishedTemplateRelativePath);if(new Set(_0x1ffe4e)[_0xc12bc7(0x1af)]!==_0x1ffe4e[_0xc12bc7(0x194)]||_0x1ffe4e[_0xc12bc7(0x23f)](_0xc12bc7(0x17f))||_0x1ffe4e[_0xc12bc7(0x23f)](_0xc12bc7(0x215)))throw new Error(_0xc12bc7(0x26f));const _0x47ec60=_0x4ed957[_0xc12bc7(0x27c)][_0xc12bc7(0x109)](publishedTemplateEntry);if(new Set(_0x47ec60[_0xc12bc7(0x109)](_0x54e488=>_0x54e488[_0xc12bc7(0x143)]))[_0xc12bc7(0x1af)]!==_0x47ec60[_0xc12bc7(0x194)])throw new Error(_0xc12bc7(0x26f));return{'schemaVersion':0x2,'sourceWorkspacePath':_0x4ed957[_0xc12bc7(0x1f7)],'directories':_0x1ffe4e,'entries':_0x47ec60};}function publishedTemplateEntry(_0x16c07f){const _0x45f7f6=_0xf958e3;if(!record(_0x16c07f))throw new Error(_0x45f7f6(0x26f));if(_0x16c07f[_0x45f7f6(0x10a)]===_0x45f7f6(0x1fb))return publishedTemplateFile(_0x16c07f,!![]);if(_0x16c07f[_0x45f7f6(0x10a)]!==_0x45f7f6(0x184)||typeof _0x16c07f[_0x45f7f6(0x206)]!==_0x45f7f6(0x17c)||_0x16c07f[_0x45f7f6(0x206)][_0x45f7f6(0x194)]===0x3*-0x366+0x4cf*0x3+-0x39*0x13||_0x16c07f[_0x45f7f6(0x206)][_0x45f7f6(0x23f)]('\x00')||_0x16c07f[_0x45f7f6(0x249)]!==_0x45f7f6(0x14a)&&_0x16c07f[_0x45f7f6(0x249)]!==_0x45f7f6(0x1e2)||typeof _0x16c07f[_0x45f7f6(0x29d)]!==_0x45f7f6(0x17c))throw new Error(_0x45f7f6(0x26f));const _0x5a4743=safePublishedTemplateRelativePath(_0x16c07f[_0x45f7f6(0x143)]),_0x47876d=safePublishedTemplateSize(_0x16c07f[_0x45f7f6(0x1af)]),_0x3bc0f9=_0x16c07f[_0x45f7f6(0x206)],_0x1a64ae=_0x16c07f[_0x45f7f6(0x249)],_0x3dbb34=_0x16c07f[_0x45f7f6(0x29d)];if(_0x47876d!==Buffer[_0x45f7f6(0x14d)](_0x3bc0f9))throw new Error(_0x45f7f6(0x26f));if(_0x1a64ae===_0x45f7f6(0x14a))safePublishedTemplateRelativePath(_0x3dbb34);else{if(!isAbsolute(_0x3dbb34)||!RUNTIME_LINK_ROOTS[_0x45f7f6(0x1b0)](_0x1de944=>_0x3dbb34===_0x1de944||within(_0x1de944,_0x3dbb34)))throw new Error(_0x45f7f6(0x26f));}return{'kind':_0x45f7f6(0x184),'relativePath':_0x5a4743,'size':_0x47876d,'linkTarget':_0x3bc0f9,'targetKind':_0x1a64ae,'resolvedTarget':_0x3dbb34};}function publishedTemplateFiles(_0x277986){const _0x27c4fd=_0xf958e3;if(!Array[_0x27c4fd(0x269)](_0x277986))throw new Error(_0x27c4fd(0x26f));const _0x5a598b=new Set();return _0x277986[_0x27c4fd(0x109)](_0x51ce45=>{const _0x1ab208=_0x27c4fd,_0xabaa6d=publishedTemplateFile(_0x51ce45);if(_0x5a598b[_0x1ab208(0x154)](_0xabaa6d[_0x1ab208(0x143)]))throw new Error(_0x1ab208(0x26f));return _0x5a598b[_0x1ab208(0x1ce)](_0xabaa6d[_0x1ab208(0x143)]),_0xabaa6d;});}function publishedTemplateFile(_0x346d05,_0x133701=![]){const _0x6cd3f0=_0xf958e3;if(!record(_0x346d05)||_0x133701&&_0x346d05[_0x6cd3f0(0x10a)]!==_0x6cd3f0(0x1fb)||typeof _0x346d05[_0x6cd3f0(0x260)]!==_0x6cd3f0(0x237)||typeof _0x346d05[_0x6cd3f0(0x1d4)]!==_0x6cd3f0(0x17c)||!/^[a-f0-9]{64}$/u[_0x6cd3f0(0x229)](_0x346d05[_0x6cd3f0(0x1d4)]))throw new Error(_0x6cd3f0(0x26f));return{'kind':_0x6cd3f0(0x1fb),'relativePath':safePublishedTemplateRelativePath(_0x346d05[_0x6cd3f0(0x143)]),'size':safePublishedTemplateSize(_0x346d05[_0x6cd3f0(0x1af)]),'executable':_0x346d05[_0x6cd3f0(0x260)],'sha256':_0x346d05[_0x6cd3f0(0x1d4)]};}function safePublishedTemplateRelativePath(_0x56a345){const _0x19eb19=_0xf958e3;if(typeof _0x56a345!==_0x19eb19(0x17c)||_0x56a345[_0x19eb19(0x194)]===0x2*0xfc3+-0xe45+-0x1141||_0x56a345[_0x19eb19(0x232)]('/')||_0x56a345[_0x19eb19(0x23f)]('\x5c')||_0x56a345[_0x19eb19(0x24a)]('/')[_0x19eb19(0x1b0)](_0x142f0d=>_0x142f0d[_0x19eb19(0x194)]===-0x21*-0x39+0x2*-0xba2+0xfeb||_0x142f0d==='.'||_0x142f0d==='..'))throw new Error(_0x19eb19(0x26f));return _0x56a345;}function safePublishedTemplateSize(_0x282e91){const _0x399356=_0xf958e3;if(!Number[_0x399356(0x23a)](_0x282e91)||_0x282e91<0x11*0xa3+0x35*-0x8b+0x2*0x8fa)throw new Error(_0x399356(0x26f));return _0x282e91;}function legacyPublishedTemplateDirectories(_0x372abb){const _0x54f585=_0xf958e3,_0xc06293=new Set();for(const _0x51e134 of _0x372abb){const _0x1e7f77=_0x51e134[_0x54f585(0x143)][_0x54f585(0x24a)]('/');for(let _0x38ab63=0x4*0x7a5+0x19b+-0xaba*0x3;_0x38ab63<_0x1e7f77[_0x54f585(0x194)];_0x38ab63+=0xc9c+-0x1*-0xab+-0xd46)_0xc06293[_0x54f585(0x1ce)](_0x1e7f77[_0x54f585(0x21d)](0x2*-0x12b2+0x4d7+-0x281*-0xd,_0x38ab63)[_0x54f585(0x1c4)]('/'));}return[..._0xc06293][_0x54f585(0x28a)]((_0x4d4cfb,_0x19a479)=>_0x4d4cfb[_0x54f585(0x19c)](_0x19a479,_0x54f585(0x20e)));}function publishedTemplateContentHash(_0x1a391b,_0x370b8d,_0x3311ce){const _0x203767=_0xf958e3,_0x5265c9=_0x3311ce===-0x179+-0x917+-0x5*-0x21d?_0x370b8d[_0x203767(0x109)](_0x29c283=>{const _0x7a1d01=_0x203767;if(_0x29c283[_0x7a1d01(0x10a)]!==_0x7a1d01(0x1fb))throw new Error(_0x7a1d01(0x26f));return _0x29c283[_0x7a1d01(0x143)]+'\x00'+_0x29c283[_0x7a1d01(0x1af)]+'\x00'+_0x29c283[_0x7a1d01(0x1d4)];})[_0x203767(0x1c4)]('\x0a'):[..._0x1a391b[_0x203767(0x109)](_0x326030=>_0x203767(0x1e6)+_0x326030),..._0x370b8d[_0x203767(0x109)](_0x4b9135=>_0x4b9135[_0x203767(0x10a)]===_0x203767(0x1fb)?_0x4b9135[_0x203767(0x10a)]+'\x00'+_0x4b9135[_0x203767(0x143)]+'\x00'+_0x4b9135[_0x203767(0x1af)]+'\x00'+(_0x4b9135[_0x203767(0x260)]?0x13*0x86+-0xff4+0x39*0x1b:0x1c95+0xccb+0x2960*-0x1)+'\x00'+_0x4b9135[_0x203767(0x1d4)]:_0x4b9135[_0x203767(0x10a)]+'\x00'+_0x4b9135[_0x203767(0x143)]+'\x00'+_0x4b9135[_0x203767(0x1af)]+'\x00'+_0x4b9135[_0x203767(0x206)]+'\x00'+_0x4b9135[_0x203767(0x249)]+'\x00'+_0x4b9135[_0x203767(0x29d)])][_0x203767(0x1c4)]('\x0a');return createHash(_0x203767(0x1d4))[_0x203767(0x1cb)](_0x5265c9)[_0x203767(0x1cf)](_0x203767(0x1a3));}function _0x5cc2(_0x431810,_0x233cbb){_0x431810=_0x431810-(-0x1af8+-0x1*-0x3ae+0x55*0x49);const _0x42c8f5=_0x2d73();let _0x86d949=_0x42c8f5[_0x431810];if(_0x5cc2['mxrNGk']===undefined){var _0xd483b0=function(_0x5cf165){const _0x573c63='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x3f2048='',_0x26a545='';for(let _0x4f8e68=0x503+0x5ab*0x1+-0x1*0xaae,_0x9e20d1,_0x5ef135,_0x51158a=0x1e2*-0xc+-0xd4e*0x1+-0x1*-0x23e6;_0x5ef135=_0x5cf165['charAt'](_0x51158a++);~_0x5ef135&&(_0x9e20d1=_0x4f8e68%(-0x413+0xfcb*0x1+-0xbb4)?_0x9e20d1*(-0x1c2b+-0x79*0x1f+-0x4a*-0x95)+_0x5ef135:_0x5ef135,_0x4f8e68++%(-0x8c8+-0x1099+0x1965))?_0x3f2048+=String['fromCharCode'](-0x74d+0x5*0x3be+-0xa6a&_0x9e20d1>>(-(-0x1b9e+0x6b3*-0x4+-0xc*-0x489)*_0x4f8e68&0x2*-0xc97+0x189b+-0x11*-0x9)):0xd9*-0x5+0xcbe+-0x881){_0x5ef135=_0x573c63['indexOf'](_0x5ef135);}for(let _0x1bbabd=0x1e11+-0x5a*0x6a+0x733*0x1,_0x258a3c=_0x3f2048['length'];_0x1bbabd<_0x258a3c;_0x1bbabd++){_0x26a545+='%'+('00'+_0x3f2048['charCodeAt'](_0x1bbabd)['toString'](0x99+-0x1*-0x239d+0x7*-0x52a))['slice'](-(0x1f96+0x233*0x6+0x2*-0x1663));}return decodeURIComponent(_0x26a545);};_0x5cc2['pifuul']=_0xd483b0,_0x5cc2['GDkAMn']={},_0x5cc2['mxrNGk']=!![];}const _0x49bea8=_0x42c8f5[-0x9c7*-0x1+0x3*-0x3b+0x2*-0x48b];_0x5cc2['CPshbK']!==_0x49bea8&&(_0x5cc2['GDkAMn']={},_0x5cc2['CPshbK']=_0x49bea8);const _0x4aa1c9=_0x5cc2['GDkAMn'][_0x431810];return _0x4aa1c9===undefined?(_0x86d949=_0x5cc2['pifuul'](_0x86d949),_0x5cc2['GDkAMn'][_0x431810]=_0x86d949):_0x86d949=_0x4aa1c9,_0x86d949;}async function verifyPublishedTemplateContent(_0x529575,_0x37b980,_0x1217d8){const _0xa7a771=_0xf958e3,_0x5ac617=new Map(_0x1217d8[_0xa7a771(0x109)](_0x4a27b1=>[_0x4a27b1[_0xa7a771(0x143)],_0x4a27b1])),_0x5bcbe3=new Set([..._0x37b980,_0xa7a771(0x17f),_0xa7a771(0x215)]),_0x43c9ad=new Set(),_0x27ce9e=await listPublishedTemplateEntries(_0x529575,_0x5bcbe3,_0x43c9ad);if(_0x27ce9e[_0xa7a771(0x194)]!==_0x5ac617[_0xa7a771(0x1af)]||_0x43c9ad[_0xa7a771(0x1af)]!==_0x5bcbe3[_0xa7a771(0x1af)])throw new Error(_0xa7a771(0x26f));for(const _0x123d65 of _0x27ce9e){const _0x45ca3c=_0x5ac617[_0xa7a771(0xfb)](_0x123d65[_0xa7a771(0x143)]);if(_0x45ca3c===undefined||_0x45ca3c[_0xa7a771(0x10a)]!==_0x123d65[_0xa7a771(0x10a)])throw new Error(_0xa7a771(0x26f));if(_0x45ca3c[_0xa7a771(0x10a)]===_0xa7a771(0x1fb)&&_0x123d65[_0xa7a771(0x10a)]===_0xa7a771(0x1fb)){if(_0x45ca3c[_0xa7a771(0x1af)]!==_0x123d65[_0xa7a771(0x1af)]||_0x45ca3c[_0xa7a771(0x260)]!==_0x123d65[_0xa7a771(0x260)]||_0x123d65[_0xa7a771(0x116)]!==(_0x45ca3c[_0xa7a771(0x260)]?-0x1*-0x20ea+0x24a7+-0x4424:0x20fa+0x1d87+-0x3d5d)||_0x45ca3c[_0xa7a771(0x1d4)]!==_0x123d65[_0xa7a771(0x1d4)])throw new Error(_0xa7a771(0x26f));continue;}if(_0x45ca3c[_0xa7a771(0x10a)]!==_0xa7a771(0x184)||_0x123d65[_0xa7a771(0x10a)]!==_0xa7a771(0x184)||_0x45ca3c[_0xa7a771(0x1af)]!==_0x123d65[_0xa7a771(0x1af)]||_0x45ca3c[_0xa7a771(0x206)]!==_0x123d65[_0xa7a771(0x206)])throw new Error(_0xa7a771(0x26f));await verifyPublishedSymlinkResolution(_0x529575,_0x45ca3c,_0x123d65[_0xa7a771(0x16d)]);}}async function verifyPublishedSymlinkResolution(_0x245209,_0x1b96e1,_0x537106){const _0x458d26=_0xf958e3;let _0x378012;try{_0x378012=await realpath(_0x537106);}catch{throw new Error(_0x458d26(0x26f));}if(_0x1b96e1[_0x458d26(0x249)]===_0x458d26(0x1e2)){if(_0x378012!==_0x1b96e1[_0x458d26(0x29d)])throw new Error(_0x458d26(0x26f));return;}let _0x283175,_0x199698;try{[_0x283175,_0x199698]=await Promise[_0x458d26(0x1f2)]([realpath(join(_0x245209,..._0x1b96e1[_0x458d26(0x29d)][_0x458d26(0x24a)]('/'))),realpath(_0x245209)]);}catch{throw new Error(_0x458d26(0x26f));}if(_0x378012!==_0x283175||!within(_0x199698,_0x378012))throw new Error(_0x458d26(0x26f));}async function listPublishedTemplateEntries(_0x4b3b25,_0xb589e2,_0x102da9,_0x480312=''){const _0x49c4e5=_0xf958e3,_0x47f63e=await lstat(_0x4b3b25);if(!_0x47f63e[_0x49c4e5(0x253)]()||_0x47f63e[_0x49c4e5(0x168)]()||(_0x47f63e[_0x49c4e5(0x116)]&-0xed*0x2+0x1b1a*-0x1+0x1a1*0x13)!==-0x63*0x4+0x15b1*0x1+-0x12b8)throw new Error(_0x49c4e5(0x26f));const _0x59502b=[];for(const _0x5f3d01 of await readdir(_0x4b3b25,{'withFileTypes':!![]})){const _0x26cbe9=join(_0x4b3b25,_0x5f3d01[_0x49c4e5(0x160)]),_0x1b2f67=_0x480312[_0x49c4e5(0x194)]===0x1*-0x16c3+0x319*-0x2+-0x3*-0x9a7?_0x5f3d01[_0x49c4e5(0x160)]:_0x480312+'/'+_0x5f3d01[_0x49c4e5(0x160)],_0x2184c8=await lstat(_0x26cbe9);if(_0x2184c8[_0x49c4e5(0x168)]()){const _0x51459a=await readlink(_0x26cbe9);_0x59502b[_0x49c4e5(0x245)]({'kind':_0x49c4e5(0x184),'relativePath':_0x1b2f67,'size':Buffer[_0x49c4e5(0x14d)](_0x51459a),'linkTarget':_0x51459a,'sourcePath':_0x26cbe9});continue;}if(_0x2184c8[_0x49c4e5(0x253)]()){if(!_0xb589e2[_0x49c4e5(0x154)](_0x1b2f67))throw new Error(_0x49c4e5(0x26f));_0x102da9[_0x49c4e5(0x1ce)](_0x1b2f67),_0x59502b[_0x49c4e5(0x245)](...await listPublishedTemplateEntries(_0x26cbe9,_0xb589e2,_0x102da9,_0x1b2f67));}else{if(!_0x2184c8[_0x49c4e5(0x1cc)]()||_0x2184c8[_0x49c4e5(0x259)]!==0x30*-0xc9+-0xe17*-0x1+0x35*0x72||!Number[_0x49c4e5(0x23a)](_0x2184c8[_0x49c4e5(0x1af)]))throw new Error(_0x49c4e5(0x26f));_0x59502b[_0x49c4e5(0x245)]({'kind':_0x49c4e5(0x1fb),'relativePath':_0x1b2f67,'size':_0x2184c8[_0x49c4e5(0x1af)],'executable':(_0x2184c8[_0x49c4e5(0x116)]&-0x45*-0xe+-0x5c4+0x247)!==-0xa01*0x1+0x1f92+-0x1*0x1591,'mode':_0x2184c8[_0x49c4e5(0x116)]&0x270c+0x18f9*-0x1+-0xc14,'sha256':createHash(_0x49c4e5(0x1d4))[_0x49c4e5(0x1cb)](await readFile(_0x26cbe9))[_0x49c4e5(0x1cf)](_0x49c4e5(0x1a3))});}}return _0x59502b;}function validatePublishedSourceWorkspacePath(_0x563621){const _0x15df71=_0xf958e3;if(!isAbsolute(_0x563621)||resolve(_0x563621)!==_0x563621||_0x563621==='/'||RESERVED_SANDBOX_ROOTS[_0x15df71(0x1b0)](_0x452b4f=>_0x563621===_0x452b4f||within(_0x452b4f,_0x563621)||within(_0x563621,_0x452b4f)))throw new Error(_0x15df71(0x26f));}function within(_0x5ef1a3,_0x369e09){const _0x4d06ce=_0xf958e3,_0x1dc982=relative(_0x5ef1a3,_0x369e09);return _0x1dc982[_0x4d06ce(0x194)]>0xe14+-0x1e53+0x1*0x103f&&_0x1dc982!=='..'&&!_0x1dc982[_0x4d06ce(0x232)]('..'+sep);}function resolveMcpServers(_0xaec0a4,_0x264ea6){const _0x35390b=_0xf958e3,_0x19bbca=_0x2b6934=>{const _0x598119=_0x5cc2,_0x8ed02a={};for(const [_0xa407d8,_0x138e3e]of Object[_0x598119(0x27c)](_0x2b6934??{})){const _0x46a2aa=_0x264ea6[_0x138e3e[_0x598119(0x11c)]];if(_0x46a2aa===undefined)throw new Error(_0x598119(0x1c9));_0x8ed02a[_0xa407d8]=_0x46a2aa;}return _0x8ed02a;};return _0xaec0a4[_0x35390b(0x165)][_0x35390b(0x192)](_0x331f53=>{const _0x13a17b=_0x35390b;if(_0x331f53[_0x13a17b(0x127)][_0x13a17b(0x1e7)]===_0x13a17b(0x113)){if(_0xaec0a4[_0x13a17b(0x147)][_0x13a17b(0x195)]!==_0x13a17b(0x234))return[];return[{'name':_0x331f53[_0x13a17b(0x22a)],'lifecycle':_0x13a17b(0x29a),'transport':_0x13a17b(0x113),'url':_0x331f53[_0x13a17b(0x127)][_0x13a17b(0x100)],'headers':{..._0x19bbca(_0x331f53[_0x13a17b(0x127)][_0x13a17b(0x202)]),..._0x19bbca(_0x331f53[_0x13a17b(0x287)][_0x13a17b(0x202)])}}];}return[{'name':_0x331f53[_0x13a17b(0x22a)],'lifecycle':_0x13a17b(0x29a),'transport':_0x13a17b(0x15f),'command':_0x331f53[_0x13a17b(0x127)][_0x13a17b(0x1ed)],'args':[..._0x331f53[_0x13a17b(0x127)][_0x13a17b(0xf9)],..._0x331f53[_0x13a17b(0x287)][_0x13a17b(0x24c)]??[]],'environment':{..._0x19bbca(_0x331f53[_0x13a17b(0x127)][_0x13a17b(0x198)]),..._0x19bbca(_0x331f53[_0x13a17b(0x287)][_0x13a17b(0x198)])}}];});}function hostedConversationSummary(_0x35573f,_0x4f274b){const _0x537b06=_0xf958e3;return hostedConversationSummarySchema[_0x537b06(0x28e)]({'id':_0x35573f['id'],'nodeId':_0x35573f[_0x537b06(0x17b)],'sessionId':_0x35573f[_0x537b06(0x16b)],'templateId':_0x35573f[_0x537b06(0x27b)],'templateName':_0x35573f[_0x537b06(0x1db)],'activeVersionId':_0x35573f[_0x537b06(0x272)],'title':_0x35573f[_0x537b06(0x239)],'pinnedAt':_0x35573f[_0x537b06(0x141)],'status':_0x35573f[_0x537b06(0x1f6)],'modelId':_0x35573f[_0x537b06(0x1b7)],'createdAt':_0x35573f[_0x537b06(0x19a)],'updatedAt':_0x35573f[_0x537b06(0x241)],'lastActivityAt':_0x35573f[_0x537b06(0x276)],..._0x4f274b===undefined?{}:{'activity':_0x4f274b}});}function templateSummary(_0xfc5e60,_0x1e63fb){const _0xe74d4d=_0xf958e3;return conversationTemplateSummarySchema[_0xe74d4d(0x28e)]({'id':_0xfc5e60[_0xe74d4d(0x27b)],'nodeId':_0xfc5e60[_0xe74d4d(0x17b)],'name':_0xfc5e60[_0xe74d4d(0x1db)],'description':_0x1e63fb[_0xe74d4d(0x1b4)],'status':_0xfc5e60[_0xe74d4d(0x24f)]?_0xe74d4d(0x18b):_0xe74d4d(0x114),'currentVersionId':_0xfc5e60[_0xe74d4d(0x272)],'available':!_0xfc5e60[_0xe74d4d(0x24f)],'createdAt':_0xfc5e60[_0xe74d4d(0x19a)],'updatedAt':_0x1e63fb[_0xe74d4d(0x241)]});}function modelSummary(_0x1b56ee,_0x168eaa){const _0x1f1fb0=_0xf958e3;return{'id':_0x1b56ee['id'],'name':_0x1b56ee[_0x1f1fb0(0x160)],'protocol':_0x1b56ee[_0x1f1fb0(0x15d)],'baseUrl':_0x1b56ee[_0x1f1fb0(0x131)],'modelId':_0x1b56ee[_0x1f1fb0(0x1b7)],'contextWindowTokens':_0x1b56ee[_0x1f1fb0(0x191)],'maxOutputTokens':_0x1b56ee[_0x1f1fb0(0x189)],'inputCapabilities':_0x1b56ee[_0x1f1fb0(0x248)],'outputCapabilities':_0x1b56ee[_0x1f1fb0(0x1a9)],'reasoningEfforts':_0x1b56ee[_0x1f1fb0(0x26d)],'hostedWebSearch':_0x1b56ee[_0x1f1fb0(0x297)],..._0x1b56ee[_0x1f1fb0(0x244)]===undefined?{}:{'responsesTransport':_0x1b56ee[_0x1f1fb0(0x244)]},'responsesPreviousResponseId':_0x1b56ee[_0x1f1fb0(0x14c)],'enabled':_0x1b56ee[_0x1f1fb0(0x17a)],'sortOrder':_0x168eaa,'apiKeyConfigured':!![]};}function systemInstruction(_0x35cd2b){const _0x44e584=_0xf958e3,_0x28f1ea=_0x35cd2b[_0x44e584(0x147)],_0x590c4b=_0x28f1ea[_0x44e584(0x195)]===_0x44e584(0xff)?_0x44e584(0x220):_0x44e584(0x1a1);return[_0x44e584(0x155),_0x44e584(0x20b),_0x44e584(0x17d),..._0x35cd2b[_0x44e584(0x1f7)]===undefined?[]:[_0x44e584(0x1a0)+_0x35cd2b[_0x44e584(0x1f7)]+_0x44e584(0x289)+join(_0x35cd2b[_0x44e584(0x1f7)],_0x44e584(0x17f))+_0x44e584(0x255)+join(_0x35cd2b[_0x44e584(0x1f7)],_0x44e584(0x215))+_0x44e584(0x135)],_0x44e584(0x18f),_0x590c4b][_0x44e584(0x1c4)]('\x0a');}function attachmentPrompt(_0x4a6fd4,_0x374940){const _0xd4792=_0xf958e3;if(_0x374940[_0xd4792(0x194)]===0xe54+-0x1*0x20bf+0x126b)return _0x4a6fd4;const _0x135d39=_0x374940[_0xd4792(0x109)](_0x1486aa=>_0xd4792(0x1c7)+_0x1486aa[_0xd4792(0x143)])[_0xd4792(0x1c4)]('\x0a');return''+_0x4a6fd4+(_0x4a6fd4[_0xd4792(0x21a)]()[_0xd4792(0x194)]===-0x1*-0x449+-0xc7f*0x2+0x14b5?'':'\x0a\x0a')+_0xd4792(0x242)+_0x135d39;}function automaticHostedConversationTitle(_0x4f0d64){const _0x4994dd=_0xf958e3;if(_0x4f0d64===undefined)return undefined;const _0x56272f=sessionTitleFromFirstMessage(_0x4f0d64);if(_0x56272f[_0x4994dd(0x194)]===-0x1db9+-0xcca+0x2a83||/^(?:new|untitled) session(?:\s*[-–—:]\s*\d{4}-\d{2}-\d{2}.*)?$/iu[_0x4994dd(0x229)](_0x56272f))return undefined;return _0x56272f;}function runFromMessage(_0x1d5fd6){const _0x1fe1ae=_0xf958e3;return{'id':_0x1d5fd6[_0x1fe1ae(0x224)],'status':_0x1d5fd6[_0x1fe1ae(0x1f6)],'startedAt':_0x1d5fd6[_0x1fe1ae(0x19a)],'completedAt':_0x1d5fd6[_0x1fe1ae(0x1f6)]===_0x1fe1ae(0x267)?null:_0x1d5fd6[_0x1fe1ae(0x241)]};}function runInterruptionKey(_0x393ea2,_0x4cdc5c){return _0x393ea2+'\x00'+_0x4cdc5c;}function uploadProjection(_0x1e5df2){const _0x171ecc=_0xf958e3;return{'uploadId':_0x1e5df2[_0x171ecc(0x217)],'conversationId':_0x1e5df2[_0x171ecc(0xfd)],'name':_0x1e5df2[_0x171ecc(0x160)],'mimeType':_0x1e5df2[_0x171ecc(0xf4)],'receivedBytes':_0x1e5df2[_0x171ecc(0x173)],'size':_0x1e5df2[_0x171ecc(0x1af)],'status':_0x1e5df2[_0x171ecc(0x1f6)],..._0x1e5df2[_0x171ecc(0x17e)]===undefined?{}:{'file':_0x1e5df2[_0x171ecc(0x17e)]}};}async function assertRegularFile(_0x4aa1e9,_0x1fa674){const _0x5e9372=_0xf958e3,_0x14165c=await lstat(_0x4aa1e9)[_0x5e9372(0x28f)](()=>{const _0x4a1f1d=_0x5e9372;throw new Error(_0x4a1f1d(0x1ef));});if(!_0x14165c[_0x5e9372(0x1cc)]()||_0x14165c[_0x5e9372(0x168)]()||_0x14165c[_0x5e9372(0x259)]!==0x685*-0x2+0x59*0x37+-0x614||_0x14165c[_0x5e9372(0x1af)]!==_0x1fa674)throw new Error(_0x5e9372(0x1ef));}async function assertUploadTemporaryFile(_0x344014,_0x1a6348){const _0x129ede=_0xf958e3,_0x320636=await lstat(_0x344014)[_0x129ede(0x28f)](()=>{const _0x389415=_0x129ede;throw new Error(_0x389415(0x170));});if(!_0x320636[_0x129ede(0x1cc)]()||_0x320636[_0x129ede(0x168)]()||_0x320636[_0x129ede(0x259)]!==0x196f+0x4af+0x1e1d*-0x1||_0x320636[_0x129ede(0x1af)]!==_0x1a6348)throw new Error(_0x129ede(0x170));}function record(_0x217a09){const _0x45f9d3=_0xf958e3;return typeof _0x217a09===_0x45f9d3(0x1c1)&&_0x217a09!==null&&!Array[_0x45f9d3(0x269)](_0x217a09);}
|
|
2
|
+
const _0x132f42=_0x1c9a;(function(_0x6c40e1,_0x23b77d){const _0x56f56a=_0x1c9a,_0x5b6e9b=_0x6c40e1();while(!![]){try{const _0x174f2b=parseInt(_0x56f56a(0x244))/(-0x121f*-0x2+-0x16a4+-0xd99*0x1)*(parseInt(_0x56f56a(0x26a))/(0x1a45+-0x1825+-0x21e))+-parseInt(_0x56f56a(0xf2))/(-0x7ed*0x1+-0x5df+0xdcf)+parseInt(_0x56f56a(0x251))/(0x7ab+-0x116a+0x9c3)*(parseInt(_0x56f56a(0x246))/(-0x75a*0x4+-0x1*-0x1edf+-0x172))+-parseInt(_0x56f56a(0x215))/(-0xa7d+0xfbc+0xbf*-0x7)+-parseInt(_0x56f56a(0x128))/(0x1f8+-0x1f30+0x1d3f)*(parseInt(_0x56f56a(0x1a4))/(-0x22e8*0x1+0x10a9*-0x2+-0x1*-0x4442))+-parseInt(_0x56f56a(0x1de))/(0xab5*-0x1+0x12cb+-0x80d)*(parseInt(_0x56f56a(0x11f))/(-0x1ded+-0x2a2+-0x685*-0x5))+parseInt(_0x56f56a(0x284))/(0x2*0xf44+0x20c7*-0x1+0x24a);if(_0x174f2b===_0x23b77d)break;else _0x5b6e9b['push'](_0x5b6e9b['shift']());}catch(_0x1107cf){_0x5b6e9b['push'](_0x5b6e9b['shift']());}}}(_0x5676,0x2*0x15f67+0xb2*-0x631+0x1e4f3*0x4));import{createHash,randomUUID}from'node:crypto';import{lstat,mkdir,open,readFile,readlink,readdir,realpath,rename,rm,utimes}from'node:fs/promises';import{isAbsolute,join,relative,resolve,sep}from'node:path';import{conversationTemplateDraftSchema,conversationTemplateSummarySchema,hostedConversationConfigUpdateInputSchema,hostedConversationCreateInputSchema,hostedConversationDeleteResultSchema,hostedConversationFileDeleteInputSchema,hostedConversationFileDeleteResultSchema,hostedConversationFileReadInputSchema,hostedConversationFileReadResultSchema,hostedConversationFilesSchema,hostedConversationIdInputSchema,hostedConversationImageReadInputSchema,hostedConversationListInputSchema,hostedConversationListPageSchema,hostedConversationMessageInputSchema,hostedConversationMetadataUpdateInputSchema,hostedConversationSnapshotSchema,hostedConversationSummarySchema,hostedConversationUnwatchInputSchema,hostedConversationUploadChunkInputSchema,hostedConversationUploadControlInputSchema,hostedConversationUploadCreateInputSchema,hostedConversationUploadPreflightInputSchema,hostedConversationUploadPreflightResultSchema,hostedConversationUploadSchema,hostedConversationWatchInputSchema,marAgentRuntimeModelConfigurationSchema,mcpInstallationConfigurationSchema,mcpRuntimeDescriptorSchema}from'@myagentroam/protocol';import{hostedConversationGeneratedImagesDisplayDirectory,hostedConversationImageRunId,marAgentGeneratedImagesDirectory}from'../runner/mar-agent/generated-images.js';function _0x5676(){const _0x13d116=['Dw5Yzwy','CMvHC29UAw5NrwzMB3j0CW','l2XPyJy0','Agv4','y2f0y2G','se9tvevex0nptLzfuLnbveLptL9tvefurv9jtLzbteLe','se9tvevex0nptLzfuLnbveLptL9trvntsu9ox0LovKfmsuq','C2L6zq','DgfYz2v0vMvYC2LVBKLK','DxrMoa','ChjVBxb0','CMvSyxrPDMvqyxrO','DxbSB2fKuhjLzMXPz2H0u3rHDhvZ','vvbtvfjfqu1Ftu9eruXFsuq','D29YA2jLBMnOq29UBMvJDgLVBKLK','Dg9tDhjPBMC','zMLUza','AxndB252zxjZyxrPB25jBLvZzq','y29UzMLNDxjHDgLVBIXKAxnWBgf5tMfTzsXPzcXVCMLNAw4SCNvUDgLTzsXZzxj2zxjoyw1LlhrYyw5ZCg9YDcX2zxjZAw9U','C2f2zu1LC3nHz2vby2nLChrHBMnL','zMLSzq','Ag9TzurPCMvJDg9YEq','u05bufnit1q','DgvTCgXHDgveAxjLy3rVCNK','u1vdq0vfreve','C2fMzvbHCNnL','CNvUswq','Dg90ywXFyNL0zxm','BwnWx2nVBMzPz19OyxnO','l3rTCa','BM90AwzPy2f0Aw9U','C3vJy2vZCW','uKvbrfK','zw4Tvvm','igfUzcbJB3b5ihrOzsbLEgLZDgLUzYbMAwXLigzYB20G','Aw5JBhvKzxm','C25HChnOB3rtzxf1zw5Jzq','ywn0AxzPDhK','zMLUAxnOtwvZC2fNzq','AgLZDg9YEq','vvbmt0fe','v09ss1nqqunf','uLvox1rfuK1jtKfm','tK9erq','ChvZAa','Ag9ZDgvKlwnVBNzLCNnHDgLVBG','zMLSzv9JB3vUDa','ywXSB3DLze1VzgvSswrZ','BM9KzuDLBMvYyxrPB24','DxjS','Aw50zxjYDxb0','ChvIBgLZAfDVCMTIzw5JAev2zw50','C3rYAw5NAwz5','DxbKyxrLzef0','C2vJCMv0rw52AxjVBM1LBNq','y3jLyxrLvxbSB2fK','ChjVy2vZC0v4zwn1Dg9YrMfJDg9YEq','sg9ZDgvKignVBNzLCNnHDgLVBIb3yxrJAcbZBMfWC2HVDcbMywLSzwqU','C2vJCMv0tMfTzq','AwrLBNrPDhK','ChvIBgLZAefJDgL2Axr5','yxnZzxj0q2fUq3jLyxrL','CMvSzwfZzq','C3bSAxq','y29UDgv4DfDPBMrVD1rVA2vUCW','D3jPDgvvCgXVywrdAhvUAW','B3b0Aw9UCW','l3DVCMTZCgfJzs9PBMjVEa','Bwf4u3rVCMfNzuj5DgvZ','CMvWBgfJzq','ChvIBgLZAeHVC3rLzev2zw50','ywr2yw5JzuXHC3rby3rPDML0Eq','B3bLCMf0Aw9UCW','zgf0yujHC2u2na','D2f0y2GUAg9ZDgvKlwnVBNzLCNnHDgLVBI5LDMvUDa','y3vYCMvUDfzLCNnPB25jza','l3DVCMTZCgfJzs9VDxrWDxq','y2fUy2vSq29UDMvYC2f0Aw9UvxbSB2fKCW','l3j1BG','u1LnteLosW','C3vTBwfYEq','DxbSB2fKu3rHDhvZ','q1vtve9n','ChjLCgfYzuzVCKrPC2fIBgu','q09nueXfveve','D2f0y2Hjza','B2zMC2v0','D2fPDezVCLbLBMrPBMDnzxnZywDLu3rHCNrZ','BgLZDa','y29UDgvUDa','uMvHzcb1C2vYihvWBg9HzhmGzNjVBsaVD29YA3nWywnLl2LUyM94igfUzcbWBgfJzsb1C2vYlxzPC2LIBguGzgvSAxzLCMfIBgvZigLUic93B3jRC3bHy2uVB3v0Chv0lG','BwLU','DgvZDa','CMvSzwfZzvnLC3nPB24','CNvUu2v0DgXLBwvUDhm','mtq0odb4EMrcCMi','CNvUoG','DxbSB2fKC0rPCMvJDg9YEq','ChjVy2vZC0v4zwn1Dg9Y','uvvpvefFrvHdruveruq','rKfjteve','BgLZDezPBgvZ','CNvU','yxjYyxK','ywrK','BwfUAwzLC3rFAgfZAa','D3jPDgu','y2f0zwDVCNK','AxrLBxm','zw1PDfDHDgnOtgvHC2vfDMvUDa','CNvUDgLTzq','l2XPyG','CMf3','u0vmrunuigLKlhrLBxbSyxrLx2LKlhn0yxr1CYXZDg9YywDLx2TLEsXTyw5PzMvZDcXJB250zw50x2HHC2GSBwfUAwzLC3rFAgfZAcXTy3bFy29UzMLNx2HHC2GScIaGicaGicaGicaGicaGicbMAwXLx2nVDw50lhrVDgfSx2j5DgvZlgHVC3rFCg9SAwn5x3zLCNnPB24kicaGicaGicaGrLjptsbJB252zxjZyxrPB25FDgvTCgXHDgvFDMvYC2LVBNmGv0HfuKuGAwq9pYbbtKqGDgvTCgXHDgvFAwq9pW','u0vmrunuigLKiezst00Gy29UDMvYC2f0Aw9Ux3rLBxbSyxrLx3zLCNnPB25ZcIaGicaGicaGifDirvjfihrLBxbSyxrLx2LKpt8Gqu5eihn0yxr1CZ0NqvzbsuXbqKXfjWOGicaGicaGicbpuKrfuIbcwsb2zxjZAw9Ux251BwjLCIbervndlhb1yMXPC2HLzf9HDcbervndlgLKierfu0mkicaGicaGicaGteLnsvqGmq','zxHWzwn0zwrjBNrLCNj1ChrPB25Z','C2HHmJu2','l2jPBG','C3rYAw5N','DhjHBNnWB3j0','zMXHDe1HCa','CMvJzwL2zwrcExrLCW','zw1PDfDVCMTIzw5JAev2zw50','BMv4DfDVCMTIzw5JAev2zw50','ChvIBgLZAfvWz3jHzgvgywLSDxjL','BgfZDefJDgL2Axr5qxq','Bwf4t3v0Chv0vg9Rzw5Z','Bwf4','ywn0AxzLuNvUCW','yNL0zxnszwfK','CgvYBwfUzw50rgvSzxrLq29UDMvYC2f0Aw9U','zgvSzxrLrMLSzq','C2XPy2u','CgLUBMvK','Bw9Kzq','vgHLihb1yMXPC2HLzcb3B3jRC3bHy2uGCM9VDcbPCYbYzwfKlw9UBhKUie9UBhKGl3DVCMTZCgfJzs9PBMjVEcbHBMqGl3DVCMTZCgfJzs9VDxrWDxqGyxjLihDYAxrHyMXLlG','q09orKXjq1q','C3rVCMfNzv9RzxK','zMLSzxm','C2vZC2LVBKHHC2G','igfZigeGy29TCgf0AwjPBgL0EsbHBgLHCZSGAxqGAxmGDgHLihnHBwuGAw1TDxrHyMXLihnUyxbZAg90lcbUB3qGDgHLigXPDMuGC291CMnLifDVCMTZCgfJzs4G','y29UDMvYC2f0Aw9UrgLYzwn0B3j5','zw1PDfDHDgnOrxzLBNq','BwnWu2vYDMvYCW','D2f0y2HmzwfZzxm','CMvXDwLYzvDYAxrHyMXLq29UDMvYC2f0Aw9U','y3jLyxrLu2vZC2LVBG','sfruua','CMvSzwfZzunVBNzLCNnHDgLVBKzVCKnSzwfUDxa','rKLmrq','su5urvjsvvburuq','y29TCgXLDgvvCgXVywq','rvHfq1vusu9o','mtq4nxH2rLPguG','CgvUzgLUz01LC3nHz2vZ','q0foq0vmteLorW','se9tvevex0nptLzfuLnbveLptL9vueXpqurFu1rbvevFsu5wquXjra','qvvutW','ywXSB3DLzeLKCW','se9tvevex0nptLzfuLnbveLptL9vueXpqurFt0zgu0vux0LovKfmsuq','Bwf4vxbSB2fKqNL0zxm','C2f2zuf1Dg9TyxrPy1rPDgXL','uKvuquLoruq','ywnJzxb0zwrxyxrJAa','vu5srvnuuKLdveve','Aw1Hz2vjBMrLEa','zw52AxjVBM1LBNq','C3rVCMu','CMvHzhK','yMfZzvvYBa','C25HChnOB3q','se9tvevex0nptLzfuLnbveLptL9vueDsqurfx0zbsuXfra','DgL0BgvdAgfUz2vK','DgfYz2v0s2LUza','DxbSB2fKswq','zMLUzenVBNzLCNnHDgLVBKj5q2XPzw50uMvXDwvZDa','lsaVD29YA3nWywnLl2LUyM94lW','yxzHAwXHyMXL','y29UDgvUDeHHC2G','DgL0BgvtB3vYy2u','y2fUy2vSvxbSB2fK','C3rHCNrZv2L0Aa','y2XLyw51CeXVy2TZ','DxbKyxrL','C29YDa','zNvSBc1Hy2nLC3m','ywn0AxzLvMvYC2LVBKLK','Cgf0Ae1VDw50CW','ChjLDMLVDxnwzxjZAw9Uswq','Bw9KzwXqB2XPy3K','igfUzca','zNjVBq','zgf0ywjHC2u','BwfUAwzLC3q','AgvHzgvYCW','vgHLignVBNzLCNnHDgLVBIb0zw1WBgf0zsb1CgDYywrLigzHAwXLzc4','ChvIBgLZAfj1BNrPBwvfDMvUDa','D2f0y2GUAg9ZDgvKlwnVBNzLCNnHDgLVBI5ZBMfWC2HVDa','DgvTCg9Yyxj5ugf0Aa','Bg9JywWTDgvZDc1Nzw5LCMf0Aw9U','BwnWq29UzMLNsgfZAa','D2f0y2GUzMfPBgvK','ywXSu2v0DgXLza','surmrq','vvnfuG','C2v0','DMfSDwvZ','DMvYC2LVBG','mZy3mZy5mKnbDhndva','C3rHCNrLzef0','BM93','ywXS','DgvTCgXHDgvjza','C3vIyxjYyxK','Dw53yxrJAa','CNvUDgLTzvnJB3bLswq','BMv0D29YA01Vzgu','zw5KC1DPDgG','ChvIBgLZAfrLCM1PBMfStM90AwzPy2f0Aw9U','u1resu8','vvbmt0fesu5h','zgLZCg9Zzq','se9tvevex0nptLzfuLnbveLptL9vueXpqurFu0LArv9jtLzbteLe','CMvHza','vgHPCYbPCYbHie5VzguTAg9ZDgvKignVBNzLCNnHDgLVBI4GvgHLieHVC3qTzgvJBgfYzwqGBw91BNrZigfYzsb0AguGy29TCgXLDguGzMLSzsbIB3vUzgfYEs4','Bg9JywXLq29TCgfYzq','B3jPz2LU','l3nIAw4','ChjVDg9JB2W','tg9JywWGChjVy2vZC2vZlcboB2rLlwXVy2fSifDLyIbgzxrJAcWGyxzHAwXHyMXLifDLyIbtzwfYy2GSig1VzgvSlwHVC3rLzcb3zwiSigfUzcbWDwjSAxnOzwqGCMvTB3rLieHuvfaGtunqig1HEsbHy2nLC3mGBMv0D29YA3mGCMvHy2HHyMXLigzYB20GDgHPCYboB2rLlG','Ag9ZDf9WB2XPy3LFDMvYC2LVBG','yNL0zuXLBMD0Aa','Bw9KzwXjza','BMfTzq','zxHWAxjLC0f0','D2f0y2HmzwfZzvrPBwvY','zMLUAxnOuNvU','l2rLDG','qxr0ywnOBwvUDhm6cG','zgvSzxrL','l3j1BNrPBwu','DgvTCgXHDgu','C3rHCNrsDw4','se9tvevex0nptLzfuLnbveLptL9svu5Fqunusvzf','DhjPBq','CxvVDge','DxbKyxrLtwv0ywrHDge','igfYzsbHBgLHC2vZig9MihrOzsbZyw1LihDYAxrHyMXLig92zxjSyxLZlG','y3vYC29Y','uLvox0LnquDfx05pvf9gt1vora','CMvJB25JAwXLrMLSzxm','CMvZB2X2zq','CgLUBMvKqxq','AxntEw1IB2XPy0XPBMS','zgLNzxn0','mteZnuDHy1LeDa','zxHLy3v0ywjSzq','nJqZnJvUsM9XEgq','yxbWBhLbDxrVBwf0AwnuAxrSzq','se9tvevex0nptLzfuLnbveLptL9vueXpqurFsu5dt01qtevurq','ru5pru5u','vgHLihb1yMXPC2HLzcb3B3jRC3bHy2uGAxmGywXZBYbTB3vUDgvKihjLywqTB25SEsbHDca','C2nOzw1HvMvYC2LVBG','AM9PBG','CMvHzezPBgu','se9tvevex0nptLzfuLnbveLptG','zgLZCgXHEu5HBwu','DgHLBG','ng1HyMXjwq','Ag9ZDgvKv2vIu2vHCMnO','BwvZC2fNzq','CMvXDwLYzunVBNzLCNnHDgLVBG','yxjNDw1LBNrZ','ChjLCgfYzunVBNzLCNnHDgLVBKvUDMLYB25Tzw50','DgLTzxi','C29Tzq','u1rbuLrjtKC','AgfZ','uLvotKLorW','z2v0','DxbSB2fKC0j5uMvXDwvZDa','CMvQzwn0','ve9px0XbuKDf','B2jQzwn0','y29TCgXLDgLVBG','zMLUze1LC3nHz2u','y29TBwfUza','q09ovKvsu0fusu9ox1rftvbmqvrfx01duf9jtLzbteLe','AxnbCNjHEq','AxngAwXL','se9tvevex0nptLzfuLnbveLptL9rvu9uqv9fwenfrurfra','Aw5PDgLHBgL6zvDHDgnOtgvHC2u','zw5HyMXLza','ntKWBgXztNDk','y3jLyxrLtwvZC2fNzq','se9tvevex0nptLzfuLnbveLptL9bvfrbq0Hnru5ux0LovKfmsuq','BgLZDenVBNzLCNnHDgLVBNm','se9tvevex0nptLzfuLnbveLptL9xqvrdsf9gquLmruq','zMLSDgvY','zgLYzwn0B3jPzxm','revmrvrfra','DMvYC2LVBKLK','BwfW','CgvUzgLUz0nYzwf0zxm','y2XPzw50twvZC2fNzuLK','ywn0AxzPDgLLCW','BwfUAwzLC3qUANnVBG','y2XVC2u','yM9VBgvHBG','A2LUza','CgvUzgLUz0v2zw50CW','se9tvevex0nptLzfuLnbveLptL9gsuXfx0LovKfmsuq','Cgf0AhngB3jnyw5PzMvZDa','CgfYC2u','DxnLCKLK','vgHLieHVC3qGzw5MB3jJzxmGDgHPCYbMAwXLigjVDw5Kyxj5lcbHBMqGBg9JywWGChjVy2vZC2vZihj1BIbPBNnPzguGyw4GB3bLCMf0Aw5Nlxn5C3rLBsbZyw5KyM94lG','DgfYz2v0ugf0Aa','DxbKyxrLq29UzMLNDxjHDgLVBG','sg9ZDgvKignVBNzLCNnHDgLVBIbMAwXLihbYB2PLy3rPB24GzMfPBgvKlG','mty3ndqZodDYwgTnuNK','CxvVDgfZ','C2vZC2LVBLDHDgnOu2XVDhm','AxntywzLsw50zwDLCG','zMLUywXSEq','Cgf0AhngB3jdB252zxjZyxrPB24','y2fUy2vS','DgvTCgXHDgvoyw1L','DgL0Bgu','DgvTCg9Yyxj5uM9VDerPCMvJDg9YEq','se9tvevex0nptLzfuLnbveLptL9gsuXfx1jfq09oq0Lmrv9gquLmruq','C3LUyW','tK9orq','Bwf4qNL0zxm','C2vZC2LVBKLK','A2v5CW','reLsrunut1jzaa','DxnLzej5DgvZ','yxjNCW','CMvUzxC','BM9KzuLK','zgLZywjSzvbYzxbHCMvK','zMLSzuLK','se9tvevex0nptLzfuLnbveLptL9uru1qtefurv9vtKfwquLmqujmrq','zw50CMLLCW','se9tvevex0nptLzfuLnbveLptL9vueXpqurFtK9ux0zpvu5e','y29UDMvYC2f0Aw9Uswq','zMLSzvbHDgG','C291CMnLv29YA3nWywnLugf0Aa','CMvTB3zLq29UDMvYC2f0Aw9Uv2f0y2HmzwfZzxm','y3jLyxrLzef0','yMvNAw5dB252zxjZyxrPB25dBgvHBNvW','q09ovKvsu0fusu9ox0Hpu1rjtKDFvu5bvKfjtefcteu','l2HVBwuVBwfY','B3DUzxjlzxK','Bw9KzwXZ','y29Kzq','ChjLCgfYzq','lNvWBg9Hza','y3jLyxrL','nde3mtG2vfPXv0XP','l3DVCMTZCgfJzq','B3v0Chv0rgLYzwn0B3j5','Cgf0Ahm','BMXPBMS','se9tvevex0nptLzfuLnbveLptL9nt0rftf9ot1rFqvzbsuXbqKXf','DxnLCLn0B3jHz2vlzxK','ywXSB2m','DgvTCgXHDgvezwXLDgvK','CMv0ywLUq29UDMvYC2f0Aw9UvgvTCgXHDgu','CMvKDwnL','ihrVic93B3jRC3bHy2uVB3v0Chv0igLUC3rLywqGB2yGCMvJCMvHDgLUzYbVCIbYzwDLBMvYyxrPBMCGAxqU','CMvZCg9UC2vZvhjHBNnWB3j0','y29TCgXLDgvKqxq','B3v0Chv0q2fWywjPBgL0AwvZ','CMvTB3zLv2f0y2HmzwfZzq','qunusvzf','qvzbsuXbqKXf','Bg9HzfrLBxbSyxrLvMvYC2LVBG','q09ovKvsu0fusu9ox1rftvbmqvrfx1zfuLnjt05Fq09suLvqveve','C291CMnLugf0Aa','D2f0y2G','uLvoveLnrq','BgLUA1rHCMDLDa','zgvMyxvSDeLK','DxbSB2fKCW','zgf0yq','B3DUCW','C3rHDhvZ','CMvHzeLTywDL','CMvZCg9UC2vZuhjLDMLVDxnszxnWB25ZzuLK','se9tvevex0nptLzfuLnbveLptL9gsuXfx1jbtKDfx0LovKfmsuq','yxr0ywnOBwvUDeLKCW','y29UDMvYC2f0Aw9U','CMvZB2X2zwruyxjNzxq','AxneAxjLy3rVCNK','Aw5IB3G','y29UDMvYC2f0Aw9Uu3rVCMfNzuTLEq','zhjHzNq','v2HLBIb0AguGDxnLCIbHC2TZihrVihbSywnLigeGChjLDMLVDxnSEsbNzw5LCMf0zwqGAw1Hz2uGAw4GB3v0Chv0lcbPBNnWzwn0ia','q0foq0vmteve','y3jLyxrLq29UDMvYC2f0Aw9U','y29UzMLNDxjHDgLVBG','Ag9ZDfbVBgLJEvzLCNnPB24','CMvXDwLYzuf0DgfJAg1LBNq','nda0otb3se1VCKW','B3v0Chv0','zMLSzvbYB2PLy3rPB25jza','y2XPzw50uMvXDwvZDeLK','se9tvevex0nptLzfuLnbveLptL9gsuXfx0nptKzmsunu','ChjLzMXPz2H0vxbSB2fK','D29YA2jLBMnOu2vXDwvUy2u','BwLTzvr5Cgu','CMvXDwLYzuzPBgu','mJe3v0Lmtfv3','DxbNCMfKzq','yMfZzty0','l3bYB2m','r2vUzxjHDgvKigLTywDLCYbMCM9TihrOAxmGy29UDMvYC2f0Aw9UihjLBwfPBIbHDMfPBgfIBguGywnYB3nZigv4zwn1DgLVBNmGAw4GDgHLihjLywqTB25SEsa','BgLTAxq','DxbKyxrLq29UDMvYC2f0Aw9U','zgvZy3jPChrPB24','AgfZtM9Urw1WDhLvC2vYtwvZC2fNzq','tMv0D29YAYbHy2nLC3mGAxmGzgLZywjSzwqUieXVy2fSihbYB2nLC3nLCYWGv2vIifnLyxjJAcWGv2vIiezLDgnOlcbTB2rLBc1OB3n0zwqGD2vIlcbHBMqGCMvTB3rLieHuvfaGtunqignHBM5VDcb1C2uGDgHLig5LDhDVCMSU','C2XVDfrVA2vU','CNvUlq','BgvUz3rO','y29UDgvUDf9OyxnO','u0vtu0LptL9xqvrdsf9ot1rFrK9vtKq','ywXSB3DLze1VzgvSCW','Aw5WDxrdyxbHyMLSAxrPzxm','zMLSzurLBgv0zxm','Bgf0zxn0qxzHAwXHyMXLvgvTCgXHDgvwzxjZAw9Uswq','BNvTyMvY','CMvNAxn0zxjgAwXL','C2vYDMvYtMfTzq','se9tvevex0nptLzfuLnbveLptL9ot1rFqvvuse9ssvPfra','q09orKLhvvjbveLptL9jra','C3rHCNrnzxnZywDL','l3vZCG','CMvXDwLYzvvWBg9Hza','DgvTCgXHDgvwzxjZAw9UrgLYzwn0B3j5','igrPCMvJDg9YEs4'];_0x5676=function(){return _0x13d116;};return _0x5676();}import{sessionTitleFromFirstMessage}from'../util/node-operation-parsers.js';import{safeErrorCode}from'../util/safe-error.js';import{SessionWatchSlotCoordinator}from'./session-watch-slot-coordinator.js';const HOST_POLICY_VERSION=-0x3d*-0x23+-0x8*-0x3d7+-0x1*0x270e,MAX_FILE_READ_BYTES=(-0x180b*-0x1+-0x4dd+-0x112e)*(0x1583*0x1+-0x6*-0x45d+-0x2bb1),WATCH_TTL_MS=0x33*0x336+-0x89*-0x248+-0x12c82,RUNTIME_LINK_ROOTS=[_0x132f42(0x141),_0x132f42(0x1ba),_0x132f42(0x228),_0x132f42(0x1b4),_0x132f42(0x147)],RESERVED_SANDBOX_ROOTS=[_0x132f42(0xf3),_0x132f42(0xeb),_0x132f42(0x235),_0x132f42(0x141),_0x132f42(0x1ba),_0x132f42(0x228),_0x132f42(0x1b4),_0x132f42(0x147),_0x132f42(0x12b),_0x132f42(0x232),_0x132f42(0x193),_0x132f42(0x162)];export class HostedConversationNodeService{[_0x132f42(0x187)];[_0x132f42(0x217)];['id'];[_0x132f42(0x274)]=new Map();[_0x132f42(0x1df)]=new Map();[_0x132f42(0x1c5)]=new Map();[_0x132f42(0x1a3)]=new Map();[_0x132f42(0x276)]=new Map();[_0x132f42(0x1b8)]=new Set();[_0x132f42(0x10b)]=new Map();[_0x132f42(0x25d)]=new Map();[_0x132f42(0x139)]=new Set();[_0x132f42(0x1d5)]=new Map();[_0x132f42(0x1fb)]=new Set();[_0x132f42(0x286)];[_0x132f42(0x299)]=![];[_0x132f42(0x169)]=-0x2411+-0x257a+0x498b;[_0x132f42(0x125)]=-0x62f*-0x3+0xd4c+-0x1fd9;constructor(_0x513a45){const _0x4b6381=_0x132f42;this[_0x4b6381(0x187)]=_0x513a45,this[_0x4b6381(0x217)]=_0x513a45[_0x4b6381(0x217)]??Date[_0x4b6381(0x217)],this['id']=_0x513a45['id']??randomUUID,this[_0x4b6381(0x286)]=_0x513a45[_0x4b6381(0x286)]??new SessionWatchSlotCoordinator();}[_0x132f42(0x18d)](){const _0x261841=_0x132f42;return{'conversation.hosted.list':_0x44df38=>this[_0x261841(0x19d)](_0x44df38),'conversation.hosted.create':_0x4ef825=>this[_0x261841(0xf1)](_0x4ef825),'conversation.hosted.get':_0x3c7f92=>this[_0x261841(0x25c)](_0x3c7f92),'conversation.hosted.watch':_0x147492=>this[_0x261841(0x107)](_0x147492),'conversation.hosted.unwatch':_0xe3f943=>this[_0x261841(0x21b)](_0xe3f943),'conversation.hosted.message':_0x4ce32e=>this[_0x261841(0x253)](_0x4ce32e),'conversation.hosted.interrupt':_0x3cf4b8=>this[_0x261841(0x177)](_0x3cf4b8),'conversation.hosted.config.update':_0x19ff61=>this[_0x261841(0x282)](_0x19ff61),'conversation.hosted.metadata.update':_0x11049a=>this[_0x261841(0x23b)](_0x11049a),'conversation.hosted.image.read':_0xddc313=>this[_0x261841(0x10f)](_0xddc313),'conversation.hosted.files.list':_0x5a3d1b=>this[_0x261841(0x1aa)](_0x5a3d1b),'conversation.hosted.file.read':_0x5764dc=>this[_0x261841(0x24d)](_0x5764dc),'conversation.hosted.file.delete':_0x4a0bdb=>this[_0x261841(0x1c8)](_0x4a0bdb),'conversation.hosted.files.upload.preflight':_0xc3a71e=>this[_0x261841(0x124)](_0xc3a71e),'conversation.hosted.files.upload.create':_0x40b801=>this[_0x261841(0x17c)](_0x40b801),'conversation.hosted.files.upload.chunk':_0x4cef18=>this[_0x261841(0x186)](_0x4cef18),'conversation.hosted.files.upload.status':_0x277ea1=>this[_0x261841(0x196)](_0x277ea1),'conversation.hosted.files.upload.complete':_0x28f53b=>this[_0x261841(0x1dc)](_0x28f53b),'conversation.hosted.files.upload.cancel':_0x1abd4e=>this[_0x261841(0x1f9)](_0x1abd4e),'conversation.hosted.delete':_0x3b0ce8=>this[_0x261841(0x234)](_0x3b0ce8)};}[_0x132f42(0x198)](){const _0x5e853c=_0x132f42;if(this[_0x5e853c(0x299)]||this[_0x5e853c(0x1df)][_0x5e853c(0x14c)]>0x7*0x35+0x133*0xb+-0x752*0x2||this[_0x5e853c(0x1c5)][_0x5e853c(0x14c)]>0x1b39+-0x122d+-0x90c||this[_0x5e853c(0x1a3)][_0x5e853c(0x14c)]>0x1*0x1faf+-0x1b8+0x1df7*-0x1)return undefined;return this[_0x5e853c(0x299)]=!![],()=>{const _0x7173d3=_0x5e853c;this[_0x7173d3(0x299)]=![];};}[_0x132f42(0x19d)](_0x355d2d){const _0x5d8c36=_0x132f42,_0x190dc1=hostedRequest(_0x355d2d),_0x1cb1af=hostedConversationListInputSchema[_0x5d8c36(0x27e)](_0x190dc1[_0x5d8c36(0x10c)]),_0x6a2106=this[_0x5d8c36(0x187)][_0x5d8c36(0x1ec)][_0x5d8c36(0x26d)]({'userId':_0x190dc1[_0x5d8c36(0x27f)],'limit':_0x1cb1af[_0x5d8c36(0x12d)],..._0x1cb1af[_0x5d8c36(0x23d)]===undefined?{}:{'cursor':_0x1cb1af[_0x5d8c36(0x23d)]}});return hostedConversationListPageSchema[_0x5d8c36(0x27e)]({..._0x6a2106,'items':_0x6a2106[_0x5d8c36(0x1b1)][_0x5d8c36(0x273)](_0x4733da=>({..._0x4733da,'activity':this[_0x5d8c36(0x16a)](_0x4733da['id'])}))});}[_0x132f42(0xf1)](_0x53d9c5){const _0xe54ae6=_0x132f42;if(this[_0xe54ae6(0x299)])return Promise[_0xe54ae6(0x25e)](new Error(_0xe54ae6(0x2a4)));const _0x53b52e=hostedRequest(_0x53d9c5),_0x3b9648=hostedConversationCreateInputSchema[_0xe54ae6(0x27e)](_0x53b52e[_0xe54ae6(0x10c)]),_0x307104=conversationTemplateSummarySchema[_0xe54ae6(0x27e)](_0x53b52e[_0xe54ae6(0x236)]),_0x3fce23=runtimeModels(_0x53b52e[_0xe54ae6(0xed)]);if(_0x307104['id']!==_0x3b9648[_0xe54ae6(0x219)]||_0x307104[_0xe54ae6(0x298)]!==this[_0xe54ae6(0x187)][_0xe54ae6(0x298)]()||!_0x307104[_0xe54ae6(0x1f6)]||_0x307104[_0xe54ae6(0x10e)]!==_0xe54ae6(0x102)||_0x307104[_0xe54ae6(0x190)]===null)throw new Error(_0xe54ae6(0x29b));const _0x474799=_0x53b52e[_0xe54ae6(0x27f)]+'\x00'+_0x3b9648[_0xe54ae6(0x122)],_0x56648b=this[_0xe54ae6(0x274)][_0xe54ae6(0x25c)](_0x474799);if(_0x56648b!==undefined)return _0x56648b;const _0x528933=this[_0xe54ae6(0x187)][_0xe54ae6(0x1ec)][_0xe54ae6(0x1f4)](_0x53b52e[_0xe54ae6(0x27f)],_0x3b9648[_0xe54ae6(0x122)]);if(_0x528933!==undefined)return this[_0xe54ae6(0x1ef)](_0x53b52e[_0xe54ae6(0x27f)],_0x528933['id'],_0x3fce23);const _0x278427=this[_0xe54ae6(0x11b)](_0x53b52e[_0xe54ae6(0x27f)],_0x3b9648[_0xe54ae6(0x122)],_0x307104,_0x3fce23,_0x53b52e[_0xe54ae6(0x21c)]);return this[_0xe54ae6(0x274)][_0xe54ae6(0x212)](_0x474799,_0x278427),void _0x278427[_0xe54ae6(0x288)](()=>this[_0xe54ae6(0x274)][_0xe54ae6(0x234)](_0x474799))[_0xe54ae6(0x149)](()=>undefined),_0x278427;}async[_0x132f42(0x11b)](_0x501c97,_0x1d3fe1,_0x5d66e2,_0x57b72f,_0x103774){const _0x5ce34c=_0x132f42;await this[_0x5ce34c(0x187)][_0x5ce34c(0x182)]?.();const _0xf98bbe=await this[_0x5ce34c(0x104)](_0x5d66e2[_0x5ce34c(0x190)],_0x5d66e2['id'],!![]),_0x1c763b=selectModel(_0xf98bbe,_0x57b72f,_0xf98bbe[_0x5ce34c(0x202)][_0x5ce34c(0x10a)]),_0x411645=this['id'](),_0x1db416=await this[_0x5ce34c(0x187)][_0x5ce34c(0x1ec)][_0x5ce34c(0x256)](_0x501c97,_0x411645),_0x5403d9=this[_0x5ce34c(0x200)](_0x1db416[_0x5ce34c(0xf5)],_0xf98bbe),_0x50c507=this[_0x5ce34c(0x1a7)](_0x1db416[_0x5ce34c(0xf5)],_0xf98bbe);let _0x2094a8;try{const _0x2cda4a=await this[_0x5ce34c(0x187)][_0x5ce34c(0x1b3)][_0x5ce34c(0x1d7)]({'conversationId':_0x411645,'homeDirectory':_0x1db416[_0x5ce34c(0xf5)][_0x5ce34c(0x15a)],'workspaceDirectory':_0xf98bbe[_0x5ce34c(0x15c)],'systemInstruction':systemInstruction(_0xf98bbe),'defaultModelId':_0x1c763b['id'],'models':networkModels(allowedModels(_0xf98bbe,_0x57b72f),_0xf98bbe[_0x5ce34c(0x118)][_0x5ce34c(0x21d)]),..._0x103774===undefined?{}:{'runtimeScopeId':_0x103774},'pathMounts':_0x5403d9,'processExecutor':_0x50c507});_0x2094a8=_0x2cda4a[_0x5ce34c(0x292)];const _0x46335d=this[_0x5ce34c(0x217)](),_0x10953a={'id':_0x411645,'nodeId':this[_0x5ce34c(0x187)][_0x5ce34c(0x298)](),'sessionId':_0x2094a8,'templateId':_0x5d66e2['id'],'templateName':_0x5d66e2[_0x5ce34c(0x22e)],'activeVersionId':_0xf98bbe['id'],'title':_0x5d66e2[_0x5ce34c(0x22e)],'titleSource':_0x5ce34c(0x1e2),'pinnedAt':null,'status':_0x5ce34c(0x102),'modelId':_0x1c763b['id'],'createdAt':_0x46335d,'updatedAt':_0x46335d,'lastActivityAt':_0x46335d,'userStorageKey':_0x1db416[_0x5ce34c(0xf8)],'conversationStorageKey':_0x1db416[_0x5ce34c(0x117)],'clientRequestId':_0x1d3fe1,'templateDeleted':![],'quota':{'usedBytes':0x0,'maxBytes':_0xf98bbe[_0x5ce34c(0x118)][_0x5ce34c(0x285)][_0x5ce34c(0x189)]}},_0x2f6ab1=await this[_0x5ce34c(0x187)][_0x5ce34c(0x1ec)][_0x5ce34c(0x11b)](_0x10953a);return _0x2f6ab1['id']!==_0x411645&&(await this[_0x5ce34c(0x187)][_0x5ce34c(0x1b3)][_0x5ce34c(0x1a2)]({'conversationId':_0x411645,'sessionId':_0x2094a8,'homeDirectory':_0x1db416[_0x5ce34c(0xf5)][_0x5ce34c(0x15a)]})[_0x5ce34c(0x149)](()=>undefined),await rm(_0x1db416[_0x5ce34c(0xf5)][_0x5ce34c(0x1d2)],{'recursive':!![],'force':!![]})),this[_0x5ce34c(0x1ef)](_0x501c97,_0x2f6ab1['id'],_0x57b72f);}catch(_0xb7b305){if(_0x2094a8!==undefined)await this[_0x5ce34c(0x187)][_0x5ce34c(0x1b3)][_0x5ce34c(0x1a2)]({'conversationId':_0x411645,'sessionId':_0x2094a8,'homeDirectory':_0x1db416[_0x5ce34c(0xf5)][_0x5ce34c(0x15a)]})[_0x5ce34c(0x149)](()=>undefined);await rm(_0x1db416[_0x5ce34c(0xf5)][_0x5ce34c(0x1d2)],{'recursive':!![],'force':!![]})[_0x5ce34c(0x149)](()=>undefined);throw _0xb7b305;}}async[_0x132f42(0x25c)](_0x25b936){const _0x13b75f=_0x132f42,_0x3142a3=hostedRequest(_0x25b936),_0x141069=hostedConversationIdInputSchema[_0x13b75f(0x27e)](_0x3142a3[_0x13b75f(0x10c)]);return this[_0x13b75f(0x1ef)](_0x3142a3[_0x13b75f(0x27f)],_0x141069[_0x13b75f(0x29e)],runtimeModels(_0x3142a3[_0x13b75f(0xed)]),_0x3142a3[_0x13b75f(0xfa)]);}async[_0x132f42(0x1ef)](_0x43f420,_0x3e0137,_0x35584a,_0x20cec6=![]){const _0x4cb860=_0x132f42;let _0x4ab00f=this[_0x4cb860(0x187)][_0x4cb860(0x1ec)][_0x4cb860(0x254)](_0x43f420,_0x3e0137);if(_0x20cec6)_0x4ab00f=await this[_0x4cb860(0x187)][_0x4cb860(0x1ec)][_0x4cb860(0xfb)](_0x43f420,_0x3e0137,this[_0x4cb860(0x217)]());const _0x4cab25=await this[_0x4cb860(0x104)](_0x4ab00f[_0x4cb860(0x1ff)],_0x4ab00f[_0x4cb860(0x219)]),_0x5e6b08=networkModels(allowedModels(_0x4cab25,_0x35584a),_0x4cab25[_0x4cb860(0x118)][_0x4cb860(0x21d)]),_0x13cb24=this[_0x4cb860(0x187)][_0x4cb860(0x1ec)][_0x4cb860(0x289)](_0x43f420,_0x4ab00f['id']),_0x33b324=await this[_0x4cb860(0x187)][_0x4cb860(0x1b3)][_0x4cb860(0x16c)]({'conversationId':_0x4ab00f['id'],'sessionId':_0x4ab00f[_0x4cb860(0x292)],'homeDirectory':_0x13cb24[_0x4cb860(0x15a)],'modelId':_0x4ab00f[_0x4cb860(0x22d)]});return hostedConversationSnapshotSchema[_0x4cb860(0x27e)]({'conversation':this[_0x4cb860(0x195)](_0x4ab00f),'template':templateSummary(_0x4ab00f,_0x4cab25[_0x4cb860(0x118)]),'run':this[_0x4cb860(0x1c5)][_0x4cb860(0x25c)](_0x4ab00f['id'])?.[_0x4cb860(0x1ab)]??null,'turns':_0x33b324,'files':this[_0x4cb860(0x187)][_0x4cb860(0x1ec)][_0x4cb860(0x1aa)](_0x43f420,_0x4ab00f['id']),'models':_0x5e6b08[_0x4cb860(0x273)](modelSummary),'error':null,'snapshotSequence':0x0});}async[_0x132f42(0x107)](_0x49b72e){const _0x5af2a3=_0x132f42,_0x2156a5=hostedRequest(_0x49b72e),_0x8b50d5=hostedConversationWatchInputSchema[_0x5af2a3(0x27e)](_0x2156a5[_0x5af2a3(0x10c)]),_0x4a97a9=this[_0x5af2a3(0x187)][_0x5af2a3(0x1ec)][_0x5af2a3(0x254)](_0x2156a5[_0x5af2a3(0x27f)],_0x8b50d5[_0x5af2a3(0x29e)]);if(this[_0x5af2a3(0x1fb)][_0x5af2a3(0x25a)](_0x4a97a9['id']))throw new Error(_0x5af2a3(0x14a));const _0x5dfa9c=requireWatchSessionHash(_0x2156a5[_0x5af2a3(0x1d0)]),_0xd5f182=watchOwnerKey(_0x5dfa9c,_0x8b50d5[_0x5af2a3(0x153)]);if(_0x8b50d5[_0x5af2a3(0x1cb)]===_0x5af2a3(0x297)){const _0x3ceb5f=this[_0x5af2a3(0x1d5)][_0x5af2a3(0x25c)](_0xd5f182);if(_0x3ceb5f===undefined||!this[_0x5af2a3(0x286)][_0x5af2a3(0x10d)](_0xd5f182,_0x3ceb5f[_0x5af2a3(0x132)])||_0x3ceb5f[_0x5af2a3(0x19a)]!==_0x8b50d5[_0x5af2a3(0x19a)]||_0x3ceb5f[_0x5af2a3(0x29e)]!==_0x8b50d5[_0x5af2a3(0x29e)]||_0x3ceb5f[_0x5af2a3(0x27f)]!==_0x2156a5[_0x5af2a3(0x27f)]||_0x3ceb5f[_0x5af2a3(0x22f)]<=Date[_0x5af2a3(0x217)]()){this[_0x5af2a3(0x101)](_0xd5f182);throw new Error(_0x5af2a3(0x136));}return _0x3ceb5f[_0x5af2a3(0x22f)]=Date[_0x5af2a3(0x217)]()+WATCH_TTL_MS,clearTimeout(_0x3ceb5f[_0x5af2a3(0x257)]),_0x3ceb5f[_0x5af2a3(0x257)]=this[_0x5af2a3(0x230)](_0xd5f182),this[_0x5af2a3(0x1e8)](_0x3ceb5f);}const _0x345099=runtimeModels(_0x2156a5[_0x5af2a3(0xed)]),_0x27f17c=this[_0x5af2a3(0x1d5)][_0x5af2a3(0x25c)](_0xd5f182);if(_0x27f17c!==undefined&&this[_0x5af2a3(0x286)][_0x5af2a3(0x10d)](_0xd5f182,_0x27f17c[_0x5af2a3(0x132)])&&_0x27f17c[_0x5af2a3(0x19a)]===_0x8b50d5[_0x5af2a3(0x19a)]&&_0x27f17c[_0x5af2a3(0x29e)]===_0x8b50d5[_0x5af2a3(0x29e)]&&_0x27f17c[_0x5af2a3(0x27f)]===_0x2156a5[_0x5af2a3(0x27f)]&&_0x27f17c[_0x5af2a3(0x22f)]>Date[_0x5af2a3(0x217)]())return _0x27f17c[_0x5af2a3(0x22f)]=Date[_0x5af2a3(0x217)]()+WATCH_TTL_MS,clearTimeout(_0x27f17c[_0x5af2a3(0x257)]),_0x27f17c[_0x5af2a3(0x257)]=this[_0x5af2a3(0x230)](_0xd5f182),this[_0x5af2a3(0x1e8)](_0x27f17c);this[_0x5af2a3(0x101)](_0xd5f182);const _0x6ff0b0=this[_0x5af2a3(0x286)][_0x5af2a3(0x18a)](_0xd5f182,_0x5af2a3(0x172),()=>this[_0x5af2a3(0x101)](_0xd5f182)),_0x197b23={'ownerKey':_0xd5f182,'slotToken':_0x6ff0b0,'sessionHash':_0x5dfa9c,'workbenchConnectionId':_0x8b50d5[_0x5af2a3(0x153)],'watchId':_0x8b50d5[_0x5af2a3(0x19a)],'conversationId':_0x8b50d5[_0x5af2a3(0x29e)],'templateId':_0x4a97a9[_0x5af2a3(0x219)],'userId':_0x2156a5[_0x5af2a3(0x27f)],'models':_0x345099,'nodeGeneration':this[_0x5af2a3(0x187)][_0x5af2a3(0x175)]?.()??_0x5af2a3(0x20c),'pendingEvents':[],'expiresAt':Date[_0x5af2a3(0x217)]()+WATCH_TTL_MS,'ready':![],'timer':undefined};return _0x197b23[_0x5af2a3(0x257)]=this[_0x5af2a3(0x230)](_0xd5f182),this[_0x5af2a3(0x1d5)][_0x5af2a3(0x212)](_0xd5f182,_0x197b23),void this[_0x5af2a3(0x268)](_0x197b23),this[_0x5af2a3(0x1e8)](_0x197b23);}[_0x132f42(0x21b)](_0x330079){const _0x1fe965=_0x132f42,_0x1079f2=hostedRequest(_0x330079),_0x2092a7=hostedConversationUnwatchInputSchema[_0x1fe965(0x27e)](_0x1079f2[_0x1fe965(0x10c)]);this[_0x1fe965(0x187)][_0x1fe965(0x1ec)][_0x1fe965(0x254)](_0x1079f2[_0x1fe965(0x27f)],_0x2092a7[_0x1fe965(0x29e)]);const _0x5aa923=watchOwnerKey(requireWatchSessionHash(_0x1079f2[_0x1fe965(0x1d0)]),_0x2092a7[_0x1fe965(0x153)]),_0x3cbbdb=this[_0x1fe965(0x1d5)][_0x1fe965(0x25c)](_0x5aa923);if(_0x3cbbdb?.[_0x1fe965(0x19a)]===_0x2092a7[_0x1fe965(0x19a)]&&_0x3cbbdb[_0x1fe965(0x29e)]===_0x2092a7[_0x1fe965(0x29e)]&&_0x3cbbdb[_0x1fe965(0x27f)]===_0x1079f2[_0x1fe965(0x27f)])this[_0x1fe965(0x101)](_0x5aa923);return{'unwatched':!![]};}[_0x132f42(0x209)](_0x29952e,_0x283d5b){const _0x17b72f=_0x132f42;return this[_0x17b72f(0x18b)](_0x29952e,{'conversationId':_0x29952e,'kind':_0x17b72f(0x1b3),'runtimeEvent':_0x283d5b});}[_0x132f42(0x156)](_0x197f47){const _0x4292d6=_0x132f42;return this[_0x4292d6(0x1fb)][_0x4292d6(0x25a)](_0x197f47)||this[_0x4292d6(0x1c5)][_0x4292d6(0x25a)](_0x197f47)||this[_0x4292d6(0x1a3)][_0x4292d6(0x25a)](_0x197f47)||[...this[_0x4292d6(0x1d5)][_0x4292d6(0x213)]()][_0x4292d6(0x258)](_0xd458cd=>_0xd458cd[_0x4292d6(0x29e)]===_0x197f47)||[...this[_0x4292d6(0x10b)][_0x4292d6(0x213)]()][_0x4292d6(0x258)](_0x18e658=>_0x18e658[_0x4292d6(0x29e)]===_0x197f47&&_0x18e658[_0x4292d6(0x10e)]===_0x4292d6(0x221))||[...this[_0x4292d6(0x1df)][_0x4292d6(0x293)]()][_0x4292d6(0x258)](_0x38730f=>_0x38730f[_0x4292d6(0x1fa)](_0x197f47+'\x00'));}[_0x132f42(0x2a3)](_0x2342ca){const _0x5944ba=_0x132f42;if(this[_0x5944ba(0x156)](_0x2342ca))return undefined;return this[_0x5944ba(0x1fb)][_0x5944ba(0x1ad)](_0x2342ca),()=>{const _0x186d41=_0x5944ba;this[_0x186d41(0x1fb)][_0x186d41(0x234)](_0x2342ca);};}async[_0x132f42(0x1d9)](_0x49edd5){const _0xc2955c=_0x132f42,_0x28381c=this[_0xc2955c(0x187)][_0xc2955c(0x1ec)][_0xc2955c(0x27d)](_0x49edd5);await this[_0xc2955c(0x187)][_0xc2955c(0x1b3)][_0xc2955c(0x1a2)]({'conversationId':_0x49edd5['id'],'sessionId':_0x49edd5[_0xc2955c(0x292)],'homeDirectory':_0x28381c[_0xc2955c(0x15a)]})[_0xc2955c(0x149)](()=>undefined);}[_0x132f42(0x222)](){const _0x20b495=_0x132f42;for(const [_0x1d0890,_0x1549d4]of this[_0x20b495(0x1c5)]){const _0x1bbe9b=runInterruptionKey(_0x1d0890,_0x1549d4[_0x20b495(0x1ab)]['id']);this[_0x20b495(0x1b8)][_0x20b495(0x1ad)](_0x1bbe9b);if(!_0x1549d4[_0x20b495(0x28a)]())this[_0x20b495(0x1b8)][_0x20b495(0x234)](_0x1bbe9b);}for(const _0x201e73 of[...this[_0x20b495(0x1d5)][_0x20b495(0x293)]()])this[_0x20b495(0x101)](_0x201e73);}[_0x132f42(0x253)](_0x3ef280){const _0xeb77d3=_0x132f42;if(this[_0xeb77d3(0x299)])return Promise[_0xeb77d3(0x25e)](new Error(_0xeb77d3(0x2a4)));const _0x262031=hostedRequest(_0x3ef280),_0x200dce=hostedConversationMessageInputSchema[_0xeb77d3(0x27e)](_0x262031[_0xeb77d3(0x10c)]),_0x2878bc=_0x200dce[_0xeb77d3(0x29e)]+'\x00'+_0x200dce[_0xeb77d3(0x275)],_0x5b7c79=this[_0xeb77d3(0x1df)][_0xeb77d3(0x25c)](_0x2878bc);if(_0x5b7c79!==undefined)return _0x5b7c79;const _0x517811=this[_0xeb77d3(0x187)][_0xeb77d3(0x1ec)][_0xeb77d3(0x262)](_0x262031[_0xeb77d3(0x27f)],_0x200dce[_0xeb77d3(0x29e)],_0x200dce[_0xeb77d3(0x275)]);if(_0x517811!==undefined){const _0x21aceb=this[_0xeb77d3(0x187)][_0xeb77d3(0x1ec)][_0xeb77d3(0x254)](_0x262031[_0xeb77d3(0x27f)],_0x200dce[_0xeb77d3(0x29e)]);return Promise[_0xeb77d3(0x240)]({'conversation':this[_0xeb77d3(0x195)](_0x21aceb),'run':runFromMessage(_0x517811)});}if([...this[_0xeb77d3(0x1df)][_0xeb77d3(0x293)]()][_0xeb77d3(0x258)](_0x380f97=>_0x380f97[_0xeb77d3(0x1fa)](_0x200dce[_0xeb77d3(0x29e)]+'\x00')))return Promise[_0xeb77d3(0x25e)](new Error(_0xeb77d3(0x238)));const _0x36e4df=this[_0xeb77d3(0x140)](_0x262031,_0x200dce);return this[_0xeb77d3(0x1df)][_0xeb77d3(0x212)](_0x2878bc,_0x36e4df),void _0x36e4df[_0xeb77d3(0x288)](()=>this[_0xeb77d3(0x1df)][_0xeb77d3(0x234)](_0x2878bc))[_0xeb77d3(0x149)](()=>undefined),_0x36e4df;}async[_0x132f42(0x140)](_0x2e342c,_0x585fbb){const _0x443ec4=_0x132f42;let _0x163104=this[_0x443ec4(0x187)][_0x443ec4(0x1ec)][_0x443ec4(0x254)](_0x2e342c[_0x443ec4(0x27f)],_0x585fbb[_0x443ec4(0x29e)]);if(this[_0x443ec4(0x1fb)][_0x443ec4(0x25a)](_0x163104['id']))throw new Error(_0x443ec4(0x14a));if(_0x163104[_0x443ec4(0x10e)]!==_0x443ec4(0x102))throw new Error(_0x443ec4(0x14a));if(this[_0x443ec4(0x1c5)][_0x443ec4(0x25a)](_0x163104['id']))throw new Error(_0x443ec4(0x238));const _0x2f211f=sessionTitleFromFirstMessage(_0x585fbb[_0x443ec4(0x14f)]),_0x36df49=_0x2f211f[_0x443ec4(0x134)]>-0x5*0x25a+0x21*0x23+0x35*0x23&&!this[_0x443ec4(0x187)][_0x443ec4(0x1ec)][_0x443ec4(0x130)](_0x2e342c[_0x443ec4(0x27f)],_0x163104['id']),_0x53ebb6=runtimeModels(_0x2e342c[_0x443ec4(0xed)]),_0x538799=this[_0x443ec4(0x187)][_0x443ec4(0x1ec)][_0x443ec4(0x289)](_0x2e342c[_0x443ec4(0x27f)],_0x163104['id']);let _0x2803e2,_0x4efc01,_0x562da3,_0x321097;const _0x1812a1=_0x163104[_0x443ec4(0xfa)]?undefined:this[_0x443ec4(0x13a)](_0x163104[_0x443ec4(0x219)]);if(_0x1812a1!==undefined&&_0x1812a1!==_0x163104[_0x443ec4(0x1ff)]){const _0x1a7ff1=_0x163104[_0x443ec4(0x1ff)],_0x3f99be=_0x1812a1;try{_0x2803e2=await this[_0x443ec4(0x104)](_0x3f99be,_0x163104[_0x443ec4(0x219)],!![]),_0x4efc01=selectModel(_0x2803e2,_0x53ebb6,_0x585fbb[_0x443ec4(0x22d)]??_0x2803e2[_0x443ec4(0x202)][_0x443ec4(0x10a)]),_0x562da3=resolveMcpServers(_0x2803e2,this[_0x443ec4(0x187)][_0x443ec4(0x17b)]??process.env),this[_0x443ec4(0x200)](_0x538799,_0x2803e2),this[_0x443ec4(0x1a7)](_0x538799,_0x2803e2),_0x321097={'previousVersionId':_0x1a7ff1,'targetVersionId':_0x3f99be};}catch(_0x5aa231){this[_0x443ec4(0x1c1)](_0x163104,_0x1a7ff1,_0x3f99be,_0x5aa231);throw new Error(_0x443ec4(0x1f0));}}else _0x2803e2=await this[_0x443ec4(0x104)](_0x163104[_0x443ec4(0x1ff)],_0x163104[_0x443ec4(0x219)],!![]),_0x4efc01=selectModel(_0x2803e2,_0x53ebb6,_0x585fbb[_0x443ec4(0x22d)]??_0x163104[_0x443ec4(0x22d)]);const _0x548fa4=await Promise[_0x443ec4(0x218)](_0x585fbb[_0x443ec4(0x112)][_0x443ec4(0x273)](_0x1a5970=>this[_0x443ec4(0x11e)](_0x2e342c[_0x443ec4(0x27f)],_0x163104['id'],_0x1a5970))),_0x51c3b0=attachmentPrompt(_0x585fbb[_0x443ec4(0x14f)],_0x548fa4),_0x42df91=marAgentGeneratedImagesDirectory(_0x538799[_0x443ec4(0x15a)],_0x163104[_0x443ec4(0x292)]),_0x47ab8c=hostedConversationGeneratedImagesDisplayDirectory(_0x163104[_0x443ec4(0x292)]);if(_0x42df91===undefined||_0x47ab8c===undefined)throw new Error(_0x443ec4(0x14b));await mkdir(_0x42df91,{'recursive':!![],'mode':0x1c0});const _0x1d06d1=this[_0x443ec4(0x200)](_0x538799,_0x2803e2,_0x42df91,_0x47ab8c),_0xbbd49=join(_0x538799[_0x443ec4(0x28d)],_0x443ec4(0x133)+randomUUID());await mkdir(_0xbbd49,{'mode':0x1c0}),this[_0x443ec4(0x181)](_0x2e342c[_0x443ec4(0x27f)],_0x163104,_0x443ec4(0x259),this[_0x443ec4(0x217)]());const _0x513932=[];let _0x3a3710=![];const _0x20de37=await this[_0x443ec4(0x187)][_0x443ec4(0x1b3)][_0x443ec4(0x237)]({'conversationId':_0x163104['id'],'sessionId':_0x163104[_0x443ec4(0x292)],'clientMessageId':_0x585fbb[_0x443ec4(0x275)],'userPrompt':_0x585fbb[_0x443ec4(0x14f)],'prompt':_0x51c3b0,'attachmentIds':_0x585fbb[_0x443ec4(0x112)],'access':_0x443ec4(0x1fe),'modelId':_0x4efc01['id'],'models':networkModels(allowedModels(_0x2803e2,_0x53ebb6),_0x2803e2[_0x443ec4(0x118)][_0x443ec4(0x21d)]),..._0x2e342c[_0x443ec4(0x21c)]===undefined?{}:{'runtimeScopeId':_0x2e342c[_0x443ec4(0x21c)]},'systemInstruction':systemInstruction(_0x2803e2,_0x47ab8c),'homeDirectory':_0x538799[_0x443ec4(0x15a)],'workspaceDirectory':_0x2803e2[_0x443ec4(0x15c)],'temporaryDirectory':_0xbbd49,'pathMounts':_0x1d06d1,'processExecutor':this[_0x443ec4(0x1a7)](_0x538799,_0x2803e2,_0xbbd49,_0x42df91,_0x47ab8c),'mcpServers':_0x562da3??resolveMcpServers(_0x2803e2,this[_0x443ec4(0x187)][_0x443ec4(0x17b)]??process.env),'webAccess':_0x2803e2[_0x443ec4(0x118)][_0x443ec4(0x21d)]!==_0x443ec4(0x290),'onEvent':_0x5be99d=>{const _0x4ef8cd=_0x443ec4;if(_0x3a3710)this[_0x4ef8cd(0x209)](_0x163104['id'],_0x5be99d);else _0x513932[_0x4ef8cd(0x171)](_0x5be99d);}})[_0x443ec4(0x149)](async _0x4fe199=>{const _0x2c61fd=_0x443ec4;this[_0x2c61fd(0x181)](_0x2e342c[_0x2c61fd(0x27f)],_0x163104,_0x2c61fd(0x210),this[_0x2c61fd(0x217)]()),await rm(_0xbbd49,{'recursive':!![],'force':!![]})[_0x2c61fd(0x149)](()=>undefined);if(_0x321097!==undefined){this[_0x2c61fd(0x1c1)](_0x163104,_0x321097[_0x2c61fd(0x201)],_0x321097[_0x2c61fd(0x14d)],_0x4fe199);throw new Error(_0x2c61fd(0x1f0));}throw _0x4fe199;}),_0x44ee36=_0x20de37[_0x443ec4(0x1ab)][_0x443ec4(0x216)];let _0x34acfb=![],_0x34aced;try{this[_0x443ec4(0x187)][_0x443ec4(0x1ec)][_0x443ec4(0x26b)]({'conversationId':_0x163104['id'],'clientMessageId':_0x585fbb[_0x443ec4(0x275)],'runId':_0x20de37[_0x443ec4(0x1ab)]['id'],'userTextPresent':_0x2f211f[_0x443ec4(0x134)]>-0x23fd+0x2112+0x2eb,'status':_0x443ec4(0x25b),'createdAt':_0x44ee36,'updatedAt':_0x44ee36}),_0x34acfb=!![];const _0x3eb4c5=this[_0x443ec4(0x217)]();_0x34aced=await this[_0x443ec4(0x187)][_0x443ec4(0x1ec)][_0x443ec4(0x158)]({'conversationId':_0x163104['id'],'modelId':_0x4efc01['id'],'activityAt':_0x3eb4c5,..._0x321097===undefined?{}:{'templateVersion':{'expectedActiveVersionId':_0x321097[_0x443ec4(0x201)],'activeVersionId':_0x321097[_0x443ec4(0x14d)],'maxStorageBytes':_0x2803e2[_0x443ec4(0x118)][_0x443ec4(0x285)][_0x443ec4(0x189)]}},..._0x36df49?{'automaticTitle':_0x2f211f}:{}});}catch(_0x39dcb1){try{_0x20de37[_0x443ec4(0x28a)]();}catch{}const _0x4c19ad=await _0x20de37[_0x443ec4(0x261)][_0x443ec4(0x149)](()=>({'status':_0x443ec4(0x1a9),'completedAt':this[_0x443ec4(0x217)]()}));if(_0x34acfb)try{this[_0x443ec4(0x187)][_0x443ec4(0x1ec)][_0x443ec4(0x16b)](_0x163104['id'],_0x585fbb[_0x443ec4(0x275)],_0x4c19ad[_0x443ec4(0x10e)],_0x4c19ad[_0x443ec4(0xff)]);}catch{}await rm(_0xbbd49,{'recursive':!![],'force':!![]})[_0x443ec4(0x149)](()=>undefined),this[_0x443ec4(0x181)](_0x2e342c[_0x443ec4(0x27f)],_0x163104,_0x443ec4(0x210),_0x4c19ad[_0x443ec4(0xff)]);if(_0x321097!==undefined)this[_0x443ec4(0x1c1)](_0x163104,_0x321097[_0x443ec4(0x201)],_0x321097[_0x443ec4(0x14d)],_0x39dcb1);throw _0x39dcb1;}_0x163104=_0x34aced[_0x443ec4(0x113)];if(_0x321097!==undefined)this[_0x443ec4(0x18b)](_0x163104['id'],{'conversationId':_0x163104['id'],'kind':_0x443ec4(0x129),'upgrade':{'status':_0x443ec4(0x15d),'previousVersionId':_0x321097[_0x443ec4(0x201)],'targetVersionId':_0x321097[_0x443ec4(0x14d)],'activeVersionId':_0x163104[_0x443ec4(0x1ff)],'conversation':this[_0x443ec4(0x195)](_0x163104),'error':null}});this[_0x443ec4(0x1c5)][_0x443ec4(0x212)](_0x163104['id'],_0x20de37),this[_0x443ec4(0x181)](_0x2e342c[_0x443ec4(0x27f)],_0x163104,_0x443ec4(0x25b),_0x20de37[_0x443ec4(0x1ab)][_0x443ec4(0x216)]);if(_0x34aced[_0x443ec4(0x1f1)])this[_0x443ec4(0x18b)](_0x163104['id'],{'conversationId':_0x163104['id'],'kind':_0x443ec4(0x113),'conversation':this[_0x443ec4(0x195)](_0x163104)});this[_0x443ec4(0x18b)](_0x163104['id'],{'conversationId':_0x163104['id'],'kind':_0x443ec4(0x1ab),'run':_0x20de37[_0x443ec4(0x1ab)]}),_0x3a3710=!![];for(const _0xece8f of _0x513932)this[_0x443ec4(0x209)](_0x163104['id'],_0xece8f);_0x513932[_0x443ec4(0x134)]=0x1*0x98f+-0x1926+0xf97;const _0x5d8111=_0x20de37[_0x443ec4(0x261)][_0x443ec4(0x250)](_0x164859=>this[_0x443ec4(0x231)](_0x2e342c[_0x443ec4(0x27f)],_0x163104['id'],_0x585fbb[_0x443ec4(0x275)],_0x20de37[_0x443ec4(0x1ab)],_0x164859),()=>this[_0x443ec4(0x231)](_0x2e342c[_0x443ec4(0x27f)],_0x163104['id'],_0x585fbb[_0x443ec4(0x275)],_0x20de37[_0x443ec4(0x1ab)],{'status':_0x443ec4(0x1a9),'completedAt':this[_0x443ec4(0x217)]()}))[_0x443ec4(0x149)](()=>undefined)[_0x443ec4(0x288)](async()=>{const _0x44faa5=_0x443ec4;this[_0x44faa5(0x1b8)][_0x44faa5(0x234)](runInterruptionKey(_0x163104['id'],_0x20de37[_0x44faa5(0x1ab)]['id']));if(this[_0x44faa5(0x1c5)][_0x44faa5(0x25c)](_0x163104['id'])===_0x20de37)this[_0x44faa5(0x1c5)][_0x44faa5(0x234)](_0x163104['id']);if(this[_0x44faa5(0x1a3)][_0x44faa5(0x25c)](_0x163104['id'])===_0x5d8111)this[_0x44faa5(0x1a3)][_0x44faa5(0x234)](_0x163104['id']);await rm(_0xbbd49,{'recursive':!![],'force':!![]})[_0x44faa5(0x149)](()=>undefined);});return this[_0x443ec4(0x1a3)][_0x443ec4(0x212)](_0x163104['id'],_0x5d8111),void _0x5d8111,{'conversation':this[_0x443ec4(0x195)](_0x163104),'run':_0x20de37[_0x443ec4(0x1ab)]};}async[_0x132f42(0x231)](_0x201c38,_0x34953f,_0x551639,_0x4652c8,_0x1bbde0){const _0x2c131c=_0x132f42,_0x25df6d=runInterruptionKey(_0x34953f,_0x4652c8['id']),_0x5be224=this[_0x2c131c(0x1b8)][_0x2c131c(0x25a)](_0x25df6d);let _0x282aab;try{this[_0x2c131c(0x187)][_0x2c131c(0x1ec)][_0x2c131c(0x16b)](_0x34953f,_0x551639,_0x1bbde0[_0x2c131c(0x10e)],_0x1bbde0[_0x2c131c(0xff)]);try{const _0x5d0172=await this[_0x2c131c(0x187)][_0x2c131c(0x1ec)][_0x2c131c(0x23f)](_0x201c38,_0x34953f);this[_0x2c131c(0x18b)](_0x34953f,{'conversationId':_0x34953f,'kind':_0x2c131c(0x1cf),'files':_0x5d0172,'error':null});}catch(_0x3c8eac){this[_0x2c131c(0x18b)](_0x34953f,{'conversationId':_0x34953f,'kind':_0x2c131c(0x1cf),'files':this[_0x2c131c(0x187)][_0x2c131c(0x1ec)][_0x2c131c(0x1aa)](_0x201c38,_0x34953f),'error':{'code':safeErrorCode(_0x3c8eac,_0x2c131c(0x28e)),'message':_0x2c131c(0x283)}});}await this[_0x2c131c(0x187)][_0x2c131c(0x1ec)][_0x2c131c(0x18c)](_0x34953f,_0x1bbde0[_0x2c131c(0xff)]),this[_0x2c131c(0x18b)](_0x34953f,{'conversationId':_0x34953f,'kind':_0x2c131c(0x1ab),'run':{'id':_0x4652c8['id'],'status':_0x1bbde0[_0x2c131c(0x10e)],'startedAt':_0x4652c8[_0x2c131c(0x216)],'completedAt':_0x1bbde0[_0x2c131c(0xff)]}}),await this[_0x2c131c(0x247)](_0x34953f,_0x1bbde0[_0x2c131c(0x28c)],_0x1bbde0[_0x2c131c(0xff)])[_0x2c131c(0x149)](()=>undefined),_0x282aab=this[_0x2c131c(0x187)][_0x2c131c(0x1ec)][_0x2c131c(0x254)](_0x201c38,_0x34953f);}finally{this[_0x2c131c(0x1b8)][_0x2c131c(0x234)](_0x25df6d);if(_0x282aab===undefined)try{_0x282aab=this[_0x2c131c(0x187)][_0x2c131c(0x1ec)][_0x2c131c(0x254)](_0x201c38,_0x34953f);}catch{}if(_0x282aab!==undefined)this[_0x2c131c(0x181)](_0x201c38,_0x282aab,_0x2c131c(0x210),_0x1bbde0[_0x2c131c(0xff)]);}if(_0x282aab!==undefined&&(_0x1bbde0[_0x2c131c(0x10e)]!==_0x2c131c(0x1db)||!_0x5be224))this[_0x2c131c(0x21f)](_0x201c38,_0x282aab,_0x4652c8['id'],_0x1bbde0);}async[_0x132f42(0x247)](_0x19fe37,_0x3efc10,_0x576cee){const _0x34fa04=_0x132f42,_0x164ad4=automaticHostedConversationTitle(_0x3efc10);if(_0x164ad4===undefined)return;const _0x46730a=await this[_0x34fa04(0x187)][_0x34fa04(0x1ec)][_0x34fa04(0x1e6)](_0x19fe37,_0x164ad4,_0x576cee);if(_0x46730a===undefined)return;this[_0x34fa04(0x18b)](_0x19fe37,{'conversationId':_0x19fe37,'kind':_0x34fa04(0x113),'conversation':this[_0x34fa04(0x195)](_0x46730a)});}[_0x132f42(0x177)](_0x567d59){const _0x36b4a3=_0x132f42,_0xab2eac=hostedRequest(_0x567d59),_0x541560=hostedConversationIdInputSchema[_0x36b4a3(0x27e)](_0xab2eac[_0x36b4a3(0x10c)]),_0x4f3b9d=this[_0x36b4a3(0x187)][_0x36b4a3(0x1ec)][_0x36b4a3(0x254)](_0xab2eac[_0x36b4a3(0x27f)],_0x541560[_0x36b4a3(0x29e)]),_0x1a982e=this[_0x36b4a3(0x1c5)][_0x36b4a3(0x25c)](_0x541560[_0x36b4a3(0x29e)]);if(_0x1a982e===undefined)return{'interrupted':![]};const _0x2eb162=runInterruptionKey(_0x4f3b9d['id'],_0x1a982e[_0x36b4a3(0x1ab)]['id']);this[_0x36b4a3(0x1b8)][_0x36b4a3(0x1ad)](_0x2eb162);try{const _0x32952c=_0x1a982e[_0x36b4a3(0x28a)]();if(!_0x32952c)return this[_0x36b4a3(0x1b8)][_0x36b4a3(0x234)](_0x2eb162),{'interrupted':![]};return this[_0x36b4a3(0x181)](_0xab2eac[_0x36b4a3(0x27f)],_0x4f3b9d,_0x36b4a3(0x1e0),this[_0x36b4a3(0x217)]()),{'interrupted':!![]};}catch(_0x2876fd){this[_0x36b4a3(0x1b8)][_0x36b4a3(0x234)](_0x2eb162);throw _0x2876fd;}}async[_0x132f42(0x282)](_0x2a2bda){const _0x2b56f3=_0x132f42,_0x52866a=hostedRequest(_0x2a2bda),_0x2fe35d=hostedConversationConfigUpdateInputSchema[_0x2b56f3(0x27e)](_0x52866a[_0x2b56f3(0x10c)]),_0x28ee83=this[_0x2b56f3(0x187)][_0x2b56f3(0x1ec)][_0x2b56f3(0x254)](_0x52866a[_0x2b56f3(0x27f)],_0x2fe35d[_0x2b56f3(0x29e)]);if(this[_0x2b56f3(0x1fb)][_0x2b56f3(0x25a)](_0x28ee83['id']))throw new Error(_0x2b56f3(0x14a));const _0x548d08=await this[_0x2b56f3(0x104)](_0x28ee83[_0x2b56f3(0x1ff)],_0x28ee83[_0x2b56f3(0x219)]),_0x467aa0=runtimeModels(_0x52866a[_0x2b56f3(0xed)]),_0x582720=selectModel(_0x548d08,_0x467aa0,_0x2fe35d[_0x2b56f3(0x22d)]??_0x28ee83[_0x2b56f3(0x22d)]),_0x29226e=this[_0x2b56f3(0x217)](),_0x210a7f=await this[_0x2b56f3(0x187)][_0x2b56f3(0x1ec)][_0x2b56f3(0x12e)](_0x28ee83['id'],_0x4d457b=>({..._0x4d457b,'modelId':_0x582720['id'],'updatedAt':_0x29226e,'lastActivityAt':_0x29226e}));return this[_0x2b56f3(0x18b)](_0x28ee83['id'],{'conversationId':_0x28ee83['id'],'kind':_0x2b56f3(0x11c),'conversation':this[_0x2b56f3(0x195)](_0x210a7f)}),{'conversation':this[_0x2b56f3(0x195)](_0x210a7f)};}async[_0x132f42(0x23b)](_0x2b3b){const _0x58205b=_0x132f42,_0x138b65=hostedRequest(_0x2b3b),_0xa0c8b6=hostedConversationMetadataUpdateInputSchema[_0x58205b(0x27e)](_0x138b65[_0x58205b(0x10c)]),_0x4dc4fa=this[_0x58205b(0x187)][_0x58205b(0x1ec)][_0x58205b(0x254)](_0x138b65[_0x58205b(0x27f)],_0xa0c8b6[_0x58205b(0x29e)]);if(this[_0x58205b(0x1fb)][_0x58205b(0x25a)](_0x4dc4fa['id']))throw new Error(_0x58205b(0x14a));const _0x2cb75c=this[_0x58205b(0x217)](),_0x1d9e6d=await this[_0x58205b(0x187)][_0x58205b(0x1ec)][_0x58205b(0x12e)](_0x4dc4fa['id'],_0x58b3cb=>({..._0x58b3cb,'title':_0xa0c8b6[_0x58205b(0x28c)]??_0x58b3cb[_0x58205b(0x28c)],'titleSource':_0xa0c8b6[_0x58205b(0x28c)]===undefined?_0x58b3cb[_0x58205b(0x1f8)]:_0x58205b(0x197),'pinnedAt':_0xa0c8b6[_0x58205b(0x1ca)]===undefined?_0x58b3cb[_0x58205b(0x241)]:_0xa0c8b6[_0x58205b(0x1ca)]?_0x2cb75c:null,'updatedAt':_0x2cb75c,'lastActivityAt':_0x58b3cb[_0x58205b(0x1c2)]}));return this[_0x58205b(0x18b)](_0x4dc4fa['id'],{'conversationId':_0x4dc4fa['id'],'kind':_0x58205b(0x11c),'conversation':this[_0x58205b(0x195)](_0x1d9e6d)}),{'conversation':this[_0x58205b(0x195)](_0x1d9e6d)};}async[_0x132f42(0x1aa)](_0x4f15d0){const _0xf4ec12=_0x132f42,_0xfa5b56=hostedRequest(_0x4f15d0),_0x53f95c=hostedConversationIdInputSchema[_0xf4ec12(0x27e)](_0xfa5b56[_0xf4ec12(0x10c)]);return hostedConversationFilesSchema[_0xf4ec12(0x27e)]({'files':this[_0xf4ec12(0x187)][_0xf4ec12(0x1ec)][_0xf4ec12(0x1aa)](_0xfa5b56[_0xf4ec12(0x27f)],_0x53f95c[_0xf4ec12(0x29e)])});}async[_0x132f42(0x10f)](_0x4a0d1b){const _0x35c5b1=_0x132f42,_0x1ee0b0=hostedRequest(_0x4a0d1b),_0x36a4a0=hostedConversationImageReadInputSchema[_0x35c5b1(0x27e)](_0x1ee0b0[_0x35c5b1(0x10c)]);this[_0x35c5b1(0x187)][_0x35c5b1(0x1ec)][_0x35c5b1(0x254)](_0x1ee0b0[_0x35c5b1(0x27f)],_0x36a4a0[_0x35c5b1(0x29e)]);if(_0x36a4a0[_0x35c5b1(0x15f)]!==hostedConversationImageRunId(_0x36a4a0[_0x35c5b1(0x29e)]))throw new Error(_0x35c5b1(0x13e));const _0x10ed57=await this[_0x35c5b1(0x187)][_0x35c5b1(0x10f)](_0x36a4a0[_0x35c5b1(0x15f)],_0x36a4a0[_0x35c5b1(0x1ea)]);if(_0x10ed57===undefined)throw new Error(_0x35c5b1(0x23e));return{'image':_0x10ed57};}async[_0x132f42(0x24d)](_0xf1dc35){const _0x466cc0=_0x132f42,_0x181e6f=hostedRequest(_0xf1dc35),_0x5f23c8=hostedConversationFileReadInputSchema[_0x466cc0(0x27e)](_0x181e6f[_0x466cc0(0x10c)]),_0x2841d4=this[_0x466cc0(0x187)][_0x466cc0(0x1ec)][_0x466cc0(0x127)](_0x181e6f[_0x466cc0(0x27f)],_0x5f23c8[_0x466cc0(0x29e)],_0x5f23c8[_0x466cc0(0x29a)]),_0x430094=this[_0x466cc0(0x187)][_0x466cc0(0x1ec)][_0x466cc0(0x29f)](_0x181e6f[_0x466cc0(0x27f)],_0x2841d4);await assertRegularFile(_0x430094,_0x2841d4[_0x466cc0(0x14c)]);const _0x382dbc=_0x5f23c8[_0x466cc0(0x19b)]??0x4c6*0x7+-0xe98+-0x49*0x42;if(_0x382dbc>_0x2841d4[_0x466cc0(0x14c)])throw new Error(_0x466cc0(0x111));const _0x241f05=Math[_0x466cc0(0x1a0)](_0x5f23c8[_0x466cc0(0x12d)]??MAX_FILE_READ_BYTES,MAX_FILE_READ_BYTES),_0x3d51f1=await open(_0x430094,'r');try{const _0xc6aea4=Buffer[_0x466cc0(0xf9)](Math[_0x466cc0(0x1a0)](_0x241f05,Math[_0x466cc0(0x1c4)](-0x14*-0x1a9+-0x1cb3+-0x481,_0x2841d4[_0x466cc0(0x14c)]-_0x382dbc))),_0x3ab2b1=await _0x3d51f1[_0x466cc0(0x224)](_0xc6aea4,-0x6c5+0x3*-0x57d+0x173c,_0xc6aea4[_0x466cc0(0x134)],_0x382dbc),_0x2a0aad=_0x382dbc+_0x3ab2b1[_0x466cc0(0x1c6)],_0x27e45c=_0x2a0aad>=_0x2841d4[_0x466cc0(0x14c)];return hostedConversationFileReadResultSchema[_0x466cc0(0x27e)]({'file':_0x2841d4,'encoding':_0x466cc0(0x12a),'content':_0xc6aea4[_0x466cc0(0x21a)](-0x1*0x1032+-0xc*0x2ff+0x3426,_0x3ab2b1[_0x466cc0(0x1c6)])[_0x466cc0(0x154)](_0x466cc0(0x12a)),'offset':_0x382dbc,'nextOffset':_0x27e45c?null:_0x2a0aad,'eof':_0x27e45c});}finally{await _0x3d51f1[_0x466cc0(0x278)]();}}async[_0x132f42(0x1c8)](_0x14a156){const _0x486a8a=_0x132f42,_0x320755=hostedRequest(_0x14a156),_0x2d7952=hostedConversationFileDeleteInputSchema[_0x486a8a(0x27e)](_0x320755[_0x486a8a(0x10c)]);this[_0x486a8a(0x1d6)](_0x320755[_0x486a8a(0x27f)],_0x2d7952[_0x486a8a(0x29e)]);const _0x246fe8=_0x2d7952[_0x486a8a(0x29e)]+'\x00'+_0x2d7952[_0x486a8a(0x29a)];if(this[_0x486a8a(0x139)][_0x486a8a(0x25a)](_0x246fe8))throw new Error(_0x486a8a(0x123));this[_0x486a8a(0x139)][_0x486a8a(0x1ad)](_0x246fe8);try{const _0x5731f4=await this[_0x486a8a(0x187)][_0x486a8a(0x1ec)][_0x486a8a(0x1c8)](_0x320755[_0x486a8a(0x27f)],_0x2d7952[_0x486a8a(0x29e)],_0x2d7952[_0x486a8a(0x29a)],this[_0x486a8a(0x217)]()),_0x28df04=hostedConversationFileDeleteResultSchema[_0x486a8a(0x27e)]({'deletedFileId':_0x2d7952[_0x486a8a(0x29a)],'files':_0x5731f4});return this[_0x486a8a(0x18b)](_0x2d7952[_0x486a8a(0x29e)],{'conversationId':_0x2d7952[_0x486a8a(0x29e)],'kind':_0x486a8a(0x1cf),'files':_0x28df04[_0x486a8a(0x1cf)],'error':null}),_0x28df04;}finally{this[_0x486a8a(0x139)][_0x486a8a(0x234)](_0x246fe8);}}async[_0x132f42(0x124)](_0x59e2f6){const _0x445eab=_0x132f42,_0x2ad044=hostedRequest(_0x59e2f6),_0x5600cb=hostedConversationUploadPreflightInputSchema[_0x445eab(0x27e)](_0x2ad044[_0x445eab(0x10c)]),_0x261db5=this[_0x445eab(0x1d6)](_0x2ad044[_0x445eab(0x27f)],_0x5600cb[_0x445eab(0x29e)]),_0x5d1798=await this[_0x445eab(0x104)](_0x261db5[_0x445eab(0x1ff)],_0x261db5[_0x445eab(0x219)]),_0x2425d8=this[_0x445eab(0x187)][_0x445eab(0x1ec)][_0x445eab(0x289)](_0x2ad044[_0x445eab(0x27f)],_0x261db5['id']),_0x1d8b18=await Promise[_0x445eab(0x218)](_0x5600cb[_0x445eab(0x1cf)][_0x445eab(0x273)](async _0x206f98=>({'name':_0x206f98[_0x445eab(0x22e)],'status':await this[_0x445eab(0x151)](_0x2425d8,_0x261db5,_0x5d1798[_0x445eab(0x118)],_0x206f98[_0x445eab(0x22e)],_0x206f98[_0x445eab(0x14c)])})));return hostedConversationUploadPreflightResultSchema[_0x445eab(0x27e)]({'files':_0x1d8b18});}async[_0x132f42(0x17c)](_0x1ce50a){const _0x332733=_0x132f42,_0x136604=hostedRequest(_0x1ce50a),_0x5dd6ac=hostedConversationUploadCreateInputSchema[_0x332733(0x27e)](_0x136604[_0x332733(0x10c)]),_0x37a155=this[_0x332733(0x1d6)](_0x136604[_0x332733(0x27f)],_0x5dd6ac[_0x332733(0x29e)]),_0x193afd=_0x136604[_0x332733(0x27f)]+'\x00'+_0x37a155['id']+'\x00'+_0x5dd6ac[_0x332733(0x122)],_0x5d5962=this[_0x332733(0x25d)][_0x332733(0x25c)](_0x193afd);if(_0x5d5962!==undefined){const _0x2e9411=this[_0x332733(0x10b)][_0x332733(0x25c)](_0x5d5962);if(_0x2e9411!==undefined)return{'upload':hostedConversationUploadSchema[_0x332733(0x27e)](uploadProjection(_0x2e9411))};}const _0x3c31a9=await this[_0x332733(0x104)](_0x37a155[_0x332733(0x1ff)],_0x37a155[_0x332733(0x219)]),_0x2ec5f4=this[_0x332733(0x187)][_0x332733(0x1ec)][_0x332733(0x289)](_0x136604[_0x332733(0x27f)],_0x37a155['id']),_0x357b8f=await this[_0x332733(0x151)](_0x2ec5f4,_0x37a155,_0x3c31a9[_0x332733(0x118)],_0x5dd6ac[_0x332733(0x22e)],_0x5dd6ac[_0x332733(0x14c)]);if(_0x357b8f===_0x332733(0x1a8)||_0x357b8f===_0x332733(0x25f))throw new Error(_0x332733(0x267));if(_0x357b8f!==_0x332733(0x165))throw new Error(_0x332733(0x27c));const _0x5bd451=this['id'](),_0xa76755=join(_0x2ec5f4[_0x332733(0x1a6)],'.'+_0x5bd451+_0x332733(0xf0)),_0x34c03b=join(_0x2ec5f4[_0x332733(0x1a6)],_0x5dd6ac[_0x332733(0x22e)]),_0x9e306c=await open(_0xa76755,'wx',-0x10b2+0x5*0x74d+0x6d*-0x2b);await _0x9e306c[_0x332733(0x278)]();const _0x13c341={'uploadId':_0x5bd451,'conversationId':_0x37a155['id'],'userId':_0x136604[_0x332733(0x27f)],'clientRequestId':_0x5dd6ac[_0x332733(0x122)],'name':_0x5dd6ac[_0x332733(0x22e)],'mimeType':_0x5dd6ac[_0x332733(0x126)],'size':_0x5dd6ac[_0x332733(0x14c)],'temporaryPath':_0xa76755,'targetPath':_0x34c03b,'receivedBytes':0x0,'status':_0x332733(0x221)};return this[_0x332733(0x10b)][_0x332733(0x212)](_0x5bd451,_0x13c341),this[_0x332733(0x25d)][_0x332733(0x212)](_0x193afd,_0x5bd451),{'upload':hostedConversationUploadSchema[_0x332733(0x27e)](uploadProjection(_0x13c341))};}async[_0x132f42(0x186)](_0x5ac9de){const _0x443bfd=_0x132f42,_0x4162a5=hostedRequest(_0x5ac9de),_0x5de368=hostedConversationUploadChunkInputSchema[_0x443bfd(0x27e)](_0x4162a5[_0x443bfd(0x10c)]),_0x489df1=this[_0x443bfd(0x142)](_0x4162a5[_0x443bfd(0x27f)],_0x5de368[_0x443bfd(0x29e)],_0x5de368[_0x443bfd(0x1f3)]);if(_0x489df1[_0x443bfd(0x10e)]!==_0x443bfd(0x221))throw new Error(_0x443bfd(0x1e1));if(_0x5de368[_0x443bfd(0x19b)]!==_0x489df1[_0x443bfd(0x1be)])throw new Error(_0x443bfd(0x1e4));const _0x3bbd00=Buffer[_0x443bfd(0x204)](_0x5de368[_0x443bfd(0x18e)],_0x443bfd(0x12a));if(_0x489df1[_0x443bfd(0x1be)]+_0x3bbd00[_0x443bfd(0x22c)]>_0x489df1[_0x443bfd(0x14c)])throw new Error(_0x443bfd(0x223));await assertUploadTemporaryFile(_0x489df1[_0x443bfd(0x20b)],_0x489df1[_0x443bfd(0x1be)]);const _0x1394db=await open(_0x489df1[_0x443bfd(0x20b)],'r+');try{await _0x1394db[_0x443bfd(0x1af)](_0x3bbd00,0x2*0x1df+0xbf*0x1+-0x47d,_0x3bbd00[_0x443bfd(0x22c)],_0x489df1[_0x443bfd(0x1be)]);}finally{await _0x1394db[_0x443bfd(0x278)]();}return _0x489df1[_0x443bfd(0x1be)]+=_0x3bbd00[_0x443bfd(0x22c)],{'upload':hostedConversationUploadSchema[_0x443bfd(0x27e)](uploadProjection(_0x489df1))};}[_0x132f42(0x196)](_0x2146cc){const _0x274fc5=_0x132f42,_0x9067f4=hostedRequest(_0x2146cc),_0x3b428b=hostedConversationUploadControlInputSchema[_0x274fc5(0x27e)](_0x9067f4[_0x274fc5(0x10c)]),_0x12aae2=this[_0x274fc5(0x142)](_0x9067f4[_0x274fc5(0x27f)],_0x3b428b[_0x274fc5(0x29e)],_0x3b428b[_0x274fc5(0x1f3)]);return{'upload':hostedConversationUploadSchema[_0x274fc5(0x27e)](uploadProjection(_0x12aae2))};}async[_0x132f42(0x1dc)](_0x1dc9ef){const _0x4147de=_0x132f42,_0x1e34a3=hostedRequest(_0x1dc9ef),_0x398a6a=hostedConversationUploadControlInputSchema[_0x4147de(0x27e)](_0x1e34a3[_0x4147de(0x10c)]),_0x37b010=this[_0x4147de(0x142)](_0x1e34a3[_0x4147de(0x27f)],_0x398a6a[_0x4147de(0x29e)],_0x398a6a[_0x4147de(0x1f3)]);if(_0x37b010[_0x4147de(0x10e)]===_0x4147de(0x199))return{'upload':hostedConversationUploadSchema[_0x4147de(0x27e)](uploadProjection(_0x37b010))};if(_0x37b010[_0x4147de(0x10e)]!==_0x4147de(0x221)||_0x37b010[_0x4147de(0x1be)]!==_0x37b010[_0x4147de(0x14c)])throw new Error(_0x4147de(0x248));const _0x565a46=this[_0x4147de(0x1d6)](_0x1e34a3[_0x4147de(0x27f)],_0x37b010[_0x4147de(0x29e)]),_0x2cb745=await this[_0x4147de(0x104)](_0x565a46[_0x4147de(0x1ff)],_0x565a46[_0x4147de(0x219)]);if(_0x37b010[_0x4147de(0x14c)]>_0x2cb745[_0x4147de(0x118)][_0x4147de(0x285)][_0x4147de(0x1e5)]||_0x565a46[_0x4147de(0x23a)][_0x4147de(0x295)]+_0x37b010[_0x4147de(0x14c)]>_0x565a46[_0x4147de(0x23a)][_0x4147de(0x291)])throw new Error(_0x4147de(0x267));await assertUploadTemporaryFile(_0x37b010[_0x4147de(0x20b)],_0x37b010[_0x4147de(0x14c)]);const _0x487f93=await lstat(_0x37b010[_0x4147de(0x281)])[_0x4147de(0x149)](_0x10da75=>{const _0x1f2dfb=_0x4147de;if(_0x10da75[_0x1f2dfb(0xee)]===_0x1f2dfb(0x249))return undefined;throw _0x10da75;});if(_0x487f93!==undefined)throw new Error(_0x4147de(0x27c));const _0x54d313=await open(_0x37b010[_0x4147de(0x20b)],'r+');try{await _0x54d313[_0x4147de(0x28f)]();}finally{await _0x54d313[_0x4147de(0x278)]();}await rename(_0x37b010[_0x4147de(0x20b)],_0x37b010[_0x4147de(0x281)]);const _0x55cfa8=this[_0x4147de(0x217)]();try{await utimes(_0x37b010[_0x4147de(0x281)],new Date(_0x55cfa8),new Date(_0x55cfa8));const _0x50b2f2={'id':this[_0x4147de(0x187)][_0x4147de(0x1ec)][_0x4147de(0x121)](_0x37b010[_0x4147de(0x29e)],_0x4147de(0x16d),_0x37b010[_0x4147de(0x22e)]),'conversationId':_0x37b010[_0x4147de(0x29e)],'category':_0x4147de(0x16d),'relativePath':_0x37b010[_0x4147de(0x22e)],'displayName':_0x37b010[_0x4147de(0x22e)],'mimeType':_0x37b010[_0x4147de(0x126)],'size':_0x37b010[_0x4147de(0x14c)],'source':_0x4147de(0x211),'createdAt':_0x55cfa8,'updatedAt':_0x55cfa8};return _0x37b010[_0x4147de(0x159)]=await this[_0x4147de(0x187)][_0x4147de(0x1ec)][_0x4147de(0x13c)](_0x1e34a3[_0x4147de(0x27f)],_0x50b2f2),_0x37b010[_0x4147de(0x10e)]=_0x4147de(0x199),this[_0x4147de(0x18b)](_0x37b010[_0x4147de(0x29e)],{'conversationId':_0x37b010[_0x4147de(0x29e)],'kind':_0x4147de(0x1cf),'files':this[_0x4147de(0x187)][_0x4147de(0x1ec)][_0x4147de(0x1aa)](_0x1e34a3[_0x4147de(0x27f)],_0x37b010[_0x4147de(0x29e)]),'error':null}),{'upload':hostedConversationUploadSchema[_0x4147de(0x27e)](uploadProjection(_0x37b010))};}catch(_0x39944b){await rename(_0x37b010[_0x4147de(0x281)],_0x37b010[_0x4147de(0x20b)])[_0x4147de(0x149)](()=>undefined);throw _0x39944b;}}async[_0x132f42(0x1f9)](_0x8da9ec){const _0x4b0c71=_0x132f42,_0xfa4e0d=hostedRequest(_0x8da9ec),_0xd18421=hostedConversationUploadControlInputSchema[_0x4b0c71(0x27e)](_0xfa4e0d[_0x4b0c71(0x10c)]),_0x17e3d0=this[_0x4b0c71(0x142)](_0xfa4e0d[_0x4b0c71(0x27f)],_0xd18421[_0x4b0c71(0x29e)],_0xd18421[_0x4b0c71(0x1f3)]);if(_0x17e3d0[_0x4b0c71(0x10e)]===_0x4b0c71(0x199))throw new Error(_0x4b0c71(0x1e1));return _0x17e3d0[_0x4b0c71(0x10e)]=_0x4b0c71(0x11a),await rm(_0x17e3d0[_0x4b0c71(0x20b)],{'force':!![]}),{'upload':hostedConversationUploadSchema[_0x4b0c71(0x27e)](uploadProjection(_0x17e3d0))};}async[_0x132f42(0x234)](_0x3d936b){const _0x43c4d9=_0x132f42,_0x10b9a8=hostedRequest(_0x3d936b),_0x4c1af7=hostedConversationIdInputSchema[_0x43c4d9(0x27e)](_0x10b9a8[_0x43c4d9(0x10c)]),_0x3e5453=this[_0x43c4d9(0x187)][_0x43c4d9(0x1ec)][_0x43c4d9(0x254)](_0x10b9a8[_0x43c4d9(0x27f)],_0x4c1af7[_0x43c4d9(0x29e)]);if(this[_0x43c4d9(0x1fb)][_0x43c4d9(0x25a)](_0x3e5453['id']))throw new Error(_0x43c4d9(0x14a));this[_0x43c4d9(0x1fb)][_0x43c4d9(0x1ad)](_0x3e5453['id']);try{await this[_0x43c4d9(0x19c)](_0x3e5453['id']);const _0xd9a0c8=this[_0x43c4d9(0x1c5)][_0x43c4d9(0x25c)](_0x3e5453['id']);if(_0xd9a0c8!==undefined){const _0x45fcf4=runInterruptionKey(_0x3e5453['id'],_0xd9a0c8[_0x43c4d9(0x1ab)]['id']);this[_0x43c4d9(0x1b8)][_0x43c4d9(0x1ad)](_0x45fcf4);if(!_0xd9a0c8[_0x43c4d9(0x28a)]())this[_0x43c4d9(0x1b8)][_0x43c4d9(0x234)](_0x45fcf4);}await this[_0x43c4d9(0x192)](_0x10b9a8[_0x43c4d9(0x27f)],_0x3e5453['id']);const _0x4b3026=this[_0x43c4d9(0x187)][_0x43c4d9(0x1ec)][_0x43c4d9(0x289)](_0x10b9a8[_0x43c4d9(0x27f)],_0x3e5453['id']);return await this[_0x43c4d9(0x187)][_0x43c4d9(0x1b3)][_0x43c4d9(0x1a2)]({'conversationId':_0x3e5453['id'],'sessionId':_0x3e5453[_0x43c4d9(0x292)],'homeDirectory':_0x4b3026[_0x43c4d9(0x15a)]})[_0x43c4d9(0x149)](()=>undefined),await this[_0x43c4d9(0x1a3)][_0x43c4d9(0x25c)](_0x3e5453['id'])?.[_0x43c4d9(0x149)](()=>undefined),this[_0x43c4d9(0x2a1)](_0x3e5453['id']),await this[_0x43c4d9(0x187)][_0x43c4d9(0x1ec)][_0x43c4d9(0x1c7)](_0x3e5453['id']),this[_0x43c4d9(0x276)][_0x43c4d9(0x234)](_0x3e5453['id']),hostedConversationDeleteResultSchema[_0x43c4d9(0x27e)]({'deletedConversationId':_0x3e5453['id']});}finally{this[_0x43c4d9(0x1fb)][_0x43c4d9(0x234)](_0x3e5453['id']);}}async[_0x132f42(0x19c)](_0x35fee6){const _0x3102c5=_0x132f42,_0x1942ac=_0x35fee6+'\x00',_0x3edcf2=[...this[_0x3102c5(0x1df)][_0x3102c5(0x29c)]()][_0x3102c5(0x26f)](([_0x51116a])=>_0x51116a[_0x3102c5(0x1fa)](_0x1942ac))[_0x3102c5(0x273)](([,_0x455a75])=>_0x455a75);await Promise[_0x3102c5(0x20f)](_0x3edcf2);}async[_0x132f42(0x268)](_0x217f5c){const _0x10cf94=_0x132f42;try{const _0x1f0da1=await this[_0x10cf94(0x25c)]({'conversationId':_0x217f5c[_0x10cf94(0x29e)],'__requestUserId':_0x217f5c[_0x10cf94(0x27f)],'__marAgentModels':_0x217f5c[_0x10cf94(0xed)]});if(this[_0x10cf94(0x1d5)][_0x10cf94(0x25c)](_0x217f5c[_0x10cf94(0xec)])!==_0x217f5c)return;this[_0x10cf94(0x187)][_0x10cf94(0x1d3)]?.({'type':_0x10cf94(0x20a),'workbenchConnectionId':_0x217f5c[_0x10cf94(0x153)],'watchId':_0x217f5c[_0x10cf94(0x19a)],'nodeGeneration':_0x217f5c[_0x10cf94(0x175)],'nodeId':this[_0x10cf94(0x187)][_0x10cf94(0x298)](),'templateId':_0x217f5c[_0x10cf94(0x219)],'conversationId':_0x217f5c[_0x10cf94(0x29e)],'revision':0x1,'snapshotSequence':++this[_0x10cf94(0x169)],'expiresAt':_0x217f5c[_0x10cf94(0x22f)],'payload':_0x1f0da1}),_0x217f5c[_0x10cf94(0x1ed)]=!![];for(const _0xf33ef0 of _0x217f5c[_0x10cf94(0x27b)])this[_0x10cf94(0x1b2)](_0x217f5c,_0xf33ef0);_0x217f5c[_0x10cf94(0x27b)][_0x10cf94(0x134)]=0xbe*0x14+-0x1f9a+0x10c2;}catch(_0x2230c0){if(this[_0x10cf94(0x1d5)][_0x10cf94(0x25c)](_0x217f5c[_0x10cf94(0xec)])!==_0x217f5c)return;this[_0x10cf94(0x187)][_0x10cf94(0x1d3)]?.({'type':_0x10cf94(0x20e),'workbenchConnectionId':_0x217f5c[_0x10cf94(0x153)],'watchType':_0x10cf94(0x172),'watchId':_0x217f5c[_0x10cf94(0x19a)],'nodeGeneration':_0x217f5c[_0x10cf94(0x175)],'nodeId':this[_0x10cf94(0x187)][_0x10cf94(0x298)](),'templateId':_0x217f5c[_0x10cf94(0x219)],'conversationId':_0x217f5c[_0x10cf94(0x29e)],'code':safeErrorCode(_0x2230c0,_0x10cf94(0x26e)),'message':_0x10cf94(0x17e)}),this[_0x10cf94(0x101)](_0x217f5c[_0x10cf94(0xec)]);}}[_0x132f42(0x16a)](_0x234daf){const _0x5c8994=_0x132f42;return this[_0x5c8994(0x276)][_0x5c8994(0x25c)](_0x234daf)??{'status':_0x5c8994(0x210),'version':0x0,'updatedAt':0x0};}[_0x132f42(0x195)](_0x2904b6){const _0x457f60=_0x132f42;return hostedConversationSummary(_0x2904b6,this[_0x457f60(0x16a)](_0x2904b6['id']));}[_0x132f42(0x181)](_0x53d825,_0x2f7319,_0x1573c1,_0x1cad33){const _0x3711b2=_0x132f42,_0xd61f73=this[_0x3711b2(0x16a)](_0x2f7319['id']),_0x1eec62={'status':_0x1573c1,'version':_0xd61f73[_0x3711b2(0x214)]+(-0x1*0x2399+0x13ee+0xfac),'updatedAt':_0x1cad33};this[_0x3711b2(0x276)][_0x3711b2(0x212)](_0x2f7319['id'],_0x1eec62),this[_0x3711b2(0x178)]({'kind':_0x3711b2(0x16a),'userId':_0x53d825,'templateId':_0x2f7319[_0x3711b2(0x219)],'conversationId':_0x2f7319['id'],'activity':_0x1eec62});}[_0x132f42(0x21f)](_0x57c278,_0x23c8ca,_0x210ca8,_0x4eef0d){const _0x248578=_0x132f42;this[_0x248578(0x178)]({'kind':_0x248578(0x163),'event':{'runId':_0x210ca8,'sequence':0x1,'eventType':_0x248578(0x163),'payload':{'targetType':_0x248578(0x24e),'userId':_0x57c278,'templateId':_0x23c8ca[_0x248578(0x219)],'conversationId':_0x23c8ca['id'],'conversationTitle':_0x23c8ca[_0x248578(0x28c)],'runId':_0x210ca8,'notificationId':_0x248578(0x1a5)+this[_0x248578(0x187)][_0x248578(0x298)]()+':'+_0x23c8ca['id']+':'+_0x210ca8,'kind':_0x248578(0x16f),'outcome':_0x4eef0d[_0x248578(0x10e)],'occurredAt':_0x4eef0d[_0x248578(0xff)]},'createdAt':_0x4eef0d[_0x248578(0xff)]}});}[_0x132f42(0x178)](_0x2e6426){const _0x313266=_0x132f42,_0x994539=this[_0x313266(0x187)][_0x313266(0x1c0)]?.(_0x2e6426)??{'sequence':++this[_0x313266(0x125)],'category':_0x313266(0x172),'payload':_0x2e6426};if(_0x994539!==undefined)this[_0x313266(0x187)][_0x313266(0x1bf)]?.(_0x994539);}[_0x132f42(0x1c1)](_0x172d60,_0x3d8719,_0x3b077d,_0x4e2e71){const _0x4409d7=_0x132f42;this[_0x4409d7(0x18b)](_0x172d60['id'],{'conversationId':_0x172d60['id'],'kind':_0x4409d7(0x129),'upgrade':{'status':_0x4409d7(0x1a9),'previousVersionId':_0x3d8719,'targetVersionId':_0x3b077d,'activeVersionId':_0x172d60[_0x4409d7(0x1ff)],'conversation':this[_0x4409d7(0x195)](_0x172d60),'error':{'code':safeErrorCode(_0x4e2e71,_0x4409d7(0x1f0)),'message':_0x4409d7(0x208)}}});}[_0x132f42(0x18b)](_0x559c95,_0x3a8d23){const _0x4e0560=_0x132f42,_0x5e7b75=[...this[_0x4e0560(0x1d5)][_0x4e0560(0x213)]()][_0x4e0560(0x26f)](_0x4707d1=>_0x4707d1[_0x4e0560(0x29e)]===_0x559c95);if(_0x5e7b75[_0x4e0560(0x134)]===0x2*-0x62b+-0x5*0x2b4+0x19da)return![];const _0x4b5c60=this[_0x4e0560(0x187)][_0x4e0560(0x1c0)]?.(_0x3a8d23)??{'sequence':++this[_0x4e0560(0x125)],'category':_0x4e0560(0x172),'payload':_0x3a8d23};if(_0x4b5c60===undefined)return![];for(const _0x34a841 of _0x5e7b75){if(!_0x34a841[_0x4e0560(0x1ed)])_0x34a841[_0x4e0560(0x27b)][_0x4e0560(0x171)](_0x4b5c60);else this[_0x4e0560(0x1b2)](_0x34a841,_0x4b5c60);}return!![];}[_0x132f42(0x1b2)](_0xfbd318,_0x545314){const _0x573a5a=_0x132f42;this[_0x573a5a(0x187)][_0x573a5a(0x1d3)]?.({'type':_0x573a5a(0x18f),'workbenchConnectionId':_0xfbd318[_0x573a5a(0x153)],'watchId':_0xfbd318[_0x573a5a(0x19a)],'nodeGeneration':_0xfbd318[_0x573a5a(0x175)],'nodeId':this[_0x573a5a(0x187)][_0x573a5a(0x298)](),'templateId':_0xfbd318[_0x573a5a(0x219)],'conversationId':_0xfbd318[_0x573a5a(0x29e)],'expiresAt':_0xfbd318[_0x573a5a(0x22f)],'event':_0x545314});}[_0x132f42(0x1e8)](_0x340b50){const _0x522309=_0x132f42;return{'accepted':!![],'watchId':_0x340b50[_0x522309(0x19a)],'nodeGeneration':_0x340b50[_0x522309(0x175)],'expiresAt':_0x340b50[_0x522309(0x22f)]};}[_0x132f42(0x2a1)](_0x3a8344){const _0x34a2cd=_0x132f42;for(const _0x11fcb4 of[...this[_0x34a2cd(0x1d5)][_0x34a2cd(0x213)]()])if(_0x11fcb4[_0x34a2cd(0x29e)]===_0x3a8344)this[_0x34a2cd(0x101)](_0x11fcb4[_0x34a2cd(0xec)]);}[_0x132f42(0x101)](_0x15984b){const _0x1ebf7b=_0x132f42,_0x425123=this[_0x1ebf7b(0x1d5)][_0x1ebf7b(0x25c)](_0x15984b);if(_0x425123===undefined)return;clearTimeout(_0x425123[_0x1ebf7b(0x257)]),this[_0x1ebf7b(0x1d5)][_0x1ebf7b(0x234)](_0x15984b),this[_0x1ebf7b(0x286)][_0x1ebf7b(0x183)](_0x15984b,_0x425123[_0x1ebf7b(0x132)]);}[_0x132f42(0x230)](_0x23757d){const _0x4b9abb=_0x132f42,_0x55e4c2=setTimeout(()=>this[_0x4b9abb(0x101)](_0x23757d),WATCH_TTL_MS);return _0x55e4c2[_0x4b9abb(0x145)](),_0x55e4c2;}[_0x132f42(0x1d6)](_0x5b1f35,_0x23940c){const _0x43822d=_0x132f42,_0xf5c18a=this[_0x43822d(0x187)][_0x43822d(0x1ec)][_0x43822d(0x254)](_0x5b1f35,_0x23940c);if(this[_0x43822d(0x1fb)][_0x43822d(0x25a)](_0xf5c18a['id']))throw new Error(_0x43822d(0x14a));if(_0xf5c18a[_0x43822d(0x10e)]!==_0x43822d(0x102))throw new Error(_0x43822d(0x14a));return _0xf5c18a;}[_0x132f42(0x142)](_0x1f2855,_0x2a4aed,_0xd4e395){const _0x694637=_0x132f42;this[_0x694637(0x187)][_0x694637(0x1ec)][_0x694637(0x254)](_0x1f2855,_0x2a4aed);const _0x50ced6=this[_0x694637(0x10b)][_0x694637(0x25c)](_0xd4e395);if(_0x50ced6===undefined||_0x50ced6[_0x694637(0x27f)]!==_0x1f2855||_0x50ced6[_0x694637(0x29e)]!==_0x2a4aed)throw new Error(_0x694637(0x29d));return _0x50ced6;}async[_0x132f42(0x192)](_0x28f202,_0x151335){const _0x2885ad=_0x132f42;for(const _0x11c8af of this[_0x2885ad(0x10b)][_0x2885ad(0x213)]()){if(_0x11c8af[_0x2885ad(0x27f)]!==_0x28f202||_0x11c8af[_0x2885ad(0x29e)]!==_0x151335)continue;_0x11c8af[_0x2885ad(0x10e)]===_0x2885ad(0x221)&&(_0x11c8af[_0x2885ad(0x10e)]=_0x2885ad(0x11a),await rm(_0x11c8af[_0x2885ad(0x20b)],{'force':!![]})[_0x2885ad(0x149)](()=>undefined));}}async[_0x132f42(0x11e)](_0x1733ae,_0x234498,_0x14957d){const _0x29eb35=_0x132f42,_0x932765=this[_0x29eb35(0x187)][_0x29eb35(0x1ec)][_0x29eb35(0x127)](_0x1733ae,_0x234498,_0x14957d);if(_0x932765[_0x29eb35(0x1b0)]!==_0x29eb35(0x16d))throw new Error(_0x29eb35(0x26c));return await assertRegularFile(this[_0x29eb35(0x187)][_0x29eb35(0x1ec)][_0x29eb35(0x29f)](_0x1733ae,_0x932765),_0x932765[_0x29eb35(0x14c)]),_0x932765;}async[_0x132f42(0x151)](_0x2d11c1,_0x1ff4fe,_0x9e9f18,_0x500567,_0x2ebaac){const _0x41853f=_0x132f42;if(_0x2ebaac>_0x9e9f18[_0x41853f(0x285)][_0x41853f(0x1e5)])return _0x41853f(0x25f);if(_0x1ff4fe[_0x41853f(0x23a)][_0x41853f(0x295)]+_0x2ebaac>_0x1ff4fe[_0x41853f(0x23a)][_0x41853f(0x291)])return _0x41853f(0x1a8);const _0x54be97=await lstat(join(_0x2d11c1[_0x41853f(0x1a6)],_0x500567))[_0x41853f(0x149)](_0x5f229f=>{const _0xd3f411=_0x41853f;if(_0x5f229f[_0xd3f411(0xee)]===_0xd3f411(0x249))return undefined;throw _0x5f229f;});return _0x54be97===undefined?_0x41853f(0x165):_0x41853f(0x1cd);}[_0x132f42(0x200)](_0x9cbc26,_0x453aec,_0x597617,_0x274aa8){const _0x586e6a=_0x132f42,_0x578f67=[{'logicalPath':_0x586e6a(0xf3),'physicalPath':_0x453aec[_0x586e6a(0x15c)],'writable':![]},{'logicalPath':_0x586e6a(0x188),'physicalPath':_0x9cbc26[_0x586e6a(0x1a6)],'writable':!![]},{'logicalPath':_0x586e6a(0x191),'physicalPath':_0x9cbc26[_0x586e6a(0xf4)],'writable':!![]}];if(_0x597617!==undefined&&_0x274aa8!==undefined)_0x578f67[_0x586e6a(0x171)]({'logicalPath':_0x274aa8,'physicalPath':_0x597617,'writable':![]});if(_0x453aec[_0x586e6a(0x2a0)]!==undefined)_0x578f67[_0x586e6a(0x171)]({'logicalPath':_0x453aec[_0x586e6a(0x2a0)],'physicalPath':_0x453aec[_0x586e6a(0x15c)],'writable':![]},{'logicalPath':join(_0x453aec[_0x586e6a(0x2a0)],_0x586e6a(0x116)),'physicalPath':_0x9cbc26[_0x586e6a(0x1a6)],'writable':!![]},{'logicalPath':join(_0x453aec[_0x586e6a(0x2a0)],_0x586e6a(0x120)),'physicalPath':_0x9cbc26[_0x586e6a(0xf4)],'writable':!![]});return _0x578f67;}[_0x132f42(0x1a7)](_0x3aa61c,_0x4c5baf,_0x4e1ce8=_0x3aa61c[_0x132f42(0x28d)],_0x3da755,_0x2829f3){const _0x54fd18=_0x132f42;return this[_0x54fd18(0x187)][_0x54fd18(0x17d)]({'policyVersion':HOST_POLICY_VERSION,'workspaceDirectory':_0x4c5baf[_0x54fd18(0x15c)],..._0x4c5baf[_0x54fd18(0x2a0)]===undefined?{}:{'sourceWorkspacePath':_0x4c5baf[_0x54fd18(0x2a0)]},'inboxDirectory':_0x3aa61c[_0x54fd18(0x1a6)],'outputDirectory':_0x3aa61c[_0x54fd18(0xf4)],..._0x3da755===undefined||_0x2829f3===undefined?{}:{'generatedImagesDirectory':_0x3da755,'generatedImagesLogicalPath':_0x2829f3},'temporaryDirectory':_0x4e1ce8,'networkMode':_0x4c5baf[_0x54fd18(0x118)][_0x54fd18(0x21d)]});}[_0x132f42(0x13a)](_0xb72ea){const _0x3676c0=_0x132f42,_0xa417bc=this[_0x3676c0(0x187)][_0x3676c0(0x205)][_0x3676c0(0x1b5)][_0x3676c0(0xef)](_0x3676c0(0x1b7))[_0x3676c0(0x25c)](_0xb72ea);if(_0xa417bc===undefined)return undefined;if(typeof _0xa417bc['id']!==_0x3676c0(0x1bb))throw new Error(_0x3676c0(0x105));return _0xa417bc['id'];}async[_0x132f42(0x104)](_0x297f5b,_0x4b2393,_0x557f08=![]){const _0x309a66=_0x132f42,_0x115541=this[_0x309a66(0x187)][_0x309a66(0x205)][_0x309a66(0x1b5)][_0x309a66(0xef)](_0x309a66(0x1b6))[_0x309a66(0x25c)](_0x297f5b,_0x4b2393);if(_0x115541===undefined||_0x115541[_0x309a66(0x10e)]!==_0x309a66(0x103)&&_0x115541[_0x309a66(0x10e)]!==_0x309a66(0x1e7)||_0x115541[_0x309a66(0x22b)]!==HOST_POLICY_VERSION||typeof _0x115541[_0x309a66(0x1ce)]!==_0x309a66(0x1bb)||typeof _0x115541[_0x309a66(0x206)]!==_0x309a66(0x1bb)||typeof _0x115541[_0x309a66(0x135)]!==_0x309a66(0x1bb)||typeof _0x115541[_0x309a66(0x1ae)]!==_0x309a66(0x1bb)||typeof _0x115541[_0x309a66(0x161)]!==_0x309a66(0x1bb))throw new Error(_0x309a66(0x105));const _0x2a1fa6=this[_0x309a66(0x187)][_0x309a66(0x1ec)][_0x309a66(0x143)](_0x115541[_0x309a66(0x1ce)]),_0x84e81=join(_0x2a1fa6,_0x309a66(0x277)),_0x2f1a97=join(_0x2a1fa6,_0x309a66(0x19e)),_0x39c0ce=await lstat(_0x84e81)[_0x309a66(0x149)](()=>undefined),_0x59bceb=await lstat(_0x2f1a97)[_0x309a66(0x149)](()=>undefined);if(_0x39c0ce===undefined||!_0x39c0ce[_0x309a66(0x266)]()||_0x39c0ce[_0x309a66(0x242)]()||_0x59bceb===undefined||!_0x59bceb[_0x309a66(0x115)]()||_0x59bceb[_0x309a66(0x242)]())throw new Error(_0x309a66(0x105));let _0x36712e;try{const _0x317050=await readFile(_0x84e81,_0x309a66(0x14e)),_0x5f0795=_0x317050[_0x309a66(0x21e)]('\x0a')?_0x317050[_0x309a66(0x1c9)](-0xcd*-0x16+-0x274*-0x6+0x1*-0x2056,-(0x9e1+0x11ba+-0xdcd*0x2)):_0x317050;if(_0x5f0795!==_0x115541[_0x309a66(0x206)]||createHash(_0x309a66(0x1b9))[_0x309a66(0x1fc)](_0x5f0795)[_0x309a66(0x243)](_0x309a66(0x148))!==_0x115541[_0x309a66(0x1ae)])throw new Error(_0x309a66(0x105));_0x36712e=JSON[_0x309a66(0x27e)](_0x5f0795);}catch{throw new Error(_0x309a66(0x105));}if(!record(_0x36712e))throw new Error(_0x309a66(0x105));const _0x3c7f4b=publishedTemplateSnapshot(_0x36712e),_0x33fd49=publishedTemplateDraft(_0x3c7f4b[_0x309a66(0x24b)],_0x36712e[_0x309a66(0x118)]),_0xc27a06=_0x33fd49[_0x309a66(0x118)],_0x25800a=publishedMcpServers(_0x36712e[_0x309a66(0x1d4)]),_0x1f2244=publishedTemplateContentHash(_0x3c7f4b[_0x309a66(0x270)],_0x3c7f4b[_0x309a66(0x29c)],_0x3c7f4b[_0x309a66(0x24b)]),_0x52c96e=_0x3c7f4b[_0x309a66(0x29c)][_0x309a66(0xfc)]((_0x12bdec,_0x4fadea)=>_0x12bdec+_0x4fadea[_0x309a66(0x14c)],0xcba+0xa7*0x3b+0x751*-0x7);if(_0x36712e[_0x309a66(0x20d)]!==_0x115541[_0x309a66(0x161)]||createHash(_0x309a66(0x1b9))[_0x309a66(0x1fc)](JSON[_0x309a66(0x179)](_0x25800a))[_0x309a66(0x243)](_0x309a66(0x148))!==_0x115541[_0x309a66(0x161)]||_0x36712e[_0x309a66(0x1f7)]!==_0x115541[_0x309a66(0x135)]||_0x1f2244!==_0x115541[_0x309a66(0x135)]||_0x115541[_0x309a66(0x173)]!==_0x3c7f4b[_0x309a66(0x29c)][_0x309a66(0x134)]||_0x115541[_0x309a66(0x160)]!==_0x52c96e)throw new Error(_0x309a66(0x105));if(_0x36712e[_0x309a66(0x272)]!==_0x297f5b||_0x36712e[_0x309a66(0x219)]!==_0x4b2393||_0x36712e[_0x309a66(0x11d)]!==HOST_POLICY_VERSION||_0xc27a06[_0x309a66(0x219)]!==_0x4b2393||_0xc27a06[_0x309a66(0x298)]!==this[_0x309a66(0x187)][_0x309a66(0x298)]())throw new Error(_0x309a66(0x105));if(_0x557f08)await verifyPublishedTemplateContent(_0x2f1a97,_0x3c7f4b[_0x309a66(0x270)],_0x3c7f4b[_0x309a66(0x29c)]);return{'id':_0x297f5b,'templateId':_0x4b2393,'storageKey':_0x115541[_0x309a66(0x1ce)],'templateDirectory':_0x2f1a97,..._0x3c7f4b[_0x309a66(0x2a0)]===undefined?{}:{'sourceWorkspacePath':_0x3c7f4b[_0x309a66(0x2a0)]},'draft':_0xc27a06,'modelPolicy':_0x33fd49[_0x309a66(0x202)],'mcpServers':_0x25800a};}}function hostedRequest(_0x2411a1){const _0x27ccb9=_0x132f42;if(!record(_0x2411a1))throw new Error(_0x27ccb9(0x13e));const {__requestUserId:_0x5bf71e,__template:_0x3cd898,__marAgentModel:_0x1ed00c,__marAgentModels:_0x290083,__marAgentRuntimeScopeId:_0x758d4f,__workspaceWatchSessionHash:_0x308e35,__templateDeleted:_0x4d32a6,..._0x240a4b}=_0x2411a1;if(typeof _0x5bf71e!==_0x27ccb9(0x13b)||!Number[_0x27ccb9(0x287)](_0x5bf71e)||_0x5bf71e<=0x9d1+-0xc7+0x2*-0x485)throw new Error(_0x27ccb9(0x13e));if(_0x4d32a6!==undefined&&_0x4d32a6!==!![])throw new Error(_0x27ccb9(0x13e));if(_0x758d4f!==undefined&&(typeof _0x758d4f!==_0x27ccb9(0x1bb)||_0x758d4f[_0x27ccb9(0x134)]===0xc1a+0x428*0x1+-0x1042))throw new Error(_0x27ccb9(0x13e));return{'data':_0x240a4b,'userId':_0x5bf71e,..._0x3cd898===undefined?{}:{'template':_0x3cd898},..._0x1ed00c===undefined?{}:{'model':_0x1ed00c},..._0x290083===undefined?{}:{'models':_0x290083},..._0x758d4f===undefined?{}:{'runtimeScopeId':_0x758d4f},..._0x308e35===undefined?{}:{'sessionHash':_0x308e35},..._0x4d32a6===!![]?{'templateDeleted':!![]}:{}};}function requireWatchSessionHash(_0x2355cd){const _0x3cf618=_0x132f42;if(typeof _0x2355cd!==_0x3cf618(0x1bb)||_0x2355cd[_0x3cf618(0x134)]===0x1e93+-0x571+-0x2*0xc91)throw new Error(_0x3cf618(0x13e));return _0x2355cd;}function watchOwnerKey(_0x5bdca9,_0x1b2db6){return _0x5bdca9+':'+_0x1b2db6;}function runtimeModels(_0x402ef0){const _0xafc8d9=_0x132f42;return marAgentRuntimeModelConfigurationSchema[_0xafc8d9(0x1ac)]()[_0xafc8d9(0x27e)](_0x402ef0);}function allowedModels(_0x12bc36,_0x34ea21){const _0x2cab11=_0x132f42,_0x310ced=new Set(_0x12bc36[_0x2cab11(0x202)][_0x2cab11(0x1e3)]);return _0x34ea21[_0x2cab11(0x26f)](_0x5b701a=>_0x5b701a[_0x2cab11(0x269)]&&_0x310ced[_0x2cab11(0x25a)](_0x12bc36[_0x2cab11(0x202)][_0x2cab11(0x180)]===_0x2cab11(0x152)?_0x5b701a[_0x2cab11(0x22d)]:_0x5b701a['id']));}function selectModel(_0x3e1260,_0x3dabd1,_0x3dd8c2){const _0x366871=_0x132f42,_0x2bad5f=allowedModels(_0x3e1260,_0x3dabd1),_0x250878=_0x2bad5f[_0x366871(0x155)](_0x3d8b5e=>_0x3d8b5e['id']===_0x3dd8c2);if(_0x250878!==undefined)return _0x250878;const _0x25be7b=_0x2bad5f[_0x366871(0x155)](_0x43c2e8=>(_0x3e1260[_0x366871(0x202)][_0x366871(0x180)]===_0x366871(0x152)?_0x43c2e8[_0x366871(0x22d)]:_0x43c2e8['id'])===_0x3e1260[_0x366871(0x202)][_0x366871(0x10a)]);if(_0x25be7b!==undefined)return _0x25be7b;const _0x4cf494=_0x3e1260[_0x366871(0x202)][_0x366871(0x1e3)][_0x366871(0x273)](_0x555694=>_0x2bad5f[_0x366871(0x155)](_0x1d7172=>(_0x3e1260[_0x366871(0x202)][_0x366871(0x180)]===_0x366871(0x152)?_0x1d7172[_0x366871(0x22d)]:_0x1d7172['id'])===_0x555694))[_0x366871(0x155)](_0x722cfa=>_0x722cfa!==undefined);if(_0x4cf494===undefined)throw new Error(_0x366871(0xf7));return _0x4cf494;}function publishedTemplateDraft(_0x479708,_0x333a77){const _0x1d169a=_0x132f42,_0x30e623=conversationTemplateDraftSchema[_0x1d169a(0x15e)](_0x333a77);if(_0x30e623[_0x1d169a(0x164)]){const {allowedModels:_0x34e0ce,defaultModelId:_0x472bf3,..._0x58fd92}=_0x30e623[_0x1d169a(0x10c)];return{'draft':_0x58fd92,'modelPolicy':{'identity':_0x1d169a(0x152),'allowedIds':_0x34e0ce[_0x1d169a(0x273)](_0x3bf693=>_0x3bf693[_0x1d169a(0x22d)]),'defaultId':_0x472bf3}};}if(_0x479708!==-0x14*-0x1bf+0x2b3*-0x5+-0x156c||!record(_0x333a77)||_0x1d169a(0x137)in _0x333a77||!Array[_0x1d169a(0x265)](_0x333a77[_0x1d169a(0x174)]))throw new Error(_0x1d169a(0x105));const _0x1a610e=_0x333a77[_0x1d169a(0x174)],_0x3554d0={..._0x333a77};delete _0x3554d0[_0x1d169a(0x174)];const _0x12a68d=conversationTemplateDraftSchema[_0x1d169a(0x15e)]({..._0x3554d0,'allowedModels':_0x1a610e[_0x1d169a(0x273)](_0x12dd33=>({'modelId':_0x12dd33,'name':_0x12dd33}))});if(!_0x12a68d[_0x1d169a(0x164)])throw new Error(_0x1d169a(0x105));const {allowedModels:_0x4278fc,defaultModelId:_0x235ea5,..._0x1dc7c6}=_0x12a68d[_0x1d169a(0x10c)];return{'draft':_0x1dc7c6,'modelPolicy':{'identity':_0x1d169a(0x13f),'allowedIds':_0x4278fc[_0x1d169a(0x273)](_0x5397f8=>_0x5397f8[_0x1d169a(0x22d)]),'defaultId':_0x235ea5}};}function networkModels(_0x22f813,_0x58ac1f){const _0x457af4=_0x132f42;if(_0x58ac1f!==_0x457af4(0x290))return _0x22f813;return _0x22f813[_0x457af4(0x273)](_0x77c018=>_0x77c018[_0x457af4(0x252)]?{..._0x77c018,'hostedWebSearch':![]}:_0x77c018);}function publishedMcpServers(_0x166bf7){const _0xd811b2=_0x132f42;if(!Array[_0xd811b2(0x265)](_0x166bf7))throw new Error(_0xd811b2(0x105));return _0x166bf7[_0xd811b2(0x273)](_0x24bdbe=>{const _0xfc2e26=_0xd811b2;if(!record(_0x24bdbe))throw new Error(_0xfc2e26(0x105));const _0x25cae7=Object[_0xfc2e26(0x293)](_0x24bdbe)[_0xfc2e26(0x1fd)]()[_0xfc2e26(0x24c)](',');if(_0x25cae7!==_0xfc2e26(0x157))throw new Error(_0xfc2e26(0x105));const _0xe37cdb=mcpRuntimeDescriptorSchema[_0xfc2e26(0x27e)](_0x24bdbe[_0xfc2e26(0x1b3)]),_0x1e2df7=mcpInstallationConfigurationSchema[_0xfc2e26(0x27e)](_0x24bdbe[_0xfc2e26(0x11c)]);if(typeof _0x24bdbe['id']!==_0xfc2e26(0x1bb)||typeof _0x24bdbe[_0xfc2e26(0x13d)]!==_0xfc2e26(0x1bb)||typeof _0x24bdbe[_0xfc2e26(0x24f)]!==_0xfc2e26(0x1bb)||typeof _0x24bdbe[_0xfc2e26(0x214)]!==_0xfc2e26(0x1bb)||_0x24bdbe[_0xfc2e26(0x227)]!==_0xfc2e26(0x170)&&_0x24bdbe[_0xfc2e26(0x227)]!==_0xfc2e26(0x16e)||_0x24bdbe[_0xfc2e26(0x1bc)]!==_0xe37cdb[_0xfc2e26(0x1bc)])throw new Error(_0xfc2e26(0x105));return{'id':_0x24bdbe['id'],'serverName':_0x24bdbe[_0xfc2e26(0x13d)],'displayName':_0x24bdbe[_0xfc2e26(0x24f)],'version':_0x24bdbe[_0xfc2e26(0x214)],'origin':_0x24bdbe[_0xfc2e26(0x227)],'transport':_0xe37cdb[_0xfc2e26(0x1bc)],'runtime':_0xe37cdb,'configuration':_0x1e2df7};});}function publishedTemplateSnapshot(_0x1b22eb){const _0xd88e60=_0x132f42;if(_0x1b22eb[_0xd88e60(0x24b)]===-0x16ab*-0x1+-0x20b*-0x7+-0x1*0x24f7){const _0x40c8f0=publishedTemplateFiles(_0x1b22eb[_0xd88e60(0x1cf)]);return{'schemaVersion':0x1,'directories':legacyPublishedTemplateDirectories(_0x40c8f0),'entries':_0x40c8f0};}if(_0x1b22eb[_0xd88e60(0x24b)]!==0x18a0+-0x105e+0x30*-0x2c||typeof _0x1b22eb[_0xd88e60(0x2a0)]!==_0xd88e60(0x1bb)||!Array[_0xd88e60(0x265)](_0x1b22eb[_0xd88e60(0x270)])||!Array[_0xd88e60(0x265)](_0x1b22eb[_0xd88e60(0x29c)]))throw new Error(_0xd88e60(0x105));validatePublishedSourceWorkspacePath(_0x1b22eb[_0xd88e60(0x2a0)]);const _0x4377c6=_0x1b22eb[_0xd88e60(0x270)][_0xd88e60(0x273)](safePublishedTemplateRelativePath);if(new Set(_0x4377c6)[_0xd88e60(0x14c)]!==_0x4377c6[_0xd88e60(0x134)]||_0x4377c6[_0xd88e60(0x168)](_0xd88e60(0x116))||_0x4377c6[_0xd88e60(0x168)](_0xd88e60(0x120)))throw new Error(_0xd88e60(0x105));const _0x5d8658=_0x1b22eb[_0xd88e60(0x29c)][_0xd88e60(0x273)](publishedTemplateEntry);if(new Set(_0x5d8658[_0xd88e60(0x273)](_0x254f8f=>_0x254f8f[_0xd88e60(0x150)]))[_0xd88e60(0x14c)]!==_0x5d8658[_0xd88e60(0x134)])throw new Error(_0xd88e60(0x105));return{'schemaVersion':0x2,'sourceWorkspacePath':_0x1b22eb[_0xd88e60(0x2a0)],'directories':_0x4377c6,'entries':_0x5d8658};}function publishedTemplateEntry(_0x188963){const _0x57e00d=_0x132f42;if(!record(_0x188963))throw new Error(_0x57e00d(0x105));if(_0x188963[_0x57e00d(0x27a)]===_0x57e00d(0x1da))return publishedTemplateFile(_0x188963,!![]);if(_0x188963[_0x57e00d(0x27a)]!==_0x57e00d(0x194)||typeof _0x188963[_0x57e00d(0x109)]!==_0x57e00d(0x1bb)||_0x188963[_0x57e00d(0x109)][_0x57e00d(0x134)]===0x10a2*0x1+0x115*-0x3+-0xd63||_0x188963[_0x57e00d(0x109)][_0x57e00d(0x168)]('\x00')||_0x188963[_0x57e00d(0x1f2)]!==_0x57e00d(0x15b)&&_0x188963[_0x57e00d(0x1f2)]!==_0x57e00d(0x108)||typeof _0x188963[_0x57e00d(0x114)]!==_0x57e00d(0x1bb))throw new Error(_0x57e00d(0x105));const _0x2154fb=safePublishedTemplateRelativePath(_0x188963[_0x57e00d(0x150)]),_0x2c33d9=safePublishedTemplateSize(_0x188963[_0x57e00d(0x14c)]),_0x3bd033=_0x188963[_0x57e00d(0x109)],_0x3914b8=_0x188963[_0x57e00d(0x1f2)],_0x30867f=_0x188963[_0x57e00d(0x114)];if(_0x2c33d9!==Buffer[_0x57e00d(0x22c)](_0x3bd033))throw new Error(_0x57e00d(0x105));if(_0x3914b8===_0x57e00d(0x15b))safePublishedTemplateRelativePath(_0x30867f);else{if(!isAbsolute(_0x30867f)||!RUNTIME_LINK_ROOTS[_0x57e00d(0x258)](_0x1ed0e6=>_0x30867f===_0x1ed0e6||within(_0x1ed0e6,_0x30867f)))throw new Error(_0x57e00d(0x105));}return{'kind':_0x57e00d(0x194),'relativePath':_0x2154fb,'size':_0x2c33d9,'linkTarget':_0x3bd033,'targetKind':_0x3914b8,'resolvedTarget':_0x30867f};}function publishedTemplateFiles(_0x872e71){const _0x299daa=_0x132f42;if(!Array[_0x299daa(0x265)](_0x872e71))throw new Error(_0x299daa(0x105));const _0xe74efb=new Set();return _0x872e71[_0x299daa(0x273)](_0x54aa98=>{const _0xe8b2b8=_0x299daa,_0x2ff2f5=publishedTemplateFile(_0x54aa98);if(_0xe74efb[_0xe8b2b8(0x25a)](_0x2ff2f5[_0xe8b2b8(0x150)]))throw new Error(_0xe8b2b8(0x105));return _0xe74efb[_0xe8b2b8(0x1ad)](_0x2ff2f5[_0xe8b2b8(0x150)]),_0x2ff2f5;});}function publishedTemplateFile(_0x425ed5,_0x1a2e16=![]){const _0x1a6ca8=_0x132f42;if(!record(_0x425ed5)||_0x1a2e16&&_0x425ed5[_0x1a6ca8(0x27a)]!==_0x1a6ca8(0x1da)||typeof _0x425ed5[_0x1a6ca8(0x245)]!==_0x1a6ca8(0x279)||typeof _0x425ed5[_0x1a6ca8(0x1b9)]!==_0x1a6ca8(0x1bb)||!/^[a-f0-9]{64}$/u[_0x1a6ca8(0x1a1)](_0x425ed5[_0x1a6ca8(0x1b9)]))throw new Error(_0x1a6ca8(0x105));return{'kind':_0x1a6ca8(0x1da),'relativePath':safePublishedTemplateRelativePath(_0x425ed5[_0x1a6ca8(0x150)]),'size':safePublishedTemplateSize(_0x425ed5[_0x1a6ca8(0x14c)]),'executable':_0x425ed5[_0x1a6ca8(0x245)],'sha256':_0x425ed5[_0x1a6ca8(0x1b9)]};}function safePublishedTemplateRelativePath(_0x2b1bb6){const _0x2bf37a=_0x132f42;if(typeof _0x2b1bb6!==_0x2bf37a(0x1bb)||_0x2b1bb6[_0x2bf37a(0x134)]===-0x17f2+0x29*0x39+-0xed1*-0x1||_0x2b1bb6[_0x2bf37a(0x1fa)]('/')||_0x2b1bb6[_0x2bf37a(0x168)]('\x5c')||_0x2b1bb6[_0x2bf37a(0x184)]('/')[_0x2bf37a(0x258)](_0x2b62f3=>_0x2b62f3[_0x2bf37a(0x134)]===0xebe+0x239d*0x1+-0x325b||_0x2b62f3==='.'||_0x2b62f3==='..'))throw new Error(_0x2bf37a(0x105));return _0x2b1bb6;}function safePublishedTemplateSize(_0x337542){const _0x21bbea=_0x132f42;if(!Number[_0x21bbea(0x287)](_0x337542)||_0x337542<0x72c+0x495+-0xbc1)throw new Error(_0x21bbea(0x105));return _0x337542;}function legacyPublishedTemplateDirectories(_0x1ef060){const _0x484ab2=_0x132f42,_0x3ef86d=new Set();for(const _0x464c3b of _0x1ef060){const _0x1d0eee=_0x464c3b[_0x484ab2(0x150)][_0x484ab2(0x184)]('/');for(let _0x3f97b1=-0x1bf*-0x5+0x2b4*0x4+-0x138a;_0x3f97b1<_0x1d0eee[_0x484ab2(0x134)];_0x3f97b1+=0x7*-0x79+-0x4*0x61+0x4d4)_0x3ef86d[_0x484ab2(0x1ad)](_0x1d0eee[_0x484ab2(0x1c9)](-0x242+0x300+-0xbe,_0x3f97b1)[_0x484ab2(0x24c)]('/'));}return[..._0x3ef86d][_0x484ab2(0x1fd)]((_0x1495f9,_0x7ea03)=>_0x1495f9[_0x484ab2(0x226)](_0x7ea03,_0x484ab2(0x166)));}function publishedTemplateContentHash(_0x5da54f,_0x1db116,_0x5ec27b){const _0x13ee65=_0x132f42,_0xcdbd28=_0x5ec27b===-0x1feb+-0x1*-0x1faf+0x3d*0x1?_0x1db116[_0x13ee65(0x273)](_0x378ee7=>{const _0x1e4543=_0x13ee65;if(_0x378ee7[_0x1e4543(0x27a)]!==_0x1e4543(0x1da))throw new Error(_0x1e4543(0x105));return _0x378ee7[_0x1e4543(0x150)]+'\x00'+_0x378ee7[_0x1e4543(0x14c)]+'\x00'+_0x378ee7[_0x1e4543(0x1b9)];})[_0x13ee65(0x24c)]('\x0a'):[..._0x5da54f[_0x13ee65(0x273)](_0xe475d7=>_0x13ee65(0x294)+_0xe475d7),..._0x1db116[_0x13ee65(0x273)](_0x52b050=>_0x52b050[_0x13ee65(0x27a)]===_0x13ee65(0x1da)?_0x52b050[_0x13ee65(0x27a)]+'\x00'+_0x52b050[_0x13ee65(0x150)]+'\x00'+_0x52b050[_0x13ee65(0x14c)]+'\x00'+(_0x52b050[_0x13ee65(0x245)]?0x21e6+0x1*-0xd87+-0x2*0xa2f:-0x13*-0x108+0x1*-0x1bc5+0x82d)+'\x00'+_0x52b050[_0x13ee65(0x1b9)]:_0x52b050[_0x13ee65(0x27a)]+'\x00'+_0x52b050[_0x13ee65(0x150)]+'\x00'+_0x52b050[_0x13ee65(0x14c)]+'\x00'+_0x52b050[_0x13ee65(0x109)]+'\x00'+_0x52b050[_0x13ee65(0x1f2)]+'\x00'+_0x52b050[_0x13ee65(0x114)])][_0x13ee65(0x24c)]('\x0a');return createHash(_0x13ee65(0x1b9))[_0x13ee65(0x1fc)](_0xcdbd28)[_0x13ee65(0x243)](_0x13ee65(0x148));}function _0x1c9a(_0x4807cf,_0x16023d){_0x4807cf=_0x4807cf-(0x1ea0+-0x1e77+-0x61*-0x2);const _0x583611=_0x5676();let _0xca8a95=_0x583611[_0x4807cf];if(_0x1c9a['tEbnkP']===undefined){var _0x318dc7=function(_0x1f0fef){const _0x276d27='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x1b97bd='',_0x1b4b01='';for(let _0x332007=0x212d+0x1*0x1999+0x1*-0x3ac6,_0x387968,_0x22ccae,_0x1bebeb=-0x141c+-0x1*-0x183+-0x3*-0x633;_0x22ccae=_0x1f0fef['charAt'](_0x1bebeb++);~_0x22ccae&&(_0x387968=_0x332007%(0x110+-0x2611+0x15f*0x1b)?_0x387968*(-0x4*-0x65+0x1da5+0x1ef9*-0x1)+_0x22ccae:_0x22ccae,_0x332007++%(-0x13*-0x7b+0xd47+-0x1664))?_0x1b97bd+=String['fromCharCode'](-0x257a+-0x1c8+0xf*0x2af&_0x387968>>(-(0xf0+-0x1654+0x16*0xf9)*_0x332007&0xa7*0x13+-0x376*-0x4+-0x3*0x8bd)):-0x100+-0x1*0xc47+0xb*0x135){_0x22ccae=_0x276d27['indexOf'](_0x22ccae);}for(let _0x3cead6=-0xb*0x3d+0xb*0xcc+-0x625,_0x51a504=_0x1b97bd['length'];_0x3cead6<_0x51a504;_0x3cead6++){_0x1b4b01+='%'+('00'+_0x1b97bd['charCodeAt'](_0x3cead6)['toString'](0x301*0x9+0x1304+-0x2dfd*0x1))['slice'](-(-0xa39*0x3+0x1*-0xaa2+0x294f));}return decodeURIComponent(_0x1b4b01);};_0x1c9a['eWDsDj']=_0x318dc7,_0x1c9a['hEJBGu']={},_0x1c9a['tEbnkP']=!![];}const _0x222073=_0x583611[-0x1c0f+0x4c6*0x7+-0x55b];_0x1c9a['TPuxWz']!==_0x222073&&(_0x1c9a['hEJBGu']={},_0x1c9a['TPuxWz']=_0x222073);const _0x253817=_0x1c9a['hEJBGu'][_0x4807cf];return _0x253817===undefined?(_0xca8a95=_0x1c9a['eWDsDj'](_0xca8a95),_0x1c9a['hEJBGu'][_0x4807cf]=_0xca8a95):_0xca8a95=_0x253817,_0xca8a95;}async function verifyPublishedTemplateContent(_0x10c5ed,_0x565a21,_0x1e1b7d){const _0x35648c=_0x132f42,_0x21fb23=new Map(_0x1e1b7d[_0x35648c(0x273)](_0x5cf9a6=>[_0x5cf9a6[_0x35648c(0x150)],_0x5cf9a6])),_0x493d80=new Set([..._0x565a21,_0x35648c(0x116),_0x35648c(0x120)]),_0x1ee991=new Set(),_0x1a654b=await listPublishedTemplateEntries(_0x10c5ed,_0x493d80,_0x1ee991);if(_0x1a654b[_0x35648c(0x134)]!==_0x21fb23[_0x35648c(0x14c)]||_0x1ee991[_0x35648c(0x14c)]!==_0x493d80[_0x35648c(0x14c)])throw new Error(_0x35648c(0x105));for(const _0x22a627 of _0x1a654b){const _0x287e98=_0x21fb23[_0x35648c(0x25c)](_0x22a627[_0x35648c(0x150)]);if(_0x287e98===undefined||_0x287e98[_0x35648c(0x27a)]!==_0x22a627[_0x35648c(0x27a)])throw new Error(_0x35648c(0x105));if(_0x287e98[_0x35648c(0x27a)]===_0x35648c(0x1da)&&_0x22a627[_0x35648c(0x27a)]===_0x35648c(0x1da)){if(_0x287e98[_0x35648c(0x14c)]!==_0x22a627[_0x35648c(0x14c)]||_0x287e98[_0x35648c(0x245)]!==_0x22a627[_0x35648c(0x245)]||_0x22a627[_0x35648c(0x1cb)]!==(_0x287e98[_0x35648c(0x245)]?-0x1feb*0x1+-0xa*-0x185+0x1226:0x2*-0xf1+-0xdba+-0x8*-0x218)||_0x287e98[_0x35648c(0x1b9)]!==_0x22a627[_0x35648c(0x1b9)])throw new Error(_0x35648c(0x105));continue;}if(_0x287e98[_0x35648c(0x27a)]!==_0x35648c(0x194)||_0x22a627[_0x35648c(0x27a)]!==_0x35648c(0x194)||_0x287e98[_0x35648c(0x14c)]!==_0x22a627[_0x35648c(0x14c)]||_0x287e98[_0x35648c(0x109)]!==_0x22a627[_0x35648c(0x109)])throw new Error(_0x35648c(0x105));await verifyPublishedSymlinkResolution(_0x10c5ed,_0x287e98,_0x22a627[_0x35648c(0x106)]);}}async function verifyPublishedSymlinkResolution(_0x48871d,_0x11703f,_0x14a53e){const _0x3856b9=_0x132f42;let _0x1cd735;try{_0x1cd735=await realpath(_0x14a53e);}catch{throw new Error(_0x3856b9(0x105));}if(_0x11703f[_0x3856b9(0x1f2)]===_0x3856b9(0x108)){if(_0x1cd735!==_0x11703f[_0x3856b9(0x114)])throw new Error(_0x3856b9(0x105));return;}let _0x2b897e,_0x5b39c6;try{[_0x2b897e,_0x5b39c6]=await Promise[_0x3856b9(0x218)]([realpath(join(_0x48871d,..._0x11703f[_0x3856b9(0x114)][_0x3856b9(0x184)]('/'))),realpath(_0x48871d)]);}catch{throw new Error(_0x3856b9(0x105));}if(_0x1cd735!==_0x2b897e||!within(_0x5b39c6,_0x1cd735))throw new Error(_0x3856b9(0x105));}async function listPublishedTemplateEntries(_0x5ab9f4,_0x109ad2,_0x1d6815,_0xabd821=''){const _0x482123=_0x132f42,_0x53dcb6=await lstat(_0x5ab9f4);if(!_0x53dcb6[_0x482123(0x115)]()||_0x53dcb6[_0x482123(0x242)]()||(_0x53dcb6[_0x482123(0x1cb)]&0xf46+-0x12f0+-0xcf*-0x7)!==-0xbe9*0x2+0x1a32+0x9*-0x1b)throw new Error(_0x482123(0x105));const _0x4217b5=[];for(const _0x3bc733 of await readdir(_0x5ab9f4,{'withFileTypes':!![]})){const _0x21d02d=join(_0x5ab9f4,_0x3bc733[_0x482123(0x22e)]),_0x43b557=_0xabd821[_0x482123(0x134)]===0x1042*-0x1+-0x7*-0x505+-0x12e1?_0x3bc733[_0x482123(0x22e)]:_0xabd821+'/'+_0x3bc733[_0x482123(0x22e)],_0x1e89d8=await lstat(_0x21d02d);if(_0x1e89d8[_0x482123(0x242)]()){const _0x4fcc30=await readlink(_0x21d02d);_0x4217b5[_0x482123(0x171)]({'kind':_0x482123(0x194),'relativePath':_0x43b557,'size':Buffer[_0x482123(0x22c)](_0x4fcc30),'linkTarget':_0x4fcc30,'sourcePath':_0x21d02d});continue;}if(_0x1e89d8[_0x482123(0x115)]()){if(!_0x109ad2[_0x482123(0x25a)](_0x43b557))throw new Error(_0x482123(0x105));_0x1d6815[_0x482123(0x1ad)](_0x43b557),_0x4217b5[_0x482123(0x171)](...await listPublishedTemplateEntries(_0x21d02d,_0x109ad2,_0x1d6815,_0x43b557));}else{if(!_0x1e89d8[_0x482123(0x266)]()||_0x1e89d8[_0x482123(0xf6)]!==0xa12+-0x2cc*0x8+0xc4f||!Number[_0x482123(0x287)](_0x1e89d8[_0x482123(0x14c)]))throw new Error(_0x482123(0x105));_0x4217b5[_0x482123(0x171)]({'kind':_0x482123(0x1da),'relativePath':_0x43b557,'size':_0x1e89d8[_0x482123(0x14c)],'executable':(_0x1e89d8[_0x482123(0x1cb)]&-0x9ea+0x7d8+-0x1*-0x25b)!==0xa51+0x1d*0x10f+-0x2904,'mode':_0x1e89d8[_0x482123(0x1cb)]&-0x130a+-0xc*0x20c+0x2d99,'sha256':createHash(_0x482123(0x1b9))[_0x482123(0x1fc)](await readFile(_0x21d02d))[_0x482123(0x243)](_0x482123(0x148))});}}return _0x4217b5;}function validatePublishedSourceWorkspacePath(_0x2e1f11){const _0x36ff20=_0x132f42;if(!isAbsolute(_0x2e1f11)||resolve(_0x2e1f11)!==_0x2e1f11||_0x2e1f11==='/'||RESERVED_SANDBOX_ROOTS[_0x36ff20(0x258)](_0x1bd768=>_0x2e1f11===_0x1bd768||within(_0x1bd768,_0x2e1f11)||within(_0x2e1f11,_0x1bd768)))throw new Error(_0x36ff20(0x105));}function within(_0x38b904,_0x5e7650){const _0x2eecfd=_0x132f42,_0x3df644=relative(_0x38b904,_0x5e7650);return _0x3df644[_0x2eecfd(0x134)]>-0x1*-0x7db+-0x1*0x1817+0x103c&&_0x3df644!=='..'&&!_0x3df644[_0x2eecfd(0x1fa)]('..'+sep);}function resolveMcpServers(_0x590753,_0x5e7b6c){const _0x10b2b7=_0x132f42,_0x360a69=_0x1d2b40=>{const _0x1354c5=_0x1c9a,_0x220f3b={};for(const [_0x572dad,_0x20edbe]of Object[_0x1354c5(0x29c)](_0x1d2b40??{})){const _0x1f2518=_0x5e7b6c[_0x20edbe[_0x1354c5(0x17f)]];if(_0x1f2518===undefined)throw new Error(_0x1354c5(0x264));_0x220f3b[_0x572dad]=_0x1f2518;}return _0x220f3b;};return _0x590753[_0x10b2b7(0x1d4)][_0x10b2b7(0x1bd)](_0x838011=>{const _0x1ae800=_0x10b2b7;if(_0x838011[_0x1ae800(0x1b3)][_0x1ae800(0x1bc)]===_0x1ae800(0x1d8)){if(_0x590753[_0x1ae800(0x118)][_0x1ae800(0x21d)]!==_0x1ae800(0x1e9))return[];return[{'name':_0x838011[_0x1ae800(0x13d)],'lifecycle':_0x1ae800(0x1dd),'transport':_0x1ae800(0x1d8),'url':_0x838011[_0x1ae800(0x1b3)][_0x1ae800(0x176)],'headers':{..._0x360a69(_0x838011[_0x1ae800(0x1b3)][_0x1ae800(0x207)]),..._0x360a69(_0x838011[_0x1ae800(0x11c)][_0x1ae800(0x207)])}}];}return[{'name':_0x838011[_0x1ae800(0x13d)],'lifecycle':_0x1ae800(0x1dd),'transport':_0x1ae800(0x220),'command':_0x838011[_0x1ae800(0x1b3)][_0x1ae800(0x263)],'args':[..._0x838011[_0x1ae800(0x1b3)][_0x1ae800(0x296)],..._0x838011[_0x1ae800(0x11c)][_0x1ae800(0x255)]??[]],'environment':{..._0x360a69(_0x838011[_0x1ae800(0x1b3)][_0x1ae800(0x1eb)]),..._0x360a69(_0x838011[_0x1ae800(0x11c)][_0x1ae800(0x1eb)])}}];});}function hostedConversationSummary(_0x5499af,_0x396b6b){const _0x3a0cd7=_0x132f42;return hostedConversationSummarySchema[_0x3a0cd7(0x27e)]({'id':_0x5499af['id'],'nodeId':_0x5499af[_0x3a0cd7(0x298)],'sessionId':_0x5499af[_0x3a0cd7(0x292)],'templateId':_0x5499af[_0x3a0cd7(0x219)],'templateName':_0x5499af[_0x3a0cd7(0x28b)],'activeVersionId':_0x5499af[_0x3a0cd7(0x1ff)],'title':_0x5499af[_0x3a0cd7(0x28c)],'pinnedAt':_0x5499af[_0x3a0cd7(0x241)],'status':_0x5499af[_0x3a0cd7(0x10e)],'modelId':_0x5499af[_0x3a0cd7(0x22d)],'createdAt':_0x5499af[_0x3a0cd7(0x2a2)],'updatedAt':_0x5499af[_0x3a0cd7(0x17a)],'lastActivityAt':_0x5499af[_0x3a0cd7(0x1c2)],..._0x396b6b===undefined?{}:{'activity':_0x396b6b}});}function templateSummary(_0x28ae3a,_0x1dde76){const _0x57b8ee=_0x132f42;return conversationTemplateSummarySchema[_0x57b8ee(0x27e)]({'id':_0x28ae3a[_0x57b8ee(0x219)],'nodeId':_0x28ae3a[_0x57b8ee(0x298)],'name':_0x28ae3a[_0x57b8ee(0x28b)],'description':_0x1dde76[_0x57b8ee(0x12f)],'status':_0x28ae3a[_0x57b8ee(0xfa)]?_0x57b8ee(0x271):_0x57b8ee(0x102),'currentVersionId':_0x28ae3a[_0x57b8ee(0x1ff)],'available':!_0x28ae3a[_0x57b8ee(0xfa)],'createdAt':_0x28ae3a[_0x57b8ee(0x2a2)],'updatedAt':_0x1dde76[_0x57b8ee(0x17a)]});}function modelSummary(_0x172b3a,_0x1639a9){const _0xc3d6e4=_0x132f42;return{'id':_0x172b3a['id'],'name':_0x172b3a[_0xc3d6e4(0x22e)],'protocol':_0x172b3a[_0xc3d6e4(0x229)],'baseUrl':_0x172b3a[_0xc3d6e4(0x1ee)],'modelId':_0x172b3a[_0xc3d6e4(0x22d)],'contextWindowTokens':_0x172b3a[_0xc3d6e4(0x185)],'maxOutputTokens':_0x172b3a[_0xc3d6e4(0x1c3)],'inputCapabilities':_0x172b3a[_0xc3d6e4(0x138)],'outputCapabilities':_0x172b3a[_0xc3d6e4(0x100)],'reasoningEfforts':_0x172b3a[_0xc3d6e4(0x146)],'hostedWebSearch':_0x172b3a[_0xc3d6e4(0x252)],..._0x172b3a[_0xc3d6e4(0xfe)]===undefined?{}:{'responsesTransport':_0x172b3a[_0xc3d6e4(0xfe)]},'responsesPreviousResponseId':_0x172b3a[_0xc3d6e4(0x110)],'enabled':_0x172b3a[_0xc3d6e4(0x269)],'sortOrder':_0x1639a9,'apiKeyConfigured':!![]};}function systemInstruction(_0x4a4d6d,_0x2aefc4){const _0x212c94=_0x132f42,_0x5cddf6=_0x4a4d6d[_0x212c94(0x118)],_0x4e3545=_0x5cddf6[_0x212c94(0x21d)]===_0x212c94(0x290)?_0x212c94(0x131):_0x212c94(0x22a);return[_0x212c94(0x225),_0x212c94(0x280),_0x212c94(0x1cc),..._0x2aefc4===undefined?[]:[_0x212c94(0x12c)+_0x2aefc4+_0x212c94(0x144),_0x212c94(0x119)+_0x2aefc4+_0x212c94(0x167)+_0x2aefc4+_0x212c94(0xfd)],..._0x4a4d6d[_0x212c94(0x2a0)]===undefined?[]:[_0x212c94(0x24a)+_0x4a4d6d[_0x212c94(0x2a0)]+_0x212c94(0x1d1)+join(_0x4a4d6d[_0x212c94(0x2a0)],_0x212c94(0x116))+_0x212c94(0x203)+join(_0x4a4d6d[_0x212c94(0x2a0)],_0x212c94(0x120))+_0x212c94(0x23c)],_0x212c94(0x19f),_0x4e3545][_0x212c94(0x24c)]('\x0a');}function attachmentPrompt(_0x5cff0e,_0x276522){const _0x5c811c=_0x132f42;if(_0x276522[_0x5c811c(0x134)]===0x8d1+0x12b*-0x1a+0x158d)return _0x5cff0e;const _0x1cece1=_0x276522[_0x5c811c(0x273)](_0xbc7bc2=>_0x5c811c(0x1f5)+_0xbc7bc2[_0x5c811c(0x150)])[_0x5c811c(0x24c)]('\x0a');return''+_0x5cff0e+(_0x5cff0e[_0x5c811c(0x239)]()[_0x5c811c(0x134)]===0x2*0xd1+0x324*-0x5+0x2*0x709?'':'\x0a\x0a')+_0x5c811c(0x233)+_0x1cece1;}function automaticHostedConversationTitle(_0x21ca45){const _0x1a59f0=_0x132f42;if(_0x21ca45===undefined)return undefined;const _0x130e79=sessionTitleFromFirstMessage(_0x21ca45);if(_0x130e79[_0x1a59f0(0x134)]===0x347+0x571*0x1+0x24*-0x3e||/^(?:new|untitled) session(?:\s*[-–—:]\s*\d{4}-\d{2}-\d{2}.*)?$/iu[_0x1a59f0(0x1a1)](_0x130e79))return undefined;return _0x130e79;}function runFromMessage(_0x59d47d){const _0x54d8ec=_0x132f42;return{'id':_0x59d47d[_0x54d8ec(0x15f)],'status':_0x59d47d[_0x54d8ec(0x10e)],'startedAt':_0x59d47d[_0x54d8ec(0x2a2)],'completedAt':_0x59d47d[_0x54d8ec(0x10e)]===_0x54d8ec(0x25b)?null:_0x59d47d[_0x54d8ec(0x17a)]};}function runInterruptionKey(_0x2fbd11,_0x406cbc){return _0x2fbd11+'\x00'+_0x406cbc;}function uploadProjection(_0x41cf2e){const _0x4891c3=_0x132f42;return{'uploadId':_0x41cf2e[_0x4891c3(0x1f3)],'conversationId':_0x41cf2e[_0x4891c3(0x29e)],'name':_0x41cf2e[_0x4891c3(0x22e)],'mimeType':_0x41cf2e[_0x4891c3(0x126)],'receivedBytes':_0x41cf2e[_0x4891c3(0x1be)],'size':_0x41cf2e[_0x4891c3(0x14c)],'status':_0x41cf2e[_0x4891c3(0x10e)],..._0x41cf2e[_0x4891c3(0x159)]===undefined?{}:{'file':_0x41cf2e[_0x4891c3(0x159)]}};}async function assertRegularFile(_0xe02c18,_0x2e3eb1){const _0x379561=_0x132f42,_0x4d9091=await lstat(_0xe02c18)[_0x379561(0x149)](()=>{const _0x6cd7dc=_0x379561;throw new Error(_0x6cd7dc(0x27c));});if(!_0x4d9091[_0x379561(0x266)]()||_0x4d9091[_0x379561(0x242)]()||_0x4d9091[_0x379561(0xf6)]!==-0x142*-0x5+0x11*0x5f+0x1a*-0x7c||_0x4d9091[_0x379561(0x14c)]!==_0x2e3eb1)throw new Error(_0x379561(0x27c));}async function assertUploadTemporaryFile(_0x462fc9,_0x52e1a1){const _0x1c1eed=_0x132f42,_0x48458f=await lstat(_0x462fc9)[_0x1c1eed(0x149)](()=>{const _0x398f2e=_0x1c1eed;throw new Error(_0x398f2e(0x1e1));});if(!_0x48458f[_0x1c1eed(0x266)]()||_0x48458f[_0x1c1eed(0x242)]()||_0x48458f[_0x1c1eed(0xf6)]!==0x1121*0x2+-0x3*-0x82a+-0x3abf||_0x48458f[_0x1c1eed(0x14c)]!==_0x52e1a1)throw new Error(_0x1c1eed(0x1e1));}function record(_0x5480d1){const _0x5aecf1=_0x132f42;return typeof _0x5480d1===_0x5aecf1(0x260)&&_0x5480d1!==null&&!Array[_0x5aecf1(0x265)](_0x5480d1);}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* mar-release-protected */
|
|
2
|
-
const _0x3b8165=_0x4baf;function _0x3824(){const _0x339a57=['Bg9JA2vK','mZu1otaWC2zPA0fY','ywXS','mJa1mZqXmgnOC2jWCq','vu5bvKfjtefcteu','mtbiEMvPA0K','zMLSDgvY','AgvHza','zgvSzxrL','yNjHBMnO','zNjVBq','yMfZzw5HBwu','v09ss1nqqunfx05pvf9hsvq','zgLYzwn0B3j5tMfTzq','Aw52ywXPzgf0zq','C2v0','y2HHBMDLC0XPBwL0zxi','CNvU','y2HHBMDLC1zLCNnPB25Z','mJa5ndu0z1bMzuXz','y2HHBMDLC0nHy2HL','mtG0Dwvdt3bK','reLsvfK','r0Lux1DpuKTtuefdrq','Chj1BMfIBgu','BwLU','zw50CMLLCW','BM93','BwfW','y2HHBMDLC1jLywrZ','Dhj1BMnHDgvK','otm5ntuZmfPxq0Dqsa','zxHWAxjLC0f0','zgLYDhK','y2HHBMDLCW','y3vYCMvUDa','y2XLyxi','mJv4quPvu1C','z2v0','A2LUza','BgvUz3rO','C3rHDgu','ndK1mJq5m2XjAw1LqW','mZaYntHKvgDiBfO','C2XPy2u','q0Xfqu4','DMfSDwu','nZm5otnZtwL6t1O','Cgf0Aa'];_0x3824=function(){return _0x339a57;};return _0x3824();}(function(_0xd14623,_0x5e9398){const _0x5e50ce=_0x4baf,_0xaf8d5d=_0xd14623();while(!![]){try{const _0xbcf1ff=parseInt(_0x5e50ce(0x177))/(0x1*0x3d0+0x2*0x1039+-0x2441)*(-parseInt(_0x5e50ce(0x17e))/(-0x1a4c+0x365*0xb+-0x19*0x71))+parseInt(_0x5e50ce(0x17c))/(-0x201a+0x11b1*-0x1+0x31ce)+parseInt(_0x5e50ce(0x17a))/(0x1d32+-0x1cf9+-0x35)+parseInt(_0x5e50ce(0x16d))/(0x2263*0x1+-0x1*-0x25ca+-0x4828)*(-parseInt(_0x5e50ce(0x18c))/(-0x133e+0x25*-0xf+0xb1*0x1f))+-parseInt(_0x5e50ce(0x172))/(-0xc8+-0x50*0x3d+0x13df)+parseInt(_0x5e50ce(0x18e))/(0xc31+0x43a*0x7+-0x29bf)*(-parseInt(_0x5e50ce(0x173))/(0x1f97*-0x1+0x690+0x1910))+parseInt(_0x5e50ce(0x198))/(-0x1f6+-0x17b6+-0x6*-0x449);if(_0xbcf1ff===_0x5e9398)break;else _0xaf8d5d['push'](_0xaf8d5d['shift']());}catch(_0x44cea1){_0xaf8d5d['push'](_0xaf8d5d['shift']());}}}(_0x3824,-0x5b0a2+0x64610+0x54541));import{basename,posix}from'node:path';import{isWorkspaceChangeVisible,listGitWorktrees,listInitializedSubmodulePaths,readCurrentChangesSummary,resolveGitRepository}from'../workspace.js';const CACHE_TTL_MS=-0x1e4f+0x9f*0x25+0x1adc,REPOSITORY_READ_CONCURRENCY=0x2279+-0x23*-0x7f+-0x33d2,WORKTREE_READ_CONCURRENCY=0x11e6+0x1d*0x3+0x5*-0x3a5,CHANGE_VISIBILITY_CONCURRENCY=-0x12eb+-0x5*0x4b7+0x2a8e;export class WorkspaceChangeService{[_0x3b8165(0x171)];constructor(_0x199e70){const _0x9ac7d0=_0x3b8165;this[_0x9ac7d0(0x171)]=_0x199e70;}[_0x3b8165(0x187)](_0x3fbc11){const _0x29717a=_0x3b8165;this[_0x29717a(0x171)][_0x29717a(0x196)][_0x29717a(0x181)](_0x3fbc11),this[_0x29717a(0x171)][_0x29717a(0x18d)][_0x29717a(0x181)](_0x3fbc11),this[_0x29717a(0x171)][_0x29717a(0x18b)][_0x29717a(0x188)](_0x3fbc11,(this[_0x29717a(0x171)][_0x29717a(0x18b)][_0x29717a(0x16e)](_0x3fbc11)??0x31c*-0x1+0x249f+-0x2183)+(-0x11*0xf1+0x210a*0x1+-0x1108*0x1));}[_0x3b8165(0x16c)](){const _0x41675e=_0x3b8165;this[_0x41675e(0x171)][_0x41675e(0x196)][_0x41675e(0x16c)](),this[_0x41675e(0x171)][_0x41675e(0x18d)][_0x41675e(0x16c)](),this[_0x41675e(0x171)][_0x41675e(0x18b)][_0x41675e(0x16c)]();}async[_0x3b8165(0x16b)](_0x26f905){const _0x22cbfa=_0x3b8165;if(_0x26f905[_0x22cbfa(0x16f)]!==_0x22cbfa(0x190))throw new Error(_0x22cbfa(0x185));const _0x47544d=this[_0x22cbfa(0x171)][_0x22cbfa(0x18d)][_0x22cbfa(0x16e)](_0x26f905['id']);if(_0x47544d!==undefined&&_0x47544d[_0x22cbfa(0x168)]>Date[_0x22cbfa(0x194)]())return _0x47544d[_0x22cbfa(0x176)];const _0x590706=this[_0x22cbfa(0x171)][_0x22cbfa(0x196)][_0x22cbfa(0x16e)](_0x26f905['id']);if(_0x590706!==undefined)return _0x590706;const _0x5c0a59=this[_0x22cbfa(0x171)][_0x22cbfa(0x18b)][_0x22cbfa(0x16e)](_0x26f905['id'])??0xf7c+-0x8e5+0x697*-0x1,_0x28b3b0=this[_0x22cbfa(0x171)][_0x22cbfa(0x189)][_0x22cbfa(0x18a)](async()=>{const _0xbd6f98=_0x22cbfa,_0x5b2774=await listInitializedSubmodulePaths(_0x26f905[_0xbd6f98(0x178)]),_0x3fd619=['',..._0x5b2774],_0x1b89b0=async _0x36c55b=>{const _0x1d31d1=_0xbd6f98,_0x378002=_0x36c55b===''?_0x26f905[_0x1d31d1(0x178)]:await resolveGitRepository(_0x26f905[_0x1d31d1(0x178)],_0x36c55b,_0x5b2774),_0x57e452=await readCurrentChangesSummary(_0x378002),_0x475696=(await mapWithConcurrency(_0x57e452[_0x1d31d1(0x16a)],CHANGE_VISIBILITY_CONCURRENCY,async _0x56c5c1=>({'change':_0x56c5c1,'visible':await isWorkspaceChangeVisible(_0x378002,_0x56c5c1[_0x1d31d1(0x178)])})))[_0x1d31d1(0x17f)](({visible:_0x3b584d})=>_0x3b584d)[_0x1d31d1(0x195)](({change:_0x2a2c5b})=>_0x2a2c5b);return{'repositoryPath':_0x36c55b,'repositoryName':_0x36c55b===''?basename(_0x378002):posix[_0x1d31d1(0x184)](_0x36c55b),'branch':_0x57e452[_0x1d31d1(0x182)],'dirty':_0x57e452[_0x1d31d1(0x16a)][_0x1d31d1(0x170)]>-0xca3+-0x13*-0x196+0x5d5*-0x3,'changes':_0x475696};},_0x1d30d2=await _0x1b89b0(''),_0x3585a6=(await mapWithConcurrency(_0x3fd619[_0xbd6f98(0x174)](-0xa75+-0x2f9*-0x5+-0x467),REPOSITORY_READ_CONCURRENCY,async _0x185d26=>{try{return await _0x1b89b0(_0x185d26);}catch{return undefined;}}))[_0xbd6f98(0x17f)](_0x370358=>_0x370358!==undefined),_0x353241=await listGitWorktrees(_0x26f905[_0xbd6f98(0x178)]),_0x2f0062=await mapWithConcurrency(_0x353241[_0xbd6f98(0x193)],WORKTREE_READ_CONCURRENCY,async _0x2adfdf=>{const _0x5fd466=_0xbd6f98;let _0x59f79d;if(_0x2adfdf[_0x5fd466(0x191)])_0x59f79d=_0x5fd466(0x17d);else{if(_0x2adfdf[_0x5fd466(0x16b)])_0x59f79d=_0x1d30d2[_0x5fd466(0x169)]?_0x5fd466(0x18f):_0x5fd466(0x175);else try{_0x59f79d=(await readCurrentChangesSummary(_0x2adfdf[_0x5fd466(0x178)]))[_0x5fd466(0x16a)][_0x5fd466(0x170)]?_0x5fd466(0x18f):_0x5fd466(0x175);}catch{_0x59f79d=_0x5fd466(0x17d);}}return{'directoryName':_0x2adfdf[_0x5fd466(0x186)],'branch':_0x2adfdf[_0x5fd466(0x182)],'head':_0x2adfdf[_0x5fd466(0x180)],'current':_0x2adfdf[_0x5fd466(0x16b)],'status':_0x59f79d,'locked':_0x2adfdf[_0x5fd466(0x179)],'prunable':_0x2adfdf[_0x5fd466(0x191)]};}),_0x4278f2=_0x68b18a=>({..._0x68b18a,'additions':null,'deletions':null,'binary':![],'diffAvailable':!![]}),_0x21a63a={'branch':_0x1d30d2[_0xbd6f98(0x182)],'changes':_0x1d30d2[_0xbd6f98(0x16a)][_0xbd6f98(0x195)](_0x4278f2),'repositories':[_0x1d30d2,..._0x3585a6][_0xbd6f98(0x195)](({dirty:_0x1932f7,..._0x510713})=>{const _0x2614dc=_0xbd6f98;return void _0x1932f7,{..._0x510713,'changes':_0x510713[_0x2614dc(0x16a)][_0x2614dc(0x195)](_0x4278f2)};}),'worktrees':_0x2f0062,'worktreesTruncated':_0x353241[_0xbd6f98(0x197)]};if((this[_0xbd6f98(0x171)][_0xbd6f98(0x18b)][_0xbd6f98(0x16e)](_0x26f905['id'])??-0x3*0x4e3+-0x26d4+0x357d*0x1)===_0x5c0a59)this[_0xbd6f98(0x171)][_0xbd6f98(0x18d)][_0xbd6f98(0x188)](_0x26f905['id'],{'value':_0x21a63a,'expiresAt':Date[_0xbd6f98(0x194)]()+CACHE_TTL_MS});return _0x21a63a;});this[_0x22cbfa(0x171)][_0x22cbfa(0x196)][_0x22cbfa(0x188)](_0x26f905['id'],_0x28b3b0);try{return await _0x28b3b0;}finally{if(this[_0x22cbfa(0x171)][_0x22cbfa(0x196)][_0x22cbfa(0x16e)](_0x26f905['id'])===_0x28b3b0)this[_0x22cbfa(0x171)][_0x22cbfa(0x196)][_0x22cbfa(0x181)](_0x26f905['id']);}}}function _0x4baf(_0x5b2774,_0x3fd619){_0x5b2774=_0x5b2774-(0x5ab*-0x2+-0x182*-0x17+-0x9c*0x24);const _0x1b89b0=_0x3824();let _0x1d30d2=_0x1b89b0[_0x5b2774];if(_0x4baf['gXHcGP']===undefined){var _0x3585a6=function(_0x4278f2){const _0x21a63a='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x36c55b='',_0x378002='';for(let _0x57e452=-0xee0+-0xa0*0x2a+0x149*0x20,_0x475696,_0x56c5c1,_0x3b584d=-0xd3*0xb+-0x19*-0x161+-0x1968;_0x56c5c1=_0x4278f2['charAt'](_0x3b584d++);~_0x56c5c1&&(_0x475696=_0x57e452%(0x11e6+0x1d*0x3+0x5*-0x3a5)?_0x475696*(-0x12eb+-0x5*0x4b7+0x2abe)+_0x56c5c1:_0x56c5c1,_0x57e452++%(0x31c*-0x1+0x249f+-0x217f))?_0x36c55b+=String['fromCharCode'](-0x11*0xf1+0x210a*0x1+-0x100a*0x1&_0x475696>>(-(0xf7c+-0x8e5+0x695*-0x1)*_0x57e452&-0xca3+-0x13*-0x196+0x1f1*-0x9)):-0xa75+-0x2f9*-0x5+-0x468){_0x56c5c1=_0x21a63a['indexOf'](_0x56c5c1);}for(let _0x2a2c5b=-0x3*0x4e3+-0x26d4+0x357d*0x1,_0x185d26=_0x36c55b['length'];_0x2a2c5b<_0x185d26;_0x2a2c5b++){_0x378002+='%'+('00'+_0x36c55b['charCodeAt'](_0x2a2c5b)['toString'](-0x1771+0xd34+0xa4d))['slice'](-(0x3e8+0x18bf+-0x1ca5));}return decodeURIComponent(_0x378002);};_0x4baf['HwOvUn']=_0x3585a6,_0x4baf['YErhDx']={},_0x4baf['gXHcGP']=!![];}const _0x353241=_0x1b89b0[-0x1215+0x231*0x6+-0x1*-0x4ef];_0x4baf['kJVhHh']!==_0x353241&&(_0x4baf['YErhDx']={},_0x4baf['kJVhHh']=_0x353241);const _0x2f0062=_0x4baf['YErhDx'][_0x5b2774];return _0x2f0062===undefined?(_0x1d30d2=_0x4baf['HwOvUn'](_0x1d30d2),_0x4baf['YErhDx'][_0x5b2774]=_0x1d30d2):_0x1d30d2=_0x2f0062,_0x1d30d2;}async function mapWithConcurrency(_0x38c089,_0x2d2e30,_0x46eb38){const _0x20acc8=_0x3b8165,_0x7847ea=new Array(_0x38c089[_0x20acc8(0x170)]);let _0x36d0dc=-0x1771+0xd34+0xa3d;return await Promise[_0x20acc8(0x17b)](Array[_0x20acc8(0x183)]({'length':Math[_0x20acc8(0x192)](_0x2d2e30,_0x38c089[_0x20acc8(0x170)])},async()=>{const _0x224d0c=_0x20acc8;while(_0x36d0dc<_0x38c089[_0x224d0c(0x170)]){const _0x23b9d6=_0x36d0dc;_0x36d0dc+=0x3e8+0x18bf+-0x1ca6,_0x7847ea[_0x23b9d6]=await _0x46eb38(_0x38c089[_0x23b9d6]);}})),_0x7847ea;}
|
|
2
|
+
function _0x1bbe(_0xcce067,_0x32ca61){_0xcce067=_0xcce067-(0x2033+-0x12d5+-0xbff);const _0x2879e6=_0x2321();let _0x16e3c2=_0x2879e6[_0xcce067];if(_0x1bbe['ZvXkUx']===undefined){var _0x342885=function(_0x19d568){const _0x38d72a='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x327f70='',_0x4774b5='';for(let _0x2ea880=0x807+-0x35*-0x65+-0x4*0x73c,_0x59f122,_0x593feb,_0x54eebe=0x305*-0x6+0xc5*0x1+0x1159;_0x593feb=_0x19d568['charAt'](_0x54eebe++);~_0x593feb&&(_0x59f122=_0x2ea880%(0x2374+0xa*-0x88+0x8*-0x3c4)?_0x59f122*(0x2354+0x163d+-0x3951)+_0x593feb:_0x593feb,_0x2ea880++%(0x1026+-0x26b9+0x1697))?_0x327f70+=String['fromCharCode'](-0x1181+0x21cd+0xf4d*-0x1&_0x59f122>>(-(0x808*0x3+-0x53d+0xc1*-0x19)*_0x2ea880&-0x25b3+0x1*0x52f+0x31*0xaa)):0x1385+0x4*0x50a+0x5ab*-0x7){_0x593feb=_0x38d72a['indexOf'](_0x593feb);}for(let _0x3a05d8=0x2f*0x4+0x399*0x4+-0xf20,_0x38fa12=_0x327f70['length'];_0x3a05d8<_0x38fa12;_0x3a05d8++){_0x4774b5+='%'+('00'+_0x327f70['charCodeAt'](_0x3a05d8)['toString'](0xc28+-0xc0e*0x1+-0xa))['slice'](-(0xd*0x3b+0x1*0xec3+0x20*-0x8e));}return decodeURIComponent(_0x4774b5);};_0x1bbe['Amzkgp']=_0x342885,_0x1bbe['oyAgJE']={},_0x1bbe['ZvXkUx']=!![];}const _0x1b61e3=_0x2879e6[0x17f8+-0x1546+-0x1*0x2b2];_0x1bbe['vQDHuk']!==_0x1b61e3&&(_0x1bbe['oyAgJE']={},_0x1bbe['vQDHuk']=_0x1b61e3);const _0x51bb08=_0x1bbe['oyAgJE'][_0xcce067];return _0x51bb08===undefined?(_0x16e3c2=_0x1bbe['Amzkgp'](_0x16e3c2),_0x1bbe['oyAgJE'][_0xcce067]=_0x16e3c2):_0x16e3c2=_0x51bb08,_0x16e3c2;}const _0x208507=_0x1bbe;(function(_0x1976d4,_0x382031){const _0x8d4e61=_0x1bbe,_0x4bb138=_0x1976d4();while(!![]){try{const _0x53080f=-parseInt(_0x8d4e61(0x163))/(0x1db7+0x8d4+-0x1*0x268a)+parseInt(_0x8d4e61(0x189))/(0x1f68+-0x167*-0xb+-0x2ed3)+parseInt(_0x8d4e61(0x17f))/(-0xd84+0x74b*0x4+-0x3*0x537)*(parseInt(_0x8d4e61(0x162))/(-0xce*0x6+0x15*0x1bf+0x1fd3*-0x1))+parseInt(_0x8d4e61(0x165))/(0x1501*0x1+0x3c3*0x7+-0x2f51)+parseInt(_0x8d4e61(0x190))/(-0x107*-0x5+-0x1*-0x882+-0xd9f*0x1)+parseInt(_0x8d4e61(0x169))/(0x1fef+-0xaa5+-0x1*0x1543)*(parseInt(_0x8d4e61(0x16a))/(0xd68+-0x1d77+0x1017))+-parseInt(_0x8d4e61(0x17d))/(-0x277*0xb+0xc*-0x2e+-0x155*-0x16);if(_0x53080f===_0x382031)break;else _0x4bb138['push'](_0x4bb138['shift']());}catch(_0x24e17a){_0x4bb138['push'](_0x4bb138['shift']());}}}(_0x2321,0x4a341*0x4+-0x155388+0x1129fe));import{basename,posix}from'node:path';import{isWorkspaceChangeVisible,listGitWorktrees,listInitializedSubmodulePaths,readCurrentChangesSummary,resolveGitRepository}from'../workspace.js';const CACHE_TTL_MS=0x2591+0x3*-0x397+0x136*-0x6,REPOSITORY_READ_CONCURRENCY=-0x1*-0x1a1b+-0xef9+0x2*-0x58f,WORKTREE_READ_CONCURRENCY=0xb5*0x1b+0xac8+-0x1ddb,CHANGE_VISIBILITY_CONCURRENCY=-0x1729+0x1026+0x713;export class WorkspaceChangeService{[_0x208507(0x18b)];constructor(_0xcce067){const _0x2a438e=_0x208507;this[_0x2a438e(0x18b)]=_0xcce067;}[_0x208507(0x168)](_0x32ca61){const _0x43474a=_0x208507;this[_0x43474a(0x18b)][_0x43474a(0x183)][_0x43474a(0x16c)](_0x32ca61),this[_0x43474a(0x18b)][_0x43474a(0x18f)][_0x43474a(0x16c)](_0x32ca61),this[_0x43474a(0x18b)][_0x43474a(0x17a)][_0x43474a(0x192)](_0x32ca61,(this[_0x43474a(0x18b)][_0x43474a(0x17a)][_0x43474a(0x160)](_0x32ca61)??-0x2*0x977+-0x1181+0xc25*0x3)+(0x808*0x3+-0x53d+0xfe*-0x13));}[_0x208507(0x18c)](){const _0x260443=_0x208507;this[_0x260443(0x18b)][_0x260443(0x183)][_0x260443(0x18c)](),this[_0x260443(0x18b)][_0x260443(0x18f)][_0x260443(0x18c)](),this[_0x260443(0x18b)][_0x260443(0x17a)][_0x260443(0x18c)]();}async[_0x208507(0x164)](_0x2879e6){const _0x2794c8=_0x208507;if(_0x2879e6[_0x2794c8(0x16b)]!==_0x2794c8(0x170))throw new Error(_0x2794c8(0x18a));const _0x16e3c2=this[_0x2794c8(0x18b)][_0x2794c8(0x18f)][_0x2794c8(0x160)](_0x2879e6['id']);if(_0x16e3c2!==undefined&&_0x16e3c2[_0x2794c8(0x182)]>Date[_0x2794c8(0x17e)]())return _0x16e3c2[_0x2794c8(0x193)];const _0x342885=this[_0x2794c8(0x18b)][_0x2794c8(0x183)][_0x2794c8(0x160)](_0x2879e6['id']);if(_0x342885!==undefined)return _0x342885;const _0x1b61e3=this[_0x2794c8(0x18b)][_0x2794c8(0x17a)][_0x2794c8(0x160)](_0x2879e6['id'])??-0x25b3+0x1*0x52f+0x4*0x821,_0x51bb08=this[_0x2794c8(0x18b)][_0x2794c8(0x176)][_0x2794c8(0x16d)](async()=>{const _0x4bad11=_0x2794c8,_0x19d568=await listInitializedSubmodulePaths(_0x2879e6[_0x4bad11(0x179)]),_0x38d72a=['',..._0x19d568],_0x327f70=async(_0x687cc4,_0x210c14)=>{const _0x548f07=_0x4bad11,_0x2efac5=_0x210c14??(_0x687cc4===''?_0x2879e6[_0x548f07(0x179)]:await resolveGitRepository(_0x2879e6[_0x548f07(0x179)],_0x687cc4,_0x19d568)),_0x1d836f=await readCurrentChangesSummary(_0x2efac5),_0x636d23=(await mapWithConcurrency(_0x1d836f[_0x548f07(0x180)],CHANGE_VISIBILITY_CONCURRENCY,async _0x161bf2=>({'change':_0x161bf2,'visible':await isWorkspaceChangeVisible(_0x2efac5,_0x161bf2[_0x548f07(0x179)])})))[_0x548f07(0x16e)](({visible:_0xb8239})=>_0xb8239)[_0x548f07(0x187)](({change:_0x4d8ad2})=>_0x4d8ad2);return{'repositoryPath':_0x687cc4,'repositoryName':_0x687cc4===''?basename(_0x2efac5):posix[_0x548f07(0x172)](_0x687cc4),'branch':_0x1d836f[_0x548f07(0x184)],'dirty':_0x1d836f[_0x548f07(0x180)][_0x548f07(0x186)]>0x1385+0x4*0x50a+0x5ab*-0x7,'changes':_0x636d23};},_0x4774b5=await _0x327f70(''),_0x2ea880=(await mapWithConcurrency(_0x38d72a[_0x4bad11(0x181)](0x2f*0x4+0x399*0x4+-0xf1f),REPOSITORY_READ_CONCURRENCY,async _0x2c30ee=>{try{return await _0x327f70(_0x2c30ee);}catch{return undefined;}}))[_0x4bad11(0x16e)](_0x33c0a8=>_0x33c0a8!==undefined),_0x59f122=await listGitWorktrees(_0x2879e6[_0x4bad11(0x179)]),_0x593feb=_0x59f122[_0x4bad11(0x161)][_0x4bad11(0x16e)](_0x3c73a7=>!_0x3c73a7[_0x4bad11(0x164)]),_0x54eebe=await mapWithConcurrency(_0x593feb,WORKTREE_READ_CONCURRENCY,async _0x39ae16=>{const _0x41d090=_0x4bad11,_0x13a64d={'repositoryPath':'','repositoryName':_0x39ae16[_0x41d090(0x177)],'source':_0x41d090(0x15f),'worktreePath':_0x39ae16[_0x41d090(0x179)],'physicalPath':_0x39ae16[_0x41d090(0x179)],'current':![],'branch':_0x39ae16[_0x41d090(0x184)],'head':_0x39ae16[_0x41d090(0x167)],'locked':_0x39ae16[_0x41d090(0x173)],'prunable':_0x39ae16[_0x41d090(0x171)]};if(_0x39ae16[_0x41d090(0x171)])return{..._0x13a64d,'dirty':![],'status':_0x41d090(0x18e),'changes':[]};try{const _0x2a4155=await _0x327f70('',_0x39ae16[_0x41d090(0x179)]);return{..._0x13a64d,'dirty':_0x2a4155[_0x41d090(0x16f)],'branch':_0x2a4155[_0x41d090(0x184)],'status':_0x2a4155[_0x41d090(0x16f)]?_0x41d090(0x166):_0x41d090(0x17b),'changes':_0x2a4155[_0x41d090(0x180)]};}catch{return{..._0x13a64d,'dirty':![],'status':_0x41d090(0x18e),'changes':[]};}}),_0x3a05d8=_0x59f122[_0x4bad11(0x161)][_0x4bad11(0x175)](_0x124fae=>_0x124fae[_0x4bad11(0x164)]),_0x38fa12=_0x59f122[_0x4bad11(0x161)][_0x4bad11(0x187)](_0x5b88f8=>{const _0x4ca872=_0x4bad11,_0x48f183=_0x54eebe[_0x4ca872(0x175)](_0x22cfc9=>_0x22cfc9[_0x4ca872(0x178)]===_0x5b88f8[_0x4ca872(0x179)]);return{'directoryName':_0x5b88f8[_0x4ca872(0x177)],'branch':_0x5b88f8[_0x4ca872(0x184)],'head':_0x5b88f8[_0x4ca872(0x167)],'current':_0x5b88f8[_0x4ca872(0x164)],'status':_0x5b88f8[_0x4ca872(0x164)]?_0x4774b5[_0x4ca872(0x16f)]?_0x4ca872(0x166):_0x4ca872(0x17b):_0x48f183?.[_0x4ca872(0x185)]??_0x4ca872(0x18e),'locked':_0x5b88f8[_0x4ca872(0x173)],'prunable':_0x5b88f8[_0x4ca872(0x171)]};}),_0x33309d=_0x3624ad=>({..._0x3624ad,'additions':null,'deletions':null,'binary':![],'diffAvailable':!![]}),_0x51c577={'branch':_0x4774b5[_0x4bad11(0x184)],'changes':_0x4774b5[_0x4bad11(0x180)][_0x4bad11(0x187)](_0x33309d),'repositories':[{..._0x4774b5,'source':_0x4bad11(0x188),'physicalPath':_0x3a05d8?.[_0x4bad11(0x179)]??_0x2879e6[_0x4bad11(0x179)],'current':!![],..._0x3a05d8===undefined?{}:{'head':_0x3a05d8[_0x4bad11(0x167)]},'status':_0x4774b5[_0x4bad11(0x16f)]?_0x4bad11(0x166):_0x4bad11(0x17b),'locked':_0x3a05d8?.[_0x4bad11(0x173)]??![],'prunable':_0x3a05d8?.[_0x4bad11(0x171)]??![]},..._0x2ea880[_0x4bad11(0x187)](_0x4395e1=>({..._0x4395e1,'source':_0x4bad11(0x174)})),..._0x54eebe][_0x4bad11(0x187)](({dirty:_0x5494d4,..._0x2c5a64})=>{const _0x791827=_0x4bad11;return void _0x5494d4,{..._0x2c5a64,'changes':_0x2c5a64[_0x791827(0x180)][_0x791827(0x187)](_0x33309d)};}),'worktrees':_0x38fa12,'worktreesTruncated':_0x59f122[_0x4bad11(0x194)]};if((this[_0x4bad11(0x18b)][_0x4bad11(0x17a)][_0x4bad11(0x160)](_0x2879e6['id'])??0xc28+-0xc0e*0x1+-0x1a)===_0x1b61e3)this[_0x4bad11(0x18b)][_0x4bad11(0x18f)][_0x4bad11(0x192)](_0x2879e6['id'],{'value':_0x51c577,'expiresAt':Date[_0x4bad11(0x17e)]()+CACHE_TTL_MS});return _0x51c577;});this[_0x2794c8(0x18b)][_0x2794c8(0x183)][_0x2794c8(0x192)](_0x2879e6['id'],_0x51bb08);try{return await _0x51bb08;}finally{if(this[_0x2794c8(0x18b)][_0x2794c8(0x183)][_0x2794c8(0x160)](_0x2879e6['id'])===_0x51bb08)this[_0x2794c8(0x18b)][_0x2794c8(0x183)][_0x2794c8(0x16c)](_0x2879e6['id']);}}}async function mapWithConcurrency(_0x48b407,_0x35cdf9,_0x240470){const _0x525d31=_0x208507,_0x1e0250=new Array(_0x48b407[_0x525d31(0x186)]);let _0x37d091=0xd*0x3b+0x1*0xec3+0x2*-0x8e1;return await Promise[_0x525d31(0x191)](Array[_0x525d31(0x17c)]({'length':Math[_0x525d31(0x18d)](_0x35cdf9,_0x48b407[_0x525d31(0x186)])},async()=>{const _0x7825b3=_0x525d31;while(_0x37d091<_0x48b407[_0x7825b3(0x186)]){const _0x82384=_0x37d091;_0x37d091+=0x17f8+-0x1546+-0x1*0x2b1,_0x1e0250[_0x82384]=await _0x240470(_0x48b407[_0x82384]);}})),_0x1e0250;}function _0x2321(){const _0x3565c8=['C3rHDgu','y2XLyxi','BwLU','vu5bvKfjtefcteu','y2HHBMDLC0nHy2HL','mZyZnte2nNvnCKvQuq','ywXS','C2v0','DMfSDwu','Dhj1BMnHDgvK','v09ss1rsruu','z2v0','zw50CMLLCW','ndyXotzZC3zxqNa','mtm2odG0nvDYtwLfEq','y3vYCMvUDa','mtGXntmXnu9JzwTezq','reLsvfK','AgvHza','Aw52ywXPzgf0zq','otq2mZnSCuDTExq','ndK2AMXwB29j','A2LUza','zgvSzxrL','CNvU','zMLSDgvY','zgLYDhK','r0Lux1DpuKTtuefdrq','Chj1BMfIBgu','yMfZzw5HBwu','Bg9JA2vK','u1vctu9evuXf','zMLUza','y2HHBMDLC0XPBwL0zxi','zgLYzwn0B3j5tMfTzq','D29YA3rYzwvqyxrO','Cgf0Aa','y2HHBMDLC1zLCNnPB25Z','q0Xfqu4','zNjVBq','odm0nZy4mfD4qM9Ktq','BM93','mtqXC2Xfq1r3','y2HHBMDLCW','C2XPy2u','zxHWAxjLC0f0','y2HHBMDLC1jLywrZ','yNjHBMnO','C3rHDhvZ','BgvUz3rO','BwfW','uK9pva','mtC3odG2mfborKrywa','v09ss1nqqunfx05pvf9hsvq'];_0x2321=function(){return _0x3565c8;};return _0x2321();}
|