@wujie-shell/core 3.0.2 → 4.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (41) hide show
  1. package/dist/bin/wujie-shell.mjs +1 -1
  2. package/dist/src/agents/bundled-agent-skills.mjs +1 -1
  3. package/dist/src/agents/bundled-agents.mjs +1 -1
  4. package/dist/src/chat/media-archive.mjs +1 -1
  5. package/dist/src/chat/queue.mjs +1 -1
  6. package/dist/src/common/diagnostics.mjs +1 -1
  7. package/dist/src/common/logging.mjs +1 -1
  8. package/dist/src/common/runtime-logger.mjs +1 -1
  9. package/dist/src/common/user-events.mjs +1 -1
  10. package/dist/src/common/utils.mjs +1 -1
  11. package/dist/src/config/controller.mjs +1 -1
  12. package/dist/src/connectors/config-utils.mjs +1 -1
  13. package/dist/src/connectors/constants.mjs +1 -1
  14. package/dist/src/connectors/controller.mjs +1 -1
  15. package/dist/src/connectors/kdocs-cli.mjs +1 -1
  16. package/dist/src/electron/main.mjs +1 -1
  17. package/dist/src/electron/preload.mjs +1 -1
  18. package/dist/src/files/generated-files-store.mjs +1 -1
  19. package/dist/src/files/handlers.mjs +1 -1
  20. package/dist/src/gateway/chat-delta.mjs +1 -1
  21. package/dist/src/gateway/controller.mjs +1 -1
  22. package/dist/src/gateway/ws-client.mjs +1 -1
  23. package/dist/src/index.mjs +1 -1
  24. package/dist/src/log-reporting/handlers.mjs +1 -1
  25. package/dist/src/log-reporting/report-logs.mjs +1 -1
  26. package/dist/src/models/handlers.mjs +1 -1
  27. package/dist/src/preferences/store.mjs +1 -1
  28. package/dist/src/runtime/index.mjs +1 -1
  29. package/dist/src/runtime/patch-channel-plugin-runtime.mjs +1 -1
  30. package/dist/src/runtime/patch-chat-history-mixed-tool-content.mjs +1 -1
  31. package/dist/src/runtime/patch-session-store-sqlite.mjs +1 -1
  32. package/dist/src/runtime/plugin-sync.mjs +1 -1
  33. package/dist/src/sessions/agent-sessions-map-store.mjs +1 -1
  34. package/dist/src/sessions/runtime-bridge.mjs +1 -1
  35. package/dist/src/sessions/session-sqlite-store.mjs +1 -1
  36. package/dist/src/skills/import.mjs +1 -1
  37. package/dist/src/skills/market.mjs +1 -1
  38. package/dist/src/terminal/manager.mjs +1 -1
  39. package/dist/src/updates/controller.mjs +1 -1
  40. package/dist/src/updates/loader.mjs +1 -1
  41. package/package.json +3 -3
