@wujie-shell/core 4.0.0 → 4.0.1

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.
Files changed (41) hide show
  1. package/dist/bin/wujie-shell.mjs +1 -1
  2. package/dist/src/agents/bundled-agent-skills.mjs +1 -1
  3. package/dist/src/agents/bundled-agents.mjs +1 -1
  4. package/dist/src/chat/media-archive.mjs +1 -1
  5. package/dist/src/chat/queue.mjs +1 -1
  6. package/dist/src/common/diagnostics.mjs +1 -1
  7. package/dist/src/common/logging.mjs +1 -1
  8. package/dist/src/common/runtime-logger.mjs +1 -1
  9. package/dist/src/common/user-events.mjs +1 -1
  10. package/dist/src/common/utils.mjs +1 -1
  11. package/dist/src/config/controller.mjs +1 -1
  12. package/dist/src/connectors/config-utils.mjs +1 -1
  13. package/dist/src/connectors/constants.mjs +1 -1
  14. package/dist/src/connectors/controller.mjs +1 -1
  15. package/dist/src/connectors/kdocs-cli.mjs +1 -1
  16. package/dist/src/electron/main.mjs +1 -1
  17. package/dist/src/electron/preload.mjs +1 -1
  18. package/dist/src/files/generated-files-store.mjs +1 -1
  19. package/dist/src/files/handlers.mjs +1 -1
  20. package/dist/src/gateway/chat-delta.mjs +1 -1
  21. package/dist/src/gateway/controller.mjs +1 -1
  22. package/dist/src/gateway/ws-client.mjs +1 -1
  23. package/dist/src/index.mjs +1 -1
  24. package/dist/src/log-reporting/handlers.mjs +1 -1
  25. package/dist/src/log-reporting/report-logs.mjs +1 -1
  26. package/dist/src/models/handlers.mjs +1 -1
  27. package/dist/src/preferences/store.mjs +1 -1
  28. package/dist/src/runtime/index.mjs +1 -1
  29. package/dist/src/runtime/patch-channel-plugin-runtime.mjs +1 -1
  30. package/dist/src/runtime/patch-chat-history-mixed-tool-content.mjs +1 -1
  31. package/dist/src/runtime/patch-session-store-sqlite.mjs +1 -1
  32. package/dist/src/runtime/plugin-sync.mjs +1 -1
  33. package/dist/src/sessions/agent-sessions-map-store.mjs +1 -1
  34. package/dist/src/sessions/runtime-bridge.mjs +1 -1
  35. package/dist/src/sessions/session-sqlite-store.mjs +1 -1
  36. package/dist/src/skills/import.mjs +1 -1
  37. package/dist/src/skills/market.mjs +1 -1
  38. package/dist/src/terminal/manager.mjs +1 -1
  39. package/dist/src/updates/controller.mjs +1 -1
  40. package/dist/src/updates/loader.mjs +1 -1
  41. package/package.json +3 -3
