@wujie-shell/core 4.0.1 → 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(_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
+ 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(_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
+ (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 _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
+ (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
- 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
+ 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(_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();}
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)]()));}