@@ -1 +1 @@
1
- function _0x1e87(_0xd694d0,_0x48e219){_0xd694d0=_0xd694d0-0x1f3;const _0x19479d=_0x1947();let _0x1e8777=_0x19479d[_0xd694d0];return _0x1e8777;}(function(_0x58adbe,_0xa2507d){const _0x1d7bda=_0x1e87,_0x150eb5=_0x58adbe();while(!![]){try{const _0x10fe44=parseInt(_0x1d7bda(0x237))/0x1+-parseInt(_0x1d7bda(0x225))/0x2+parseInt(_0x1d7bda(0x1fb))/0x3+-parseInt(_0x1d7bda(0x20a))/0x4+parseInt(_0x1d7bda(0x23f))/0x5+-parseInt(_0x1d7bda(0x22f))/0x6*(parseInt(_0x1d7bda(0x1f7))/0x7)+parseInt(_0x1d7bda(0x218))/0x8;if(_0x10fe44===_0xa2507d)break;else _0x150eb5['push'](_0x150eb5['shift']());}catch(_0x275208){_0x150eb5['push'](_0x150eb5['shift']());}}}(_0x1947,0xc8f2d));function _0x1947(){const _0x26eb7f=['{\x0a\x09\x09\x09pro','xChars);','\x09\x09\x09});\x0a\x09','tent.som','istoryBl','\x20isToolH','\x09\x09}\x0a\x09\x09co','ock\x20!==\x20','toryText','2395884RQrHDW','ext\x20=\x20fa','lineDire',':\x20projec',')\x20return','t,\x20maxCh',');\x0a\x09\x09\x09co','ext\x20===\x20','(entry.t','of\x20block','6qoyLKu','mMixedTo','length','onst\x20tru','\x09}\x20else\x20','&\x20typeof','nst\x20entr','eChatHis','198806ACxLIH','\x09}\x0a\x09retu','pe);\x0a\x09})','projecte','lse;\x0a\x09co','substrin','\x20false;\x0a','sh({\x0a\x09\x09\x09','2506975yCBadm','ted,\x0a\x09\x09c','rn\x20hasTe','d.push(b','\x0a\x09\x09\x09hasT',':\x20null;\x0a','\x20project','\x20!==\x20\x22ob','\x0a\x09\x09\x09proj','ue;\x0a\x09\x09\x09c','if\x20(!con','\x09if\x20(!bl','sForDisp','indexOf','ject\x22)\x20{','\x09type:\x20\x22','ypeof\x20bl','6853966IluKgk','\x20(const\x20','\x09\x09\x09text:','let\x20hasT','3585759GtoPFC','ntinue;\x0a','xt\x20?\x20{\x0a\x09','Assistan','\x20(!block','y\x20=\x20bloc','\x09content','block\x20of','[];\x0a\x09for','e((block','already-','jected.p','ush(bloc','y.text.t','patched','1100288eDjjRP','\x20null;\x0a\x09','true\x0a\x09}\x20','tTextFro',')\x20{\x0a\x09\x09if','hanged:\x20','ed.text\x0a','\x09\x09return','replace','olConten','ext\x20=\x20tr','ock\x20||\x20t','ockType(','y.text).','11038264zDYFBJ','lay(entr','ype\x20===\x20','sh(block'];_0x1947=function(){return _0x26eb7f;};return _0x1947();}export function patchMixedToolContentFromSource(_0x2e09c4){const _0x42115d=_0x1e87,_0x2f1e45='function'+_0x42115d(0x245)+_0x42115d(0x1fe)+_0x42115d(0x20d)+_0x42115d(0x230)+_0x42115d(0x213)+'t',_0x1893d3=_0x2e09c4[_0x42115d(0x1f3)](_0x2f1e45);if(_0x1893d3===-0x1)return{'patched':![],'reason':'not-foun'+'d'};let _0x390cf9=0x0,_0xf36b92=![],_0x32e436=_0x1893d3;for(let _0x250dff=_0x1893d3;_0x250dff<_0x2e09c4[_0x42115d(0x231)];_0x250dff+=0x1){_0x2e09c4[_0x250dff]==='{'&&(_0x390cf9+=0x1,_0xf36b92=!![]);_0x2e09c4[_0x250dff]==='}'&&(_0x390cf9-=0x1);if(_0xf36b92&&_0x390cf9===0x0){_0x32e436=_0x250dff+0x1;break;}}const _0x66b25d=_0x2e09c4[_0x42115d(0x23c)+'g'](_0x1893d3,_0x32e436);if(_0x66b25d['includes'](_0x42115d(0x23a)+_0x42115d(0x242)+'lock)'))return{'patched':![],'reason':_0x42115d(0x205)+_0x42115d(0x209)};const _0x1b1e27='function'+'\x20project'+_0x42115d(0x1fe)+_0x42115d(0x20d)+_0x42115d(0x230)+_0x42115d(0x213)+'t(conten'+_0x42115d(0x22a)+'ars)\x20{\x0a\x09'+_0x42115d(0x249)+_0x42115d(0x21f)+_0x42115d(0x204)+')\x20=>\x20{\x0a\x09'+_0x42115d(0x24a)+_0x42115d(0x215)+_0x42115d(0x1f6)+_0x42115d(0x223)+'\x22object\x22'+')\x20return'+_0x42115d(0x23d)+_0x42115d(0x211)+_0x42115d(0x221)+_0x42115d(0x220)+_0x42115d(0x216)+'block.ty'+_0x42115d(0x239)+_0x42115d(0x229)+_0x42115d(0x20b)+_0x42115d(0x1fa)+_0x42115d(0x226)+_0x42115d(0x23b)+'nst\x20proj'+'ected\x20=\x20'+_0x42115d(0x203)+_0x42115d(0x1f8)+_0x42115d(0x202)+'\x20content'+_0x42115d(0x20e)+_0x42115d(0x1ff)+'\x20||\x20type'+_0x42115d(0x22e)+_0x42115d(0x246)+_0x42115d(0x1f4)+_0x42115d(0x247)+'ected.pu'+_0x42115d(0x21b)+_0x42115d(0x22b)+_0x42115d(0x1fc)+_0x42115d(0x222)+_0x42115d(0x235)+_0x42115d(0x200)+'k;\x0a\x09\x09if\x20'+_0x42115d(0x22d)+_0x42115d(0x21a)+'\x22text\x22\x20&'+_0x42115d(0x234)+'\x20entry.t'+_0x42115d(0x22c)+'\x22string\x22'+'\x20&&\x20entr'+_0x42115d(0x208)+'rim())\x20{'+_0x42115d(0x243)+_0x42115d(0x214)+_0x42115d(0x248)+_0x42115d(0x232)+'ncated\x20='+'\x20truncat'+_0x42115d(0x236)+_0x42115d(0x224)+'(stripIn'+_0x42115d(0x227)+'ctiveTag'+_0x42115d(0x24b)+_0x42115d(0x219)+_0x42115d(0x217)+'text,\x20ma'+_0x42115d(0x21d)+_0x42115d(0x247)+'ected.pu'+_0x42115d(0x23e)+_0x42115d(0x1f5)+'text\x22,\x0a\x09'+_0x42115d(0x1f9)+'\x20truncat'+_0x42115d(0x210)+_0x42115d(0x21e)+_0x42115d(0x233)+_0x42115d(0x21c)+_0x42115d(0x206)+_0x42115d(0x207)+'k);\x0a\x09\x09}\x0a'+_0x42115d(0x238)+_0x42115d(0x241)+_0x42115d(0x1fd)+_0x42115d(0x201)+_0x42115d(0x228)+_0x42115d(0x240)+_0x42115d(0x20f)+_0x42115d(0x20c)+_0x42115d(0x244)+'}';return{'patched':!![],'source':_0x2e09c4[_0x42115d(0x212)](_0x66b25d,_0x1b1e27)};}
1
+ (function(_0x424d22,_0x4bc844){const _0xf5da3=_0x1aba,_0x2c6208=_0x424d22();while(!![]){try{const _0x5ec078=parseInt(_0xf5da3(0x1f7))/0x1*(parseInt(_0xf5da3(0x211))/0x2)+parseInt(_0xf5da3(0x214))/0x3+-parseInt(_0xf5da3(0x1f6))/0x4*(-parseInt(_0xf5da3(0x1f1))/0x5)+-parseInt(_0xf5da3(0x1c7))/0x6*(parseInt(_0xf5da3(0x1bf))/0x7)+parseInt(_0xf5da3(0x1fd))/0x8+-parseInt(_0xf5da3(0x1e1))/0x9*(parseInt(_0xf5da3(0x1dc))/0xa)+-parseInt(_0xf5da3(0x1e9))/0xb;if(_0x5ec078===_0x4bc844)break;else _0x2c6208['push'](_0x2c6208['shift']());}catch(_0x7ead8a){_0x2c6208['push'](_0x2c6208['shift']());}}}(_0x1f63,0x5e2b2));function _0x1aba(_0x53cabb,_0x203a4f){_0x53cabb=_0x53cabb-0x1bc;const _0x1f6322=_0x1f63();let _0x1aba82=_0x1f6322[_0x53cabb];return _0x1aba82;}export function patchMixedToolContentFromSource(_0x4d9acc){const _0x4e05c8=_0x1aba,_0x12b3ae=_0x4e05c8(0x1d7)+_0x4e05c8(0x1ea)+_0x4e05c8(0x1ee)+_0x4e05c8(0x1f9)+_0x4e05c8(0x1ec)+_0x4e05c8(0x1e8)+'t',_0x1d74d6=_0x4d9acc['indexOf'](_0x12b3ae);if(_0x1d74d6===-0x1)return{'patched':![],'reason':_0x4e05c8(0x1d2)+'d'};let _0x2b1c1b=0x0,_0x5da631=![],_0x345b1e=_0x1d74d6;for(let _0x37eef5=_0x1d74d6;_0x37eef5<_0x4d9acc[_0x4e05c8(0x206)];_0x37eef5+=0x1){_0x4d9acc[_0x37eef5]==='{'&&(_0x2b1c1b+=0x1,_0x5da631=!![]);_0x4d9acc[_0x37eef5]==='}'&&(_0x2b1c1b-=0x1);if(_0x5da631&&_0x2b1c1b===0x0){_0x345b1e=_0x37eef5+0x1;break;}}const _0x270198=_0x4d9acc['substrin'+'g'](_0x1d74d6,_0x345b1e);if(_0x270198['includes'](_0x4e05c8(0x1c8)+_0x4e05c8(0x1fe)+_0x4e05c8(0x1c6)))return{'patched':![],'reason':_0x4e05c8(0x1d3)+'patched'};const _0x30f537='function'+_0x4e05c8(0x1ea)+_0x4e05c8(0x1ee)+_0x4e05c8(0x1f9)+_0x4e05c8(0x1ec)+_0x4e05c8(0x1e8)+_0x4e05c8(0x20f)+_0x4e05c8(0x1d5)+'ars)\x20{\x0a\x09'+_0x4e05c8(0x1df)+'tent.som'+_0x4e05c8(0x1fa)+_0x4e05c8(0x20d)+_0x4e05c8(0x200)+_0x4e05c8(0x1c2)+_0x4e05c8(0x1d0)+_0x4e05c8(0x20e)+'\x22object\x22'+_0x4e05c8(0x1eb)+'\x20false;\x0a'+_0x4e05c8(0x1e3)+_0x4e05c8(0x1cc)+_0x4e05c8(0x1ff)+_0x4e05c8(0x1bd)+'block.ty'+'pe);\x0a\x09})'+_0x4e05c8(0x1eb)+_0x4e05c8(0x1e5)+_0x4e05c8(0x1d1)+_0x4e05c8(0x1d8)+_0x4e05c8(0x1f0)+_0x4e05c8(0x1d4)+_0x4e05c8(0x20a)+_0x4e05c8(0x207)+'\x20(const\x20'+_0x4e05c8(0x204)+_0x4e05c8(0x1e7)+')\x20{\x0a\x09\x09if'+'\x20(!block'+_0x4e05c8(0x202)+_0x4e05c8(0x1cb)+_0x4e05c8(0x1f2)+_0x4e05c8(0x1e0)+_0x4e05c8(0x1f8)+_0x4e05c8(0x1bc)+'sh(block'+_0x4e05c8(0x212)+_0x4e05c8(0x1db)+_0x4e05c8(0x1f3)+'nst\x20entr'+_0x4e05c8(0x1c5)+_0x4e05c8(0x1de)+_0x4e05c8(0x1c0)+_0x4e05c8(0x1cf)+_0x4e05c8(0x1dd)+'&\x20typeof'+'\x20entry.t'+_0x4e05c8(0x209)+_0x4e05c8(0x1c3)+'\x20&&\x20entr'+_0x4e05c8(0x201)+_0x4e05c8(0x1c1)+_0x4e05c8(0x1e4)+_0x4e05c8(0x1cd)+_0x4e05c8(0x20b)+'onst\x20tru'+_0x4e05c8(0x205)+_0x4e05c8(0x1ef)+_0x4e05c8(0x1be)+_0x4e05c8(0x1fb)+_0x4e05c8(0x1fc)+'lineDire'+'ctiveTag'+_0x4e05c8(0x1f4)+'lay(entr'+_0x4e05c8(0x217)+_0x4e05c8(0x219)+'xChars);'+_0x4e05c8(0x1f8)+_0x4e05c8(0x1bc)+_0x4e05c8(0x1f5)+_0x4e05c8(0x1e6)+_0x4e05c8(0x1d6)+_0x4e05c8(0x1ca)+_0x4e05c8(0x1ef)+_0x4e05c8(0x216)+_0x4e05c8(0x20c)+_0x4e05c8(0x21a)+_0x4e05c8(0x1e2)+_0x4e05c8(0x1da)+_0x4e05c8(0x208)+_0x4e05c8(0x1ce)+_0x4e05c8(0x1d9)+_0x4e05c8(0x203)+_0x4e05c8(0x218)+_0x4e05c8(0x210)+':\x20projec'+_0x4e05c8(0x215)+_0x4e05c8(0x213)+_0x4e05c8(0x1ed)+_0x4e05c8(0x1c9)+'}';return{'patched':!![],'source':_0x4d9acc[_0x4e05c8(0x1c4)](_0x270198,_0x30f537)};}function _0x1f63(){const _0x123eb3=['ush(bloc','ext\x20===\x20','ected\x20=\x20','ue;\x0a\x09\x09\x09c','\x09\x09\x09});\x0a\x09',')\x20=>\x20{\x0a\x09','ock\x20!==\x20','t(conten','\x09content','362xtinmB',');\x0a\x09\x09\x09co','hanged:\x20','1761225ePCCVb','ted,\x0a\x09\x09c','ed.text\x0a','y.text).','xt\x20?\x20{\x0a\x09','text,\x20ma','\x09}\x20else\x20','ected.pu','ockType(','eChatHis','3885784kytkBO','(entry.t','rim())\x20{','ock\x20||\x20t','\x22string\x22','replace','y\x20=\x20bloc','lock)','6wTerbE','projecte',':\x20null;\x0a','\x09\x09\x09text:','of\x20block','\x20isToolH','ext\x20=\x20tr','k);\x0a\x09\x09}\x0a','ype\x20===\x20','ypeof\x20bl','let\x20hasT','not-foun','already-','nst\x20proj','t,\x20maxCh','text\x22,\x0a\x09','function','ext\x20=\x20fa','\x09}\x0a\x09retu','jected.p','ntinue;\x0a','450vuClUG','\x22text\x22\x20&','k;\x0a\x09\x09if\x20','if\x20(!con','ject\x22)\x20{','117000ubNoyy','{\x0a\x09\x09\x09pro','\x09\x09return','\x0a\x09\x09\x09hasT','\x20null;\x0a\x09','\x09type:\x20\x22','\x20content','olConten','683144CDdnTT','\x20project',')\x20return','mMixedTo','true\x0a\x09}\x20','Assistan','\x20truncat','lse;\x0a\x09co','1730515NDUoZu','\x20!==\x20\x22ob','\x09\x09}\x0a\x09\x09co','sForDisp','sh({\x0a\x09\x09\x09','4GpHQlR','3263aFZrsG','\x0a\x09\x09\x09proj','tTextFro','e((block','toryText','(stripIn','513192rfyuEK','d.push(b','istoryBl','\x09if\x20(!bl','y.text.t','\x20||\x20type','rn\x20hasTe','block\x20of','ncated\x20=','length','[];\x0a\x09for'];_0x1f63=function(){return _0x123eb3;};return _0x1f63();}
@@ -1 +1 @@
1
- function _0x4a2a(_0x30f702,_0xa53268){_0x30f702=_0x30f702-0x168;const _0x203da9=_0x203d();let _0x4a2a4c=_0x203da9[_0x30f702];return _0x4a2a4c;}(function(_0xd8aab4,_0x3d21b2){const _0x272957=_0x4a2a,_0x52bb45=_0xd8aab4();while(!![]){try{const _0x23de69=parseInt(_0x272957(0x199))/0x1+-parseInt(_0x272957(0x16f))/0x2*(-parseInt(_0x272957(0x170))/0x3)+parseInt(_0x272957(0x174))/0x4*(-parseInt(_0x272957(0x17d))/0x5)+parseInt(_0x272957(0x194))/0x6+parseInt(_0x272957(0x191))/0x7+-parseInt(_0x272957(0x198))/0x8*(-parseInt(_0x272957(0x16b))/0x9)+-parseInt(_0x272957(0x17a))/0xa;if(_0x23de69===_0x3d21b2)break;else _0x52bb45['push'](_0x52bb45['shift']());}catch(_0x554bc8){_0x52bb45['push'](_0x52bb45['shift']());}}}(_0x203d,0xda508));function createBridgeImport(_0x6044a0){const _0x366fd9=_0x4a2a;return _0x366fd9(0x17e)+'\x20as\x20wuji'+_0x366fd9(0x18b)+_0x366fd9(0x177)+_0x366fd9(0x171)+_0x6044a0+'\x22;';}function ensureBridgeImport(_0x2adae3,_0x16a2cb){const _0x53cc3f=createBridgeImport(_0x16a2cb);if(_0x2adae3['includes'](_0x53cc3f))return _0x2adae3;const _0x41c93d=_0x2adae3['match'](/^import .*;$/m);if(!_0x41c93d)return _0x53cc3f+'\x0a'+_0x2adae3;return _0x2adae3['replace'](_0x41c93d[0x0],_0x41c93d[0x0]+'\x0a'+_0x53cc3f);}function findFunctionBodyStart(_0x19fdcf,_0x377e92){const _0x1b664f=_0x4a2a,_0x53ca65=_0x19fdcf[_0x1b664f(0x16c)]('(',_0x377e92);if(_0x53ca65===-0x1)return-0x1;let _0x43150d=0x0,_0x525647=null,_0x434ad0=![];for(let _0x2a94cb=_0x53ca65;_0x2a94cb<_0x19fdcf[_0x1b664f(0x18f)];_0x2a94cb+=0x1){const _0x2a0a9b=_0x19fdcf[_0x2a94cb];if(_0x525647){if(_0x434ad0){_0x434ad0=![];continue;}if(_0x2a0a9b==='\x5c'){_0x434ad0=!![];continue;}if(_0x2a0a9b===_0x525647)_0x525647=null;continue;}if(_0x2a0a9b==='\x22'||_0x2a0a9b==='\x27'||_0x2a0a9b==='`'){_0x525647=_0x2a0a9b;continue;}if(_0x2a0a9b==='('){_0x43150d+=0x1;continue;}if(_0x2a0a9b===')'){_0x43150d-=0x1;continue;}if(_0x2a0a9b==='{'&&_0x43150d===0x0)return _0x2a94cb;}return-0x1;}function findMatchingBlockEnd(_0x44da8d,_0x56f52e){const _0x2a9195=_0x4a2a;let _0x317e7e=0x0,_0x328b97=null,_0x712092=![];for(let _0xa7ca7d=_0x56f52e;_0xa7ca7d<_0x44da8d[_0x2a9195(0x18f)];_0xa7ca7d+=0x1){const _0x3cf264=_0x44da8d[_0xa7ca7d];if(_0x328b97){if(_0x712092){_0x712092=![];continue;}if(_0x3cf264==='\x5c'){_0x712092=!![];continue;}if(_0x3cf264===_0x328b97)_0x328b97=null;continue;}if(_0x3cf264==='\x22'||_0x3cf264==='\x27'||_0x3cf264==='`'){_0x328b97=_0x3cf264;continue;}if(_0x3cf264==='{')_0x317e7e+=0x1;if(_0x3cf264==='}')_0x317e7e-=0x1;if(_0x317e7e===0x0)return _0xa7ca7d+0x1;}return-0x1;}function findNextNonWhitespace(_0x533863,_0x3eb5ef){const _0x1ff098=_0x4a2a;for(let _0x445cd1=_0x3eb5ef;_0x445cd1<_0x533863[_0x1ff098(0x18f)];_0x445cd1+=0x1){if(!/\s/['test'](_0x533863[_0x445cd1]))return _0x445cd1;}return-0x1;}function repairMalformedAlreadyPatchedFunction(_0x76e19e,_0x10a124){const _0x3ccadf=_0x4a2a,_0x1a2db9=_0x76e19e[_0x3ccadf(0x16c)](_0x10a124);if(_0x1a2db9===-0x1)return{'patched':![],'reason':'not-foun'+'d'};const _0x5358de=findFunctionBodyStart(_0x76e19e,_0x1a2db9);if(_0x5358de===-0x1)return{'patched':![],'reason':'body-not'+_0x3ccadf(0x17f)};const _0x58613b=findMatchingBlockEnd(_0x76e19e,_0x5358de);if(_0x58613b===-0x1)return{'patched':![],'reason':_0x3ccadf(0x173)+'-not-fou'+'nd'};const _0x470b44=findNextNonWhitespace(_0x76e19e,_0x58613b);if(_0x76e19e[_0x470b44]!==')')return{'patched':![],'reason':_0x3ccadf(0x190)+'patched'};const _0x87cf65=findNextNonWhitespace(_0x76e19e,_0x470b44+0x1);if(_0x76e19e[_0x87cf65]!=='{')return{'patched':![],'reason':_0x3ccadf(0x190)+_0x3ccadf(0x192)};const _0x13bd2b=findMatchingBlockEnd(_0x76e19e,_0x87cf65);if(_0x13bd2b===-0x1)return{'patched':![],'reason':_0x3ccadf(0x173)+_0x3ccadf(0x16d)+'nd'};return{'patched':!![],'source':_0x76e19e['slice'](0x0,_0x58613b)+_0x76e19e[_0x3ccadf(0x181)](_0x13bd2b)};}function _0x203d(){const _0x2861ef=['toreAtom','eSession','ore','ic(param','body-not','length','already-','7048552qgIdqI','patched','mport-no','5711904cpmlgm','async\x20fu','portPath','arams)','494288rmPBIC','1747711eeLVYW','not-foun','function','sionStor','135HpYxJw','indexOf','-not-fou','bridge-i','146198ilIgKs','45zgnZvr','rom\x20\x22','bridgeIm','body-end','484PdzcNr','\x20opts);\x0a','Atomic(p','Bridge\x20f','dSession','n\x20wujieS','40465280RYSqPr','ath,\x20opt','includes','32610CEJCOo','import\x20*','-found','n\x20await\x20','slice','t-provid','\x20loadSes','sionBrid','s\x20=\x20{})','wujieSes','idge.loa','Store(st','{\x0a\x09retur'];_0x203d=function(){return _0x2861ef;};return _0x203d();}function replaceFunctionBody(_0x1abce9,_0x411f2c,_0x35556f){const _0x88750a=_0x4a2a,_0x6bcf8c=_0x1abce9[_0x88750a(0x16c)](_0x411f2c);if(_0x6bcf8c===-0x1)return{'patched':![],'reason':_0x88750a(0x168)+'d'};const _0x51e5e6=findFunctionBodyStart(_0x1abce9,_0x6bcf8c);if(_0x51e5e6===-0x1)return{'patched':![],'reason':_0x88750a(0x18e)+_0x88750a(0x17f)};const _0x422e8a=findMatchingBlockEnd(_0x1abce9,_0x51e5e6);if(_0x422e8a===-0x1)return{'patched':![],'reason':_0x88750a(0x173)+_0x88750a(0x16d)+'nd'};const _0x23265a=_0x411f2c+'\x20'+_0x35556f;return{'patched':!![],'source':_0x1abce9[_0x88750a(0x181)](0x0,_0x6bcf8c)+_0x23265a+_0x1abce9[_0x88750a(0x181)](_0x422e8a)};}export function patchSessionStoreLoadFromSource(_0x3db375,_0x15d2af={}){const _0xdcf702=_0x4a2a,_0xaedc88=_0x15d2af[_0xdcf702(0x172)+'portPath'];if(!_0xaedc88)return{'patched':![],'reason':_0xdcf702(0x16e)+_0xdcf702(0x193)+'t-provid'+'ed'};if(_0x3db375[_0xdcf702(0x17c)]('wujieSes'+_0xdcf702(0x184)+'ge.loadS'+'essionSt'+_0xdcf702(0x18c)))return repairMalformedAlreadyPatchedFunction(_0x3db375,_0xdcf702(0x169)+_0xdcf702(0x183)+'sionStor'+'e(storeP'+_0xdcf702(0x17b)+_0xdcf702(0x185));const _0x5e3721=replaceFunctionBody(ensureBridgeImport(_0x3db375,_0xaedc88),_0xdcf702(0x169)+'\x20loadSes'+_0xdcf702(0x16a)+'e(storeP'+_0xdcf702(0x17b)+'s\x20=\x20{})',_0xdcf702(0x189)+_0xdcf702(0x179)+'essionBr'+_0xdcf702(0x187)+_0xdcf702(0x178)+_0xdcf702(0x188)+'orePath,'+_0xdcf702(0x175)+'}');return _0x5e3721;}export function patchSessionStoreWriteFromSource(_0x12cbac,_0x3e5b18={}){const _0x283284=_0x4a2a,_0x1a8557=_0x3e5b18[_0x283284(0x172)+_0x283284(0x196)];if(!_0x1a8557)return{'patched':![],'reason':_0x283284(0x16e)+_0x283284(0x193)+_0x283284(0x182)+'ed'};const _0x3c11c6=replaceFunctionBody(ensureBridgeImport(_0x12cbac,_0x1a8557),_0x283284(0x195)+'nction\x20w'+'riteSess'+'ionStore'+_0x283284(0x176)+_0x283284(0x197),'{\x0a\x09retur'+_0x283284(0x180)+_0x283284(0x186)+'sionBrid'+'ge.write'+'SessionS'+_0x283284(0x18a)+_0x283284(0x18d)+'s);\x0a}');if(!_0x3c11c6[_0x283284(0x192)])return _0x3c11c6;return _0x3c11c6;}
1
+ (function(_0x311d9c,_0x2da0f9){const _0x597719=_0xd0a4,_0x12652f=_0x311d9c();while(!![]){try{const _0x195eb6=parseInt(_0x597719(0xf7))/0x1+-parseInt(_0x597719(0x102))/0x2+-parseInt(_0x597719(0xf4))/0x3*(-parseInt(_0x597719(0xf1))/0x4)+-parseInt(_0x597719(0xf8))/0x5*(parseInt(_0x597719(0xfb))/0x6)+-parseInt(_0x597719(0xee))/0x7+parseInt(_0x597719(0xf9))/0x8+parseInt(_0x597719(0xef))/0x9*(-parseInt(_0x597719(0x10e))/0xa);if(_0x195eb6===_0x2da0f9)break;else _0x12652f['push'](_0x12652f['shift']());}catch(_0x42075d){_0x12652f['push'](_0x12652f['shift']());}}}(_0x5c25,0x6fdbe));function createBridgeImport(_0x5824ce){const _0x56987a=_0xd0a4;return _0x56987a(0x105)+_0x56987a(0x101)+_0x56987a(0x11e)+'Bridge\x20f'+_0x56987a(0xf5)+_0x5824ce+'\x22;';}function ensureBridgeImport(_0x336126,_0x528a86){const _0x4d45ea=_0xd0a4,_0x478eb4=createBridgeImport(_0x528a86);if(_0x336126['includes'](_0x478eb4))return _0x336126;const _0x274f42=_0x336126[_0x4d45ea(0x111)](/^import .*;$/m);if(!_0x274f42)return _0x478eb4+'\x0a'+_0x336126;return _0x336126[_0x4d45ea(0x10a)](_0x274f42[0x0],_0x274f42[0x0]+'\x0a'+_0x478eb4);}function findFunctionBodyStart(_0x3e708c,_0x56a3c6){const _0x4695d0=_0xd0a4,_0x133069=_0x3e708c[_0x4695d0(0xeb)]('(',_0x56a3c6);if(_0x133069===-0x1)return-0x1;let _0x3812d8=0x0,_0x21cb51=null,_0x80e4b4=![];for(let _0x1990e9=_0x133069;_0x1990e9<_0x3e708c['length'];_0x1990e9+=0x1){const _0x22fa4c=_0x3e708c[_0x1990e9];if(_0x21cb51){if(_0x80e4b4){_0x80e4b4=![];continue;}if(_0x22fa4c==='\x5c'){_0x80e4b4=!![];continue;}if(_0x22fa4c===_0x21cb51)_0x21cb51=null;continue;}if(_0x22fa4c==='\x22'||_0x22fa4c==='\x27'||_0x22fa4c==='`'){_0x21cb51=_0x22fa4c;continue;}if(_0x22fa4c==='('){_0x3812d8+=0x1;continue;}if(_0x22fa4c===')'){_0x3812d8-=0x1;continue;}if(_0x22fa4c==='{'&&_0x3812d8===0x0)return _0x1990e9;}return-0x1;}function findMatchingBlockEnd(_0x1a5a79,_0x5cec4e){const _0x5712fd=_0xd0a4;let _0x4e00e3=0x0,_0x57a607=null,_0x13b67f=![];for(let _0x9466f9=_0x5cec4e;_0x9466f9<_0x1a5a79[_0x5712fd(0x109)];_0x9466f9+=0x1){const _0x561361=_0x1a5a79[_0x9466f9];if(_0x57a607){if(_0x13b67f){_0x13b67f=![];continue;}if(_0x561361==='\x5c'){_0x13b67f=!![];continue;}if(_0x561361===_0x57a607)_0x57a607=null;continue;}if(_0x561361==='\x22'||_0x561361==='\x27'||_0x561361==='`'){_0x57a607=_0x561361;continue;}if(_0x561361==='{')_0x4e00e3+=0x1;if(_0x561361==='}')_0x4e00e3-=0x1;if(_0x4e00e3===0x0)return _0x9466f9+0x1;}return-0x1;}function findNextNonWhitespace(_0x3fb8c3,_0x485b53){const _0x148dc5=_0xd0a4;for(let _0x5e2b19=_0x485b53;_0x5e2b19<_0x3fb8c3[_0x148dc5(0x109)];_0x5e2b19+=0x1){if(!/\s/[_0x148dc5(0xf2)](_0x3fb8c3[_0x5e2b19]))return _0x5e2b19;}return-0x1;}function _0x5c25(){const _0x1819ac=['bridge-i','706506EozOBA','body-end','already-','s);\x0a}','-found','ore','\x20as\x20wuji','414888FDTRIi','slice','not-foun','import\x20*','portPath','SessionS','{\x0a\x09retur','length','replace','t-provid','Atomic(p','riteSess','50HhWCbx','nction\x20w','sionBrid','match','s\x20=\x20{})','essionSt','\x20loadSes','-not-fou','bridgeIm','patched','toreAtom','\x20opts);\x0a','e(storeP','arams)','ge.write','ge.loadS','eSession','function','ath,\x20opt','body-not','indexOf','sionStor','mport-no','273714PUKZEk','1093959TXiKCq','essionBr','2459024cYnVeS','test','idge.loa','3EUcnaG','rom\x20\x22','includes','712750RIhxxA','5HhHgpq','821760owADTy'];_0x5c25=function(){return _0x1819ac;};return _0x5c25();}function repairMalformedAlreadyPatchedFunction(_0x2a7177,_0x11dffb){const _0x1d62b1=_0xd0a4,_0xd8e4aa=_0x2a7177[_0x1d62b1(0xeb)](_0x11dffb);if(_0xd8e4aa===-0x1)return{'patched':![],'reason':_0x1d62b1(0x104)+'d'};const _0x2af825=findFunctionBodyStart(_0x2a7177,_0xd8e4aa);if(_0x2af825===-0x1)return{'patched':![],'reason':'body-not'+_0x1d62b1(0xff)};const _0x23a1bb=findMatchingBlockEnd(_0x2a7177,_0x2af825);if(_0x23a1bb===-0x1)return{'patched':![],'reason':_0x1d62b1(0xfc)+'-not-fou'+'nd'};const _0x2ebd1c=findNextNonWhitespace(_0x2a7177,_0x23a1bb);if(_0x2a7177[_0x2ebd1c]!==')')return{'patched':![],'reason':_0x1d62b1(0xfd)+_0x1d62b1(0x117)};const _0x189b81=findNextNonWhitespace(_0x2a7177,_0x2ebd1c+0x1);if(_0x2a7177[_0x189b81]!=='{')return{'patched':![],'reason':'already-'+'patched'};const _0x3d79d0=findMatchingBlockEnd(_0x2a7177,_0x189b81);if(_0x3d79d0===-0x1)return{'patched':![],'reason':_0x1d62b1(0xfc)+_0x1d62b1(0x115)+'nd'};return{'patched':!![],'source':_0x2a7177[_0x1d62b1(0x103)](0x0,_0x23a1bb)+_0x2a7177[_0x1d62b1(0x103)](_0x3d79d0)};}function _0xd0a4(_0x5b7e53,_0x1e982c){_0x5b7e53=_0x5b7e53-0xeb;const _0x5c25f6=_0x5c25();let _0xd0a45d=_0x5c25f6[_0x5b7e53];return _0xd0a45d;}function replaceFunctionBody(_0x4d16ff,_0x20b091,_0x37de3d){const _0x1e3854=_0xd0a4,_0x1eb0f1=_0x4d16ff[_0x1e3854(0xeb)](_0x20b091);if(_0x1eb0f1===-0x1)return{'patched':![],'reason':'not-foun'+'d'};const _0x1275cb=findFunctionBodyStart(_0x4d16ff,_0x1eb0f1);if(_0x1275cb===-0x1)return{'patched':![],'reason':_0x1e3854(0x121)+_0x1e3854(0xff)};const _0x43b197=findMatchingBlockEnd(_0x4d16ff,_0x1275cb);if(_0x43b197===-0x1)return{'patched':![],'reason':_0x1e3854(0xfc)+_0x1e3854(0x115)+'nd'};const _0x1a3ecf=_0x20b091+'\x20'+_0x37de3d;return{'patched':!![],'source':_0x4d16ff['slice'](0x0,_0x1eb0f1)+_0x1a3ecf+_0x4d16ff['slice'](_0x43b197)};}export function patchSessionStoreLoadFromSource(_0x2598ef,_0x13f19a={}){const _0x3ea41b=_0xd0a4,_0x4f21e6=_0x13f19a[_0x3ea41b(0x116)+'portPath'];if(!_0x4f21e6)return{'patched':![],'reason':_0x3ea41b(0xfa)+_0x3ea41b(0xed)+_0x3ea41b(0x10b)+'ed'};if(_0x2598ef[_0x3ea41b(0xf6)]('wujieSes'+_0x3ea41b(0x110)+_0x3ea41b(0x11d)+_0x3ea41b(0x113)+_0x3ea41b(0x100)))return repairMalformedAlreadyPatchedFunction(_0x2598ef,_0x3ea41b(0x11f)+_0x3ea41b(0x114)+_0x3ea41b(0xec)+_0x3ea41b(0x11a)+_0x3ea41b(0x120)+_0x3ea41b(0x112));const _0x1a2146=replaceFunctionBody(ensureBridgeImport(_0x2598ef,_0x4f21e6),'function'+_0x3ea41b(0x114)+'sionStor'+_0x3ea41b(0x11a)+_0x3ea41b(0x120)+_0x3ea41b(0x112),'{\x0a\x09retur'+'n\x20wujieS'+_0x3ea41b(0xf0)+_0x3ea41b(0xf3)+'dSession'+'Store(st'+'orePath,'+_0x3ea41b(0x119)+'}');return _0x1a2146;}export function patchSessionStoreWriteFromSource(_0x39c076,_0x65bea2={}){const _0x3258a6=_0xd0a4,_0x314da1=_0x65bea2[_0x3258a6(0x116)+_0x3258a6(0x106)];if(!_0x314da1)return{'patched':![],'reason':_0x3258a6(0xfa)+_0x3258a6(0xed)+'t-provid'+'ed'};const _0x3c0890=replaceFunctionBody(ensureBridgeImport(_0x39c076,_0x314da1),'async\x20fu'+_0x3258a6(0x10f)+_0x3258a6(0x10d)+'ionStore'+_0x3258a6(0x10c)+_0x3258a6(0x11b),_0x3258a6(0x108)+'n\x20await\x20'+'wujieSes'+_0x3258a6(0x110)+_0x3258a6(0x11c)+_0x3258a6(0x107)+_0x3258a6(0x118)+'ic(param'+_0x3258a6(0xfe));if(!_0x3c0890[_0x3258a6(0x117)])return _0x3c0890;return _0x3c0890;}
@@ -1 +1 @@
1
- function _0x1075(_0x46f031,_0x39a78a){_0x46f031=_0x46f031-0x122;const _0x6bf845=_0x6bf8();let _0x107514=_0x6bf845[_0x46f031];return _0x107514;}(function(_0x5d3f88,_0x3e9764){const _0xd624a=_0x1075,_0x470e75=_0x5d3f88();while(!![]){try{const _0x5d89a6=-parseInt(_0xd624a(0x124))/0x1+parseInt(_0xd624a(0x125))/0x2+parseInt(_0xd624a(0x127))/0x3*(-parseInt(_0xd624a(0x136))/0x4)+-parseInt(_0xd624a(0x12d))/0x5+parseInt(_0xd624a(0x137))/0x6*(-parseInt(_0xd624a(0x129))/0x7)+parseInt(_0xd624a(0x131))/0x8*(parseInt(_0xd624a(0x12e))/0x9)+-parseInt(_0xd624a(0x12a))/0xa*(-parseInt(_0xd624a(0x133))/0xb);if(_0x5d89a6===_0x3e9764)break;else _0x470e75['push'](_0x470e75['shift']());}catch(_0x39186a){_0x470e75['push'](_0x470e75['shift']());}}}(_0x6bf8,0x877f1));import{asRecord,asStringArray,dedupeStrings,getTrimmedString}from'../common/utils.mjs';function _0x6bf8(){const _0x2220fc=['length','24tLQmjU','6644850aMgXRA','has','entries','legacyPl','889617nnPyTr','2004658hRtHmx','local','117561fFJfCD','yPluginI','7LONQEh','30gsRVWl','ByDefaul','installs','2753295zSNXGX','9QRcANg','includes','filter','5357720qeeCBL','allow','6108014cBcOSx','keys'];_0x6bf8=function(){return _0x2220fc;};return _0x6bf8();}export function syncRuntimeManifestPlugins(_0x115856,_0x17c820,_0x60ed71={}){const _0x5a6281=_0x1075,_0x234d10=new Set(_0x60ed71['disabled'+_0x5a6281(0x12b)+'tPluginI'+'ds']??[]),_0x55ad2a=asRecord(_0x60ed71[_0x5a6281(0x123)+'uginIdsB'+_0x5a6281(0x128)+'d']),_0x52f6cd={...asRecord(_0x115856)},_0x367da6={...asRecord(_0x52f6cd['entries'])},_0x1afb6d={...asRecord(_0x52f6cd[_0x5a6281(0x12c)])};let _0x47045a=asStringArray(_0x52f6cd[_0x5a6281(0x132)]),_0x1fff30=![];for(const _0x344950 of _0x17c820??[]){const _0x1859fa=getTrimmedString(_0x344950['pluginId']);if(!_0x1859fa)continue;const _0x138703=asStringArray(_0x55ad2a[_0x1859fa]);for(const _0x2ef531 of _0x138703){_0x2ef531 in _0x367da6&&(_0x367da6[_0x1859fa]={...asRecord(_0x367da6[_0x1859fa]),...asRecord(_0x367da6[_0x2ef531])},delete _0x367da6[_0x2ef531],_0x1fff30=!![]);}if(_0x138703['length']>0x0){const _0x19e217=_0x47045a[_0x5a6281(0x130)](_0x2e82db=>!_0x138703[_0x5a6281(0x12f)](_0x2e82db));_0x19e217[_0x5a6281(0x135)]!==_0x47045a['length']&&(_0x47045a=_0x19e217,_0x1fff30=!![]);}!(_0x1859fa in _0x367da6)&&(_0x367da6[_0x1859fa]={'enabled':!_0x234d10[_0x5a6281(0x138)](_0x1859fa)},_0x1fff30=!![]);if(asRecord(_0x367da6[_0x1859fa])['enabled']!==![]){const _0x5974f9=dedupeStrings([..._0x47045a,_0x1859fa]);_0x5974f9[_0x5a6281(0x135)]!==_0x47045a[_0x5a6281(0x135)]&&(_0x47045a=_0x5974f9,_0x1fff30=!![]);}getTrimmedString(_0x344950['source'])===_0x5a6281(0x126)&&_0x1859fa in _0x1afb6d&&(delete _0x1afb6d[_0x1859fa],_0x1fff30=!![]);}_0x52f6cd[_0x5a6281(0x122)]=_0x367da6,_0x52f6cd[_0x5a6281(0x132)]=_0x47045a;if(Object[_0x5a6281(0x134)](_0x1afb6d)['length']>0x0)_0x52f6cd[_0x5a6281(0x12c)]=_0x1afb6d;else delete _0x52f6cd[_0x5a6281(0x12c)];return{'plugins':_0x52f6cd,'changed':_0x1fff30};}
1
+ function _0x5df4(){const _0x2e7392=['local','keys','ByDefaul','6SStcZM','3889170eoNVHB','filter','805192aAtSJH','760pXqTUB','pluginId','10012247FuSygV','87LHuAky','198892bKAHrD','yPluginI','302283HPyBsT','11576680ccYiOw','allow','has','includes','11578PRDbZM','tPluginI','legacyPl','length','entries','installs'];_0x5df4=function(){return _0x2e7392;};return _0x5df4();}function _0xb552(_0x15a1e3,_0x3e79b1){_0x15a1e3=_0x15a1e3-0x115;const _0x5df4cf=_0x5df4();let _0xb55219=_0x5df4cf[_0x15a1e3];return _0xb55219;}(function(_0x5e16e5,_0x3d2eb7){const _0x40e87d=_0xb552,_0x129e8e=_0x5e16e5();while(!![]){try{const _0x42e8df=-parseInt(_0x40e87d(0x119))/0x1+parseInt(_0x40e87d(0x125))/0x2+-parseInt(_0x40e87d(0x129))/0x3*(-parseInt(_0x40e87d(0x12a))/0x4)+-parseInt(_0x40e87d(0x123))/0x5+-parseInt(_0x40e87d(0x122))/0x6*(parseInt(_0x40e87d(0x128))/0x7)+-parseInt(_0x40e87d(0x115))/0x8+-parseInt(_0x40e87d(0x12c))/0x9*(-parseInt(_0x40e87d(0x126))/0xa);if(_0x42e8df===_0x3d2eb7)break;else _0x129e8e['push'](_0x129e8e['shift']());}catch(_0x5b6fab){_0x129e8e['push'](_0x129e8e['shift']());}}}(_0x5df4,0xb24f5));import{asRecord,asStringArray,dedupeStrings,getTrimmedString}from'../common/utils.mjs';export function syncRuntimeManifestPlugins(_0x8c7ae4,_0x3f1fb4,_0x39fc99={}){const _0x803436=_0xb552,_0x87fd14=new Set(_0x39fc99['disabled'+_0x803436(0x121)+_0x803436(0x11a)+'ds']??[]),_0x12ea91=asRecord(_0x39fc99[_0x803436(0x11b)+'uginIdsB'+_0x803436(0x12b)+'d']),_0x490671={...asRecord(_0x8c7ae4)},_0x578df5={...asRecord(_0x490671[_0x803436(0x11d)])},_0x487d48={...asRecord(_0x490671[_0x803436(0x11e)])};let _0x540889=asStringArray(_0x490671['allow']),_0x2ad758=![];for(const _0x3cad29 of _0x3f1fb4??[]){const _0x30fa1b=getTrimmedString(_0x3cad29[_0x803436(0x127)]);if(!_0x30fa1b)continue;const _0x245506=asStringArray(_0x12ea91[_0x30fa1b]);for(const _0x506677 of _0x245506){_0x506677 in _0x578df5&&(_0x578df5[_0x30fa1b]={...asRecord(_0x578df5[_0x30fa1b]),...asRecord(_0x578df5[_0x506677])},delete _0x578df5[_0x506677],_0x2ad758=!![]);}if(_0x245506[_0x803436(0x11c)]>0x0){const _0x193815=_0x540889[_0x803436(0x124)](_0x85ea1f=>!_0x245506[_0x803436(0x118)](_0x85ea1f));_0x193815[_0x803436(0x11c)]!==_0x540889['length']&&(_0x540889=_0x193815,_0x2ad758=!![]);}!(_0x30fa1b in _0x578df5)&&(_0x578df5[_0x30fa1b]={'enabled':!_0x87fd14[_0x803436(0x117)](_0x30fa1b)},_0x2ad758=!![]);if(asRecord(_0x578df5[_0x30fa1b])['enabled']!==![]){const _0x515ed8=dedupeStrings([..._0x540889,_0x30fa1b]);_0x515ed8[_0x803436(0x11c)]!==_0x540889[_0x803436(0x11c)]&&(_0x540889=_0x515ed8,_0x2ad758=!![]);}getTrimmedString(_0x3cad29['source'])===_0x803436(0x11f)&&_0x30fa1b in _0x487d48&&(delete _0x487d48[_0x30fa1b],_0x2ad758=!![]);}_0x490671['entries']=_0x578df5,_0x490671[_0x803436(0x116)]=_0x540889;if(Object[_0x803436(0x120)](_0x487d48)[_0x803436(0x11c)]>0x0)_0x490671[_0x803436(0x11e)]=_0x487d48;else delete _0x490671[_0x803436(0x11e)];return{'plugins':_0x490671,'changed':_0x2ad758};}
@@ -1 +1 @@
1
- function _0x1833(_0x12ad25,_0x4fea24){_0x12ad25=_0x12ad25-0xd6;const _0x5eb05b=_0x5eb0();let _0x18337e=_0x5eb05b[_0x12ad25];return _0x18337e;}const _0x5b2747=_0x1833;(function(_0x207f80,_0x3fa96b){const _0x26a76d=_0x1833,_0x29db58=_0x207f80();while(!![]){try{const _0x58c922=parseInt(_0x26a76d(0xea))/0x1+parseInt(_0x26a76d(0xf6))/0x2+-parseInt(_0x26a76d(0xef))/0x3*(parseInt(_0x26a76d(0xdc))/0x4)+-parseInt(_0x26a76d(0xdf))/0x5+parseInt(_0x26a76d(0xe9))/0x6+-parseInt(_0x26a76d(0x101))/0x7+parseInt(_0x26a76d(0x106))/0x8*(parseInt(_0x26a76d(0x104))/0x9);if(_0x58c922===_0x3fa96b)break;else _0x29db58['push'](_0x29db58['shift']());}catch(_0x1bedda){_0x29db58['push'](_0x29db58['shift']());}}}(_0x5eb0,0x433b0));import{existsSync}from'node:fs';import{copyFile,mkdir,readFile,writeFile}from'node:fs/promises';function _0x5eb0(){const _0x29e743=['1044046vklRpn','number','includes','utf8','type','sessionK','ile','content','quired','ssionEnt','string','2498090dZngDQ','pop','filter','9iLUYhk','join','749872MxqqYw','push','cutoffRo','upsertSe','sessionF','split','agentId','onsMap','getSessi','main','lTs','235864djiWcS','agent','label','1969120UgNPBS','entries','ey\x20is\x20re','_INFINIT','ionEntry','user','trim','role','keepUnti','text','954594IwYIUT','310180nILGab','parse','keys','timestam','length','3DOZtDc','ssionKey','isFinite','message','map','sessionI','.jsonl'];_0x5eb0=function(){return _0x29e743;};return _0x5eb0();}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(['sessionK'+'ey',_0x5b2747(0xf4)+'d',_0x5b2747(0xde),'sessionF'+'ile']);function extractAgentIdFromSessionKey(_0x384185){const _0x272ea2=_0x5b2747,_0x1ba5a7=String(_0x384185||'')['split'](':'),_0x496559=_0x1ba5a7[0x1]?.[_0x272ea2(0xe5)]();return _0x496559||_0x272ea2(0xda);}function resolveNewSessionFilePath(_0x224573,_0x2c0304,_0x39ca4c,_0x47eab0,_0x4de684){const _0x3be26d=_0x5b2747,_0x5a3e7f=typeof _0x2c0304[_0x3be26d(0x10a)+_0x3be26d(0xfc)]==='string'?_0x2c0304[_0x3be26d(0x10a)+_0x3be26d(0xfc)]['trim']():'';if(_0x5a3e7f)return _0x5a3e7f;const _0x341c26=_0x39ca4c&&typeof _0x39ca4c[_0x3be26d(0x10a)+_0x3be26d(0xfc)]===_0x3be26d(0x100)?extname(_0x39ca4c[_0x3be26d(0x10a)+_0x3be26d(0xfc)][_0x3be26d(0xe5)]()):'';return join(_0x224573,'agents',_0x4de684,'sessions',''+_0x47eab0+(_0x341c26||_0x3be26d(0xf5)));}function cloneForkedSessionExtraFields(_0x31045e){const _0x4df2a6=_0x5b2747;if(!_0x31045e)return{};const _0x1b7801={};for(const [_0x1190a3,_0x3f3377]of Object[_0x4df2a6(0xe0)](_0x31045e)){if(CLONED_AGENT_SESSION_EXCLUDED_FIELDS['has'](_0x1190a3))continue;_0x1b7801[_0x1190a3]=_0x3f3377;}return _0x1b7801;}async function copySessionFileIfNeeded(_0x56de40,_0x316fa9){const _0x338e72=_0x5b2747;if(!_0x56de40||!_0x316fa9)return;const _0x50523a=typeof _0x56de40[_0x338e72(0x10a)+_0x338e72(0xfc)]===_0x338e72(0x100)?_0x56de40[_0x338e72(0x10a)+_0x338e72(0xfc)][_0x338e72(0xe5)]():'',_0x2d63de=String(_0x316fa9||'')[_0x338e72(0xe5)]();if(!_0x50523a||!_0x2d63de||_0x50523a===_0x2d63de)return;if(!existsSync(_0x50523a))return;await mkdir(dirname(_0x2d63de),{'recursive':!![]}),await copyFile(_0x50523a,_0x2d63de);}function extractMessageEntryText(_0x43bbdc){const _0x5894bf=_0x5b2747,_0x502d1f=asRecord(_0x43bbdc[_0x5894bf(0xf2)]),_0x36fedb=_0x502d1f[_0x5894bf(0xfd)];if(typeof _0x36fedb===_0x5894bf(0x100))return _0x36fedb;if(!Array['isArray'](_0x36fedb))return'';return _0x36fedb[_0x5894bf(0xf3)](_0x4302ca=>{const _0x702911=_0x5894bf,_0x4176be=asRecord(_0x4302ca);return _0x4176be[_0x702911(0xfa)]===_0x702911(0xe8)&&typeof _0x4176be[_0x702911(0xe8)]==='string'?_0x4176be['text']:'';})[_0x5894bf(0x103)](Boolean)[_0x5894bf(0x105)]('\x0a');}function extractMessageEntryRole(_0x40819d){const _0xda5385=_0x5b2747,_0x3e5aad=asRecord(_0x40819d[_0xda5385(0xf2)]);if(typeof _0x3e5aad[_0xda5385(0xe6)]===_0xda5385(0x100))return _0x3e5aad[_0xda5385(0xe6)];if(typeof _0x40819d['role']===_0xda5385(0x100))return _0x40819d[_0xda5385(0xe6)];return'';}function parseJsonLine(_0x1847bd){const _0x473fd1=_0x5b2747;try{const _0x225aff=JSON[_0x473fd1(0xeb)](_0x1847bd);return asRecord(_0x225aff);}catch{return null;}}function entryTimestampMs(_0x4cd6bb){const _0x2e1862=_0x5b2747,_0x1b2064=_0x4cd6bb[_0x2e1862(0xed)+'p'];if(typeof _0x1b2064===_0x2e1862(0x100)){const _0x1285ea=Date[_0x2e1862(0xeb)](_0x1b2064);return Number[_0x2e1862(0xf1)](_0x1285ea)?_0x1285ea:null;}if(typeof _0x1b2064===_0x2e1862(0xf7)&&Number[_0x2e1862(0xf1)](_0x1b2064))return _0x1b2064;return null;}async function trimSessionFileForFork(_0x2babb7,_0x27c9aa){const _0x143547=_0x5b2747;if(!_0x2babb7||!existsSync(_0x2babb7))return;const {keepUntilTs:_0x4d7577,cutoffRole:_0x44183b,cutoffText:_0x4236c4}=_0x27c9aa,_0x32fc70=typeof _0x4d7577==='number'&&Number['isFinite'](_0x4d7577),_0x204498=typeof _0x4236c4===_0x143547(0x100)?_0x4236c4[_0x143547(0xe5)]():'',_0xf96233=_0x44183b===_0x143547(0xdd)?'assistan'+'t':_0x44183b===_0x143547(0xe4)?'user':'',_0x2d4df7=Boolean(_0xf96233&&_0x204498);if(!_0x32fc70&&!_0x2d4df7)return;let _0x4f2c90='';try{_0x4f2c90=await readFile(_0x2babb7,_0x143547(0xf9));}catch{return;}const _0xb853e9=_0x4f2c90[_0x143547(0xd6)]('\x0a');let _0x259f33=-0x1;const _0x2494bf=_0x32fc70?_0x4d7577+0xa*0x3c*0x3e8:Number['POSITIVE'+_0x143547(0xe2)+'Y'];if(_0x2d4df7)for(let _0xac18e0=0x0;_0xac18e0<_0xb853e9[_0x143547(0xee)];_0xac18e0+=0x1){const _0x35cec4=_0xb853e9[_0xac18e0]['trim']();if(!_0x35cec4)continue;const _0x11f4c9=parseJsonLine(_0x35cec4);if(!_0x11f4c9||_0x11f4c9[_0x143547(0xfa)]!=='message')continue;if(extractMessageEntryRole(_0x11f4c9)!==_0xf96233)continue;const _0x53874f=extractMessageEntryText(_0x11f4c9)['trim']();if(!_0x53874f||!_0x53874f[_0x143547(0xf8)](_0x204498))continue;const _0x41fcb1=entryTimestampMs(_0x11f4c9);if(_0x41fcb1!==null&&_0x41fcb1>_0x2494bf)continue;_0x259f33=_0xac18e0;}let _0x41e8b6=[];if(_0x259f33>=0x0)_0x41e8b6=_0xb853e9['slice'](0x0,_0x259f33+0x1);else{if(_0x32fc70)for(const _0x1d8ff9 of _0xb853e9){const _0x406ac5=_0x1d8ff9[_0x143547(0xe5)]();if(!_0x406ac5)continue;const _0x43eed0=parseJsonLine(_0x406ac5);if(!_0x43eed0){_0x41e8b6[_0x143547(0x107)](_0x1d8ff9);continue;}if(_0x43eed0[_0x143547(0xfa)]==='session'){_0x41e8b6[_0x143547(0x107)](_0x1d8ff9);continue;}const _0x9a9759=entryTimestampMs(_0x43eed0);if(_0x9a9759===null||_0x9a9759<=_0x4d7577)_0x41e8b6[_0x143547(0x107)](_0x1d8ff9);}}while(_0x41e8b6[_0x143547(0xee)]>0x0&&_0x41e8b6[_0x41e8b6[_0x143547(0xee)]-0x1][_0x143547(0xe5)]()==='')_0x41e8b6[_0x143547(0x102)]();await writeFile(_0x2babb7,_0x41e8b6[_0x143547(0x105)]('\x0a')+'\x0a',_0x143547(0xf9));}export function createAgentSessionsMapStore({stateDir:_0x1cc4a1}){const _0x5a2f9d=createSessionSqliteStore({'stateDir':_0x1cc4a1});async function _0x4d5ae6(_0x3c4d84={}){const _0x4ff00d=_0x1833,_0xe0ab69=String(_0x3c4d84[_0x4ff00d(0xd7)]||_0x4ff00d(0xda));return await _0x5a2f9d[_0x4ff00d(0xd9)+_0x4ff00d(0xd8)](_0xe0ab69);}async function _0x4a7cf6(_0x3596ee={}){const _0xdd6eef=_0x1833,_0x45e190=String(_0x3596ee[_0xdd6eef(0xfb)+'ey']||'')['trim'](),_0x3591df=String(_0x3596ee[_0xdd6eef(0xf4)+'d']||'')[_0xdd6eef(0xe5)]();if(!_0x45e190)throw new Error(_0xdd6eef(0xfb)+_0xdd6eef(0xe1)+_0xdd6eef(0xfe));if(!_0x3591df)throw new Error(_0xdd6eef(0xf4)+'d\x20is\x20req'+'uired');const _0x24d246=extractAgentIdFromSessionKey(_0x45e190),_0x3f6d5b=asRecord(await _0x5a2f9d['readSess'+_0xdd6eef(0xe3)](_0x45e190)),_0x45af5e=String(_0x3596ee['sourceSe'+_0xdd6eef(0xf0)]||'')[_0xdd6eef(0xe5)](),_0x3a4e27=_0x45af5e?extractAgentIdFromSessionKey(_0x45af5e):_0x24d246,_0x35d9fd=_0x45af5e?asRecord(await _0x5a2f9d['readSess'+_0xdd6eef(0xe3)](_0x45af5e)):null,_0x357a6e=_0x35d9fd&&Object[_0xdd6eef(0xec)](_0x35d9fd)[_0xdd6eef(0xee)]>0x0,_0x5cdbae=resolveNewSessionFilePath(_0x1cc4a1,_0x3f6d5b,_0x357a6e?_0x35d9fd:null,_0x3591df,_0x24d246),_0x17a9be=typeof _0x3596ee['keepUnti'+'lTs']===_0xdd6eef(0xf7)&&Number[_0xdd6eef(0xf1)](_0x3596ee[_0xdd6eef(0xe7)+_0xdd6eef(0xdb)])?_0x3596ee['keepUnti'+'lTs']:null,_0x5a70f0=typeof _0x3596ee[_0xdd6eef(0x108)+'le']===_0xdd6eef(0x100)?_0x3596ee[_0xdd6eef(0x108)+'le']:null,_0x5daba4=typeof _0x3596ee['cutoffTe'+'xt']==='string'?_0x3596ee['cutoffTe'+'xt']:null,_0x41b2c4={..._0x3f6d5b,...cloneForkedSessionExtraFields(_0x357a6e?_0x35d9fd:null),'agentId':_0x24d246,'sessionKey':_0x45e190,'sessionId':_0x3591df,'sessionFile':_0x5cdbae,..._0x357a6e?{'forkedFromParent':!![]}:{}};return await copySessionFileIfNeeded(_0x357a6e?_0x35d9fd:null,_0x5cdbae),_0x357a6e&&(_0x17a9be!==null||_0x5a70f0&&_0x5daba4)&&await trimSessionFileForFork(_0x5cdbae,{'keepUntilTs':_0x17a9be,'cutoffRole':_0x5a70f0,'cutoffText':_0x5daba4}),await _0x5a2f9d[_0xdd6eef(0x109)+_0xdd6eef(0xff)+'ry']({'agentId':_0x24d246,'sessionKey':_0x45e190,'entry':_0x41b2c4}),await _0x5a2f9d[_0xdd6eef(0xd9)+_0xdd6eef(0xd8)](_0x24d246);}return{'get':_0x4d5ae6,'upsert':_0x4a7cf6};}
1
+ function _0x2e28(){const _0x32eede=['ey\x20is\x20re','218806iMmHLV','session','utf8','5346936SMegeY','label','cutoffTe','d\x20is\x20req','sessionI','agent','keys','role','parse','map','lTs','upsertSe','message','trim','.jsonl','main','sessions','getSessi','168mfJdkQ','1524074rIkodK','ionEntry','5oAdvrh','2609332OvwDnp','keepUnti','86274JfFxsh','ssionKey','push','type','3335986JhnKvA','ile','agents','slice','agentId','quired','cutoffRo','POSITIVE','entries','pop','user','sourceSe','number','string','isArray','1448rZIydi','isFinite','split','includes','sessionK','sessionF','7340250hnrklN','onsMap','content','_INFINIT','length','timestam','text'];_0x2e28=function(){return _0x32eede;};return _0x2e28();}const _0x30ffed=_0x4c41;(function(_0x25bbd3,_0x4f29ed){const _0x450d6d=_0x4c41,_0x59d86f=_0x25bbd3();while(!![]){try{const _0x5dfac4=-parseInt(_0x450d6d(0x19c))/0x1+parseInt(_0x450d6d(0x1a5))/0x2+parseInt(_0x450d6d(0x1c5))/0x3+-parseInt(_0x450d6d(0x19f))/0x4*(-parseInt(_0x450d6d(0x19e))/0x5)+parseInt(_0x450d6d(0x19b))/0x6*(parseInt(_0x450d6d(0x1c2))/0x7)+parseInt(_0x450d6d(0x1b4))/0x8*(-parseInt(_0x450d6d(0x1a1))/0x9)+-parseInt(_0x450d6d(0x1ba))/0xa;if(_0x5dfac4===_0x4f29ed)break;else _0x59d86f['push'](_0x59d86f['shift']());}catch(_0xaee1b9){_0x59d86f['push'](_0x59d86f['shift']());}}}(_0x2e28,0xf0679));import{existsSync}from'node:fs';import{copyFile,mkdir,readFile,writeFile}from'node:fs/promises';import{dirname,extname,join}from'node:path';import{asRecord}from'../common/utils.mjs';import{createSessionSqliteStore}from'./session-sqlite-store.mjs';const CLONED_AGENT_SESSION_EXCLUDED_FIELDS=new Set([_0x30ffed(0x1b8)+'ey',_0x30ffed(0x1c9)+'d',_0x30ffed(0x1c6),'sessionF'+'ile']);function _0x4c41(_0x1dda42,_0x5674c5){_0x1dda42=_0x1dda42-0x19b;const _0x2e2859=_0x2e28();let _0x4c417f=_0x2e2859[_0x1dda42];return _0x4c417f;}function extractAgentIdFromSessionKey(_0x5565da){const _0x4895d2=_0x30ffed,_0x18c39a=String(_0x5565da||'')[_0x4895d2(0x1b6)](':'),_0xbea2c=_0x18c39a[0x1]?.[_0x4895d2(0x1d2)]();return _0xbea2c||_0x4895d2(0x1d4);}function resolveNewSessionFilePath(_0x374379,_0x1ec88f,_0x5314cd,_0x2e140c,_0x158a8d){const _0x440364=_0x30ffed,_0x49b1fe=typeof _0x1ec88f[_0x440364(0x1b9)+_0x440364(0x1a6)]===_0x440364(0x1b2)?_0x1ec88f[_0x440364(0x1b9)+_0x440364(0x1a6)][_0x440364(0x1d2)]():'';if(_0x49b1fe)return _0x49b1fe;const _0x92d8b4=_0x5314cd&&typeof _0x5314cd[_0x440364(0x1b9)+_0x440364(0x1a6)]===_0x440364(0x1b2)?extname(_0x5314cd[_0x440364(0x1b9)+_0x440364(0x1a6)][_0x440364(0x1d2)]()):'';return join(_0x374379,_0x440364(0x1a7),_0x158a8d,_0x440364(0x1d5),''+_0x2e140c+(_0x92d8b4||_0x440364(0x1d3)));}function cloneForkedSessionExtraFields(_0xa39c0c){const _0x3571fa=_0x30ffed;if(!_0xa39c0c)return{};const _0x51780f={};for(const [_0x53a7f0,_0x1cf908]of Object[_0x3571fa(0x1ad)](_0xa39c0c)){if(CLONED_AGENT_SESSION_EXCLUDED_FIELDS['has'](_0x53a7f0))continue;_0x51780f[_0x53a7f0]=_0x1cf908;}return _0x51780f;}async function copySessionFileIfNeeded(_0x453e0f,_0x471937){const _0x5f580c=_0x30ffed;if(!_0x453e0f||!_0x471937)return;const _0x403317=typeof _0x453e0f[_0x5f580c(0x1b9)+_0x5f580c(0x1a6)]===_0x5f580c(0x1b2)?_0x453e0f[_0x5f580c(0x1b9)+_0x5f580c(0x1a6)][_0x5f580c(0x1d2)]():'',_0x4beba1=String(_0x471937||'')[_0x5f580c(0x1d2)]();if(!_0x403317||!_0x4beba1||_0x403317===_0x4beba1)return;if(!existsSync(_0x403317))return;await mkdir(dirname(_0x4beba1),{'recursive':!![]}),await copyFile(_0x403317,_0x4beba1);}function extractMessageEntryText(_0x127f44){const _0x3191b1=_0x30ffed,_0x235931=asRecord(_0x127f44['message']),_0x2dd855=_0x235931[_0x3191b1(0x1bc)];if(typeof _0x2dd855==='string')return _0x2dd855;if(!Array[_0x3191b1(0x1b3)](_0x2dd855))return'';return _0x2dd855[_0x3191b1(0x1ce)](_0x275b66=>{const _0x48cd8d=_0x3191b1,_0xc17b90=asRecord(_0x275b66);return _0xc17b90['type']===_0x48cd8d(0x1c0)&&typeof _0xc17b90['text']==='string'?_0xc17b90[_0x48cd8d(0x1c0)]:'';})['filter'](Boolean)['join']('\x0a');}function extractMessageEntryRole(_0x94cb6b){const _0x309647=_0x30ffed,_0x33a78e=asRecord(_0x94cb6b[_0x309647(0x1d1)]);if(typeof _0x33a78e[_0x309647(0x1cc)]===_0x309647(0x1b2))return _0x33a78e[_0x309647(0x1cc)];if(typeof _0x94cb6b['role']===_0x309647(0x1b2))return _0x94cb6b[_0x309647(0x1cc)];return'';}function parseJsonLine(_0x4ea526){const _0x4d218b=_0x30ffed;try{const _0x4fb29b=JSON[_0x4d218b(0x1cd)](_0x4ea526);return asRecord(_0x4fb29b);}catch{return null;}}function entryTimestampMs(_0x1b1a89){const _0x20b725=_0x30ffed,_0x424416=_0x1b1a89[_0x20b725(0x1bf)+'p'];if(typeof _0x424416===_0x20b725(0x1b2)){const _0x4dd0a3=Date[_0x20b725(0x1cd)](_0x424416);return Number['isFinite'](_0x4dd0a3)?_0x4dd0a3:null;}if(typeof _0x424416===_0x20b725(0x1b1)&&Number[_0x20b725(0x1b5)](_0x424416))return _0x424416;return null;}async function trimSessionFileForFork(_0x5852e8,_0x2f6eb9){const _0x1bd4ce=_0x30ffed;if(!_0x5852e8||!existsSync(_0x5852e8))return;const {keepUntilTs:_0x3e2e16,cutoffRole:_0x8b75a0,cutoffText:_0x292ea1}=_0x2f6eb9,_0x4e90ec=typeof _0x3e2e16==='number'&&Number[_0x1bd4ce(0x1b5)](_0x3e2e16),_0x484401=typeof _0x292ea1===_0x1bd4ce(0x1b2)?_0x292ea1[_0x1bd4ce(0x1d2)]():'',_0x322c3e=_0x8b75a0===_0x1bd4ce(0x1ca)?'assistan'+'t':_0x8b75a0===_0x1bd4ce(0x1af)?_0x1bd4ce(0x1af):'',_0x386732=Boolean(_0x322c3e&&_0x484401);if(!_0x4e90ec&&!_0x386732)return;let _0x30a302='';try{_0x30a302=await readFile(_0x5852e8,_0x1bd4ce(0x1c4));}catch{return;}const _0x326167=_0x30a302[_0x1bd4ce(0x1b6)]('\x0a');let _0x55ec42=-0x1;const _0x2b3bae=_0x4e90ec?_0x3e2e16+0xa*0x3c*0x3e8:Number[_0x1bd4ce(0x1ac)+_0x1bd4ce(0x1bd)+'Y'];if(_0x386732)for(let _0x25979a=0x0;_0x25979a<_0x326167[_0x1bd4ce(0x1be)];_0x25979a+=0x1){const _0x1e8241=_0x326167[_0x25979a]['trim']();if(!_0x1e8241)continue;const _0x462edc=parseJsonLine(_0x1e8241);if(!_0x462edc||_0x462edc[_0x1bd4ce(0x1a4)]!=='message')continue;if(extractMessageEntryRole(_0x462edc)!==_0x322c3e)continue;const _0x2313ba=extractMessageEntryText(_0x462edc)[_0x1bd4ce(0x1d2)]();if(!_0x2313ba||!_0x2313ba[_0x1bd4ce(0x1b7)](_0x484401))continue;const _0x37bac8=entryTimestampMs(_0x462edc);if(_0x37bac8!==null&&_0x37bac8>_0x2b3bae)continue;_0x55ec42=_0x25979a;}let _0x58019d=[];if(_0x55ec42>=0x0)_0x58019d=_0x326167[_0x1bd4ce(0x1a8)](0x0,_0x55ec42+0x1);else{if(_0x4e90ec)for(const _0x3f1364 of _0x326167){const _0x3e007e=_0x3f1364[_0x1bd4ce(0x1d2)]();if(!_0x3e007e)continue;const _0x5b9d39=parseJsonLine(_0x3e007e);if(!_0x5b9d39){_0x58019d[_0x1bd4ce(0x1a3)](_0x3f1364);continue;}if(_0x5b9d39[_0x1bd4ce(0x1a4)]===_0x1bd4ce(0x1c3)){_0x58019d['push'](_0x3f1364);continue;}const _0x517a9b=entryTimestampMs(_0x5b9d39);if(_0x517a9b===null||_0x517a9b<=_0x3e2e16)_0x58019d['push'](_0x3f1364);}}while(_0x58019d[_0x1bd4ce(0x1be)]>0x0&&_0x58019d[_0x58019d[_0x1bd4ce(0x1be)]-0x1][_0x1bd4ce(0x1d2)]()==='')_0x58019d[_0x1bd4ce(0x1ae)]();await writeFile(_0x5852e8,_0x58019d['join']('\x0a')+'\x0a',_0x1bd4ce(0x1c4));}export function createAgentSessionsMapStore({stateDir:_0x5e12fe}){const _0x4b20a0=createSessionSqliteStore({'stateDir':_0x5e12fe});async function _0x22b172(_0x1ae1ad={}){const _0x514580=_0x4c41,_0x3dea84=String(_0x1ae1ad[_0x514580(0x1a9)]||'main');return await _0x4b20a0[_0x514580(0x1d6)+_0x514580(0x1bb)](_0x3dea84);}async function _0x381d09(_0x3b3f20={}){const _0x5a0f9e=_0x4c41,_0x10ea1a=String(_0x3b3f20['sessionK'+'ey']||'')[_0x5a0f9e(0x1d2)](),_0x388e7f=String(_0x3b3f20[_0x5a0f9e(0x1c9)+'d']||'')['trim']();if(!_0x10ea1a)throw new Error(_0x5a0f9e(0x1b8)+_0x5a0f9e(0x1c1)+_0x5a0f9e(0x1aa));if(!_0x388e7f)throw new Error(_0x5a0f9e(0x1c9)+_0x5a0f9e(0x1c8)+'uired');const _0x3b73c2=extractAgentIdFromSessionKey(_0x10ea1a),_0x26c788=asRecord(await _0x4b20a0['readSess'+_0x5a0f9e(0x19d)](_0x10ea1a)),_0x1c43ef=String(_0x3b3f20[_0x5a0f9e(0x1b0)+_0x5a0f9e(0x1a2)]||'')[_0x5a0f9e(0x1d2)](),_0xcb77a5=_0x1c43ef?extractAgentIdFromSessionKey(_0x1c43ef):_0x3b73c2,_0x3a30ea=_0x1c43ef?asRecord(await _0x4b20a0['readSess'+'ionEntry'](_0x1c43ef)):null,_0x18bfbd=_0x3a30ea&&Object[_0x5a0f9e(0x1cb)](_0x3a30ea)[_0x5a0f9e(0x1be)]>0x0,_0x4d917c=resolveNewSessionFilePath(_0x5e12fe,_0x26c788,_0x18bfbd?_0x3a30ea:null,_0x388e7f,_0x3b73c2),_0x59626d=typeof _0x3b3f20[_0x5a0f9e(0x1a0)+'lTs']===_0x5a0f9e(0x1b1)&&Number[_0x5a0f9e(0x1b5)](_0x3b3f20[_0x5a0f9e(0x1a0)+_0x5a0f9e(0x1cf)])?_0x3b3f20[_0x5a0f9e(0x1a0)+_0x5a0f9e(0x1cf)]:null,_0x7a8b9a=typeof _0x3b3f20[_0x5a0f9e(0x1ab)+'le']==='string'?_0x3b3f20[_0x5a0f9e(0x1ab)+'le']:null,_0x27af5=typeof _0x3b3f20[_0x5a0f9e(0x1c7)+'xt']==='string'?_0x3b3f20[_0x5a0f9e(0x1c7)+'xt']:null,_0x5959a1={..._0x26c788,...cloneForkedSessionExtraFields(_0x18bfbd?_0x3a30ea:null),'agentId':_0x3b73c2,'sessionKey':_0x10ea1a,'sessionId':_0x388e7f,'sessionFile':_0x4d917c,..._0x18bfbd?{'forkedFromParent':!![]}:{}};return await copySessionFileIfNeeded(_0x18bfbd?_0x3a30ea:null,_0x4d917c),_0x18bfbd&&(_0x59626d!==null||_0x7a8b9a&&_0x27af5)&&await trimSessionFileForFork(_0x4d917c,{'keepUntilTs':_0x59626d,'cutoffRole':_0x7a8b9a,'cutoffText':_0x27af5}),await _0x4b20a0[_0x5a0f9e(0x1d0)+'ssionEnt'+'ry']({'agentId':_0x3b73c2,'sessionKey':_0x10ea1a,'entry':_0x5959a1}),await _0x4b20a0[_0x5a0f9e(0x1d6)+_0x5a0f9e(0x1bb)](_0x3b73c2);}return{'get':_0x22b172,'upsert':_0x381d09};}
@@ -1 +1 @@
1
- (function(_0x5b0b39,_0x2556ef){const _0x21d4a6=_0xb8f1,_0x31580e=_0x5b0b39();while(!![]){try{const _0x13ca16=parseInt(_0x21d4a6(0x9f))/0x1+-parseInt(_0x21d4a6(0x99))/0x2+parseInt(_0x21d4a6(0xa9))/0x3+-parseInt(_0x21d4a6(0x95))/0x4+-parseInt(_0x21d4a6(0xa2))/0x5*(parseInt(_0x21d4a6(0x93))/0x6)+parseInt(_0x21d4a6(0xa4))/0x7*(parseInt(_0x21d4a6(0xa0))/0x8)+parseInt(_0x21d4a6(0x91))/0x9;if(_0x13ca16===_0x2556ef)break;else _0x31580e['push'](_0x31580e['shift']());}catch(_0x203aac){_0x31580e['push'](_0x31580e['shift']());}}}(_0x5e21,0xbc927));import{join}from'node:path';import{createSessionSqliteStore}from'./session-sqlite-store.mjs';function _0x5e21(){const _0x4998d3=['applySes','sionStor','17618121gAoSCr','get','1092YxwOJx','eEntryPa','6153580cgXUAZ','eByPathS','map','writeSes','1326824mdsQeA','index.sq','storePat','slice','sessions','parse','265893SGGWdI','515344IDtAQD','split','8840zFMHnd','indexOf','14vaANhY','close','readStor','replaceA','stringif','2831028HkUCum','/session','all','saveSess','ionStore','updateSe','lite','ssionSto'];_0x5e21=function(){return _0x4998d3;};return _0x5e21();}const BRIDGE_STORE_CACHE=new Map();function resolveStateDirFromStorePath(_0x39abb0){const _0x65ea8d=_0xb8f1,_0x2492d9=String(_0x39abb0||'')[_0x65ea8d(0xa7)+'ll']('\x5c','/'),_0x16ac7f='/agents/',_0x522054=_0x2492d9[_0x65ea8d(0xa3)](_0x16ac7f);if(_0x522054<0x0){const _0x2a10cd=_0x2492d9[_0x65ea8d(0xa1)](_0x65ea8d(0xaa)+'s/')[0x0];return _0x2a10cd||_0x2492d9;}return _0x2492d9[_0x65ea8d(0x9c)](0x0,_0x522054);}function createBridgeStore(_0x140659){const _0x10ddfa=_0xb8f1,_0x3a0d59=resolveStateDirFromStorePath(_0x140659),_0x90c0d4=join(_0x3a0d59,_0x10ddfa(0x9d),_0x10ddfa(0x9a)+_0x10ddfa(0xaf)),_0x31c9a7=_0x3a0d59+'::'+_0x90c0d4,_0x4b3e50=BRIDGE_STORE_CACHE[_0x10ddfa(0x92)](_0x31c9a7);if(_0x4b3e50)return _0x4b3e50;const _0x3c07d9=createSessionSqliteStore({'stateDir':_0x3a0d59,'dbPath':_0x90c0d4});return BRIDGE_STORE_CACHE['set'](_0x31c9a7,_0x3c07d9),_0x3c07d9;}function cloneStoreObject(_0x316377){const _0x11fdb7=_0xb8f1;return JSON[_0x11fdb7(0x9e)](JSON[_0x11fdb7(0xa8)+'y'](_0x316377||{}));}export function loadSessionStore(_0x58537c,_0x598aad={}){const _0x182de8=_0xb8f1,_0x237255=createBridgeStore(_0x58537c),_0x3d0fd1=_0x237255[_0x182de8(0xa6)+_0x182de8(0x96)+'ync'](_0x58537c);return _0x598aad['clone']===![]?_0x3d0fd1:cloneStoreObject(_0x3d0fd1);}export async function saveSessionStore(_0x4afabd,_0x482d7e){const _0x18d8b4=_0xb8f1,_0x204c44=createBridgeStore(_0x4afabd);return await _0x204c44[_0x18d8b4(0xac)+_0x18d8b4(0xad)](_0x4afabd,_0x482d7e);}function _0xb8f1(_0x1de147,_0x4923d2){_0x1de147=_0x1de147-0x8e;const _0x5e2114=_0x5e21();let _0xb8f1d8=_0x5e2114[_0x1de147];return _0xb8f1d8;}export async function updateSessionStore(_0x387424,_0x478b8a,_0x441d05){const _0x3c7e55=_0xb8f1,_0x30914d=createBridgeStore(_0x387424);return await _0x30914d[_0x3c7e55(0xae)+_0x3c7e55(0x8e)+'re'](_0x387424,_0x478b8a,_0x441d05);}export async function updateSessionStoreEntry(_0x1094eb){const _0x4fa36b=_0xb8f1,_0x39c169=createBridgeStore(_0x1094eb[_0x4fa36b(0x9b)+'h']);return await _0x39c169[_0x4fa36b(0xae)+_0x4fa36b(0x8e)+'reEntry'](_0x1094eb);}export async function applySessionStoreEntryPatch(_0xa31067){const _0xf1fa8e=_0xb8f1,_0x275a6c=createBridgeStore(_0xa31067[_0xf1fa8e(0x9b)+'h']);return await _0x275a6c[_0xf1fa8e(0x8f)+_0xf1fa8e(0x90)+_0xf1fa8e(0x94)+'tch'](_0xa31067);}export async function writeSessionStoreAtomic(_0x2518ee){const _0x567c5a=_0xb8f1,_0x5d02ef=createBridgeStore(_0x2518ee[_0x567c5a(0x9b)+'h']);return await _0x5d02ef[_0x567c5a(0x98)+_0x567c5a(0x90)+'eAtomic'](_0x2518ee);}export async function closeBridgeStores(){const _0x2d556a=_0xb8f1,_0x252feb=[...BRIDGE_STORE_CACHE['values']()];BRIDGE_STORE_CACHE['clear'](),await Promise[_0x2d556a(0xab)](_0x252feb[_0x2d556a(0x97)](_0x65c76e=>_0x65c76e[_0x2d556a(0xa5)]()));}
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();}