@wujie-shell/core 4.0.0 → 4.0.2

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 _0x178e(_0x4432f8,_0x261f23){_0x4432f8=_0x4432f8-0x79;const _0x20a201=_0x20a2();let _0x178e7b=_0x20a201[_0x4432f8];return _0x178e7b;}(function(_0x25ad5c,_0x2530ab){const _0x3b1fda=_0x178e,_0x3cacd6=_0x25ad5c();while(!![]){try{const _0x391a4c=parseInt(_0x3b1fda(0xa6))/0x1+parseInt(_0x3b1fda(0xbd))/0x2*(parseInt(_0x3b1fda(0xb6))/0x3)+parseInt(_0x3b1fda(0x79))/0x4+parseInt(_0x3b1fda(0x7f))/0x5*(-parseInt(_0x3b1fda(0x80))/0x6)+parseInt(_0x3b1fda(0xce))/0x7+-parseInt(_0x3b1fda(0xcf))/0x8+-parseInt(_0x3b1fda(0xa4))/0x9;if(_0x391a4c===_0x2530ab)break;else _0x3cacd6['push'](_0x3cacd6['shift']());}catch(_0x422294){_0x3cacd6['push'](_0x3cacd6['shift']());}}}(_0x20a2,0x5287e));export function patchMixedToolContentFromSource(_0x181684){const _0x544f53=_0x178e,_0x22275f=_0x544f53(0xaf)+_0x544f53(0xd0)+_0x544f53(0xa3)+_0x544f53(0x90)+_0x544f53(0xc6)+_0x544f53(0x82)+'t',_0x13502a=_0x181684['indexOf'](_0x22275f);if(_0x13502a===-0x1)return{'patched':![],'reason':_0x544f53(0xb0)+'d'};let _0x14e9f9=0x0,_0x2f9a51=![],_0xd717b=_0x13502a;for(let _0x20d644=_0x13502a;_0x20d644<_0x181684['length'];_0x20d644+=0x1){_0x181684[_0x20d644]==='{'&&(_0x14e9f9+=0x1,_0x2f9a51=!![]);_0x181684[_0x20d644]==='}'&&(_0x14e9f9-=0x1);if(_0x2f9a51&&_0x14e9f9===0x0){_0xd717b=_0x20d644+0x1;break;}}const _0x228d69=_0x181684[_0x544f53(0x9f)+'g'](_0x13502a,_0xd717b);if(_0x228d69['includes']('projecte'+'d.push(b'+_0x544f53(0x86)))return{'patched':![],'reason':_0x544f53(0x9c)+_0x544f53(0xb1)};const _0x309c14='function'+_0x544f53(0xd0)+_0x544f53(0xa3)+_0x544f53(0x90)+_0x544f53(0xc6)+_0x544f53(0x82)+_0x544f53(0xbb)+'t,\x20maxCh'+_0x544f53(0xa1)+_0x544f53(0xa7)+'tent.som'+_0x544f53(0xc8)+_0x544f53(0x8f)+_0x544f53(0xbc)+_0x544f53(0xa0)+_0x544f53(0xa2)+_0x544f53(0xd2)+_0x544f53(0xc4)+_0x544f53(0xcc)+_0x544f53(0x84)+_0x544f53(0xad)+'\x20isToolH'+'istoryBl'+_0x544f53(0x87)+_0x544f53(0x97)+_0x544f53(0x92)+')\x20return'+_0x544f53(0xab)+_0x544f53(0x7e)+_0x544f53(0xcd)+_0x544f53(0xca)+'nst\x20proj'+'ected\x20=\x20'+'[];\x0a\x09for'+_0x544f53(0xb5)+_0x544f53(0xc0)+_0x544f53(0x83)+_0x544f53(0xc9)+_0x544f53(0xc3)+_0x544f53(0xb9)+_0x544f53(0xcb)+_0x544f53(0xae)+_0x544f53(0x7d)+_0x544f53(0xc7)+'ected.pu'+_0x544f53(0xb7)+_0x544f53(0x95)+'ntinue;\x0a'+'\x09\x09}\x0a\x09\x09co'+_0x544f53(0x93)+'y\x20=\x20bloc'+_0x544f53(0x88)+_0x544f53(0xa5)+_0x544f53(0x81)+_0x544f53(0x96)+_0x544f53(0xc5)+_0x544f53(0xaa)+'ext\x20===\x20'+_0x544f53(0xc2)+_0x544f53(0x99)+_0x544f53(0xb2)+_0x544f53(0xc1)+_0x544f53(0x7b)+'ext\x20=\x20tr'+_0x544f53(0xd1)+_0x544f53(0x9d)+_0x544f53(0x91)+_0x544f53(0xac)+'eChatHis'+'toryText'+'(stripIn'+_0x544f53(0x7a)+_0x544f53(0x8b)+_0x544f53(0xa9)+_0x544f53(0xb8)+_0x544f53(0x8d)+_0x544f53(0x8c)+'xChars);'+_0x544f53(0xc7)+_0x544f53(0x9a)+_0x544f53(0xa8)+_0x544f53(0xbe)+_0x544f53(0x85)+_0x544f53(0x9b)+_0x544f53(0xac)+_0x544f53(0x98)+_0x544f53(0x94)+_0x544f53(0xb4)+_0x544f53(0x9e)+_0x544f53(0x8a)+_0x544f53(0xb3)+_0x544f53(0x89)+_0x544f53(0xbf)+_0x544f53(0x7c)+'xt\x20?\x20{\x0a\x09'+_0x544f53(0x8e)+':\x20projec'+'ted,\x0a\x09\x09c'+'hanged:\x20'+'true\x0a\x09}\x20'+':\x20null;\x0a'+'}';return{'patched':!![],'source':_0x181684[_0x544f53(0xba)](_0x228d69,_0x309c14)};}function _0x20a2(){const _0x56436d=['mMixedTo','\x0a\x09\x09\x09proj','e((block',')\x20{\x0a\x09\x09if','lse;\x0a\x09co','of\x20block',')\x20return','ext\x20=\x20fa','2238733EWmVeh','1542016PxtBUe','\x20project','ue;\x0a\x09\x09\x09c','ock\x20!==\x20','1991068lUtgBm','lineDire','\x0a\x09\x09\x09hasT','rn\x20hasTe','ject\x22)\x20{','let\x20hasT','35amjJhk','124842xkbWGH','ype\x20===\x20','olConten','\x20content','\x20false;\x0a','text\x22,\x0a\x09','lock)','ockType(','k;\x0a\x09\x09if\x20','k);\x0a\x09\x09}\x0a','jected.p','ctiveTag','text,\x20ma','y.text).','\x09content',')\x20=>\x20{\x0a\x09','tTextFro','ncated\x20=','pe);\x0a\x09})','nst\x20entr','\x09\x09\x09});\x0a\x09',');\x0a\x09\x09\x09co','\x22text\x22\x20&','block.ty','ed.text\x0a','\x20&&\x20entr','ected.pu','\x09\x09\x09text:','already-','onst\x20tru','{\x0a\x09\x09\x09pro','substrin','ock\x20||\x20t','ars)\x20{\x0a\x09','ypeof\x20bl','Assistan','6717339LqkJTS','(entry.t','384376qTnQCY','if\x20(!con','sh({\x0a\x09\x09\x09','sForDisp','\x20entry.t','\x20null;\x0a\x09','\x20truncat','\x09\x09return','\x20!==\x20\x22ob','function','not-foun','patched','y.text.t','ush(bloc','\x09}\x20else\x20','\x20(const\x20','34872HOqzQh','sh(block','lay(entr','\x20||\x20type','replace','t(conten','\x09if\x20(!bl','38zBphWV','\x09type:\x20\x22','\x09}\x0a\x09retu','block\x20of','rim())\x20{','\x22string\x22','\x20(!block','\x22object\x22','&\x20typeof'];_0x20a2=function(){return _0x56436d;};return _0x20a2();}
@@ -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(_0x278bab,_0x2c7109){const _0xca025d=_0x16b1,_0x460141=_0x278bab();while(!![]){try{const _0x57545f=parseInt(_0xca025d(0xf8))/0x1*(-parseInt(_0xca025d(0xd6))/0x2)+parseInt(_0xca025d(0xed))/0x3*(-parseInt(_0xca025d(0xdd))/0x4)+parseInt(_0xca025d(0xe1))/0x5+-parseInt(_0xca025d(0xe6))/0x6*(parseInt(_0xca025d(0x101))/0x7)+-parseInt(_0xca025d(0xee))/0x8+parseInt(_0xca025d(0xec))/0x9*(-parseInt(_0xca025d(0xe0))/0xa)+-parseInt(_0xca025d(0x102))/0xb*(-parseInt(_0xca025d(0xf9))/0xc);if(_0x57545f===_0x2c7109)break;else _0x460141['push'](_0x460141['shift']());}catch(_0x5c7ee2){_0x460141['push'](_0x460141['shift']());}}}(_0xb134,0x392be));function createBridgeImport(_0x54e0d1){const _0x3e1618=_0x16b1;return'import\x20*'+_0x3e1618(0xd2)+'eSession'+_0x3e1618(0xf2)+'rom\x20\x22'+_0x54e0d1+'\x22;';}function ensureBridgeImport(_0x5b2e35,_0x27dbd8){const _0x50346b=_0x16b1,_0x4aafa0=createBridgeImport(_0x27dbd8);if(_0x5b2e35[_0x50346b(0xf0)](_0x4aafa0))return _0x5b2e35;const _0x4643a6=_0x5b2e35[_0x50346b(0xcf)](/^import .*;$/m);if(!_0x4643a6)return _0x4aafa0+'\x0a'+_0x5b2e35;return _0x5b2e35[_0x50346b(0xf3)](_0x4643a6[0x0],_0x4643a6[0x0]+'\x0a'+_0x4aafa0);}function findFunctionBodyStart(_0x72a35f,_0x6d2680){const _0x58e324=_0x16b1,_0x5c9ba7=_0x72a35f['indexOf']('(',_0x6d2680);if(_0x5c9ba7===-0x1)return-0x1;let _0x37850c=0x0,_0x545df3=null,_0x26ce5a=![];for(let _0x4b8f11=_0x5c9ba7;_0x4b8f11<_0x72a35f[_0x58e324(0xf7)];_0x4b8f11+=0x1){const _0x45599d=_0x72a35f[_0x4b8f11];if(_0x545df3){if(_0x26ce5a){_0x26ce5a=![];continue;}if(_0x45599d==='\x5c'){_0x26ce5a=!![];continue;}if(_0x45599d===_0x545df3)_0x545df3=null;continue;}if(_0x45599d==='\x22'||_0x45599d==='\x27'||_0x45599d==='`'){_0x545df3=_0x45599d;continue;}if(_0x45599d==='('){_0x37850c+=0x1;continue;}if(_0x45599d===')'){_0x37850c-=0x1;continue;}if(_0x45599d==='{'&&_0x37850c===0x0)return _0x4b8f11;}return-0x1;}function findMatchingBlockEnd(_0x5ee3c6,_0x4d3460){const _0xa403ce=_0x16b1;let _0x237d91=0x0,_0x5f0545=null,_0x42ec3f=![];for(let _0x522804=_0x4d3460;_0x522804<_0x5ee3c6[_0xa403ce(0xf7)];_0x522804+=0x1){const _0x341fef=_0x5ee3c6[_0x522804];if(_0x5f0545){if(_0x42ec3f){_0x42ec3f=![];continue;}if(_0x341fef==='\x5c'){_0x42ec3f=!![];continue;}if(_0x341fef===_0x5f0545)_0x5f0545=null;continue;}if(_0x341fef==='\x22'||_0x341fef==='\x27'||_0x341fef==='`'){_0x5f0545=_0x341fef;continue;}if(_0x341fef==='{')_0x237d91+=0x1;if(_0x341fef==='}')_0x237d91-=0x1;if(_0x237d91===0x0)return _0x522804+0x1;}return-0x1;}function findNextNonWhitespace(_0x1b6bb8,_0x29914d){const _0x1ae6e2=_0x16b1;for(let _0x3075b4=_0x29914d;_0x3075b4<_0x1b6bb8['length'];_0x3075b4+=0x1){if(!/\s/[_0x1ae6e2(0xcc)](_0x1b6bb8[_0x3075b4]))return _0x3075b4;}return-0x1;}function repairMalformedAlreadyPatchedFunction(_0xe4b87e,_0x3f70d3){const _0x11c8f2=_0x16b1,_0x27b235=_0xe4b87e[_0x11c8f2(0xe2)](_0x3f70d3);if(_0x27b235===-0x1)return{'patched':![],'reason':'not-foun'+'d'};const _0x5b7acd=findFunctionBodyStart(_0xe4b87e,_0x27b235);if(_0x5b7acd===-0x1)return{'patched':![],'reason':_0x11c8f2(0xda)+'-found'};const _0x2504f9=findMatchingBlockEnd(_0xe4b87e,_0x5b7acd);if(_0x2504f9===-0x1)return{'patched':![],'reason':_0x11c8f2(0xdf)+_0x11c8f2(0xe9)+'nd'};const _0x25b002=findNextNonWhitespace(_0xe4b87e,_0x2504f9);if(_0xe4b87e[_0x25b002]!==')')return{'patched':![],'reason':_0x11c8f2(0xd1)+_0x11c8f2(0xef)};const _0x5171c9=findNextNonWhitespace(_0xe4b87e,_0x25b002+0x1);if(_0xe4b87e[_0x5171c9]!=='{')return{'patched':![],'reason':'already-'+_0x11c8f2(0xef)};const _0x4ed5ec=findMatchingBlockEnd(_0xe4b87e,_0x5171c9);if(_0x4ed5ec===-0x1)return{'patched':![],'reason':_0x11c8f2(0xdf)+_0x11c8f2(0xe9)+'nd'};return{'patched':!![],'source':_0xe4b87e[_0x11c8f2(0xd5)](0x0,_0x2504f9)+_0xe4b87e[_0x11c8f2(0xd5)](_0x4ed5ec)};}function replaceFunctionBody(_0x445321,_0x22bd32,_0x1bfded){const _0x5870aa=_0x16b1,_0x48ca61=_0x445321[_0x5870aa(0xe2)](_0x22bd32);if(_0x48ca61===-0x1)return{'patched':![],'reason':_0x5870aa(0xd3)+'d'};const _0x47fe00=findFunctionBodyStart(_0x445321,_0x48ca61);if(_0x47fe00===-0x1)return{'patched':![],'reason':_0x5870aa(0xda)+'-found'};const _0x50f58a=findMatchingBlockEnd(_0x445321,_0x47fe00);if(_0x50f58a===-0x1)return{'patched':![],'reason':'body-end'+_0x5870aa(0xe9)+'nd'};const _0x54d793=_0x22bd32+'\x20'+_0x1bfded;return{'patched':!![],'source':_0x445321[_0x5870aa(0xd5)](0x0,_0x48ca61)+_0x54d793+_0x445321[_0x5870aa(0xd5)](_0x50f58a)};}function _0x16b1(_0xe135ab,_0x418967){_0xe135ab=_0xe135ab-0xcc;const _0xb13471=_0xb134();let _0x16b1b5=_0xb13471[_0xe135ab];return _0x16b1b5;}function _0xb134(){const _0x5cc0bf=['arams)','ath,\x20opt','e(storeP','toreAtom','function','3256841pPvkMj','3616701hFMxlF','test','ge.write','ic(param','match','t-provid','already-','\x20as\x20wuji','not-foun','Atomic(p','slice','6ldqYev','nction\x20w','Store(st','portPath','body-not','orePath,','bridge-i','92uNNrdP','idge.loa','body-end','745410dUMCZx','1719305UiQRRX','indexOf','{\x0a\x09retur','wujieSes','ore','6ydSIUJ','sionBrid','mport-no','-not-fou','async\x20fu','bridgeIm','9EzIzrA','9003gXEGCk','1265136STFkrv','patched','includes','s\x20=\x20{})','Bridge\x20f','replace','n\x20wujieS','sionStor','n\x20await\x20','length','109697ArmBQg','36ysXqUJ','s);\x0a}','SessionS'];_0xb134=function(){return _0x5cc0bf;};return _0xb134();}export function patchSessionStoreLoadFromSource(_0x4bed1e,_0x32ec88={}){const _0x16ec97=_0x16b1,_0x1766fc=_0x32ec88[_0x16ec97(0xeb)+_0x16ec97(0xd9)];if(!_0x1766fc)return{'patched':![],'reason':_0x16ec97(0xdc)+_0x16ec97(0xe8)+_0x16ec97(0xd0)+'ed'};if(_0x4bed1e['includes'](_0x16ec97(0xe4)+_0x16ec97(0xe7)+'ge.loadS'+'essionSt'+_0x16ec97(0xe5)))return repairMalformedAlreadyPatchedFunction(_0x4bed1e,_0x16ec97(0x100)+'\x20loadSes'+_0x16ec97(0xf5)+_0x16ec97(0xfe)+'ath,\x20opt'+'s\x20=\x20{})');const _0x62fa2d=replaceFunctionBody(ensureBridgeImport(_0x4bed1e,_0x1766fc),_0x16ec97(0x100)+'\x20loadSes'+_0x16ec97(0xf5)+_0x16ec97(0xfe)+_0x16ec97(0xfd)+_0x16ec97(0xf1),_0x16ec97(0xe3)+_0x16ec97(0xf4)+'essionBr'+_0x16ec97(0xde)+'dSession'+_0x16ec97(0xd8)+_0x16ec97(0xdb)+'\x20opts);\x0a'+'}');return _0x62fa2d;}export function patchSessionStoreWriteFromSource(_0xf61b74,_0xc61baf={}){const _0x559e4a=_0x16b1,_0x21c557=_0xc61baf['bridgeIm'+_0x559e4a(0xd9)];if(!_0x21c557)return{'patched':![],'reason':_0x559e4a(0xdc)+_0x559e4a(0xe8)+_0x559e4a(0xd0)+'ed'};const _0x4ca55d=replaceFunctionBody(ensureBridgeImport(_0xf61b74,_0x21c557),_0x559e4a(0xea)+_0x559e4a(0xd7)+'riteSess'+'ionStore'+_0x559e4a(0xd4)+_0x559e4a(0xfc),'{\x0a\x09retur'+_0x559e4a(0xf6)+_0x559e4a(0xe4)+_0x559e4a(0xe7)+_0x559e4a(0xcd)+_0x559e4a(0xfb)+_0x559e4a(0xff)+_0x559e4a(0xce)+_0x559e4a(0xfa));if(!_0x4ca55d['patched'])return _0x4ca55d;return _0x4ca55d;}
@@ -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(_0x3de0b0,_0x234248){const _0x48e471=_0x52ed,_0x395031=_0x3de0b0();while(!![]){try{const _0x4cae63=parseInt(_0x48e471(0x1e4))/0x1+parseInt(_0x48e471(0x1e8))/0x2*(parseInt(_0x48e471(0x1e7))/0x3)+-parseInt(_0x48e471(0x1de))/0x4*(-parseInt(_0x48e471(0x1e3))/0x5)+parseInt(_0x48e471(0x1f2))/0x6+-parseInt(_0x48e471(0x1ec))/0x7*(-parseInt(_0x48e471(0x1f4))/0x8)+-parseInt(_0x48e471(0x1f0))/0x9*(-parseInt(_0x48e471(0x1df))/0xa)+-parseInt(_0x48e471(0x1e5))/0xb;if(_0x4cae63===_0x234248)break;else _0x395031['push'](_0x395031['shift']());}catch(_0x1eadb1){_0x395031['push'](_0x395031['shift']());}}}(_0x596e,0x7504c));import{asRecord,asStringArray,dedupeStrings,getTrimmedString}from'../common/utils.mjs';export function syncRuntimeManifestPlugins(_0x1a0bb7,_0x563b25,_0x53f080={}){const _0x8b89ad=_0x52ed,_0x31ac95=new Set(_0x53f080[_0x8b89ad(0x1ed)+_0x8b89ad(0x1f6)+'tPluginI'+'ds']??[]),_0x3b3e52=asRecord(_0x53f080[_0x8b89ad(0x1f7)+_0x8b89ad(0x1e6)+'yPluginI'+'d']),_0x35400a={...asRecord(_0x1a0bb7)},_0x4bd3fe={...asRecord(_0x35400a['entries'])},_0x179f32={...asRecord(_0x35400a[_0x8b89ad(0x1f3)])};let _0xddb012=asStringArray(_0x35400a[_0x8b89ad(0x1eb)]),_0x3e6648=![];for(const _0x5cf5ea of _0x563b25??[]){const _0x58db54=getTrimmedString(_0x5cf5ea[_0x8b89ad(0x1f1)]);if(!_0x58db54)continue;const _0x201b6e=asStringArray(_0x3b3e52[_0x58db54]);for(const _0xd54050 of _0x201b6e){_0xd54050 in _0x4bd3fe&&(_0x4bd3fe[_0x58db54]={...asRecord(_0x4bd3fe[_0x58db54]),...asRecord(_0x4bd3fe[_0xd54050])},delete _0x4bd3fe[_0xd54050],_0x3e6648=!![]);}if(_0x201b6e['length']>0x0){const _0xe32334=_0xddb012[_0x8b89ad(0x1e2)](_0x480bb9=>!_0x201b6e['includes'](_0x480bb9));_0xe32334[_0x8b89ad(0x1e0)]!==_0xddb012[_0x8b89ad(0x1e0)]&&(_0xddb012=_0xe32334,_0x3e6648=!![]);}!(_0x58db54 in _0x4bd3fe)&&(_0x4bd3fe[_0x58db54]={'enabled':!_0x31ac95[_0x8b89ad(0x1ea)](_0x58db54)},_0x3e6648=!![]);if(asRecord(_0x4bd3fe[_0x58db54])[_0x8b89ad(0x1ef)]!==![]){const _0x3f9a27=dedupeStrings([..._0xddb012,_0x58db54]);_0x3f9a27[_0x8b89ad(0x1e0)]!==_0xddb012['length']&&(_0xddb012=_0x3f9a27,_0x3e6648=!![]);}getTrimmedString(_0x5cf5ea[_0x8b89ad(0x1e1)])===_0x8b89ad(0x1ee)&&_0x58db54 in _0x179f32&&(delete _0x179f32[_0x58db54],_0x3e6648=!![]);}_0x35400a[_0x8b89ad(0x1f5)]=_0x4bd3fe,_0x35400a[_0x8b89ad(0x1eb)]=_0xddb012;if(Object[_0x8b89ad(0x1e9)](_0x179f32)[_0x8b89ad(0x1e0)]>0x0)_0x35400a['installs']=_0x179f32;else delete _0x35400a[_0x8b89ad(0x1f3)];return{'plugins':_0x35400a,'changed':_0x3e6648};}function _0x52ed(_0x541ccf,_0x81ae8b){_0x541ccf=_0x541ccf-0x1de;const _0x596eee=_0x596e();let _0x52ed46=_0x596eee[_0x541ccf];return _0x52ed46;}function _0x596e(){const _0x136abc=['2546bQwaKh','keys','has','allow','394324DcDRMU','disabled','local','enabled','1251lenOXR','pluginId','357060UVyTsJ','installs','16SJpXSu','entries','ByDefaul','legacyPl','4geheCB','4670gjzqhL','length','source','filter','2511390FoLOkH','686600BeXJAf','16028430BBQTMR','uginIdsB','1203SqKmtp'];_0x596e=function(){return _0x136abc;};return _0x596e();}
@@ -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
+ const _0x3c7291=_0x564e;(function(_0x5d2373,_0x3bc101){const _0x881ba8=_0x564e,_0x34345e=_0x5d2373();while(!![]){try{const _0x119b8c=-parseInt(_0x881ba8(0x8f))/0x1*(-parseInt(_0x881ba8(0x72))/0x2)+-parseInt(_0x881ba8(0x6b))/0x3*(parseInt(_0x881ba8(0x7f))/0x4)+-parseInt(_0x881ba8(0x66))/0x5+-parseInt(_0x881ba8(0x9d))/0x6*(parseInt(_0x881ba8(0x74))/0x7)+-parseInt(_0x881ba8(0x88))/0x8+parseInt(_0x881ba8(0x97))/0x9*(parseInt(_0x881ba8(0xa2))/0xa)+-parseInt(_0x881ba8(0x8b))/0xb*(-parseInt(_0x881ba8(0x7e))/0xc);if(_0x119b8c===_0x3bc101)break;else _0x34345e['push'](_0x34345e['shift']());}catch(_0x3aece4){_0x34345e['push'](_0x34345e['shift']());}}}(_0x23e3,0x492a5));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([_0x3c7291(0x69)+'ey',_0x3c7291(0x87)+'d',_0x3c7291(0x85),_0x3c7291(0x73)+_0x3c7291(0x9a)]);function extractAgentIdFromSessionKey(_0xfb6915){const _0x24e7ab=_0x3c7291,_0x405951=String(_0xfb6915||'')[_0x24e7ab(0x8d)](':'),_0x7c80d2=_0x405951[0x1]?.[_0x24e7ab(0x6e)]();return _0x7c80d2||_0x24e7ab(0x89);}function _0x23e3(){const _0x22accf=['entries','onsMap','label','user','sessionI','445848FpgsCP','main','assistan','1320CUCfqY','has','split','POSITIVE','1841XJWlNX','includes','.jsonl','role','sessions','text','_INFINIT','slice','479835hqKeSO','isArray','agents','ile','map','d\x20is\x20req','102aMkwZt','session','pop','parse','upsertSe','60HxDGWN','lTs','ey\x20is\x20re','2532225AiRHdp','ionEntry','sourceSe','sessionK','keys','92772xJAQUa','cutoffTe','message','trim','push','getSessi','cutoffRo','202pCeRzS','sessionF','58814SprJwR','content','keepUnti','agent','ssionEnt','number','readSess','ssionKey','type','join','62256pDIgTv','16gXjzCb','isFinite','length','string'];_0x23e3=function(){return _0x22accf;};return _0x23e3();}function resolveNewSessionFilePath(_0xcac24e,_0x1d1d58,_0xdfe1a8,_0x7f8cf4,_0x35e20a){const _0xc3899f=_0x3c7291,_0x5747ff=typeof _0x1d1d58['sessionF'+_0xc3899f(0x9a)]==='string'?_0x1d1d58[_0xc3899f(0x73)+_0xc3899f(0x9a)]['trim']():'';if(_0x5747ff)return _0x5747ff;const _0x4a58c2=_0xdfe1a8&&typeof _0xdfe1a8[_0xc3899f(0x73)+_0xc3899f(0x9a)]===_0xc3899f(0x82)?extname(_0xdfe1a8[_0xc3899f(0x73)+_0xc3899f(0x9a)][_0xc3899f(0x6e)]()):'';return join(_0xcac24e,_0xc3899f(0x99),_0x35e20a,_0xc3899f(0x93),''+_0x7f8cf4+(_0x4a58c2||_0xc3899f(0x91)));}function cloneForkedSessionExtraFields(_0x39b204){const _0x557d75=_0x3c7291;if(!_0x39b204)return{};const _0x451825={};for(const [_0x297538,_0x400086]of Object[_0x557d75(0x83)](_0x39b204)){if(CLONED_AGENT_SESSION_EXCLUDED_FIELDS[_0x557d75(0x8c)](_0x297538))continue;_0x451825[_0x297538]=_0x400086;}return _0x451825;}async function copySessionFileIfNeeded(_0x1b97cc,_0x1b6b3f){const _0x31e142=_0x3c7291;if(!_0x1b97cc||!_0x1b6b3f)return;const _0x1b96aa=typeof _0x1b97cc[_0x31e142(0x73)+_0x31e142(0x9a)]===_0x31e142(0x82)?_0x1b97cc[_0x31e142(0x73)+_0x31e142(0x9a)][_0x31e142(0x6e)]():'',_0x2fad6f=String(_0x1b6b3f||'')[_0x31e142(0x6e)]();if(!_0x1b96aa||!_0x2fad6f||_0x1b96aa===_0x2fad6f)return;if(!existsSync(_0x1b96aa))return;await mkdir(dirname(_0x2fad6f),{'recursive':!![]}),await copyFile(_0x1b96aa,_0x2fad6f);}function extractMessageEntryText(_0x4230b3){const _0x25a266=_0x3c7291,_0x23fcba=asRecord(_0x4230b3[_0x25a266(0x6d)]),_0x11a147=_0x23fcba[_0x25a266(0x75)];if(typeof _0x11a147===_0x25a266(0x82))return _0x11a147;if(!Array[_0x25a266(0x98)](_0x11a147))return'';return _0x11a147[_0x25a266(0x9b)](_0x1c1c74=>{const _0x462249=_0x25a266,_0x4a81ef=asRecord(_0x1c1c74);return _0x4a81ef[_0x462249(0x7c)]==='text'&&typeof _0x4a81ef[_0x462249(0x94)]===_0x462249(0x82)?_0x4a81ef[_0x462249(0x94)]:'';})['filter'](Boolean)[_0x25a266(0x7d)]('\x0a');}function extractMessageEntryRole(_0xaa98fb){const _0x2c32be=_0x3c7291,_0x3ca7d7=asRecord(_0xaa98fb[_0x2c32be(0x6d)]);if(typeof _0x3ca7d7['role']===_0x2c32be(0x82))return _0x3ca7d7[_0x2c32be(0x92)];if(typeof _0xaa98fb[_0x2c32be(0x92)]==='string')return _0xaa98fb[_0x2c32be(0x92)];return'';}function parseJsonLine(_0x57a251){const _0x2dbe95=_0x3c7291;try{const _0x21c96d=JSON[_0x2dbe95(0xa0)](_0x57a251);return asRecord(_0x21c96d);}catch{return null;}}function entryTimestampMs(_0x5066ce){const _0x30d4ad=_0x3c7291,_0x193358=_0x5066ce['timestam'+'p'];if(typeof _0x193358===_0x30d4ad(0x82)){const _0x25110f=Date[_0x30d4ad(0xa0)](_0x193358);return Number['isFinite'](_0x25110f)?_0x25110f:null;}if(typeof _0x193358===_0x30d4ad(0x79)&&Number[_0x30d4ad(0x80)](_0x193358))return _0x193358;return null;}function _0x564e(_0x73b90d,_0x100c28){_0x73b90d=_0x73b90d-0x64;const _0x23e3c3=_0x23e3();let _0x564eed=_0x23e3c3[_0x73b90d];return _0x564eed;}async function trimSessionFileForFork(_0x4512fa,_0x53cb63){const _0x2a388e=_0x3c7291;if(!_0x4512fa||!existsSync(_0x4512fa))return;const {keepUntilTs:_0x41b39a,cutoffRole:_0x415811,cutoffText:_0x4fa425}=_0x53cb63,_0x6a2895=typeof _0x41b39a===_0x2a388e(0x79)&&Number[_0x2a388e(0x80)](_0x41b39a),_0x30b837=typeof _0x4fa425===_0x2a388e(0x82)?_0x4fa425[_0x2a388e(0x6e)]():'',_0x14e6a2=_0x415811===_0x2a388e(0x77)?_0x2a388e(0x8a)+'t':_0x415811===_0x2a388e(0x86)?_0x2a388e(0x86):'',_0x136730=Boolean(_0x14e6a2&&_0x30b837);if(!_0x6a2895&&!_0x136730)return;let _0x16e36b='';try{_0x16e36b=await readFile(_0x4512fa,'utf8');}catch{return;}const _0x2607d7=_0x16e36b[_0x2a388e(0x8d)]('\x0a');let _0x3b9852=-0x1;const _0x36553f=_0x6a2895?_0x41b39a+0xa*0x3c*0x3e8:Number[_0x2a388e(0x8e)+_0x2a388e(0x95)+'Y'];if(_0x136730)for(let _0x593877=0x0;_0x593877<_0x2607d7[_0x2a388e(0x81)];_0x593877+=0x1){const _0x32070c=_0x2607d7[_0x593877][_0x2a388e(0x6e)]();if(!_0x32070c)continue;const _0x50044b=parseJsonLine(_0x32070c);if(!_0x50044b||_0x50044b[_0x2a388e(0x7c)]!=='message')continue;if(extractMessageEntryRole(_0x50044b)!==_0x14e6a2)continue;const _0xd0c118=extractMessageEntryText(_0x50044b)[_0x2a388e(0x6e)]();if(!_0xd0c118||!_0xd0c118[_0x2a388e(0x90)](_0x30b837))continue;const _0x59a223=entryTimestampMs(_0x50044b);if(_0x59a223!==null&&_0x59a223>_0x36553f)continue;_0x3b9852=_0x593877;}let _0x4f5925=[];if(_0x3b9852>=0x0)_0x4f5925=_0x2607d7[_0x2a388e(0x96)](0x0,_0x3b9852+0x1);else{if(_0x6a2895)for(const _0xd3259 of _0x2607d7){const _0x4dde2e=_0xd3259[_0x2a388e(0x6e)]();if(!_0x4dde2e)continue;const _0x6513f0=parseJsonLine(_0x4dde2e);if(!_0x6513f0){_0x4f5925['push'](_0xd3259);continue;}if(_0x6513f0['type']===_0x2a388e(0x9e)){_0x4f5925[_0x2a388e(0x6f)](_0xd3259);continue;}const _0x497893=entryTimestampMs(_0x6513f0);if(_0x497893===null||_0x497893<=_0x41b39a)_0x4f5925[_0x2a388e(0x6f)](_0xd3259);}}while(_0x4f5925[_0x2a388e(0x81)]>0x0&&_0x4f5925[_0x4f5925[_0x2a388e(0x81)]-0x1]['trim']()==='')_0x4f5925[_0x2a388e(0x9f)]();await writeFile(_0x4512fa,_0x4f5925[_0x2a388e(0x7d)]('\x0a')+'\x0a','utf8');}export function createAgentSessionsMapStore({stateDir:_0xb55c6e}){const _0x555839=createSessionSqliteStore({'stateDir':_0xb55c6e});async function _0x1bbfab(_0x3bed30={}){const _0x3b4979=_0x564e,_0x23bcd1=String(_0x3bed30['agentId']||'main');return await _0x555839[_0x3b4979(0x70)+'onsMap'](_0x23bcd1);}async function _0x4dfc5c(_0x5644f5={}){const _0x20b5e8=_0x564e,_0x29abb8=String(_0x5644f5[_0x20b5e8(0x69)+'ey']||'')[_0x20b5e8(0x6e)](),_0x3b958b=String(_0x5644f5[_0x20b5e8(0x87)+'d']||'')['trim']();if(!_0x29abb8)throw new Error('sessionK'+_0x20b5e8(0x65)+'quired');if(!_0x3b958b)throw new Error(_0x20b5e8(0x87)+_0x20b5e8(0x9c)+'uired');const _0xe68deb=extractAgentIdFromSessionKey(_0x29abb8),_0x463d02=asRecord(await _0x555839[_0x20b5e8(0x7a)+_0x20b5e8(0x67)](_0x29abb8)),_0x5a634d=String(_0x5644f5[_0x20b5e8(0x68)+_0x20b5e8(0x7b)]||'')[_0x20b5e8(0x6e)](),_0x194a03=_0x5a634d?extractAgentIdFromSessionKey(_0x5a634d):_0xe68deb,_0x5ac581=_0x5a634d?asRecord(await _0x555839[_0x20b5e8(0x7a)+_0x20b5e8(0x67)](_0x5a634d)):null,_0x2955a6=_0x5ac581&&Object[_0x20b5e8(0x6a)](_0x5ac581)[_0x20b5e8(0x81)]>0x0,_0x35cccb=resolveNewSessionFilePath(_0xb55c6e,_0x463d02,_0x2955a6?_0x5ac581:null,_0x3b958b,_0xe68deb),_0x188ccd=typeof _0x5644f5['keepUnti'+_0x20b5e8(0x64)]==='number'&&Number['isFinite'](_0x5644f5[_0x20b5e8(0x76)+_0x20b5e8(0x64)])?_0x5644f5[_0x20b5e8(0x76)+'lTs']:null,_0x4205a1=typeof _0x5644f5[_0x20b5e8(0x71)+'le']==='string'?_0x5644f5[_0x20b5e8(0x71)+'le']:null,_0x4af0c2=typeof _0x5644f5[_0x20b5e8(0x6c)+'xt']==='string'?_0x5644f5[_0x20b5e8(0x6c)+'xt']:null,_0x15a0b9={..._0x463d02,...cloneForkedSessionExtraFields(_0x2955a6?_0x5ac581:null),'agentId':_0xe68deb,'sessionKey':_0x29abb8,'sessionId':_0x3b958b,'sessionFile':_0x35cccb,..._0x2955a6?{'forkedFromParent':!![]}:{}};return await copySessionFileIfNeeded(_0x2955a6?_0x5ac581:null,_0x35cccb),_0x2955a6&&(_0x188ccd!==null||_0x4205a1&&_0x4af0c2)&&await trimSessionFileForFork(_0x35cccb,{'keepUntilTs':_0x188ccd,'cutoffRole':_0x4205a1,'cutoffText':_0x4af0c2}),await _0x555839[_0x20b5e8(0xa1)+_0x20b5e8(0x78)+'ry']({'agentId':_0xe68deb,'sessionKey':_0x29abb8,'entry':_0x15a0b9}),await _0x555839[_0x20b5e8(0x70)+_0x20b5e8(0x84)](_0xe68deb);}return{'get':_0x1bbfab,'upsert':_0x4dfc5c};}
@@ -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(_0x517852,_0x11f72e){const _0x4398dd=_0x1dd9,_0x41773e=_0x517852();while(!![]){try{const _0xf03447=parseInt(_0x4398dd(0xe6))/0x1+parseInt(_0x4398dd(0xe4))/0x2*(-parseInt(_0x4398dd(0xe2))/0x3)+-parseInt(_0x4398dd(0xc6))/0x4*(-parseInt(_0x4398dd(0xdd))/0x5)+parseInt(_0x4398dd(0xe9))/0x6+parseInt(_0x4398dd(0xda))/0x7*(-parseInt(_0x4398dd(0xe5))/0x8)+-parseInt(_0x4398dd(0xd4))/0x9+parseInt(_0x4398dd(0xca))/0xa*(-parseInt(_0x4398dd(0xcb))/0xb);if(_0xf03447===_0x11f72e)break;else _0x41773e['push'](_0x41773e['shift']());}catch(_0x1ea16d){_0x41773e['push'](_0x41773e['shift']());}}}(_0x3a35,0x23787));import{join}from'node:path';import{createSessionSqliteStore}from'./session-sqlite-store.mjs';const BRIDGE_STORE_CACHE=new Map();function _0x1dd9(_0x457962,_0x2c401b){_0x457962=_0x457962-0xc6;const _0x3a35f4=_0x3a35();let _0x1dd906=_0x3a35f4[_0x457962];return _0x1dd906;}function resolveStateDirFromStorePath(_0x2faa24){const _0x5eeb56=_0x1dd9,_0x30d073=String(_0x2faa24||'')[_0x5eeb56(0xc9)+'ll']('\x5c','/'),_0x201dda='/agents/',_0xe9b2dd=_0x30d073[_0x5eeb56(0xd9)](_0x201dda);if(_0xe9b2dd<0x0){const _0xce899a=_0x30d073[_0x5eeb56(0xd7)](_0x5eeb56(0xdc)+'s/')[0x0];return _0xce899a||_0x30d073;}return _0x30d073[_0x5eeb56(0xdf)](0x0,_0xe9b2dd);}function createBridgeStore(_0x7aa0f0){const _0x5c8216=_0x1dd9,_0x1661a8=resolveStateDirFromStorePath(_0x7aa0f0),_0x522729=join(_0x1661a8,_0x5c8216(0xcd),_0x5c8216(0xeb)+_0x5c8216(0xe7)),_0x217d87=_0x1661a8+'::'+_0x522729,_0x57fd82=BRIDGE_STORE_CACHE[_0x5c8216(0xd3)](_0x217d87);if(_0x57fd82)return _0x57fd82;const _0x56225e=createSessionSqliteStore({'stateDir':_0x1661a8,'dbPath':_0x522729});return BRIDGE_STORE_CACHE[_0x5c8216(0xcc)](_0x217d87,_0x56225e),_0x56225e;}function cloneStoreObject(_0x2abc97){return JSON['parse'](JSON['stringif'+'y'](_0x2abc97||{}));}export function loadSessionStore(_0x3040fa,_0xf1e652={}){const _0x62bca9=_0x1dd9,_0x596ec6=createBridgeStore(_0x3040fa),_0x5bf61f=_0x596ec6[_0x62bca9(0xd2)+_0x62bca9(0xe1)+'ync'](_0x3040fa);return _0xf1e652[_0x62bca9(0xd6)]===![]?_0x5bf61f:cloneStoreObject(_0x5bf61f);}function _0x3a35(){const _0x9e0f69=['266209JGNKGx','lite','reEntry','1425414HwRbNB','storePat','index.sq','8GxYkHt','ionStore','all','replaceA','2415230uRHUTR','11HsApFA','set','sessions','writeSes','ssionSto','applySes','eAtomic','readStor','get','837675dZwPdm','updateSe','clone','split','sionStor','indexOf','924jVLgWw','map','/session','235990ZDcAwl','tch','slice','clear','eByPathS','15ugZpNz','close','47210SoyMbB','16ZqjRmy'];_0x3a35=function(){return _0x9e0f69;};return _0x3a35();}export async function saveSessionStore(_0x1cb122,_0x5704c7){const _0x519639=_0x1dd9,_0x229268=createBridgeStore(_0x1cb122);return await _0x229268['saveSess'+_0x519639(0xc7)](_0x1cb122,_0x5704c7);}export async function updateSessionStore(_0x43541e,_0x4088ed,_0x2104ba){const _0x52a0f3=_0x1dd9,_0x2c22a3=createBridgeStore(_0x43541e);return await _0x2c22a3['updateSe'+_0x52a0f3(0xcf)+'re'](_0x43541e,_0x4088ed,_0x2104ba);}export async function updateSessionStoreEntry(_0x214907){const _0x5a69f9=_0x1dd9,_0x15edc5=createBridgeStore(_0x214907[_0x5a69f9(0xea)+'h']);return await _0x15edc5[_0x5a69f9(0xd5)+'ssionSto'+_0x5a69f9(0xe8)](_0x214907);}export async function applySessionStoreEntryPatch(_0x13ca71){const _0x4302b2=_0x1dd9,_0x181489=createBridgeStore(_0x13ca71[_0x4302b2(0xea)+'h']);return await _0x181489[_0x4302b2(0xd0)+_0x4302b2(0xd8)+'eEntryPa'+_0x4302b2(0xde)](_0x13ca71);}export async function writeSessionStoreAtomic(_0x42bf79){const _0x4513ba=_0x1dd9,_0x7ce20a=createBridgeStore(_0x42bf79[_0x4513ba(0xea)+'h']);return await _0x7ce20a[_0x4513ba(0xce)+_0x4513ba(0xd8)+_0x4513ba(0xd1)](_0x42bf79);}export async function closeBridgeStores(){const _0x5a53a4=_0x1dd9,_0x548ef3=[...BRIDGE_STORE_CACHE['values']()];BRIDGE_STORE_CACHE[_0x5a53a4(0xe0)](),await Promise[_0x5a53a4(0xc8)](_0x548ef3[_0x5a53a4(0xdb)](_0x3daabb=>_0x3daabb[_0x5a53a4(0xe3)]()));}