@wujie-shell/core 3.0.1 → 3.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (41) hide show
  1. package/dist/bin/wujie-shell.mjs +1 -1
  2. package/dist/src/agents/bundled-agent-skills.mjs +1 -1
  3. package/dist/src/agents/bundled-agents.mjs +1 -1
  4. package/dist/src/chat/media-archive.mjs +1 -1
  5. package/dist/src/chat/queue.mjs +1 -1
  6. package/dist/src/common/diagnostics.mjs +1 -1
  7. package/dist/src/common/logging.mjs +1 -1
  8. package/dist/src/common/runtime-logger.mjs +1 -1
  9. package/dist/src/common/user-events.mjs +1 -1
  10. package/dist/src/common/utils.mjs +1 -1
  11. package/dist/src/config/controller.mjs +1 -1
  12. package/dist/src/connectors/config-utils.mjs +1 -1
  13. package/dist/src/connectors/constants.mjs +1 -1
  14. package/dist/src/connectors/controller.mjs +1 -1
  15. package/dist/src/connectors/kdocs-cli.mjs +1 -1
  16. package/dist/src/electron/main.mjs +1 -1
  17. package/dist/src/electron/preload.mjs +1 -1
  18. package/dist/src/files/generated-files-store.mjs +1 -1
  19. package/dist/src/files/handlers.mjs +1 -1
  20. package/dist/src/gateway/chat-delta.mjs +1 -1
  21. package/dist/src/gateway/controller.mjs +1 -1
  22. package/dist/src/gateway/ws-client.mjs +1 -1
  23. package/dist/src/index.mjs +1 -1
  24. package/dist/src/log-reporting/handlers.mjs +1 -1
  25. package/dist/src/log-reporting/report-logs.mjs +1 -1
  26. package/dist/src/models/handlers.mjs +1 -1
  27. package/dist/src/preferences/store.mjs +1 -1
  28. package/dist/src/runtime/index.mjs +1 -1
  29. package/dist/src/runtime/patch-channel-plugin-runtime.mjs +1 -1
  30. package/dist/src/runtime/patch-chat-history-mixed-tool-content.mjs +1 -1
  31. package/dist/src/runtime/patch-session-store-sqlite.mjs +1 -1
  32. package/dist/src/runtime/plugin-sync.mjs +1 -1
  33. package/dist/src/sessions/agent-sessions-map-store.mjs +1 -1
  34. package/dist/src/sessions/runtime-bridge.mjs +1 -1
  35. package/dist/src/sessions/session-sqlite-store.mjs +1 -1
  36. package/dist/src/skills/import.mjs +1 -1
  37. package/dist/src/skills/market.mjs +1 -1
  38. package/dist/src/terminal/manager.mjs +1 -1
  39. package/dist/src/updates/controller.mjs +1 -1
  40. package/dist/src/updates/loader.mjs +1 -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 _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 +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 _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 +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 _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 +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
+ 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 +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(_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)]()));}