@wujie-shell/core 3.0.1 → 4.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
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 -0
  41. package/package.json +4 -3
@@ -1 +1 @@
1
- (function(_0x8bff16,_0x4e5674){const _0x94dcf9=_0x3b0f,_0x4fe073=_0x8bff16();while(!![]){try{const _0x20cad5=-parseInt(_0x94dcf9(0xdf))/0x1+parseInt(_0x94dcf9(0xde))/0x2*(parseInt(_0x94dcf9(0x94))/0x3)+-parseInt(_0x94dcf9(0xf1))/0x4+-parseInt(_0x94dcf9(0x9b))/0x5+parseInt(_0x94dcf9(0xda))/0x6*(parseInt(_0x94dcf9(0xaa))/0x7)+-parseInt(_0x94dcf9(0xc6))/0x8*(-parseInt(_0x94dcf9(0xcb))/0x9)+parseInt(_0x94dcf9(0xd0))/0xa*(parseInt(_0x94dcf9(0xc2))/0xb);if(_0x20cad5===_0x4e5674)break;else _0x4fe073['push'](_0x4fe073['shift']());}catch(_0x13249a){_0x4fe073['push'](_0x4fe073['shift']());}}}(_0x1cbb,0x9fa99));export function patchMixedToolContentFromSource(_0x18b1e1){const _0x2d4c51=_0x3b0f,_0x277c1c=_0x2d4c51(0xc0)+_0x2d4c51(0xe4)+_0x2d4c51(0x9a)+_0x2d4c51(0xd6)+_0x2d4c51(0xbb)+'olConten'+'t',_0x2c6efb=_0x18b1e1[_0x2d4c51(0xca)](_0x277c1c);if(_0x2c6efb===-0x1)return{'patched':![],'reason':_0x2d4c51(0xc4)+'d'};let _0x46383f=0x0,_0x295f19=![],_0x5ee8ba=_0x2c6efb;for(let _0x1f528e=_0x2c6efb;_0x1f528e<_0x18b1e1['length'];_0x1f528e+=0x1){_0x18b1e1[_0x1f528e]==='{'&&(_0x46383f+=0x1,_0x295f19=!![]);_0x18b1e1[_0x1f528e]==='}'&&(_0x46383f-=0x1);if(_0x295f19&&_0x46383f===0x0){_0x5ee8ba=_0x1f528e+0x1;break;}}const _0x4a0573=_0x18b1e1[_0x2d4c51(0x9e)+'g'](_0x2c6efb,_0x5ee8ba);if(_0x4a0573['includes'](_0x2d4c51(0xe8)+_0x2d4c51(0xbd)+_0x2d4c51(0xb3)))return{'patched':![],'reason':_0x2d4c51(0xb1)+_0x2d4c51(0xa7)};const _0x4e51cb=_0x2d4c51(0xc0)+_0x2d4c51(0xe4)+'Assistan'+_0x2d4c51(0xd6)+_0x2d4c51(0xbb)+'olConten'+_0x2d4c51(0xb6)+_0x2d4c51(0xce)+'ars)\x20{\x0a\x09'+_0x2d4c51(0xb5)+_0x2d4c51(0xd7)+_0x2d4c51(0x95)+_0x2d4c51(0xaf)+_0x2d4c51(0xb0)+_0x2d4c51(0xb2)+_0x2d4c51(0x97)+'ock\x20!==\x20'+'\x22object\x22'+_0x2d4c51(0x98)+_0x2d4c51(0xd2)+_0x2d4c51(0xa2)+'\x20isToolH'+_0x2d4c51(0xba)+_0x2d4c51(0xea)+_0x2d4c51(0xd1)+_0x2d4c51(0xab)+_0x2d4c51(0x98)+_0x2d4c51(0xe6)+'let\x20hasT'+_0x2d4c51(0xef)+'lse;\x0a\x09co'+_0x2d4c51(0x9c)+_0x2d4c51(0xac)+'[];\x0a\x09for'+_0x2d4c51(0xc8)+_0x2d4c51(0x90)+_0x2d4c51(0x96)+')\x20{\x0a\x09\x09if'+_0x2d4c51(0xf2)+_0x2d4c51(0xa8)+_0x2d4c51(0xec)+_0x2d4c51(0xb9)+_0x2d4c51(0xbc)+_0x2d4c51(0xd3)+'ected.pu'+_0x2d4c51(0xeb)+_0x2d4c51(0xd4)+_0x2d4c51(0xc7)+'\x09\x09}\x0a\x09\x09co'+_0x2d4c51(0x92)+'y\x20=\x20bloc'+_0x2d4c51(0xd8)+_0x2d4c51(0xe5)+_0x2d4c51(0xee)+'\x22text\x22\x20&'+_0x2d4c51(0xb7)+_0x2d4c51(0xcc)+_0x2d4c51(0x93)+_0x2d4c51(0xcd)+_0x2d4c51(0xdc)+_0x2d4c51(0xe0)+_0x2d4c51(0xc9)+_0x2d4c51(0x9d)+_0x2d4c51(0xd9)+_0x2d4c51(0xbe)+'onst\x20tru'+_0x2d4c51(0xb4)+_0x2d4c51(0xa0)+_0x2d4c51(0xdb)+_0x2d4c51(0xa9)+_0x2d4c51(0xc1)+_0x2d4c51(0xc5)+_0x2d4c51(0xe1)+_0x2d4c51(0xb8)+_0x2d4c51(0xa4)+_0x2d4c51(0xdd)+'text,\x20ma'+'xChars);'+_0x2d4c51(0xd3)+_0x2d4c51(0xad)+_0x2d4c51(0xf0)+_0x2d4c51(0xe9)+_0x2d4c51(0xa6)+_0x2d4c51(0xcf)+_0x2d4c51(0xa0)+'ed.text\x0a'+_0x2d4c51(0xed)+_0x2d4c51(0xe2)+_0x2d4c51(0xa1)+_0x2d4c51(0xbf)+_0x2d4c51(0x91)+_0x2d4c51(0x99)+_0x2d4c51(0xa3)+_0x2d4c51(0xa5)+'xt\x20?\x20{\x0a\x09'+_0x2d4c51(0xae)+_0x2d4c51(0xe7)+_0x2d4c51(0xd5)+_0x2d4c51(0xc3)+'true\x0a\x09}\x20'+_0x2d4c51(0x9f)+'}';return{'patched':!![],'source':_0x18b1e1[_0x2d4c51(0xe3)](_0x4a0573,_0x4e51cb)};}function _0x3b0f(_0x3ede07,_0x34b6bb){_0x3ede07=_0x3ede07-0x90;const _0x1cbbbf=_0x1cbb();let _0x3b0fbf=_0x1cbbbf[_0x3ede07];return _0x3b0fbf;}function _0x1cbb(){const _0x533077=['toryText','6608uvixOE','pe);\x0a\x09})','ected\x20=\x20','ected.pu','\x09content',')\x20=>\x20{\x0a\x09','\x09if\x20(!bl','already-','ock\x20||\x20t','lock)','ncated\x20=','if\x20(!con','t(conten','&\x20typeof','sForDisp','\x20!==\x20\x22ob','istoryBl','mMixedTo','ject\x22)\x20{','d.push(b','ue;\x0a\x09\x09\x09c','jected.p','function','(stripIn','869Pxjudr','hanged:\x20','not-foun','lineDire','296WqiaCl','ntinue;\x0a','\x20(const\x20','rim())\x20{','indexOf','46098ikpEYs','\x20entry.t','\x22string\x22','t,\x20maxCh','\x09\x09\x09text:','212230FkDklJ','block.ty','\x20false;\x0a','\x0a\x09\x09\x09proj',');\x0a\x09\x09\x09co','ted,\x0a\x09\x09c','tTextFro','tent.som','k;\x0a\x09\x09if\x20','ext\x20=\x20tr','4776eqiOvD','eChatHis','\x20&&\x20entr','y.text).','504eDjtjP','659899ZJAbKT','y.text.t','ctiveTag','\x09}\x20else\x20','replace','\x20project','(entry.t','\x20null;\x0a\x09',':\x20projec','projecte','\x09type:\x20\x22','ockType(','sh(block','of\x20block','\x09\x09\x09});\x0a\x09','ype\x20===\x20','ext\x20=\x20fa','sh({\x0a\x09\x09\x09','3180584nhWCeB','\x20(!block','block\x20of','ush(bloc','nst\x20entr','ext\x20===\x20','2283GetMiR','e((block','\x20content','ypeof\x20bl',')\x20return','k);\x0a\x09\x09}\x0a','Assistan','3501525EVAlZO','nst\x20proj','\x0a\x09\x09\x09hasT','substrin',':\x20null;\x0a','\x20truncat','{\x0a\x09\x09\x09pro','\x09\x09return','\x09}\x0a\x09retu','lay(entr','rn\x20hasTe','text\x22,\x0a\x09','patched','\x20||\x20type'];_0x1cbb=function(){return _0x533077;};return _0x1cbb();}
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 +1 @@
1
- (function(_0x3cfb52,_0x357844){const _0x32b960=_0x3c8e,_0x3e6ba6=_0x3cfb52();while(!![]){try{const _0x5e7dab=-parseInt(_0x32b960(0x1ad))/0x1+parseInt(_0x32b960(0x188))/0x2+-parseInt(_0x32b960(0x19b))/0x3+parseInt(_0x32b960(0x1aa))/0x4+parseInt(_0x32b960(0x18a))/0x5*(parseInt(_0x32b960(0x1af))/0x6)+-parseInt(_0x32b960(0x189))/0x7+parseInt(_0x32b960(0x1a7))/0x8;if(_0x5e7dab===_0x357844)break;else _0x3e6ba6['push'](_0x3e6ba6['shift']());}catch(_0x259f1a){_0x3e6ba6['push'](_0x3e6ba6['shift']());}}}(_0x5154,0x3b0cb));function createBridgeImport(_0x5035d7){const _0x3ccd86=_0x3c8e;return'import\x20*'+'\x20as\x20wuji'+_0x3ccd86(0x1b2)+_0x3ccd86(0x1a4)+'rom\x20\x22'+_0x5035d7+'\x22;';}function ensureBridgeImport(_0x7c78a6,_0x324e0e){const _0x1831ab=_0x3c8e,_0x3dae39=createBridgeImport(_0x324e0e);if(_0x7c78a6[_0x1831ab(0x1b7)](_0x3dae39))return _0x7c78a6;const _0x55f0f6=_0x7c78a6[_0x1831ab(0x196)](/^import .*;$/m);if(!_0x55f0f6)return _0x3dae39+'\x0a'+_0x7c78a6;return _0x7c78a6[_0x1831ab(0x1b1)](_0x55f0f6[0x0],_0x55f0f6[0x0]+'\x0a'+_0x3dae39);}function findFunctionBodyStart(_0x40e61b,_0x5c0d63){const _0x211c74=_0x3c8e,_0x5e503c=_0x40e61b[_0x211c74(0x1a2)]('(',_0x5c0d63);if(_0x5e503c===-0x1)return-0x1;let _0x5c6053=0x0,_0x5568c7=null,_0x4f5712=![];for(let _0x6d2b80=_0x5e503c;_0x6d2b80<_0x40e61b[_0x211c74(0x19a)];_0x6d2b80+=0x1){const _0x2baeea=_0x40e61b[_0x6d2b80];if(_0x5568c7){if(_0x4f5712){_0x4f5712=![];continue;}if(_0x2baeea==='\x5c'){_0x4f5712=!![];continue;}if(_0x2baeea===_0x5568c7)_0x5568c7=null;continue;}if(_0x2baeea==='\x22'||_0x2baeea==='\x27'||_0x2baeea==='`'){_0x5568c7=_0x2baeea;continue;}if(_0x2baeea==='('){_0x5c6053+=0x1;continue;}if(_0x2baeea===')'){_0x5c6053-=0x1;continue;}if(_0x2baeea==='{'&&_0x5c6053===0x0)return _0x6d2b80;}return-0x1;}function findMatchingBlockEnd(_0x11de57,_0x32734e){let _0x737dd4=0x0,_0x2d01e2=null,_0x5f0a1f=![];for(let _0x5e928e=_0x32734e;_0x5e928e<_0x11de57['length'];_0x5e928e+=0x1){const _0x557c9c=_0x11de57[_0x5e928e];if(_0x2d01e2){if(_0x5f0a1f){_0x5f0a1f=![];continue;}if(_0x557c9c==='\x5c'){_0x5f0a1f=!![];continue;}if(_0x557c9c===_0x2d01e2)_0x2d01e2=null;continue;}if(_0x557c9c==='\x22'||_0x557c9c==='\x27'||_0x557c9c==='`'){_0x2d01e2=_0x557c9c;continue;}if(_0x557c9c==='{')_0x737dd4+=0x1;if(_0x557c9c==='}')_0x737dd4-=0x1;if(_0x737dd4===0x0)return _0x5e928e+0x1;}return-0x1;}function findNextNonWhitespace(_0x22179e,_0x1d667e){const _0x51e685=_0x3c8e;for(let _0x453f34=_0x1d667e;_0x453f34<_0x22179e[_0x51e685(0x19a)];_0x453f34+=0x1){if(!/\s/['test'](_0x22179e[_0x453f34]))return _0x453f34;}return-0x1;}function _0x3c8e(_0x58b4de,_0x171d63){_0x58b4de=_0x58b4de-0x186;const _0x5154cf=_0x5154();let _0x3c8e07=_0x5154cf[_0x58b4de];return _0x3c8e07;}function repairMalformedAlreadyPatchedFunction(_0x3fa5e8,_0x1b1f5e){const _0x523277=_0x3c8e,_0x1473db=_0x3fa5e8[_0x523277(0x1a2)](_0x1b1f5e);if(_0x1473db===-0x1)return{'patched':![],'reason':_0x523277(0x1a5)+'d'};const _0x6aab4f=findFunctionBodyStart(_0x3fa5e8,_0x1473db);if(_0x6aab4f===-0x1)return{'patched':![],'reason':_0x523277(0x192)+_0x523277(0x19f)};const _0x47e598=findMatchingBlockEnd(_0x3fa5e8,_0x6aab4f);if(_0x47e598===-0x1)return{'patched':![],'reason':_0x523277(0x1ab)+'-not-fou'+'nd'};const _0x3fd02b=findNextNonWhitespace(_0x3fa5e8,_0x47e598);if(_0x3fa5e8[_0x3fd02b]!==')')return{'patched':![],'reason':_0x523277(0x191)+_0x523277(0x190)};const _0x4348c0=findNextNonWhitespace(_0x3fa5e8,_0x3fd02b+0x1);if(_0x3fa5e8[_0x4348c0]!=='{')return{'patched':![],'reason':'already-'+_0x523277(0x190)};const _0x1f9fc0=findMatchingBlockEnd(_0x3fa5e8,_0x4348c0);if(_0x1f9fc0===-0x1)return{'patched':![],'reason':'body-end'+_0x523277(0x18c)+'nd'};return{'patched':!![],'source':_0x3fa5e8['slice'](0x0,_0x47e598)+_0x3fa5e8['slice'](_0x1f9fc0)};}function replaceFunctionBody(_0x5087b1,_0x35c43f,_0xaffe01){const _0x533410=_0x3c8e,_0x2834f7=_0x5087b1[_0x533410(0x1a2)](_0x35c43f);if(_0x2834f7===-0x1)return{'patched':![],'reason':'not-foun'+'d'};const _0x2be95e=findFunctionBodyStart(_0x5087b1,_0x2834f7);if(_0x2be95e===-0x1)return{'patched':![],'reason':_0x533410(0x192)+'-found'};const _0x19aa0f=findMatchingBlockEnd(_0x5087b1,_0x2be95e);if(_0x19aa0f===-0x1)return{'patched':![],'reason':_0x533410(0x1ab)+_0x533410(0x18c)+'nd'};const _0x46262d=_0x35c43f+'\x20'+_0xaffe01;return{'patched':!![],'source':_0x5087b1[_0x533410(0x1b4)](0x0,_0x2834f7)+_0x46262d+_0x5087b1[_0x533410(0x1b4)](_0x19aa0f)};}export function patchSessionStoreLoadFromSource(_0x4e34a0,_0x1392c6={}){const _0xa25cf3=_0x3c8e,_0xaab031=_0x1392c6[_0xa25cf3(0x197)+_0xa25cf3(0x19c)];if(!_0xaab031)return{'patched':![],'reason':_0xa25cf3(0x1ae)+_0xa25cf3(0x18e)+_0xa25cf3(0x18d)+'ed'};if(_0x4e34a0[_0xa25cf3(0x1b7)](_0xa25cf3(0x195)+'sionBrid'+_0xa25cf3(0x1a3)+_0xa25cf3(0x198)+_0xa25cf3(0x187)))return repairMalformedAlreadyPatchedFunction(_0x4e34a0,_0xa25cf3(0x186)+'\x20loadSes'+_0xa25cf3(0x1b6)+_0xa25cf3(0x1a8)+_0xa25cf3(0x1a1)+_0xa25cf3(0x1b5));const _0x26fd84=replaceFunctionBody(ensureBridgeImport(_0x4e34a0,_0xaab031),'function'+_0xa25cf3(0x18f)+_0xa25cf3(0x1b6)+_0xa25cf3(0x1a8)+_0xa25cf3(0x1a1)+'s\x20=\x20{})',_0xa25cf3(0x1b9)+'n\x20wujieS'+_0xa25cf3(0x1a9)+_0xa25cf3(0x193)+'dSession'+'Store(st'+'orePath,'+'\x20opts);\x0a'+'}');return _0x26fd84;}function _0x5154(){const _0x2429be=['ge.loadS','Bridge\x20f','not-foun','arams)','3321144fCNrAA','e(storeP','essionBr','1799056dGTNrZ','body-end','ionStore','256657RNwyCG','bridge-i','76200aJqyLG','Atomic(p','replace','eSession','sionBrid','slice','s\x20=\x20{})','sionStor','includes','async\x20fu','{\x0a\x09retur','function','ore','879452NVcQBX','2890867wGWRzI','25nDUgPG','ic(param','-not-fou','t-provid','mport-no','\x20loadSes','patched','already-','body-not','idge.loa','n\x20await\x20','wujieSes','match','bridgeIm','essionSt','riteSess','length','1369884XjkcYJ','portPath','toreAtom','s);\x0a}','-found','ge.write','ath,\x20opt','indexOf'];_0x5154=function(){return _0x2429be;};return _0x5154();}export function patchSessionStoreWriteFromSource(_0x3c9d8b,_0x4c3935={}){const _0x2b4b13=_0x3c8e,_0x2bfd72=_0x4c3935[_0x2b4b13(0x197)+_0x2b4b13(0x19c)];if(!_0x2bfd72)return{'patched':![],'reason':_0x2b4b13(0x1ae)+_0x2b4b13(0x18e)+'t-provid'+'ed'};const _0x960ed0=replaceFunctionBody(ensureBridgeImport(_0x3c9d8b,_0x2bfd72),_0x2b4b13(0x1b8)+'nction\x20w'+_0x2b4b13(0x199)+_0x2b4b13(0x1ac)+_0x2b4b13(0x1b0)+_0x2b4b13(0x1a6),_0x2b4b13(0x1b9)+_0x2b4b13(0x194)+_0x2b4b13(0x195)+_0x2b4b13(0x1b3)+_0x2b4b13(0x1a0)+'SessionS'+_0x2b4b13(0x19d)+_0x2b4b13(0x18b)+_0x2b4b13(0x19e));if(!_0x960ed0[_0x2b4b13(0x190)])return _0x960ed0;return _0x960ed0;}
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 +1 @@
1
- (function(_0x43b7ed,_0x50e9b7){const _0x32564a=_0x449e,_0xd84f46=_0x43b7ed();while(!![]){try{const _0x5d8ede=-parseInt(_0x32564a(0xd4))/0x1*(parseInt(_0x32564a(0xde))/0x2)+-parseInt(_0x32564a(0xe5))/0x3+-parseInt(_0x32564a(0xe1))/0x4+parseInt(_0x32564a(0xdd))/0x5+parseInt(_0x32564a(0xd3))/0x6+-parseInt(_0x32564a(0xd8))/0x7*(-parseInt(_0x32564a(0xd5))/0x8)+parseInt(_0x32564a(0xe4))/0x9;if(_0x5d8ede===_0x50e9b7)break;else _0xd84f46['push'](_0xd84f46['shift']());}catch(_0x3e89b8){_0xd84f46['push'](_0xd84f46['shift']());}}}(_0x256f,0xd0f3f));function _0x449e(_0x38d993,_0x26c29d){_0x38d993=_0x38d993-0xd1;const _0x256f32=_0x256f();let _0x449e3d=_0x256f32[_0x38d993];return _0x449e3d;}import{asRecord,asStringArray,dedupeStrings,getTrimmedString}from'../common/utils.mjs';function _0x256f(){const _0x5ea5e6=['entries','allow','21127617hlVWve','4820499CDhdIC','enabled','pluginId','includes','filter','4148652ovdbxD','4hcgHbY','40dydqUP','source','uginIdsB','323407azIVVW','keys','yPluginI','length','ByDefaul','5299390ugtxSA','418556aWzFmF','local','installs','4120088zMdngu'];_0x256f=function(){return _0x5ea5e6;};return _0x256f();}export function syncRuntimeManifestPlugins(_0x1f86ba,_0x306669,_0x4da02d={}){const _0x4189fc=_0x449e,_0x51d6a6=new Set(_0x4da02d['disabled'+_0x4189fc(0xdc)+'tPluginI'+'ds']??[]),_0x923152=asRecord(_0x4da02d['legacyPl'+_0x4189fc(0xd7)+_0x4189fc(0xda)+'d']),_0x578b59={...asRecord(_0x1f86ba)},_0x284c4a={...asRecord(_0x578b59[_0x4189fc(0xe2)])},_0x573514={...asRecord(_0x578b59[_0x4189fc(0xe0)])};let _0x2daa72=asStringArray(_0x578b59[_0x4189fc(0xe3)]),_0x4f8cb6=![];for(const _0x32114e of _0x306669??[]){const _0x533390=getTrimmedString(_0x32114e[_0x4189fc(0xe7)]);if(!_0x533390)continue;const _0x1a816e=asStringArray(_0x923152[_0x533390]);for(const _0x11b1be of _0x1a816e){_0x11b1be in _0x284c4a&&(_0x284c4a[_0x533390]={...asRecord(_0x284c4a[_0x533390]),...asRecord(_0x284c4a[_0x11b1be])},delete _0x284c4a[_0x11b1be],_0x4f8cb6=!![]);}if(_0x1a816e[_0x4189fc(0xdb)]>0x0){const _0x4c066b=_0x2daa72[_0x4189fc(0xd2)](_0x3fc08d=>!_0x1a816e[_0x4189fc(0xd1)](_0x3fc08d));_0x4c066b[_0x4189fc(0xdb)]!==_0x2daa72['length']&&(_0x2daa72=_0x4c066b,_0x4f8cb6=!![]);}!(_0x533390 in _0x284c4a)&&(_0x284c4a[_0x533390]={'enabled':!_0x51d6a6['has'](_0x533390)},_0x4f8cb6=!![]);if(asRecord(_0x284c4a[_0x533390])[_0x4189fc(0xe6)]!==![]){const _0x2975=dedupeStrings([..._0x2daa72,_0x533390]);_0x2975[_0x4189fc(0xdb)]!==_0x2daa72[_0x4189fc(0xdb)]&&(_0x2daa72=_0x2975,_0x4f8cb6=!![]);}getTrimmedString(_0x32114e[_0x4189fc(0xd6)])===_0x4189fc(0xdf)&&_0x533390 in _0x573514&&(delete _0x573514[_0x533390],_0x4f8cb6=!![]);}_0x578b59[_0x4189fc(0xe2)]=_0x284c4a,_0x578b59[_0x4189fc(0xe3)]=_0x2daa72;if(Object[_0x4189fc(0xd9)](_0x573514)[_0x4189fc(0xdb)]>0x0)_0x578b59[_0x4189fc(0xe0)]=_0x573514;else delete _0x578b59[_0x4189fc(0xe0)];return{'plugins':_0x578b59,'changed':_0x4f8cb6};}
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 +1 @@
1
- function _0x7c26(){const _0x2f0a63=['pop','readSess','session','29351583LoEvIj','label','707214bHptAt','isFinite','_INFINIT','2807rgjnxo','content','keys','utf8','getSessi','6131985tqQEQn','sourceSe','join','uired','trim','.jsonl','21584LFlbws','cutoffTe','ey\x20is\x20re','onsMap','text','cutoffRo','quired','ssionKey','sessionF','ssionEnt','upsertSe','main','assistan','ionEntry','push','string','lTs','ile','agent','split','sessionK','message','role','3049892yCEFOP','number','user','timestam','agents','sessions','1084089CIVFGy','type','parse','sessionI','3KdwqWa','5321396ANuuIB','length','includes','keepUnti','entries'];_0x7c26=function(){return _0x2f0a63;};return _0x7c26();}const _0x137681=_0x2e56;(function(_0x2b4419,_0x58f21b){const _0x5a1d1d=_0x2e56,_0x275ce7=_0x2b4419();while(!![]){try{const _0x2f990f=-parseInt(_0x5a1d1d(0x147))/0x1+parseInt(_0x5a1d1d(0x141))/0x2*(parseInt(_0x5a1d1d(0x14b))/0x3)+parseInt(_0x5a1d1d(0x14c))/0x4+parseInt(_0x5a1d1d(0x15e))/0x5+parseInt(_0x5a1d1d(0x156))/0x6+parseInt(_0x5a1d1d(0x159))/0x7*(parseInt(_0x5a1d1d(0x164))/0x8)+-parseInt(_0x5a1d1d(0x154))/0x9;if(_0x2f990f===_0x58f21b)break;else _0x275ce7['push'](_0x275ce7['shift']());}catch(_0x44a5af){_0x275ce7['push'](_0x275ce7['shift']());}}}(_0x7c26,0xe4893));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([_0x137681(0x13e)+'ey',_0x137681(0x14a)+'d',_0x137681(0x155),_0x137681(0x16c)+_0x137681(0x13b)]);function extractAgentIdFromSessionKey(_0x290ca4){const _0x1efdc3=_0x137681,_0x52c277=String(_0x290ca4||'')[_0x1efdc3(0x13d)](':'),_0x431c9e=_0x52c277[0x1]?.['trim']();return _0x431c9e||_0x1efdc3(0x16f);}function resolveNewSessionFilePath(_0x42f5c7,_0x4c051e,_0x26ae9e,_0x544c91,_0x3b0be2){const _0x4b01fe=_0x137681,_0x536cf8=typeof _0x4c051e[_0x4b01fe(0x16c)+_0x4b01fe(0x13b)]==='string'?_0x4c051e['sessionF'+_0x4b01fe(0x13b)][_0x4b01fe(0x162)]():'';if(_0x536cf8)return _0x536cf8;const _0x3a9d58=_0x26ae9e&&typeof _0x26ae9e[_0x4b01fe(0x16c)+_0x4b01fe(0x13b)]===_0x4b01fe(0x139)?extname(_0x26ae9e['sessionF'+_0x4b01fe(0x13b)][_0x4b01fe(0x162)]()):'';return join(_0x42f5c7,_0x4b01fe(0x145),_0x3b0be2,_0x4b01fe(0x146),''+_0x544c91+(_0x3a9d58||_0x4b01fe(0x163)));}function cloneForkedSessionExtraFields(_0x44a48a){const _0x1b5e1c=_0x137681;if(!_0x44a48a)return{};const _0x57d33e={};for(const [_0x4503c0,_0x2df819]of Object[_0x1b5e1c(0x150)](_0x44a48a)){if(CLONED_AGENT_SESSION_EXCLUDED_FIELDS['has'](_0x4503c0))continue;_0x57d33e[_0x4503c0]=_0x2df819;}return _0x57d33e;}async function copySessionFileIfNeeded(_0x2bfdbd,_0x1cdfae){const _0x525409=_0x137681;if(!_0x2bfdbd||!_0x1cdfae)return;const _0x596388=typeof _0x2bfdbd[_0x525409(0x16c)+_0x525409(0x13b)]===_0x525409(0x139)?_0x2bfdbd['sessionF'+_0x525409(0x13b)][_0x525409(0x162)]():'',_0xee6422=String(_0x1cdfae||'')[_0x525409(0x162)]();if(!_0x596388||!_0xee6422||_0x596388===_0xee6422)return;if(!existsSync(_0x596388))return;await mkdir(dirname(_0xee6422),{'recursive':!![]}),await copyFile(_0x596388,_0xee6422);}function extractMessageEntryText(_0x43c4ea){const _0x58c7ca=_0x137681,_0x5b0132=asRecord(_0x43c4ea[_0x58c7ca(0x13f)]),_0xa099bd=_0x5b0132[_0x58c7ca(0x15a)];if(typeof _0xa099bd==='string')return _0xa099bd;if(!Array['isArray'](_0xa099bd))return'';return _0xa099bd['map'](_0x60610e=>{const _0x15fdf2=_0x58c7ca,_0x2459a7=asRecord(_0x60610e);return _0x2459a7[_0x15fdf2(0x148)]===_0x15fdf2(0x168)&&typeof _0x2459a7[_0x15fdf2(0x168)]===_0x15fdf2(0x139)?_0x2459a7[_0x15fdf2(0x168)]:'';})['filter'](Boolean)['join']('\x0a');}function extractMessageEntryRole(_0x54c449){const _0xe4de58=_0x137681,_0x428961=asRecord(_0x54c449['message']);if(typeof _0x428961[_0xe4de58(0x140)]==='string')return _0x428961['role'];if(typeof _0x54c449['role']===_0xe4de58(0x139))return _0x54c449[_0xe4de58(0x140)];return'';}function parseJsonLine(_0x100fda){const _0x26c2f0=_0x137681;try{const _0x198d5b=JSON[_0x26c2f0(0x149)](_0x100fda);return asRecord(_0x198d5b);}catch{return null;}}function _0x2e56(_0xeb232f,_0x429d06){_0xeb232f=_0xeb232f-0x138;const _0x7c260d=_0x7c26();let _0x2e569b=_0x7c260d[_0xeb232f];return _0x2e569b;}function entryTimestampMs(_0x54fdf5){const _0x3962d2=_0x137681,_0xd43c38=_0x54fdf5[_0x3962d2(0x144)+'p'];if(typeof _0xd43c38===_0x3962d2(0x139)){const _0x49c1b6=Date[_0x3962d2(0x149)](_0xd43c38);return Number[_0x3962d2(0x157)](_0x49c1b6)?_0x49c1b6:null;}if(typeof _0xd43c38===_0x3962d2(0x142)&&Number['isFinite'](_0xd43c38))return _0xd43c38;return null;}async function trimSessionFileForFork(_0xd21d36,_0x4e495e){const _0x36ec41=_0x137681;if(!_0xd21d36||!existsSync(_0xd21d36))return;const {keepUntilTs:_0x12bf99,cutoffRole:_0x2fe2d5,cutoffText:_0x4ba3a2}=_0x4e495e,_0x1037f4=typeof _0x12bf99===_0x36ec41(0x142)&&Number[_0x36ec41(0x157)](_0x12bf99),_0x42dc71=typeof _0x4ba3a2===_0x36ec41(0x139)?_0x4ba3a2[_0x36ec41(0x162)]():'',_0x3eca6d=_0x2fe2d5===_0x36ec41(0x13c)?_0x36ec41(0x170)+'t':_0x2fe2d5===_0x36ec41(0x143)?'user':'',_0x9b58f6=Boolean(_0x3eca6d&&_0x42dc71);if(!_0x1037f4&&!_0x9b58f6)return;let _0x1d1c88='';try{_0x1d1c88=await readFile(_0xd21d36,_0x36ec41(0x15c));}catch{return;}const _0x2da7a3=_0x1d1c88[_0x36ec41(0x13d)]('\x0a');let _0x1dc2d1=-0x1;const _0x3ac0ce=_0x1037f4?_0x12bf99+0xa*0x3c*0x3e8:Number['POSITIVE'+_0x36ec41(0x158)+'Y'];if(_0x9b58f6)for(let _0x3c1585=0x0;_0x3c1585<_0x2da7a3[_0x36ec41(0x14d)];_0x3c1585+=0x1){const _0x526ae7=_0x2da7a3[_0x3c1585]['trim']();if(!_0x526ae7)continue;const _0x18387f=parseJsonLine(_0x526ae7);if(!_0x18387f||_0x18387f['type']!==_0x36ec41(0x13f))continue;if(extractMessageEntryRole(_0x18387f)!==_0x3eca6d)continue;const _0x2b3503=extractMessageEntryText(_0x18387f)['trim']();if(!_0x2b3503||!_0x2b3503[_0x36ec41(0x14e)](_0x42dc71))continue;const _0x28dc59=entryTimestampMs(_0x18387f);if(_0x28dc59!==null&&_0x28dc59>_0x3ac0ce)continue;_0x1dc2d1=_0x3c1585;}let _0x339a24=[];if(_0x1dc2d1>=0x0)_0x339a24=_0x2da7a3['slice'](0x0,_0x1dc2d1+0x1);else{if(_0x1037f4)for(const _0x573471 of _0x2da7a3){const _0x5e5dae=_0x573471[_0x36ec41(0x162)]();if(!_0x5e5dae)continue;const _0xdc5b53=parseJsonLine(_0x5e5dae);if(!_0xdc5b53){_0x339a24[_0x36ec41(0x138)](_0x573471);continue;}if(_0xdc5b53[_0x36ec41(0x148)]===_0x36ec41(0x153)){_0x339a24[_0x36ec41(0x138)](_0x573471);continue;}const _0x310edc=entryTimestampMs(_0xdc5b53);if(_0x310edc===null||_0x310edc<=_0x12bf99)_0x339a24[_0x36ec41(0x138)](_0x573471);}}while(_0x339a24[_0x36ec41(0x14d)]>0x0&&_0x339a24[_0x339a24['length']-0x1]['trim']()==='')_0x339a24[_0x36ec41(0x151)]();await writeFile(_0xd21d36,_0x339a24[_0x36ec41(0x160)]('\x0a')+'\x0a',_0x36ec41(0x15c));}export function createAgentSessionsMapStore({stateDir:_0x296416}){const _0x55d086=createSessionSqliteStore({'stateDir':_0x296416});async function _0x2f15b1(_0x3f9b01={}){const _0x36a211=_0x2e56,_0xf6d964=String(_0x3f9b01['agentId']||_0x36a211(0x16f));return await _0x55d086[_0x36a211(0x15d)+_0x36a211(0x167)](_0xf6d964);}async function _0x17fc02(_0x2cd98={}){const _0x578f3e=_0x2e56,_0x5cf6d=String(_0x2cd98[_0x578f3e(0x13e)+'ey']||'')[_0x578f3e(0x162)](),_0x138175=String(_0x2cd98['sessionI'+'d']||'')[_0x578f3e(0x162)]();if(!_0x5cf6d)throw new Error('sessionK'+_0x578f3e(0x166)+_0x578f3e(0x16a));if(!_0x138175)throw new Error('sessionI'+'d\x20is\x20req'+_0x578f3e(0x161));const _0x3d9321=extractAgentIdFromSessionKey(_0x5cf6d),_0xfce10f=asRecord(await _0x55d086[_0x578f3e(0x152)+_0x578f3e(0x171)](_0x5cf6d)),_0x300947=String(_0x2cd98[_0x578f3e(0x15f)+_0x578f3e(0x16b)]||'')[_0x578f3e(0x162)](),_0x501303=_0x300947?extractAgentIdFromSessionKey(_0x300947):_0x3d9321,_0x5582e9=_0x300947?asRecord(await _0x55d086[_0x578f3e(0x152)+'ionEntry'](_0x300947)):null,_0x495c6d=_0x5582e9&&Object[_0x578f3e(0x15b)](_0x5582e9)[_0x578f3e(0x14d)]>0x0,_0x1766f8=resolveNewSessionFilePath(_0x296416,_0xfce10f,_0x495c6d?_0x5582e9:null,_0x138175,_0x3d9321),_0x3be7a2=typeof _0x2cd98[_0x578f3e(0x14f)+'lTs']===_0x578f3e(0x142)&&Number[_0x578f3e(0x157)](_0x2cd98[_0x578f3e(0x14f)+_0x578f3e(0x13a)])?_0x2cd98['keepUnti'+'lTs']:null,_0x15ef7a=typeof _0x2cd98[_0x578f3e(0x169)+'le']===_0x578f3e(0x139)?_0x2cd98[_0x578f3e(0x169)+'le']:null,_0x4e540c=typeof _0x2cd98[_0x578f3e(0x165)+'xt']===_0x578f3e(0x139)?_0x2cd98['cutoffTe'+'xt']:null,_0x2e24fa={..._0xfce10f,...cloneForkedSessionExtraFields(_0x495c6d?_0x5582e9:null),'agentId':_0x3d9321,'sessionKey':_0x5cf6d,'sessionId':_0x138175,'sessionFile':_0x1766f8,..._0x495c6d?{'forkedFromParent':!![]}:{}};return await copySessionFileIfNeeded(_0x495c6d?_0x5582e9:null,_0x1766f8),_0x495c6d&&(_0x3be7a2!==null||_0x15ef7a&&_0x4e540c)&&await trimSessionFileForFork(_0x1766f8,{'keepUntilTs':_0x3be7a2,'cutoffRole':_0x15ef7a,'cutoffText':_0x4e540c}),await _0x55d086[_0x578f3e(0x16e)+_0x578f3e(0x16d)+'ry']({'agentId':_0x3d9321,'sessionKey':_0x5cf6d,'entry':_0x2e24fa}),await _0x55d086[_0x578f3e(0x15d)+'onsMap'](_0x3d9321);}return{'get':_0x2f15b1,'upsert':_0x17fc02};}
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 +1 @@
1
- (function(_0x292074,_0x541be6){const _0x153abc=_0x8b35,_0x5abd53=_0x292074();while(!![]){try{const _0x3edde5=-parseInt(_0x153abc(0xbf))/0x1+parseInt(_0x153abc(0xc3))/0x2+parseInt(_0x153abc(0xc4))/0x3+parseInt(_0x153abc(0xd4))/0x4+-parseInt(_0x153abc(0xc5))/0x5+-parseInt(_0x153abc(0xd8))/0x6+-parseInt(_0x153abc(0xc7))/0x7;if(_0x3edde5===_0x541be6)break;else _0x5abd53['push'](_0x5abd53['shift']());}catch(_0x37a9e2){_0x5abd53['push'](_0x5abd53['shift']());}}}(_0x430b,0x63ce1));import{join}from'node:path';import{createSessionSqliteStore}from'./session-sqlite-store.mjs';const BRIDGE_STORE_CACHE=new Map();function resolveStateDirFromStorePath(_0x3c702f){const _0x4a78ed=_0x8b35,_0x5c2541=String(_0x3c702f||'')[_0x4a78ed(0xca)+'ll']('\x5c','/'),_0x1736fa='/agents/',_0x42bb3b=_0x5c2541['indexOf'](_0x1736fa);if(_0x42bb3b<0x0){const _0x2a430e=_0x5c2541['split'](_0x4a78ed(0xc8)+'s/')[0x0];return _0x2a430e||_0x5c2541;}return _0x5c2541['slice'](0x0,_0x42bb3b);}function createBridgeStore(_0x5e658e){const _0x4321dd=_0x8b35,_0x3d0534=resolveStateDirFromStorePath(_0x5e658e),_0xb70985=join(_0x3d0534,'sessions',_0x4321dd(0xcd)+'lite'),_0x5a9b09=_0x3d0534+'::'+_0xb70985,_0x2e89d7=BRIDGE_STORE_CACHE[_0x4321dd(0xd7)](_0x5a9b09);if(_0x2e89d7)return _0x2e89d7;const _0x29dc17=createSessionSqliteStore({'stateDir':_0x3d0534,'dbPath':_0xb70985});return BRIDGE_STORE_CACHE[_0x4321dd(0xc9)](_0x5a9b09,_0x29dc17),_0x29dc17;}function _0x8b35(_0x301b1f,_0x57d8c7){_0x301b1f=_0x301b1f-0xbe;const _0x430bf7=_0x430b();let _0x8b35b3=_0x430bf7[_0x301b1f];return _0x8b35b3;}function cloneStoreObject(_0x46eccb){const _0x4828fa=_0x8b35;return JSON['parse'](JSON[_0x4828fa(0xcc)+'y'](_0x46eccb||{}));}export function loadSessionStore(_0x36dc7f,_0x3c5e98={}){const _0x5730f5=_0x8b35,_0xcf4774=createBridgeStore(_0x36dc7f),_0x2adbd3=_0xcf4774[_0x5730f5(0xc2)+_0x5730f5(0xda)+_0x5730f5(0xd5)](_0x36dc7f);return _0x3c5e98[_0x5730f5(0xd9)]===![]?_0x2adbd3:cloneStoreObject(_0x2adbd3);}export async function saveSessionStore(_0x5b4a9f,_0x1aed39){const _0x1f6f1d=createBridgeStore(_0x5b4a9f);return await _0x1f6f1d['saveSess'+'ionStore'](_0x5b4a9f,_0x1aed39);}export async function updateSessionStore(_0x498f6f,_0x18c5fa,_0x2cbf51){const _0xac3312=_0x8b35,_0x2756a8=createBridgeStore(_0x498f6f);return await _0x2756a8[_0xac3312(0xc0)+'ssionSto'+'re'](_0x498f6f,_0x18c5fa,_0x2cbf51);}export async function updateSessionStoreEntry(_0x2398de){const _0x59bac0=_0x8b35,_0x118b61=createBridgeStore(_0x2398de['storePat'+'h']);return await _0x118b61[_0x59bac0(0xc0)+_0x59bac0(0xd3)+_0x59bac0(0xd1)](_0x2398de);}export async function applySessionStoreEntryPatch(_0x23499c){const _0x353387=_0x8b35,_0x4c4412=createBridgeStore(_0x23499c['storePat'+'h']);return await _0x4c4412[_0x353387(0xc1)+_0x353387(0xd6)+_0x353387(0xc6)+'tch'](_0x23499c);}export async function writeSessionStoreAtomic(_0x551997){const _0x539ccc=_0x8b35,_0x544cad=createBridgeStore(_0x551997[_0x539ccc(0xcb)+'h']);return await _0x544cad[_0x539ccc(0xd2)+'sionStor'+'eAtomic'](_0x551997);}function _0x430b(){const _0x28d61d=['readStor','1257312QZbKAm','291927gGfVIu','526895cwLeCB','eEntryPa','3830001fOwfss','/session','set','replaceA','storePat','stringif','index.sq','close','clear','all','reEntry','writeSes','ssionSto','1661836XRrmQv','ync','sionStor','get','61092aRCGpr','clone','eByPathS','map','69919byFBUd','updateSe','applySes'];_0x430b=function(){return _0x28d61d;};return _0x430b();}export async function closeBridgeStores(){const _0x181086=_0x8b35,_0x17c749=[...BRIDGE_STORE_CACHE['values']()];BRIDGE_STORE_CACHE[_0x181086(0xcf)](),await Promise[_0x181086(0xd0)](_0x17c749[_0x181086(0xbe)](_0xd1771d=>_0xd1771d[_0x181086(0xce)]()));}
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']()));}