@@ -1 +1 @@
1
- (function(_0xfd34ad,_0x20d488){const _0x582ef0=_0xfb90,_0x463964=_0xfd34ad();while(!![]){try{const _0x2c48d3=parseInt(_0x582ef0(0x119))/0x1*(parseInt(_0x582ef0(0x159))/0x2)+-parseInt(_0x582ef0(0x149))/0x3+parseInt(_0x582ef0(0x11a))/0x4+parseInt(_0x582ef0(0x122))/0x5*(parseInt(_0x582ef0(0x140))/0x6)+parseInt(_0x582ef0(0x136))/0x7*(parseInt(_0x582ef0(0x150))/0x8)+parseInt(_0x582ef0(0x163))/0x9*(parseInt(_0x582ef0(0x164))/0xa)+parseInt(_0x582ef0(0x141))/0xb*(-parseInt(_0x582ef0(0x143))/0xc);if(_0x2c48d3===_0x20d488)break;else _0x463964['push'](_0x463964['shift']());}catch(_0x546dbb){_0x463964['push'](_0x463964['shift']());}}}(_0x2cc8,0xec1cc));function _0xfb90(_0x30785c,_0x3aabe6){_0x30785c=_0x30785c-0x106;const _0x2cc871=_0x2cc8();let _0xfb9079=_0x2cc871[_0x30785c];return _0xfb9079;}export function patchMixedToolContentFromSource(_0x4b700c){const _0x241ec4=_0xfb90,_0x509c39=_0x241ec4(0x146)+_0x241ec4(0x129)+_0x241ec4(0x107)+_0x241ec4(0x14e)+'mMixedTo'+'olConten'+'t',_0x155f44=_0x4b700c[_0x241ec4(0x10e)](_0x509c39);if(_0x155f44===-0x1)return{'patched':![],'reason':_0x241ec4(0x112)+'d'};let _0x3c4744=0x0,_0x384413=![],_0xd6a471=_0x155f44;for(let _0x4fbbe6=_0x155f44;_0x4fbbe6<_0x4b700c[_0x241ec4(0x132)];_0x4fbbe6+=0x1){_0x4b700c[_0x4fbbe6]==='{'&&(_0x3c4744+=0x1,_0x384413=!![]);_0x4b700c[_0x4fbbe6]==='}'&&(_0x3c4744-=0x1);if(_0x384413&&_0x3c4744===0x0){_0xd6a471=_0x4fbbe6+0x1;break;}}const _0x3e1c61=_0x4b700c[_0x241ec4(0x130)+'g'](_0x155f44,_0xd6a471);if(_0x3e1c61[_0x241ec4(0x161)](_0x241ec4(0x14b)+_0x241ec4(0x120)+_0x241ec4(0x157)))return{'patched':![],'reason':_0x241ec4(0x13b)+_0x241ec4(0x135)};const _0x26e3a3=_0x241ec4(0x146)+'\x20project'+_0x241ec4(0x107)+_0x241ec4(0x14e)+_0x241ec4(0x110)+'olConten'+_0x241ec4(0x15e)+'t,\x20maxCh'+'ars)\x20{\x0a\x09'+_0x241ec4(0x156)+'tent.som'+'e((block'+')\x20=>\x20{\x0a\x09'+_0x241ec4(0x12b)+_0x241ec4(0x126)+_0x241ec4(0x144)+_0x241ec4(0x13d)+'\x22object\x22'+')\x20return'+_0x241ec4(0x142)+'\x09\x09return'+_0x241ec4(0x108)+_0x241ec4(0x154)+_0x241ec4(0x151)+_0x241ec4(0x10a)+_0x241ec4(0x15f)+_0x241ec4(0x113)+_0x241ec4(0x12a)+_0x241ec4(0x15a)+_0x241ec4(0x160)+_0x241ec4(0x125)+_0x241ec4(0x10d)+'ected\x20=\x20'+_0x241ec4(0x12c)+'\x20(const\x20'+_0x241ec4(0x128)+_0x241ec4(0x14f)+_0x241ec4(0x13a)+_0x241ec4(0x152)+_0x241ec4(0x123)+'of\x20block'+_0x241ec4(0x134)+_0x241ec4(0x148)+_0x241ec4(0x121)+_0x241ec4(0x11b)+'sh(block'+_0x241ec4(0x138)+_0x241ec4(0x139)+_0x241ec4(0x14d)+_0x241ec4(0x127)+'y\x20=\x20bloc'+_0x241ec4(0x12f)+_0x241ec4(0x11c)+_0x241ec4(0x13f)+_0x241ec4(0x13c)+_0x241ec4(0x111)+_0x241ec4(0x11d)+'ext\x20===\x20'+_0x241ec4(0x116)+_0x241ec4(0x115)+_0x241ec4(0x15d)+_0x241ec4(0x145)+'\x0a\x09\x09\x09hasT'+'ext\x20=\x20tr'+'ue;\x0a\x09\x09\x09c'+_0x241ec4(0x11e)+_0x241ec4(0x155)+_0x241ec4(0x153)+_0x241ec4(0x13e)+'toryText'+'(stripIn'+_0x241ec4(0x162)+_0x241ec4(0x11f)+_0x241ec4(0x158)+'lay(entr'+_0x241ec4(0x12d)+_0x241ec4(0x131)+_0x241ec4(0x137)+_0x241ec4(0x121)+_0x241ec4(0x11b)+_0x241ec4(0x10f)+_0x241ec4(0x15c)+_0x241ec4(0x14c)+_0x241ec4(0x10b)+'\x20truncat'+_0x241ec4(0x118)+_0x241ec4(0x147)+'\x09}\x20else\x20'+_0x241ec4(0x124)+_0x241ec4(0x109)+_0x241ec4(0x10c)+'k);\x0a\x09\x09}\x0a'+_0x241ec4(0x114)+_0x241ec4(0x106)+_0x241ec4(0x133)+_0x241ec4(0x117)+_0x241ec4(0x14a)+'ted,\x0a\x09\x09c'+_0x241ec4(0x12e)+_0x241ec4(0x15b)+':\x20null;\x0a'+'}';return{'patched':!![],'source':_0x4b700c['replace'](_0x3e1c61,_0x26e3a3)};}function _0x2cc8(){const _0x253dd2=['\x20&&\x20entr','\x22string\x22','\x09content','ed.text\x0a','1bVhRWv','6424480zYuVIy','ected.pu','(entry.t','\x20entry.t','onst\x20tru','ctiveTag','d.push(b','\x0a\x09\x09\x09proj','10ErePim','\x20||\x20type','{\x0a\x09\x09\x09pro','lse;\x0a\x09co','ock\x20||\x20t','nst\x20entr','block\x20of','\x20project','\x20null;\x0a\x09','\x09if\x20(!bl','[];\x0a\x09for','y.text).','hanged:\x20','k;\x0a\x09\x09if\x20','substrin','text,\x20ma','length','xt\x20?\x20{\x0a\x09','\x20!==\x20\x22ob','patched','211841kztZPc','xChars);',');\x0a\x09\x09\x09co','ntinue;\x0a',')\x20{\x0a\x09\x09if','already-','\x22text\x22\x20&','ock\x20!==\x20','eChatHis','ype\x20===\x20','5221812xtyQZZ','31326229vYfkZk','\x20false;\x0a','24Bmtugm','ypeof\x20bl','rim())\x20{','function','\x09\x09\x09});\x0a\x09','ject\x22)\x20{','1669896LOPcKN',':\x20projec','projecte','text\x22,\x0a\x09','\x09\x09}\x0a\x09\x09co','tTextFro','\x20content','120QFGlBq','ockType(','\x20(!block','\x20truncat','istoryBl','ncated\x20=','if\x20(!con','lock)','sForDisp','3525758UtJjSq','let\x20hasT','true\x0a\x09}\x20','\x09type:\x20\x22','y.text.t','t(conten','pe);\x0a\x09})','ext\x20=\x20fa','includes','lineDire','9WbeOVA','16558780woXECv','rn\x20hasTe','Assistan','\x20isToolH','jected.p','block.ty','\x09\x09\x09text:','ush(bloc','nst\x20proj','indexOf','sh({\x0a\x09\x09\x09','mMixedTo','&\x20typeof','not-foun',')\x20return','\x09}\x0a\x09retu'];_0x2cc8=function(){return _0x253dd2;};return _0x2cc8();}
1
+ (function(_0x424d22,_0x4bc844){const _0xf5da3=_0x1aba,_0x2c6208=_0x424d22();while(!![]){try{const _0x5ec078=parseInt(_0xf5da3(0x1f7))/0x1*(parseInt(_0xf5da3(0x211))/0x2)+parseInt(_0xf5da3(0x214))/0x3+-parseInt(_0xf5da3(0x1f6))/0x4*(-parseInt(_0xf5da3(0x1f1))/0x5)+-parseInt(_0xf5da3(0x1c7))/0x6*(parseInt(_0xf5da3(0x1bf))/0x7)+parseInt(_0xf5da3(0x1fd))/0x8+-parseInt(_0xf5da3(0x1e1))/0x9*(parseInt(_0xf5da3(0x1dc))/0xa)+-parseInt(_0xf5da3(0x1e9))/0xb;if(_0x5ec078===_0x4bc844)break;else _0x2c6208['push'](_0x2c6208['shift']());}catch(_0x7ead8a){_0x2c6208['push'](_0x2c6208['shift']());}}}(_0x1f63,0x5e2b2));function _0x1aba(_0x53cabb,_0x203a4f){_0x53cabb=_0x53cabb-0x1bc;const _0x1f6322=_0x1f63();let _0x1aba82=_0x1f6322[_0x53cabb];return _0x1aba82;}export function patchMixedToolContentFromSource(_0x4d9acc){const _0x4e05c8=_0x1aba,_0x12b3ae=_0x4e05c8(0x1d7)+_0x4e05c8(0x1ea)+_0x4e05c8(0x1ee)+_0x4e05c8(0x1f9)+_0x4e05c8(0x1ec)+_0x4e05c8(0x1e8)+'t',_0x1d74d6=_0x4d9acc['indexOf'](_0x12b3ae);if(_0x1d74d6===-0x1)return{'patched':![],'reason':_0x4e05c8(0x1d2)+'d'};let _0x2b1c1b=0x0,_0x5da631=![],_0x345b1e=_0x1d74d6;for(let _0x37eef5=_0x1d74d6;_0x37eef5<_0x4d9acc[_0x4e05c8(0x206)];_0x37eef5+=0x1){_0x4d9acc[_0x37eef5]==='{'&&(_0x2b1c1b+=0x1,_0x5da631=!![]);_0x4d9acc[_0x37eef5]==='}'&&(_0x2b1c1b-=0x1);if(_0x5da631&&_0x2b1c1b===0x0){_0x345b1e=_0x37eef5+0x1;break;}}const _0x270198=_0x4d9acc['substrin'+'g'](_0x1d74d6,_0x345b1e);if(_0x270198['includes'](_0x4e05c8(0x1c8)+_0x4e05c8(0x1fe)+_0x4e05c8(0x1c6)))return{'patched':![],'reason':_0x4e05c8(0x1d3)+'patched'};const _0x30f537='function'+_0x4e05c8(0x1ea)+_0x4e05c8(0x1ee)+_0x4e05c8(0x1f9)+_0x4e05c8(0x1ec)+_0x4e05c8(0x1e8)+_0x4e05c8(0x20f)+_0x4e05c8(0x1d5)+'ars)\x20{\x0a\x09'+_0x4e05c8(0x1df)+'tent.som'+_0x4e05c8(0x1fa)+_0x4e05c8(0x20d)+_0x4e05c8(0x200)+_0x4e05c8(0x1c2)+_0x4e05c8(0x1d0)+_0x4e05c8(0x20e)+'\x22object\x22'+_0x4e05c8(0x1eb)+'\x20false;\x0a'+_0x4e05c8(0x1e3)+_0x4e05c8(0x1cc)+_0x4e05c8(0x1ff)+_0x4e05c8(0x1bd)+'block.ty'+'pe);\x0a\x09})'+_0x4e05c8(0x1eb)+_0x4e05c8(0x1e5)+_0x4e05c8(0x1d1)+_0x4e05c8(0x1d8)+_0x4e05c8(0x1f0)+_0x4e05c8(0x1d4)+_0x4e05c8(0x20a)+_0x4e05c8(0x207)+'\x20(const\x20'+_0x4e05c8(0x204)+_0x4e05c8(0x1e7)+')\x20{\x0a\x09\x09if'+'\x20(!block'+_0x4e05c8(0x202)+_0x4e05c8(0x1cb)+_0x4e05c8(0x1f2)+_0x4e05c8(0x1e0)+_0x4e05c8(0x1f8)+_0x4e05c8(0x1bc)+'sh(block'+_0x4e05c8(0x212)+_0x4e05c8(0x1db)+_0x4e05c8(0x1f3)+'nst\x20entr'+_0x4e05c8(0x1c5)+_0x4e05c8(0x1de)+_0x4e05c8(0x1c0)+_0x4e05c8(0x1cf)+_0x4e05c8(0x1dd)+'&\x20typeof'+'\x20entry.t'+_0x4e05c8(0x209)+_0x4e05c8(0x1c3)+'\x20&&\x20entr'+_0x4e05c8(0x201)+_0x4e05c8(0x1c1)+_0x4e05c8(0x1e4)+_0x4e05c8(0x1cd)+_0x4e05c8(0x20b)+'onst\x20tru'+_0x4e05c8(0x205)+_0x4e05c8(0x1ef)+_0x4e05c8(0x1be)+_0x4e05c8(0x1fb)+_0x4e05c8(0x1fc)+'lineDire'+'ctiveTag'+_0x4e05c8(0x1f4)+'lay(entr'+_0x4e05c8(0x217)+_0x4e05c8(0x219)+'xChars);'+_0x4e05c8(0x1f8)+_0x4e05c8(0x1bc)+_0x4e05c8(0x1f5)+_0x4e05c8(0x1e6)+_0x4e05c8(0x1d6)+_0x4e05c8(0x1ca)+_0x4e05c8(0x1ef)+_0x4e05c8(0x216)+_0x4e05c8(0x20c)+_0x4e05c8(0x21a)+_0x4e05c8(0x1e2)+_0x4e05c8(0x1da)+_0x4e05c8(0x208)+_0x4e05c8(0x1ce)+_0x4e05c8(0x1d9)+_0x4e05c8(0x203)+_0x4e05c8(0x218)+_0x4e05c8(0x210)+':\x20projec'+_0x4e05c8(0x215)+_0x4e05c8(0x213)+_0x4e05c8(0x1ed)+_0x4e05c8(0x1c9)+'}';return{'patched':!![],'source':_0x4d9acc[_0x4e05c8(0x1c4)](_0x270198,_0x30f537)};}function _0x1f63(){const _0x123eb3=['ush(bloc','ext\x20===\x20','ected\x20=\x20','ue;\x0a\x09\x09\x09c','\x09\x09\x09});\x0a\x09',')\x20=>\x20{\x0a\x09','ock\x20!==\x20','t(conten','\x09content','362xtinmB',');\x0a\x09\x09\x09co','hanged:\x20','1761225ePCCVb','ted,\x0a\x09\x09c','ed.text\x0a','y.text).','xt\x20?\x20{\x0a\x09','text,\x20ma','\x09}\x20else\x20','ected.pu','ockType(','eChatHis','3885784kytkBO','(entry.t','rim())\x20{','ock\x20||\x20t','\x22string\x22','replace','y\x20=\x20bloc','lock)','6wTerbE','projecte',':\x20null;\x0a','\x09\x09\x09text:','of\x20block','\x20isToolH','ext\x20=\x20tr','k);\x0a\x09\x09}\x0a','ype\x20===\x20','ypeof\x20bl','let\x20hasT','not-foun','already-','nst\x20proj','t,\x20maxCh','text\x22,\x0a\x09','function','ext\x20=\x20fa','\x09}\x0a\x09retu','jected.p','ntinue;\x0a','450vuClUG','\x22text\x22\x20&','k;\x0a\x09\x09if\x20','if\x20(!con','ject\x22)\x20{','117000ubNoyy','{\x0a\x09\x09\x09pro','\x09\x09return','\x0a\x09\x09\x09hasT','\x20null;\x0a\x09','\x09type:\x20\x22','\x20content','olConten','683144CDdnTT','\x20project',')\x20return','mMixedTo','true\x0a\x09}\x20','Assistan','\x20truncat','lse;\x0a\x09co','1730515NDUoZu','\x20!==\x20\x22ob','\x09\x09}\x0a\x09\x09co','sForDisp','sh({\x0a\x09\x09\x09','4GpHQlR','3263aFZrsG','\x0a\x09\x09\x09proj','tTextFro','e((block','toryText','(stripIn','513192rfyuEK','d.push(b','istoryBl','\x09if\x20(!bl','y.text.t','\x20||\x20type','rn\x20hasTe','block\x20of','ncated\x20=','length','[];\x0a\x09for'];_0x1f63=function(){return _0x123eb3;};return _0x1f63();}
@@ -1 +1 @@
1
- (function(_0x39efc0,_0xedd48e){const _0x3e70ef=_0x5baf,_0x1cddd0=_0x39efc0();while(!![]){try{const _0x33bf64=-parseInt(_0x3e70ef(0x120))/0x1*(-parseInt(_0x3e70ef(0x13e))/0x2)+-parseInt(_0x3e70ef(0x13c))/0x3*(parseInt(_0x3e70ef(0x139))/0x4)+parseInt(_0x3e70ef(0x113))/0x5+-parseInt(_0x3e70ef(0x124))/0x6*(-parseInt(_0x3e70ef(0x11e))/0x7)+-parseInt(_0x3e70ef(0x134))/0x8*(parseInt(_0x3e70ef(0x126))/0x9)+parseInt(_0x3e70ef(0x138))/0xa+-parseInt(_0x3e70ef(0x10d))/0xb*(parseInt(_0x3e70ef(0x10f))/0xc);if(_0x33bf64===_0xedd48e)break;else _0x1cddd0['push'](_0x1cddd0['shift']());}catch(_0x1be6de){_0x1cddd0['push'](_0x1cddd0['shift']());}}}(_0xb87a,0xcfc62));function createBridgeImport(_0x3dfaf1){const _0x2863b9=_0x5baf;return _0x2863b9(0x11a)+_0x2863b9(0x13b)+'eSession'+'Bridge\x20f'+_0x2863b9(0x12b)+_0x3dfaf1+'\x22;';}function ensureBridgeImport(_0x4c01af,_0x3df958){const _0x28ff68=_0x5baf,_0x21c697=createBridgeImport(_0x3df958);if(_0x4c01af['includes'](_0x21c697))return _0x4c01af;const _0x50c33a=_0x4c01af[_0x28ff68(0x12d)](/^import .*;$/m);if(!_0x50c33a)return _0x21c697+'\x0a'+_0x4c01af;return _0x4c01af[_0x28ff68(0x129)](_0x50c33a[0x0],_0x50c33a[0x0]+'\x0a'+_0x21c697);}function _0xb87a(){const _0x2a5612=['5396340vwIoci','s\x20=\x20{})','async\x20fu','s);\x0a}','e(storeP','sionBrid','already-','import\x20*','portPath','\x20loadSes','sionStor','1998381oZiFRW','dSession','1oWsqdC','orePath,','bridge-i','test','6bmQfeU','Store(st','249507aYepqE','arams)','body-not','replace','patched','rom\x20\x22','bridgeIm','match','{\x0a\x09retur','idge.loa','n\x20await\x20','wujieSes','t-provid','essionBr','56DzpohE','mport-no','not-foun','indexOf','4045650cqKROj','856QdosuE','\x20opts);\x0a','\x20as\x20wuji','11184rbzgGB','ath,\x20opt','2783714vEroiO','ionStore','Atomic(p','n\x20wujieS','-found','ge.write','includes','essionSt','body-end','33blSTGO','-not-fou','5273112WSIqCk','ic(param','slice','function'];_0xb87a=function(){return _0x2a5612;};return _0xb87a();}function findFunctionBodyStart(_0x55292a,_0x4d16de){const _0x3c7732=_0x5baf,_0x3034e8=_0x55292a[_0x3c7732(0x137)]('(',_0x4d16de);if(_0x3034e8===-0x1)return-0x1;let _0x21f5af=0x0,_0x1ff528=null,_0x19846b=![];for(let _0xb9d7ee=_0x3034e8;_0xb9d7ee<_0x55292a['length'];_0xb9d7ee+=0x1){const _0xd7f254=_0x55292a[_0xb9d7ee];if(_0x1ff528){if(_0x19846b){_0x19846b=![];continue;}if(_0xd7f254==='\x5c'){_0x19846b=!![];continue;}if(_0xd7f254===_0x1ff528)_0x1ff528=null;continue;}if(_0xd7f254==='\x22'||_0xd7f254==='\x27'||_0xd7f254==='`'){_0x1ff528=_0xd7f254;continue;}if(_0xd7f254==='('){_0x21f5af+=0x1;continue;}if(_0xd7f254===')'){_0x21f5af-=0x1;continue;}if(_0xd7f254==='{'&&_0x21f5af===0x0)return _0xb9d7ee;}return-0x1;}function findMatchingBlockEnd(_0xa3d523,_0xe4b3d3){let _0x22df0a=0x0,_0x4893f1=null,_0x220b23=![];for(let _0x18f790=_0xe4b3d3;_0x18f790<_0xa3d523['length'];_0x18f790+=0x1){const _0x432266=_0xa3d523[_0x18f790];if(_0x4893f1){if(_0x220b23){_0x220b23=![];continue;}if(_0x432266==='\x5c'){_0x220b23=!![];continue;}if(_0x432266===_0x4893f1)_0x4893f1=null;continue;}if(_0x432266==='\x22'||_0x432266==='\x27'||_0x432266==='`'){_0x4893f1=_0x432266;continue;}if(_0x432266==='{')_0x22df0a+=0x1;if(_0x432266==='}')_0x22df0a-=0x1;if(_0x22df0a===0x0)return _0x18f790+0x1;}return-0x1;}function findNextNonWhitespace(_0xda62ee,_0xa20b89){const _0x56bc38=_0x5baf;for(let _0x4bd1e9=_0xa20b89;_0x4bd1e9<_0xda62ee['length'];_0x4bd1e9+=0x1){if(!/\s/[_0x56bc38(0x123)](_0xda62ee[_0x4bd1e9]))return _0x4bd1e9;}return-0x1;}function _0x5baf(_0x3dd3b5,_0x28beef){_0x3dd3b5=_0x3dd3b5-0x10c;const _0xb87a42=_0xb87a();let _0x5baff5=_0xb87a42[_0x3dd3b5];return _0x5baff5;}function repairMalformedAlreadyPatchedFunction(_0x128346,_0x208881){const _0x1429ee=_0x5baf,_0x8db6e2=_0x128346[_0x1429ee(0x137)](_0x208881);if(_0x8db6e2===-0x1)return{'patched':![],'reason':_0x1429ee(0x136)+'d'};const _0x670c4e=findFunctionBodyStart(_0x128346,_0x8db6e2);if(_0x670c4e===-0x1)return{'patched':![],'reason':_0x1429ee(0x128)+_0x1429ee(0x142)};const _0x19aaf3=findMatchingBlockEnd(_0x128346,_0x670c4e);if(_0x19aaf3===-0x1)return{'patched':![],'reason':'body-end'+_0x1429ee(0x10e)+'nd'};const _0x473164=findNextNonWhitespace(_0x128346,_0x19aaf3);if(_0x128346[_0x473164]!==')')return{'patched':![],'reason':_0x1429ee(0x119)+_0x1429ee(0x12a)};const _0x5cc7de=findNextNonWhitespace(_0x128346,_0x473164+0x1);if(_0x128346[_0x5cc7de]!=='{')return{'patched':![],'reason':_0x1429ee(0x119)+_0x1429ee(0x12a)};const _0x4703b6=findMatchingBlockEnd(_0x128346,_0x5cc7de);if(_0x4703b6===-0x1)return{'patched':![],'reason':'body-end'+'-not-fou'+'nd'};return{'patched':!![],'source':_0x128346[_0x1429ee(0x111)](0x0,_0x19aaf3)+_0x128346[_0x1429ee(0x111)](_0x4703b6)};}function replaceFunctionBody(_0x3deb9a,_0x25daaa,_0x3d5b2a){const _0x12a4de=_0x5baf,_0x3bcdbe=_0x3deb9a[_0x12a4de(0x137)](_0x25daaa);if(_0x3bcdbe===-0x1)return{'patched':![],'reason':_0x12a4de(0x136)+'d'};const _0xb56e18=findFunctionBodyStart(_0x3deb9a,_0x3bcdbe);if(_0xb56e18===-0x1)return{'patched':![],'reason':'body-not'+'-found'};const _0x367bb5=findMatchingBlockEnd(_0x3deb9a,_0xb56e18);if(_0x367bb5===-0x1)return{'patched':![],'reason':_0x12a4de(0x10c)+_0x12a4de(0x10e)+'nd'};const _0x43883b=_0x25daaa+'\x20'+_0x3d5b2a;return{'patched':!![],'source':_0x3deb9a[_0x12a4de(0x111)](0x0,_0x3bcdbe)+_0x43883b+_0x3deb9a['slice'](_0x367bb5)};}export function patchSessionStoreLoadFromSource(_0x5880cf,_0x58df90={}){const _0x2a2c6e=_0x5baf,_0x3123fd=_0x58df90[_0x2a2c6e(0x12c)+_0x2a2c6e(0x11b)];if(!_0x3123fd)return{'patched':![],'reason':'bridge-i'+'mport-no'+_0x2a2c6e(0x132)+'ed'};if(_0x5880cf[_0x2a2c6e(0x144)](_0x2a2c6e(0x131)+_0x2a2c6e(0x118)+'ge.loadS'+_0x2a2c6e(0x145)+'ore'))return repairMalformedAlreadyPatchedFunction(_0x5880cf,_0x2a2c6e(0x112)+_0x2a2c6e(0x11c)+_0x2a2c6e(0x11d)+_0x2a2c6e(0x117)+_0x2a2c6e(0x13d)+'s\x20=\x20{})');const _0x50c04a=replaceFunctionBody(ensureBridgeImport(_0x5880cf,_0x3123fd),'function'+_0x2a2c6e(0x11c)+_0x2a2c6e(0x11d)+_0x2a2c6e(0x117)+'ath,\x20opt'+_0x2a2c6e(0x114),_0x2a2c6e(0x12e)+_0x2a2c6e(0x141)+_0x2a2c6e(0x133)+_0x2a2c6e(0x12f)+_0x2a2c6e(0x11f)+_0x2a2c6e(0x125)+_0x2a2c6e(0x121)+_0x2a2c6e(0x13a)+'}');return _0x50c04a;}export function patchSessionStoreWriteFromSource(_0x175dec,_0x455737={}){const _0x592cd7=_0x5baf,_0x59983f=_0x455737[_0x592cd7(0x12c)+_0x592cd7(0x11b)];if(!_0x59983f)return{'patched':![],'reason':_0x592cd7(0x122)+_0x592cd7(0x135)+_0x592cd7(0x132)+'ed'};const _0x1236b3=replaceFunctionBody(ensureBridgeImport(_0x175dec,_0x59983f),_0x592cd7(0x115)+'nction\x20w'+'riteSess'+_0x592cd7(0x13f)+_0x592cd7(0x140)+_0x592cd7(0x127),_0x592cd7(0x12e)+_0x592cd7(0x130)+_0x592cd7(0x131)+_0x592cd7(0x118)+_0x592cd7(0x143)+'SessionS'+'toreAtom'+_0x592cd7(0x110)+_0x592cd7(0x116));if(!_0x1236b3['patched'])return _0x1236b3;return _0x1236b3;}
1
+ (function(_0x311d9c,_0x2da0f9){const _0x597719=_0xd0a4,_0x12652f=_0x311d9c();while(!![]){try{const _0x195eb6=parseInt(_0x597719(0xf7))/0x1+-parseInt(_0x597719(0x102))/0x2+-parseInt(_0x597719(0xf4))/0x3*(-parseInt(_0x597719(0xf1))/0x4)+-parseInt(_0x597719(0xf8))/0x5*(parseInt(_0x597719(0xfb))/0x6)+-parseInt(_0x597719(0xee))/0x7+parseInt(_0x597719(0xf9))/0x8+parseInt(_0x597719(0xef))/0x9*(-parseInt(_0x597719(0x10e))/0xa);if(_0x195eb6===_0x2da0f9)break;else _0x12652f['push'](_0x12652f['shift']());}catch(_0x42075d){_0x12652f['push'](_0x12652f['shift']());}}}(_0x5c25,0x6fdbe));function createBridgeImport(_0x5824ce){const _0x56987a=_0xd0a4;return _0x56987a(0x105)+_0x56987a(0x101)+_0x56987a(0x11e)+'Bridge\x20f'+_0x56987a(0xf5)+_0x5824ce+'\x22;';}function ensureBridgeImport(_0x336126,_0x528a86){const _0x4d45ea=_0xd0a4,_0x478eb4=createBridgeImport(_0x528a86);if(_0x336126['includes'](_0x478eb4))return _0x336126;const _0x274f42=_0x336126[_0x4d45ea(0x111)](/^import .*;$/m);if(!_0x274f42)return _0x478eb4+'\x0a'+_0x336126;return _0x336126[_0x4d45ea(0x10a)](_0x274f42[0x0],_0x274f42[0x0]+'\x0a'+_0x478eb4);}function findFunctionBodyStart(_0x3e708c,_0x56a3c6){const _0x4695d0=_0xd0a4,_0x133069=_0x3e708c[_0x4695d0(0xeb)]('(',_0x56a3c6);if(_0x133069===-0x1)return-0x1;let _0x3812d8=0x0,_0x21cb51=null,_0x80e4b4=![];for(let _0x1990e9=_0x133069;_0x1990e9<_0x3e708c['length'];_0x1990e9+=0x1){const _0x22fa4c=_0x3e708c[_0x1990e9];if(_0x21cb51){if(_0x80e4b4){_0x80e4b4=![];continue;}if(_0x22fa4c==='\x5c'){_0x80e4b4=!![];continue;}if(_0x22fa4c===_0x21cb51)_0x21cb51=null;continue;}if(_0x22fa4c==='\x22'||_0x22fa4c==='\x27'||_0x22fa4c==='`'){_0x21cb51=_0x22fa4c;continue;}if(_0x22fa4c==='('){_0x3812d8+=0x1;continue;}if(_0x22fa4c===')'){_0x3812d8-=0x1;continue;}if(_0x22fa4c==='{'&&_0x3812d8===0x0)return _0x1990e9;}return-0x1;}function findMatchingBlockEnd(_0x1a5a79,_0x5cec4e){const _0x5712fd=_0xd0a4;let _0x4e00e3=0x0,_0x57a607=null,_0x13b67f=![];for(let _0x9466f9=_0x5cec4e;_0x9466f9<_0x1a5a79[_0x5712fd(0x109)];_0x9466f9+=0x1){const _0x561361=_0x1a5a79[_0x9466f9];if(_0x57a607){if(_0x13b67f){_0x13b67f=![];continue;}if(_0x561361==='\x5c'){_0x13b67f=!![];continue;}if(_0x561361===_0x57a607)_0x57a607=null;continue;}if(_0x561361==='\x22'||_0x561361==='\x27'||_0x561361==='`'){_0x57a607=_0x561361;continue;}if(_0x561361==='{')_0x4e00e3+=0x1;if(_0x561361==='}')_0x4e00e3-=0x1;if(_0x4e00e3===0x0)return _0x9466f9+0x1;}return-0x1;}function findNextNonWhitespace(_0x3fb8c3,_0x485b53){const _0x148dc5=_0xd0a4;for(let _0x5e2b19=_0x485b53;_0x5e2b19<_0x3fb8c3[_0x148dc5(0x109)];_0x5e2b19+=0x1){if(!/\s/[_0x148dc5(0xf2)](_0x3fb8c3[_0x5e2b19]))return _0x5e2b19;}return-0x1;}function _0x5c25(){const _0x1819ac=['bridge-i','706506EozOBA','body-end','already-','s);\x0a}','-found','ore','\x20as\x20wuji','414888FDTRIi','slice','not-foun','import\x20*','portPath','SessionS','{\x0a\x09retur','length','replace','t-provid','Atomic(p','riteSess','50HhWCbx','nction\x20w','sionBrid','match','s\x20=\x20{})','essionSt','\x20loadSes','-not-fou','bridgeIm','patched','toreAtom','\x20opts);\x0a','e(storeP','arams)','ge.write','ge.loadS','eSession','function','ath,\x20opt','body-not','indexOf','sionStor','mport-no','273714PUKZEk','1093959TXiKCq','essionBr','2459024cYnVeS','test','idge.loa','3EUcnaG','rom\x20\x22','includes','712750RIhxxA','5HhHgpq','821760owADTy'];_0x5c25=function(){return _0x1819ac;};return _0x5c25();}function repairMalformedAlreadyPatchedFunction(_0x2a7177,_0x11dffb){const _0x1d62b1=_0xd0a4,_0xd8e4aa=_0x2a7177[_0x1d62b1(0xeb)](_0x11dffb);if(_0xd8e4aa===-0x1)return{'patched':![],'reason':_0x1d62b1(0x104)+'d'};const _0x2af825=findFunctionBodyStart(_0x2a7177,_0xd8e4aa);if(_0x2af825===-0x1)return{'patched':![],'reason':'body-not'+_0x1d62b1(0xff)};const _0x23a1bb=findMatchingBlockEnd(_0x2a7177,_0x2af825);if(_0x23a1bb===-0x1)return{'patched':![],'reason':_0x1d62b1(0xfc)+'-not-fou'+'nd'};const _0x2ebd1c=findNextNonWhitespace(_0x2a7177,_0x23a1bb);if(_0x2a7177[_0x2ebd1c]!==')')return{'patched':![],'reason':_0x1d62b1(0xfd)+_0x1d62b1(0x117)};const _0x189b81=findNextNonWhitespace(_0x2a7177,_0x2ebd1c+0x1);if(_0x2a7177[_0x189b81]!=='{')return{'patched':![],'reason':'already-'+'patched'};const _0x3d79d0=findMatchingBlockEnd(_0x2a7177,_0x189b81);if(_0x3d79d0===-0x1)return{'patched':![],'reason':_0x1d62b1(0xfc)+_0x1d62b1(0x115)+'nd'};return{'patched':!![],'source':_0x2a7177[_0x1d62b1(0x103)](0x0,_0x23a1bb)+_0x2a7177[_0x1d62b1(0x103)](_0x3d79d0)};}function _0xd0a4(_0x5b7e53,_0x1e982c){_0x5b7e53=_0x5b7e53-0xeb;const _0x5c25f6=_0x5c25();let _0xd0a45d=_0x5c25f6[_0x5b7e53];return _0xd0a45d;}function replaceFunctionBody(_0x4d16ff,_0x20b091,_0x37de3d){const _0x1e3854=_0xd0a4,_0x1eb0f1=_0x4d16ff[_0x1e3854(0xeb)](_0x20b091);if(_0x1eb0f1===-0x1)return{'patched':![],'reason':'not-foun'+'d'};const _0x1275cb=findFunctionBodyStart(_0x4d16ff,_0x1eb0f1);if(_0x1275cb===-0x1)return{'patched':![],'reason':_0x1e3854(0x121)+_0x1e3854(0xff)};const _0x43b197=findMatchingBlockEnd(_0x4d16ff,_0x1275cb);if(_0x43b197===-0x1)return{'patched':![],'reason':_0x1e3854(0xfc)+_0x1e3854(0x115)+'nd'};const _0x1a3ecf=_0x20b091+'\x20'+_0x37de3d;return{'patched':!![],'source':_0x4d16ff['slice'](0x0,_0x1eb0f1)+_0x1a3ecf+_0x4d16ff['slice'](_0x43b197)};}export function patchSessionStoreLoadFromSource(_0x2598ef,_0x13f19a={}){const _0x3ea41b=_0xd0a4,_0x4f21e6=_0x13f19a[_0x3ea41b(0x116)+'portPath'];if(!_0x4f21e6)return{'patched':![],'reason':_0x3ea41b(0xfa)+_0x3ea41b(0xed)+_0x3ea41b(0x10b)+'ed'};if(_0x2598ef[_0x3ea41b(0xf6)]('wujieSes'+_0x3ea41b(0x110)+_0x3ea41b(0x11d)+_0x3ea41b(0x113)+_0x3ea41b(0x100)))return repairMalformedAlreadyPatchedFunction(_0x2598ef,_0x3ea41b(0x11f)+_0x3ea41b(0x114)+_0x3ea41b(0xec)+_0x3ea41b(0x11a)+_0x3ea41b(0x120)+_0x3ea41b(0x112));const _0x1a2146=replaceFunctionBody(ensureBridgeImport(_0x2598ef,_0x4f21e6),'function'+_0x3ea41b(0x114)+'sionStor'+_0x3ea41b(0x11a)+_0x3ea41b(0x120)+_0x3ea41b(0x112),'{\x0a\x09retur'+'n\x20wujieS'+_0x3ea41b(0xf0)+_0x3ea41b(0xf3)+'dSession'+'Store(st'+'orePath,'+_0x3ea41b(0x119)+'}');return _0x1a2146;}export function patchSessionStoreWriteFromSource(_0x39c076,_0x65bea2={}){const _0x3258a6=_0xd0a4,_0x314da1=_0x65bea2[_0x3258a6(0x116)+_0x3258a6(0x106)];if(!_0x314da1)return{'patched':![],'reason':_0x3258a6(0xfa)+_0x3258a6(0xed)+'t-provid'+'ed'};const _0x3c0890=replaceFunctionBody(ensureBridgeImport(_0x39c076,_0x314da1),'async\x20fu'+_0x3258a6(0x10f)+_0x3258a6(0x10d)+'ionStore'+_0x3258a6(0x10c)+_0x3258a6(0x11b),_0x3258a6(0x108)+'n\x20await\x20'+'wujieSes'+_0x3258a6(0x110)+_0x3258a6(0x11c)+_0x3258a6(0x107)+_0x3258a6(0x118)+'ic(param'+_0x3258a6(0xfe));if(!_0x3c0890[_0x3258a6(0x117)])return _0x3c0890;return _0x3c0890;}
@@ -1 +1 @@
1
- function _0x468a(_0x2b85b8,_0x458826){_0x2b85b8=_0x2b85b8-0x186;const _0xe5d212=_0xe5d2();let _0x468a0a=_0xe5d212[_0x2b85b8];return _0x468a0a;}(function(_0x5293eb,_0x236dad){const _0x110b02=_0x468a,_0x2d1100=_0x5293eb();while(!![]){try{const _0x30577a=parseInt(_0x110b02(0x18e))/0x1+-parseInt(_0x110b02(0x19a))/0x2+parseInt(_0x110b02(0x192))/0x3+-parseInt(_0x110b02(0x196))/0x4*(-parseInt(_0x110b02(0x191))/0x5)+-parseInt(_0x110b02(0x18c))/0x6+parseInt(_0x110b02(0x18a))/0x7+-parseInt(_0x110b02(0x188))/0x8;if(_0x30577a===_0x236dad)break;else _0x2d1100['push'](_0x2d1100['shift']());}catch(_0x5dcb22){_0x2d1100['push'](_0x2d1100['shift']());}}}(_0xe5d2,0x2cf81));function _0xe5d2(){const _0x36ada6=['has','tPluginI','1547705rNIFKv','961686zlboDl','filter','uginIdsB','disabled','4NUWXwn','entries','installs','includes','460592oBCZEd','allow','pluginId','length','yPluginI','local','keys','2565912faOPCa','ByDefaul','1733634AAdrXE','legacyPl','1278126zXQXbP','enabled','70484smIGKg'];_0xe5d2=function(){return _0x36ada6;};return _0xe5d2();}import{asRecord,asStringArray,dedupeStrings,getTrimmedString}from'../common/utils.mjs';export function syncRuntimeManifestPlugins(_0x580264,_0x4861e9,_0x47f41e={}){const _0x43f5fe=_0x468a,_0x30bb7e=new Set(_0x47f41e[_0x43f5fe(0x195)+_0x43f5fe(0x189)+_0x43f5fe(0x190)+'ds']??[]),_0x537a10=asRecord(_0x47f41e[_0x43f5fe(0x18b)+_0x43f5fe(0x194)+_0x43f5fe(0x19e)+'d']),_0x331cc5={...asRecord(_0x580264)},_0x549781={...asRecord(_0x331cc5[_0x43f5fe(0x197)])},_0x43f47a={...asRecord(_0x331cc5[_0x43f5fe(0x198)])};let _0xed661c=asStringArray(_0x331cc5['allow']),_0x43f3ac=![];for(const _0x1607d5 of _0x4861e9??[]){const _0x2517eb=getTrimmedString(_0x1607d5[_0x43f5fe(0x19c)]);if(!_0x2517eb)continue;const _0x5b26de=asStringArray(_0x537a10[_0x2517eb]);for(const _0x37c4c4 of _0x5b26de){_0x37c4c4 in _0x549781&&(_0x549781[_0x2517eb]={...asRecord(_0x549781[_0x2517eb]),...asRecord(_0x549781[_0x37c4c4])},delete _0x549781[_0x37c4c4],_0x43f3ac=!![]);}if(_0x5b26de[_0x43f5fe(0x19d)]>0x0){const _0x53246c=_0xed661c[_0x43f5fe(0x193)](_0x10c75a=>!_0x5b26de[_0x43f5fe(0x199)](_0x10c75a));_0x53246c[_0x43f5fe(0x19d)]!==_0xed661c[_0x43f5fe(0x19d)]&&(_0xed661c=_0x53246c,_0x43f3ac=!![]);}!(_0x2517eb in _0x549781)&&(_0x549781[_0x2517eb]={'enabled':!_0x30bb7e[_0x43f5fe(0x18f)](_0x2517eb)},_0x43f3ac=!![]);if(asRecord(_0x549781[_0x2517eb])[_0x43f5fe(0x18d)]!==![]){const _0x96c51e=dedupeStrings([..._0xed661c,_0x2517eb]);_0x96c51e[_0x43f5fe(0x19d)]!==_0xed661c[_0x43f5fe(0x19d)]&&(_0xed661c=_0x96c51e,_0x43f3ac=!![]);}getTrimmedString(_0x1607d5['source'])===_0x43f5fe(0x186)&&_0x2517eb in _0x43f47a&&(delete _0x43f47a[_0x2517eb],_0x43f3ac=!![]);}_0x331cc5['entries']=_0x549781,_0x331cc5[_0x43f5fe(0x19b)]=_0xed661c;if(Object[_0x43f5fe(0x187)](_0x43f47a)[_0x43f5fe(0x19d)]>0x0)_0x331cc5[_0x43f5fe(0x198)]=_0x43f47a;else delete _0x331cc5['installs'];return{'plugins':_0x331cc5,'changed':_0x43f3ac};}
1
+ function _0x5df4(){const _0x2e7392=['local','keys','ByDefaul','6SStcZM','3889170eoNVHB','filter','805192aAtSJH','760pXqTUB','pluginId','10012247FuSygV','87LHuAky','198892bKAHrD','yPluginI','302283HPyBsT','11576680ccYiOw','allow','has','includes','11578PRDbZM','tPluginI','legacyPl','length','entries','installs'];_0x5df4=function(){return _0x2e7392;};return _0x5df4();}function _0xb552(_0x15a1e3,_0x3e79b1){_0x15a1e3=_0x15a1e3-0x115;const _0x5df4cf=_0x5df4();let _0xb55219=_0x5df4cf[_0x15a1e3];return _0xb55219;}(function(_0x5e16e5,_0x3d2eb7){const _0x40e87d=_0xb552,_0x129e8e=_0x5e16e5();while(!![]){try{const _0x42e8df=-parseInt(_0x40e87d(0x119))/0x1+parseInt(_0x40e87d(0x125))/0x2+-parseInt(_0x40e87d(0x129))/0x3*(-parseInt(_0x40e87d(0x12a))/0x4)+-parseInt(_0x40e87d(0x123))/0x5+-parseInt(_0x40e87d(0x122))/0x6*(parseInt(_0x40e87d(0x128))/0x7)+-parseInt(_0x40e87d(0x115))/0x8+-parseInt(_0x40e87d(0x12c))/0x9*(-parseInt(_0x40e87d(0x126))/0xa);if(_0x42e8df===_0x3d2eb7)break;else _0x129e8e['push'](_0x129e8e['shift']());}catch(_0x5b6fab){_0x129e8e['push'](_0x129e8e['shift']());}}}(_0x5df4,0xb24f5));import{asRecord,asStringArray,dedupeStrings,getTrimmedString}from'../common/utils.mjs';export function syncRuntimeManifestPlugins(_0x8c7ae4,_0x3f1fb4,_0x39fc99={}){const _0x803436=_0xb552,_0x87fd14=new Set(_0x39fc99['disabled'+_0x803436(0x121)+_0x803436(0x11a)+'ds']??[]),_0x12ea91=asRecord(_0x39fc99[_0x803436(0x11b)+'uginIdsB'+_0x803436(0x12b)+'d']),_0x490671={...asRecord(_0x8c7ae4)},_0x578df5={...asRecord(_0x490671[_0x803436(0x11d)])},_0x487d48={...asRecord(_0x490671[_0x803436(0x11e)])};let _0x540889=asStringArray(_0x490671['allow']),_0x2ad758=![];for(const _0x3cad29 of _0x3f1fb4??[]){const _0x30fa1b=getTrimmedString(_0x3cad29[_0x803436(0x127)]);if(!_0x30fa1b)continue;const _0x245506=asStringArray(_0x12ea91[_0x30fa1b]);for(const _0x506677 of _0x245506){_0x506677 in _0x578df5&&(_0x578df5[_0x30fa1b]={...asRecord(_0x578df5[_0x30fa1b]),...asRecord(_0x578df5[_0x506677])},delete _0x578df5[_0x506677],_0x2ad758=!![]);}if(_0x245506[_0x803436(0x11c)]>0x0){const _0x193815=_0x540889[_0x803436(0x124)](_0x85ea1f=>!_0x245506[_0x803436(0x118)](_0x85ea1f));_0x193815[_0x803436(0x11c)]!==_0x540889['length']&&(_0x540889=_0x193815,_0x2ad758=!![]);}!(_0x30fa1b in _0x578df5)&&(_0x578df5[_0x30fa1b]={'enabled':!_0x87fd14[_0x803436(0x117)](_0x30fa1b)},_0x2ad758=!![]);if(asRecord(_0x578df5[_0x30fa1b])['enabled']!==![]){const _0x515ed8=dedupeStrings([..._0x540889,_0x30fa1b]);_0x515ed8[_0x803436(0x11c)]!==_0x540889[_0x803436(0x11c)]&&(_0x540889=_0x515ed8,_0x2ad758=!![]);}getTrimmedString(_0x3cad29['source'])===_0x803436(0x11f)&&_0x30fa1b in _0x487d48&&(delete _0x487d48[_0x30fa1b],_0x2ad758=!![]);}_0x490671['entries']=_0x578df5,_0x490671[_0x803436(0x116)]=_0x540889;if(Object[_0x803436(0x120)](_0x487d48)[_0x803436(0x11c)]>0x0)_0x490671[_0x803436(0x11e)]=_0x487d48;else delete _0x490671[_0x803436(0x11e)];return{'plugins':_0x490671,'changed':_0x2ad758};}
@@ -1 +1 @@
1
- const _0x2c2f59=_0x5668;(function(_0x23c90e,_0x1abef0){const _0x1d4868=_0x5668,_0x4763cf=_0x23c90e();while(!![]){try{const _0x5574b3=parseInt(_0x1d4868(0x217))/0x1+parseInt(_0x1d4868(0x207))/0x2+parseInt(_0x1d4868(0x1f8))/0x3*(parseInt(_0x1d4868(0x1f4))/0x4)+-parseInt(_0x1d4868(0x20b))/0x5+parseInt(_0x1d4868(0x21b))/0x6*(parseInt(_0x1d4868(0x1f7))/0x7)+parseInt(_0x1d4868(0x209))/0x8+-parseInt(_0x1d4868(0x1f3))/0x9*(parseInt(_0x1d4868(0x213))/0xa);if(_0x5574b3===_0x1abef0)break;else _0x4763cf['push'](_0x4763cf['shift']());}catch(_0x42a513){_0x4763cf['push'](_0x4763cf['shift']());}}}(_0x38d6,0x72f34));import{existsSync}from'node:fs';import{copyFile,mkdir,readFile,writeFile}from'node:fs/promises';import{dirname,extname,join}from'node:path';import{asRecord}from'../common/utils.mjs';import{createSessionSqliteStore}from'./session-sqlite-store.mjs';function _0x5668(_0x5b34dc,_0x1648e7){_0x5b34dc=_0x5b34dc-0x1f1;const _0x38d6a3=_0x38d6();let _0x5668d1=_0x38d6a3[_0x5b34dc];return _0x5668d1;}const CLONED_AGENT_SESSION_EXCLUDED_FIELDS=new Set(['sessionK'+'ey',_0x2c2f59(0x20f)+'d',_0x2c2f59(0x20a),_0x2c2f59(0x216)+_0x2c2f59(0x201)]);function extractAgentIdFromSessionKey(_0x2a4907){const _0x2278ff=_0x2c2f59,_0x5f0c60=String(_0x2a4907||'')[_0x2278ff(0x1f9)](':'),_0x121ab3=_0x5f0c60[0x1]?.[_0x2278ff(0x225)]();return _0x121ab3||_0x2278ff(0x222);}function resolveNewSessionFilePath(_0x115f0e,_0x10c34b,_0x5cd92b,_0x43b0de,_0x4953f0){const _0xf6ca13=_0x2c2f59,_0x5c6654=typeof _0x10c34b[_0xf6ca13(0x216)+'ile']===_0xf6ca13(0x1ff)?_0x10c34b[_0xf6ca13(0x216)+'ile'][_0xf6ca13(0x225)]():'';if(_0x5c6654)return _0x5c6654;const _0x41421b=_0x5cd92b&&typeof _0x5cd92b[_0xf6ca13(0x216)+'ile']===_0xf6ca13(0x1ff)?extname(_0x5cd92b['sessionF'+'ile'][_0xf6ca13(0x225)]()):'';return join(_0x115f0e,'agents',_0x4953f0,_0xf6ca13(0x219),''+_0x43b0de+(_0x41421b||'.jsonl'));}function cloneForkedSessionExtraFields(_0x297fd1){const _0x1f4f58=_0x2c2f59;if(!_0x297fd1)return{};const _0x528020={};for(const [_0xaace9e,_0x442c46]of Object[_0x1f4f58(0x20e)](_0x297fd1)){if(CLONED_AGENT_SESSION_EXCLUDED_FIELDS['has'](_0xaace9e))continue;_0x528020[_0xaace9e]=_0x442c46;}return _0x528020;}function _0x38d6(){const _0x18535e=['1918EbygFO','90234vlpxvu','split','session','role','sessionK','length','cutoffTe','string','cutoffRo','ile','pop','POSITIVE','utf8','keys','timestam','220490HeQWtQ','sourceSe','3080736ASLEZK','label','3166465odFrsf','text','_INFINIT','entries','sessionI','agent','parse','type','30RzRcKb','number','message','sessionF','598167OnPsPN','join','sessions','quired','17796FKNVfn','uired','ssionKey','push','ionEntry','slice','onsMap','main','user','lTs','trim','d\x20is\x20req','agentId','ey\x20is\x20re','assistan','getSessi','isFinite','map','keepUnti','3940155mwEvov','68JjkMwv','ssionEnt','readSess'];_0x38d6=function(){return _0x18535e;};return _0x38d6();}async function copySessionFileIfNeeded(_0xafdb2c,_0x32a0c6){const _0x12e606=_0x2c2f59;if(!_0xafdb2c||!_0x32a0c6)return;const _0x38ef5d=typeof _0xafdb2c[_0x12e606(0x216)+_0x12e606(0x201)]==='string'?_0xafdb2c['sessionF'+_0x12e606(0x201)][_0x12e606(0x225)]():'',_0x11508c=String(_0x32a0c6||'')[_0x12e606(0x225)]();if(!_0x38ef5d||!_0x11508c||_0x38ef5d===_0x11508c)return;if(!existsSync(_0x38ef5d))return;await mkdir(dirname(_0x11508c),{'recursive':!![]}),await copyFile(_0x38ef5d,_0x11508c);}function extractMessageEntryText(_0x201b53){const _0xd200ee=_0x2c2f59,_0x4913b5=asRecord(_0x201b53[_0xd200ee(0x215)]),_0x370d79=_0x4913b5['content'];if(typeof _0x370d79===_0xd200ee(0x1ff))return _0x370d79;if(!Array['isArray'](_0x370d79))return'';return _0x370d79[_0xd200ee(0x1f1)](_0x3f94b3=>{const _0xf38f3e=_0xd200ee,_0x25485e=asRecord(_0x3f94b3);return _0x25485e[_0xf38f3e(0x212)]===_0xf38f3e(0x20c)&&typeof _0x25485e[_0xf38f3e(0x20c)]==='string'?_0x25485e[_0xf38f3e(0x20c)]:'';})['filter'](Boolean)[_0xd200ee(0x218)]('\x0a');}function extractMessageEntryRole(_0x2fc8cd){const _0x1c515f=_0x2c2f59,_0x5ec9f0=asRecord(_0x2fc8cd[_0x1c515f(0x215)]);if(typeof _0x5ec9f0[_0x1c515f(0x1fb)]===_0x1c515f(0x1ff))return _0x5ec9f0[_0x1c515f(0x1fb)];if(typeof _0x2fc8cd[_0x1c515f(0x1fb)]===_0x1c515f(0x1ff))return _0x2fc8cd[_0x1c515f(0x1fb)];return'';}function parseJsonLine(_0x1f0ba8){try{const _0x20555d=JSON['parse'](_0x1f0ba8);return asRecord(_0x20555d);}catch{return null;}}function entryTimestampMs(_0x12d915){const _0x10101c=_0x2c2f59,_0x41e981=_0x12d915[_0x10101c(0x206)+'p'];if(typeof _0x41e981===_0x10101c(0x1ff)){const _0x840b9=Date[_0x10101c(0x211)](_0x41e981);return Number[_0x10101c(0x22b)](_0x840b9)?_0x840b9:null;}if(typeof _0x41e981===_0x10101c(0x214)&&Number[_0x10101c(0x22b)](_0x41e981))return _0x41e981;return null;}async function trimSessionFileForFork(_0xe5eab7,_0x22ed27){const _0x58d816=_0x2c2f59;if(!_0xe5eab7||!existsSync(_0xe5eab7))return;const {keepUntilTs:_0x52a2b1,cutoffRole:_0x4c8253,cutoffText:_0x30a6fa}=_0x22ed27,_0x1e9425=typeof _0x52a2b1===_0x58d816(0x214)&&Number['isFinite'](_0x52a2b1),_0x493cb2=typeof _0x30a6fa==='string'?_0x30a6fa[_0x58d816(0x225)]():'',_0x389b63=_0x4c8253===_0x58d816(0x210)?_0x58d816(0x229)+'t':_0x4c8253==='user'?_0x58d816(0x223):'',_0x4d057b=Boolean(_0x389b63&&_0x493cb2);if(!_0x1e9425&&!_0x4d057b)return;let _0x3fa8a4='';try{_0x3fa8a4=await readFile(_0xe5eab7,'utf8');}catch{return;}const _0x3c6352=_0x3fa8a4[_0x58d816(0x1f9)]('\x0a');let _0x3ee65d=-0x1;const _0x261c87=_0x1e9425?_0x52a2b1+0xa*0x3c*0x3e8:Number[_0x58d816(0x203)+_0x58d816(0x20d)+'Y'];if(_0x4d057b)for(let _0x442588=0x0;_0x442588<_0x3c6352['length'];_0x442588+=0x1){const _0x4e5e52=_0x3c6352[_0x442588]['trim']();if(!_0x4e5e52)continue;const _0x6b9668=parseJsonLine(_0x4e5e52);if(!_0x6b9668||_0x6b9668[_0x58d816(0x212)]!==_0x58d816(0x215))continue;if(extractMessageEntryRole(_0x6b9668)!==_0x389b63)continue;const _0xa4c33d=extractMessageEntryText(_0x6b9668)[_0x58d816(0x225)]();if(!_0xa4c33d||!_0xa4c33d['includes'](_0x493cb2))continue;const _0x46a2d5=entryTimestampMs(_0x6b9668);if(_0x46a2d5!==null&&_0x46a2d5>_0x261c87)continue;_0x3ee65d=_0x442588;}let _0xb8c53b=[];if(_0x3ee65d>=0x0)_0xb8c53b=_0x3c6352[_0x58d816(0x220)](0x0,_0x3ee65d+0x1);else{if(_0x1e9425)for(const _0x4ccc69 of _0x3c6352){const _0x7b61f8=_0x4ccc69['trim']();if(!_0x7b61f8)continue;const _0x47a8b9=parseJsonLine(_0x7b61f8);if(!_0x47a8b9){_0xb8c53b[_0x58d816(0x21e)](_0x4ccc69);continue;}if(_0x47a8b9[_0x58d816(0x212)]===_0x58d816(0x1fa)){_0xb8c53b['push'](_0x4ccc69);continue;}const _0xcad318=entryTimestampMs(_0x47a8b9);if(_0xcad318===null||_0xcad318<=_0x52a2b1)_0xb8c53b[_0x58d816(0x21e)](_0x4ccc69);}}while(_0xb8c53b[_0x58d816(0x1fd)]>0x0&&_0xb8c53b[_0xb8c53b[_0x58d816(0x1fd)]-0x1][_0x58d816(0x225)]()==='')_0xb8c53b[_0x58d816(0x202)]();await writeFile(_0xe5eab7,_0xb8c53b[_0x58d816(0x218)]('\x0a')+'\x0a',_0x58d816(0x204));}export function createAgentSessionsMapStore({stateDir:_0x54e217}){const _0xc9ab76=createSessionSqliteStore({'stateDir':_0x54e217});async function _0x3b1927(_0x575faa={}){const _0x7fb263=_0x5668,_0x578704=String(_0x575faa[_0x7fb263(0x227)]||_0x7fb263(0x222));return await _0xc9ab76['getSessi'+_0x7fb263(0x221)](_0x578704);}async function _0x2764d7(_0x22fc4e={}){const _0x5a8e31=_0x5668,_0x18afdd=String(_0x22fc4e[_0x5a8e31(0x1fc)+'ey']||'')['trim'](),_0x589f91=String(_0x22fc4e[_0x5a8e31(0x20f)+'d']||'')[_0x5a8e31(0x225)]();if(!_0x18afdd)throw new Error(_0x5a8e31(0x1fc)+_0x5a8e31(0x228)+_0x5a8e31(0x21a));if(!_0x589f91)throw new Error(_0x5a8e31(0x20f)+_0x5a8e31(0x226)+_0x5a8e31(0x21c));const _0x3cfa94=extractAgentIdFromSessionKey(_0x18afdd),_0x1a9468=asRecord(await _0xc9ab76['readSess'+_0x5a8e31(0x21f)](_0x18afdd)),_0x1e32af=String(_0x22fc4e[_0x5a8e31(0x208)+_0x5a8e31(0x21d)]||'')[_0x5a8e31(0x225)](),_0x2672cc=_0x1e32af?extractAgentIdFromSessionKey(_0x1e32af):_0x3cfa94,_0x212e9e=_0x1e32af?asRecord(await _0xc9ab76[_0x5a8e31(0x1f6)+_0x5a8e31(0x21f)](_0x1e32af)):null,_0x58f00b=_0x212e9e&&Object[_0x5a8e31(0x205)](_0x212e9e)['length']>0x0,_0x30d542=resolveNewSessionFilePath(_0x54e217,_0x1a9468,_0x58f00b?_0x212e9e:null,_0x589f91,_0x3cfa94),_0x10d6b6=typeof _0x22fc4e[_0x5a8e31(0x1f2)+_0x5a8e31(0x224)]==='number'&&Number[_0x5a8e31(0x22b)](_0x22fc4e[_0x5a8e31(0x1f2)+_0x5a8e31(0x224)])?_0x22fc4e['keepUnti'+_0x5a8e31(0x224)]:null,_0x307030=typeof _0x22fc4e[_0x5a8e31(0x200)+'le']===_0x5a8e31(0x1ff)?_0x22fc4e[_0x5a8e31(0x200)+'le']:null,_0x178b73=typeof _0x22fc4e[_0x5a8e31(0x1fe)+'xt']===_0x5a8e31(0x1ff)?_0x22fc4e[_0x5a8e31(0x1fe)+'xt']:null,_0x886513={..._0x1a9468,...cloneForkedSessionExtraFields(_0x58f00b?_0x212e9e:null),'agentId':_0x3cfa94,'sessionKey':_0x18afdd,'sessionId':_0x589f91,'sessionFile':_0x30d542,..._0x58f00b?{'forkedFromParent':!![]}:{}};return await copySessionFileIfNeeded(_0x58f00b?_0x212e9e:null,_0x30d542),_0x58f00b&&(_0x10d6b6!==null||_0x307030&&_0x178b73)&&await trimSessionFileForFork(_0x30d542,{'keepUntilTs':_0x10d6b6,'cutoffRole':_0x307030,'cutoffText':_0x178b73}),await _0xc9ab76['upsertSe'+_0x5a8e31(0x1f5)+'ry']({'agentId':_0x3cfa94,'sessionKey':_0x18afdd,'entry':_0x886513}),await _0xc9ab76[_0x5a8e31(0x22a)+_0x5a8e31(0x221)](_0x3cfa94);}return{'get':_0x3b1927,'upsert':_0x2764d7};}
1
+ function _0x2e28(){const _0x32eede=['ey\x20is\x20re','218806iMmHLV','session','utf8','5346936SMegeY','label','cutoffTe','d\x20is\x20req','sessionI','agent','keys','role','parse','map','lTs','upsertSe','message','trim','.jsonl','main','sessions','getSessi','168mfJdkQ','1524074rIkodK','ionEntry','5oAdvrh','2609332OvwDnp','keepUnti','86274JfFxsh','ssionKey','push','type','3335986JhnKvA','ile','agents','slice','agentId','quired','cutoffRo','POSITIVE','entries','pop','user','sourceSe','number','string','isArray','1448rZIydi','isFinite','split','includes','sessionK','sessionF','7340250hnrklN','onsMap','content','_INFINIT','length','timestam','text'];_0x2e28=function(){return _0x32eede;};return _0x2e28();}const _0x30ffed=_0x4c41;(function(_0x25bbd3,_0x4f29ed){const _0x450d6d=_0x4c41,_0x59d86f=_0x25bbd3();while(!![]){try{const _0x5dfac4=-parseInt(_0x450d6d(0x19c))/0x1+parseInt(_0x450d6d(0x1a5))/0x2+parseInt(_0x450d6d(0x1c5))/0x3+-parseInt(_0x450d6d(0x19f))/0x4*(-parseInt(_0x450d6d(0x19e))/0x5)+parseInt(_0x450d6d(0x19b))/0x6*(parseInt(_0x450d6d(0x1c2))/0x7)+parseInt(_0x450d6d(0x1b4))/0x8*(-parseInt(_0x450d6d(0x1a1))/0x9)+-parseInt(_0x450d6d(0x1ba))/0xa;if(_0x5dfac4===_0x4f29ed)break;else _0x59d86f['push'](_0x59d86f['shift']());}catch(_0xaee1b9){_0x59d86f['push'](_0x59d86f['shift']());}}}(_0x2e28,0xf0679));import{existsSync}from'node:fs';import{copyFile,mkdir,readFile,writeFile}from'node:fs/promises';import{dirname,extname,join}from'node:path';import{asRecord}from'../common/utils.mjs';import{createSessionSqliteStore}from'./session-sqlite-store.mjs';const CLONED_AGENT_SESSION_EXCLUDED_FIELDS=new Set([_0x30ffed(0x1b8)+'ey',_0x30ffed(0x1c9)+'d',_0x30ffed(0x1c6),'sessionF'+'ile']);function _0x4c41(_0x1dda42,_0x5674c5){_0x1dda42=_0x1dda42-0x19b;const _0x2e2859=_0x2e28();let _0x4c417f=_0x2e2859[_0x1dda42];return _0x4c417f;}function extractAgentIdFromSessionKey(_0x5565da){const _0x4895d2=_0x30ffed,_0x18c39a=String(_0x5565da||'')[_0x4895d2(0x1b6)](':'),_0xbea2c=_0x18c39a[0x1]?.[_0x4895d2(0x1d2)]();return _0xbea2c||_0x4895d2(0x1d4);}function resolveNewSessionFilePath(_0x374379,_0x1ec88f,_0x5314cd,_0x2e140c,_0x158a8d){const _0x440364=_0x30ffed,_0x49b1fe=typeof _0x1ec88f[_0x440364(0x1b9)+_0x440364(0x1a6)]===_0x440364(0x1b2)?_0x1ec88f[_0x440364(0x1b9)+_0x440364(0x1a6)][_0x440364(0x1d2)]():'';if(_0x49b1fe)return _0x49b1fe;const _0x92d8b4=_0x5314cd&&typeof _0x5314cd[_0x440364(0x1b9)+_0x440364(0x1a6)]===_0x440364(0x1b2)?extname(_0x5314cd[_0x440364(0x1b9)+_0x440364(0x1a6)][_0x440364(0x1d2)]()):'';return join(_0x374379,_0x440364(0x1a7),_0x158a8d,_0x440364(0x1d5),''+_0x2e140c+(_0x92d8b4||_0x440364(0x1d3)));}function cloneForkedSessionExtraFields(_0xa39c0c){const _0x3571fa=_0x30ffed;if(!_0xa39c0c)return{};const _0x51780f={};for(const [_0x53a7f0,_0x1cf908]of Object[_0x3571fa(0x1ad)](_0xa39c0c)){if(CLONED_AGENT_SESSION_EXCLUDED_FIELDS['has'](_0x53a7f0))continue;_0x51780f[_0x53a7f0]=_0x1cf908;}return _0x51780f;}async function copySessionFileIfNeeded(_0x453e0f,_0x471937){const _0x5f580c=_0x30ffed;if(!_0x453e0f||!_0x471937)return;const _0x403317=typeof _0x453e0f[_0x5f580c(0x1b9)+_0x5f580c(0x1a6)]===_0x5f580c(0x1b2)?_0x453e0f[_0x5f580c(0x1b9)+_0x5f580c(0x1a6)][_0x5f580c(0x1d2)]():'',_0x4beba1=String(_0x471937||'')[_0x5f580c(0x1d2)]();if(!_0x403317||!_0x4beba1||_0x403317===_0x4beba1)return;if(!existsSync(_0x403317))return;await mkdir(dirname(_0x4beba1),{'recursive':!![]}),await copyFile(_0x403317,_0x4beba1);}function extractMessageEntryText(_0x127f44){const _0x3191b1=_0x30ffed,_0x235931=asRecord(_0x127f44['message']),_0x2dd855=_0x235931[_0x3191b1(0x1bc)];if(typeof _0x2dd855==='string')return _0x2dd855;if(!Array[_0x3191b1(0x1b3)](_0x2dd855))return'';return _0x2dd855[_0x3191b1(0x1ce)](_0x275b66=>{const _0x48cd8d=_0x3191b1,_0xc17b90=asRecord(_0x275b66);return _0xc17b90['type']===_0x48cd8d(0x1c0)&&typeof _0xc17b90['text']==='string'?_0xc17b90[_0x48cd8d(0x1c0)]:'';})['filter'](Boolean)['join']('\x0a');}function extractMessageEntryRole(_0x94cb6b){const _0x309647=_0x30ffed,_0x33a78e=asRecord(_0x94cb6b[_0x309647(0x1d1)]);if(typeof _0x33a78e[_0x309647(0x1cc)]===_0x309647(0x1b2))return _0x33a78e[_0x309647(0x1cc)];if(typeof _0x94cb6b['role']===_0x309647(0x1b2))return _0x94cb6b[_0x309647(0x1cc)];return'';}function parseJsonLine(_0x4ea526){const _0x4d218b=_0x30ffed;try{const _0x4fb29b=JSON[_0x4d218b(0x1cd)](_0x4ea526);return asRecord(_0x4fb29b);}catch{return null;}}function entryTimestampMs(_0x1b1a89){const _0x20b725=_0x30ffed,_0x424416=_0x1b1a89[_0x20b725(0x1bf)+'p'];if(typeof _0x424416===_0x20b725(0x1b2)){const _0x4dd0a3=Date[_0x20b725(0x1cd)](_0x424416);return Number['isFinite'](_0x4dd0a3)?_0x4dd0a3:null;}if(typeof _0x424416===_0x20b725(0x1b1)&&Number[_0x20b725(0x1b5)](_0x424416))return _0x424416;return null;}async function trimSessionFileForFork(_0x5852e8,_0x2f6eb9){const _0x1bd4ce=_0x30ffed;if(!_0x5852e8||!existsSync(_0x5852e8))return;const {keepUntilTs:_0x3e2e16,cutoffRole:_0x8b75a0,cutoffText:_0x292ea1}=_0x2f6eb9,_0x4e90ec=typeof _0x3e2e16==='number'&&Number[_0x1bd4ce(0x1b5)](_0x3e2e16),_0x484401=typeof _0x292ea1===_0x1bd4ce(0x1b2)?_0x292ea1[_0x1bd4ce(0x1d2)]():'',_0x322c3e=_0x8b75a0===_0x1bd4ce(0x1ca)?'assistan'+'t':_0x8b75a0===_0x1bd4ce(0x1af)?_0x1bd4ce(0x1af):'',_0x386732=Boolean(_0x322c3e&&_0x484401);if(!_0x4e90ec&&!_0x386732)return;let _0x30a302='';try{_0x30a302=await readFile(_0x5852e8,_0x1bd4ce(0x1c4));}catch{return;}const _0x326167=_0x30a302[_0x1bd4ce(0x1b6)]('\x0a');let _0x55ec42=-0x1;const _0x2b3bae=_0x4e90ec?_0x3e2e16+0xa*0x3c*0x3e8:Number[_0x1bd4ce(0x1ac)+_0x1bd4ce(0x1bd)+'Y'];if(_0x386732)for(let _0x25979a=0x0;_0x25979a<_0x326167[_0x1bd4ce(0x1be)];_0x25979a+=0x1){const _0x1e8241=_0x326167[_0x25979a]['trim']();if(!_0x1e8241)continue;const _0x462edc=parseJsonLine(_0x1e8241);if(!_0x462edc||_0x462edc[_0x1bd4ce(0x1a4)]!=='message')continue;if(extractMessageEntryRole(_0x462edc)!==_0x322c3e)continue;const _0x2313ba=extractMessageEntryText(_0x462edc)[_0x1bd4ce(0x1d2)]();if(!_0x2313ba||!_0x2313ba[_0x1bd4ce(0x1b7)](_0x484401))continue;const _0x37bac8=entryTimestampMs(_0x462edc);if(_0x37bac8!==null&&_0x37bac8>_0x2b3bae)continue;_0x55ec42=_0x25979a;}let _0x58019d=[];if(_0x55ec42>=0x0)_0x58019d=_0x326167[_0x1bd4ce(0x1a8)](0x0,_0x55ec42+0x1);else{if(_0x4e90ec)for(const _0x3f1364 of _0x326167){const _0x3e007e=_0x3f1364[_0x1bd4ce(0x1d2)]();if(!_0x3e007e)continue;const _0x5b9d39=parseJsonLine(_0x3e007e);if(!_0x5b9d39){_0x58019d[_0x1bd4ce(0x1a3)](_0x3f1364);continue;}if(_0x5b9d39[_0x1bd4ce(0x1a4)]===_0x1bd4ce(0x1c3)){_0x58019d['push'](_0x3f1364);continue;}const _0x517a9b=entryTimestampMs(_0x5b9d39);if(_0x517a9b===null||_0x517a9b<=_0x3e2e16)_0x58019d['push'](_0x3f1364);}}while(_0x58019d[_0x1bd4ce(0x1be)]>0x0&&_0x58019d[_0x58019d[_0x1bd4ce(0x1be)]-0x1][_0x1bd4ce(0x1d2)]()==='')_0x58019d[_0x1bd4ce(0x1ae)]();await writeFile(_0x5852e8,_0x58019d['join']('\x0a')+'\x0a',_0x1bd4ce(0x1c4));}export function createAgentSessionsMapStore({stateDir:_0x5e12fe}){const _0x4b20a0=createSessionSqliteStore({'stateDir':_0x5e12fe});async function _0x22b172(_0x1ae1ad={}){const _0x514580=_0x4c41,_0x3dea84=String(_0x1ae1ad[_0x514580(0x1a9)]||'main');return await _0x4b20a0[_0x514580(0x1d6)+_0x514580(0x1bb)](_0x3dea84);}async function _0x381d09(_0x3b3f20={}){const _0x5a0f9e=_0x4c41,_0x10ea1a=String(_0x3b3f20['sessionK'+'ey']||'')[_0x5a0f9e(0x1d2)](),_0x388e7f=String(_0x3b3f20[_0x5a0f9e(0x1c9)+'d']||'')['trim']();if(!_0x10ea1a)throw new Error(_0x5a0f9e(0x1b8)+_0x5a0f9e(0x1c1)+_0x5a0f9e(0x1aa));if(!_0x388e7f)throw new Error(_0x5a0f9e(0x1c9)+_0x5a0f9e(0x1c8)+'uired');const _0x3b73c2=extractAgentIdFromSessionKey(_0x10ea1a),_0x26c788=asRecord(await _0x4b20a0['readSess'+_0x5a0f9e(0x19d)](_0x10ea1a)),_0x1c43ef=String(_0x3b3f20[_0x5a0f9e(0x1b0)+_0x5a0f9e(0x1a2)]||'')[_0x5a0f9e(0x1d2)](),_0xcb77a5=_0x1c43ef?extractAgentIdFromSessionKey(_0x1c43ef):_0x3b73c2,_0x3a30ea=_0x1c43ef?asRecord(await _0x4b20a0['readSess'+'ionEntry'](_0x1c43ef)):null,_0x18bfbd=_0x3a30ea&&Object[_0x5a0f9e(0x1cb)](_0x3a30ea)[_0x5a0f9e(0x1be)]>0x0,_0x4d917c=resolveNewSessionFilePath(_0x5e12fe,_0x26c788,_0x18bfbd?_0x3a30ea:null,_0x388e7f,_0x3b73c2),_0x59626d=typeof _0x3b3f20[_0x5a0f9e(0x1a0)+'lTs']===_0x5a0f9e(0x1b1)&&Number[_0x5a0f9e(0x1b5)](_0x3b3f20[_0x5a0f9e(0x1a0)+_0x5a0f9e(0x1cf)])?_0x3b3f20[_0x5a0f9e(0x1a0)+_0x5a0f9e(0x1cf)]:null,_0x7a8b9a=typeof _0x3b3f20[_0x5a0f9e(0x1ab)+'le']==='string'?_0x3b3f20[_0x5a0f9e(0x1ab)+'le']:null,_0x27af5=typeof _0x3b3f20[_0x5a0f9e(0x1c7)+'xt']==='string'?_0x3b3f20[_0x5a0f9e(0x1c7)+'xt']:null,_0x5959a1={..._0x26c788,...cloneForkedSessionExtraFields(_0x18bfbd?_0x3a30ea:null),'agentId':_0x3b73c2,'sessionKey':_0x10ea1a,'sessionId':_0x388e7f,'sessionFile':_0x4d917c,..._0x18bfbd?{'forkedFromParent':!![]}:{}};return await copySessionFileIfNeeded(_0x18bfbd?_0x3a30ea:null,_0x4d917c),_0x18bfbd&&(_0x59626d!==null||_0x7a8b9a&&_0x27af5)&&await trimSessionFileForFork(_0x4d917c,{'keepUntilTs':_0x59626d,'cutoffRole':_0x7a8b9a,'cutoffText':_0x27af5}),await _0x4b20a0[_0x5a0f9e(0x1d0)+'ssionEnt'+'ry']({'agentId':_0x3b73c2,'sessionKey':_0x10ea1a,'entry':_0x5959a1}),await _0x4b20a0[_0x5a0f9e(0x1d6)+_0x5a0f9e(0x1bb)](_0x3b73c2);}return{'get':_0x22b172,'upsert':_0x381d09};}
@@ -1 +1 @@
1
- (function(_0x3e39ae,_0x274866){const _0xeab4a9=_0xbe32,_0x57d1e4=_0x3e39ae();while(!![]){try{const _0x4fcebd=-parseInt(_0xeab4a9(0x1f5))/0x1+parseInt(_0xeab4a9(0x1e9))/0x2+parseInt(_0xeab4a9(0x1e2))/0x3*(parseInt(_0xeab4a9(0x1f0))/0x4)+parseInt(_0xeab4a9(0x1ec))/0x5*(parseInt(_0xeab4a9(0x1fd))/0x6)+-parseInt(_0xeab4a9(0x1f1))/0x7*(parseInt(_0xeab4a9(0x1e3))/0x8)+-parseInt(_0xeab4a9(0x1fc))/0x9+parseInt(_0xeab4a9(0x1fb))/0xa;if(_0x4fcebd===_0x274866)break;else _0x57d1e4['push'](_0x57d1e4['shift']());}catch(_0x206248){_0x57d1e4['push'](_0x57d1e4['shift']());}}}(_0xf1f5,0xa5488));import{join}from'node:path';import{createSessionSqliteStore}from'./session-sqlite-store.mjs';function _0xf1f5(){const _0x22ad01=['41398zvYhDT','indexOf','slice','sionStor','832522Gciouk','tch','readStor','sessions','values','storePat','3004500loMcgK','1675125NNUWjb','6bCorLg','ssionSto','clone','split','15cbZVXf','320Fzmlza','map','stringif','get','ionStore','set','1188742fuNOwL','lite','writeSes','4467955tNVyUI','saveSess','updateSe','/agents/','115036SrTjZI'];_0xf1f5=function(){return _0x22ad01;};return _0xf1f5();}const BRIDGE_STORE_CACHE=new Map();function resolveStateDirFromStorePath(_0x42897b){const _0x4c3ef6=_0xbe32,_0x18cf0d=String(_0x42897b||'')['replaceA'+'ll']('\x5c','/'),_0x3653ce=_0x4c3ef6(0x1ef),_0x17d0ba=_0x18cf0d[_0x4c3ef6(0x1f2)](_0x3653ce);if(_0x17d0ba<0x0){const _0x4c294e=_0x18cf0d[_0x4c3ef6(0x1e1)]('/session'+'s/')[0x0];return _0x4c294e||_0x18cf0d;}return _0x18cf0d[_0x4c3ef6(0x1f3)](0x0,_0x17d0ba);}function createBridgeStore(_0x1358e7){const _0x415a7c=_0xbe32,_0x3b0db6=resolveStateDirFromStorePath(_0x1358e7),_0x590c07=join(_0x3b0db6,_0x415a7c(0x1f8),'index.sq'+_0x415a7c(0x1ea)),_0xf3a33c=_0x3b0db6+'::'+_0x590c07,_0x4cb373=BRIDGE_STORE_CACHE[_0x415a7c(0x1e6)](_0xf3a33c);if(_0x4cb373)return _0x4cb373;const _0x338c13=createSessionSqliteStore({'stateDir':_0x3b0db6,'dbPath':_0x590c07});return BRIDGE_STORE_CACHE[_0x415a7c(0x1e8)](_0xf3a33c,_0x338c13),_0x338c13;}function _0xbe32(_0xe5970a,_0x1e6616){_0xe5970a=_0xe5970a-0x1e0;const _0xf1f5fc=_0xf1f5();let _0xbe3278=_0xf1f5fc[_0xe5970a];return _0xbe3278;}function cloneStoreObject(_0x2e869e){const _0x5de55a=_0xbe32;return JSON['parse'](JSON[_0x5de55a(0x1e5)+'y'](_0x2e869e||{}));}export function loadSessionStore(_0x46bd46,_0x204bcb={}){const _0x3f97a3=_0xbe32,_0x28648b=createBridgeStore(_0x46bd46),_0x4f1d1d=_0x28648b[_0x3f97a3(0x1f7)+'eByPathS'+'ync'](_0x46bd46);return _0x204bcb[_0x3f97a3(0x1e0)]===![]?_0x4f1d1d:cloneStoreObject(_0x4f1d1d);}export async function saveSessionStore(_0x3fd220,_0x407349){const _0x174c7b=_0xbe32,_0x258a56=createBridgeStore(_0x3fd220);return await _0x258a56[_0x174c7b(0x1ed)+_0x174c7b(0x1e7)](_0x3fd220,_0x407349);}export async function updateSessionStore(_0x33226e,_0x5c4b7f,_0xfd4689){const _0x359c8b=_0xbe32,_0x134972=createBridgeStore(_0x33226e);return await _0x134972[_0x359c8b(0x1ee)+_0x359c8b(0x1fe)+'re'](_0x33226e,_0x5c4b7f,_0xfd4689);}export async function updateSessionStoreEntry(_0x6c3d94){const _0x267da5=_0xbe32,_0x2f5757=createBridgeStore(_0x6c3d94[_0x267da5(0x1fa)+'h']);return await _0x2f5757[_0x267da5(0x1ee)+_0x267da5(0x1fe)+'reEntry'](_0x6c3d94);}export async function applySessionStoreEntryPatch(_0x5b76e5){const _0x1bc2db=_0xbe32,_0xeccc86=createBridgeStore(_0x5b76e5['storePat'+'h']);return await _0xeccc86['applySes'+_0x1bc2db(0x1f4)+'eEntryPa'+_0x1bc2db(0x1f6)](_0x5b76e5);}export async function writeSessionStoreAtomic(_0x3811a1){const _0x367b67=_0xbe32,_0x475ef8=createBridgeStore(_0x3811a1[_0x367b67(0x1fa)+'h']);return await _0x475ef8[_0x367b67(0x1eb)+_0x367b67(0x1f4)+'eAtomic'](_0x3811a1);}export async function closeBridgeStores(){const _0x425023=_0xbe32,_0x56136a=[...BRIDGE_STORE_CACHE[_0x425023(0x1f9)]()];BRIDGE_STORE_CACHE['clear'](),await Promise['all'](_0x56136a[_0x425023(0x1e4)](_0x2b5df5=>_0x2b5df5['close']()));}
1
+ (function(_0x41fdae,_0x1c23d7){const _0x3c5c62=_0x137f,_0xb1571c=_0x41fdae();while(!![]){try{const _0x3757cc=-parseInt(_0x3c5c62(0x10f))/0x1*(-parseInt(_0x3c5c62(0xfa))/0x2)+-parseInt(_0x3c5c62(0x10d))/0x3*(-parseInt(_0x3c5c62(0xf7))/0x4)+parseInt(_0x3c5c62(0x107))/0x5+parseInt(_0x3c5c62(0x104))/0x6+parseInt(_0x3c5c62(0x119))/0x7+parseInt(_0x3c5c62(0x112))/0x8+parseInt(_0x3c5c62(0x110))/0x9*(-parseInt(_0x3c5c62(0x113))/0xa);if(_0x3757cc===_0x1c23d7)break;else _0xb1571c['push'](_0xb1571c['shift']());}catch(_0x31445b){_0xb1571c['push'](_0xb1571c['shift']());}}}(_0x22f1,0x81046));import{join}from'node:path';import{createSessionSqliteStore}from'./session-sqlite-store.mjs';const BRIDGE_STORE_CACHE=new Map();function resolveStateDirFromStorePath(_0x4e1d42){const _0x568944=_0x137f,_0x784615=String(_0x4e1d42||'')['replaceA'+'ll']('\x5c','/'),_0x4cbf3f=_0x568944(0x116),_0x1cb74d=_0x784615['indexOf'](_0x4cbf3f);if(_0x1cb74d<0x0){const _0x2cc310=_0x784615[_0x568944(0x100)](_0x568944(0xff)+'s/')[0x0];return _0x2cc310||_0x784615;}return _0x784615[_0x568944(0xfc)](0x0,_0x1cb74d);}function createBridgeStore(_0xdc9eb7){const _0x221d42=_0x137f,_0x4b2bee=resolveStateDirFromStorePath(_0xdc9eb7),_0x5d07f9=join(_0x4b2bee,_0x221d42(0x10c),_0x221d42(0xfb)+_0x221d42(0xfe)),_0x5cc576=_0x4b2bee+'::'+_0x5d07f9,_0x5bf206=BRIDGE_STORE_CACHE['get'](_0x5cc576);if(_0x5bf206)return _0x5bf206;const _0x34b80e=createSessionSqliteStore({'stateDir':_0x4b2bee,'dbPath':_0x5d07f9});return BRIDGE_STORE_CACHE[_0x221d42(0xf8)](_0x5cc576,_0x34b80e),_0x34b80e;}function cloneStoreObject(_0x3bea8){const _0x9bc5c2=_0x137f;return JSON[_0x9bc5c2(0x115)](JSON[_0x9bc5c2(0x108)+'y'](_0x3bea8||{}));}function _0x137f(_0x133a20,_0x4f4b0d){_0x133a20=_0x133a20-0xf7;const _0x22f11e=_0x22f1();let _0x137f76=_0x22f11e[_0x133a20];return _0x137f76;}export function loadSessionStore(_0x2d8593,_0x5531ce={}){const _0x15a06a=_0x137f,_0x4b89aa=createBridgeStore(_0x2d8593),_0x27861e=_0x4b89aa['readStor'+_0x15a06a(0x102)+'ync'](_0x2d8593);return _0x5531ce[_0x15a06a(0x10a)]===![]?_0x27861e:cloneStoreObject(_0x27861e);}export async function saveSessionStore(_0x2f50c6,_0x1c2864){const _0x579a7e=_0x137f,_0x1e61d1=createBridgeStore(_0x2f50c6);return await _0x1e61d1[_0x579a7e(0x105)+_0x579a7e(0x103)](_0x2f50c6,_0x1c2864);}export async function updateSessionStore(_0x29dd75,_0x23a261,_0x3e2eb4){const _0x45d7d0=_0x137f,_0x21cbb4=createBridgeStore(_0x29dd75);return await _0x21cbb4[_0x45d7d0(0xfd)+_0x45d7d0(0x101)+'re'](_0x29dd75,_0x23a261,_0x3e2eb4);}export async function updateSessionStoreEntry(_0x281621){const _0x21335f=_0x137f,_0x595660=createBridgeStore(_0x281621[_0x21335f(0x111)+'h']);return await _0x595660[_0x21335f(0xfd)+'ssionSto'+_0x21335f(0xf9)](_0x281621);}export async function applySessionStoreEntryPatch(_0x64c6c2){const _0x56caaa=_0x137f,_0x5af585=createBridgeStore(_0x64c6c2[_0x56caaa(0x111)+'h']);return await _0x5af585[_0x56caaa(0x118)+_0x56caaa(0x10b)+_0x56caaa(0x109)+'tch'](_0x64c6c2);}export async function writeSessionStoreAtomic(_0x3bc4f0){const _0x52153a=_0x137f,_0xef01e8=createBridgeStore(_0x3bc4f0[_0x52153a(0x111)+'h']);return await _0xef01e8['writeSes'+_0x52153a(0x10b)+_0x52153a(0x106)](_0x3bc4f0);}export async function closeBridgeStores(){const _0x3516ff=_0x137f,_0x4de4b0=[...BRIDGE_STORE_CACHE[_0x3516ff(0x10e)]()];BRIDGE_STORE_CACHE[_0x3516ff(0x114)](),await Promise['all'](_0x4de4b0['map'](_0x5e4855=>_0x5e4855[_0x3516ff(0x117)]()));}function _0x22f1(){const _0x5c5b7f=['parse','/agents/','close','applySes','2137786kjNmpv','4mMLQyp','set','reEntry','46dMsgIt','index.sq','slice','updateSe','lite','/session','split','ssionSto','eByPathS','ionStore','5754438zpZSmY','saveSess','eAtomic','2517015cqURMB','stringif','eEntryPa','clone','sionStor','sessions','455268bVBMxN','values','24662JyCARh','21864393tVSBjk','storePat','3767800OgaCXM','10NqdYSX','clear'];_0x22f1=function(){return _0x5c5b7f;};return _0x22f1();}