@wujie-shell/core 3.0.0 → 3.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 (40) 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/package.json +3 -3
@@ -1 +1 @@
1
- (function(_0x5dd28f,_0x386bfe){const _0x2b4835=_0x9a0b,_0x248b75=_0x5dd28f();while(!![]){try{const _0x364dda=parseInt(_0x2b4835(0xca))/0x1+parseInt(_0x2b4835(0x9d))/0x2+-parseInt(_0x2b4835(0x91))/0x3+parseInt(_0x2b4835(0x9f))/0x4*(-parseInt(_0x2b4835(0x79))/0x5)+parseInt(_0x2b4835(0x97))/0x6*(parseInt(_0x2b4835(0x8b))/0x7)+parseInt(_0x2b4835(0xb0))/0x8+-parseInt(_0x2b4835(0x85))/0x9;if(_0x364dda===_0x386bfe)break;else _0x248b75['push'](_0x248b75['shift']());}catch(_0x1bcf2e){_0x248b75['push'](_0x248b75['shift']());}}}(_0x7fdc,0x58ba8));export function patchMixedToolContentFromSource(_0x4c6a56){const _0x5a3842=_0x9a0b,_0x470b93=_0x5a3842(0x9e)+'\x20project'+_0x5a3842(0xc0)+_0x5a3842(0xd7)+_0x5a3842(0x90)+'olConten'+'t',_0x31fbde=_0x4c6a56['indexOf'](_0x470b93);if(_0x31fbde===-0x1)return{'patched':![],'reason':'not-foun'+'d'};let _0x5eaffc=0x0,_0x21b41e=![],_0x1f9281=_0x31fbde;for(let _0x2fb7a1=_0x31fbde;_0x2fb7a1<_0x4c6a56['length'];_0x2fb7a1+=0x1){_0x4c6a56[_0x2fb7a1]==='{'&&(_0x5eaffc+=0x1,_0x21b41e=!![]);_0x4c6a56[_0x2fb7a1]==='}'&&(_0x5eaffc-=0x1);if(_0x21b41e&&_0x5eaffc===0x0){_0x1f9281=_0x2fb7a1+0x1;break;}}const _0x1a7c7c=_0x4c6a56[_0x5a3842(0x98)+'g'](_0x31fbde,_0x1f9281);if(_0x1a7c7c[_0x5a3842(0xb6)]('projecte'+_0x5a3842(0x95)+_0x5a3842(0xd0)))return{'patched':![],'reason':_0x5a3842(0xcc)+_0x5a3842(0xc8)};const _0x418b45=_0x5a3842(0x9e)+_0x5a3842(0x7e)+_0x5a3842(0xc0)+'tTextFro'+_0x5a3842(0x90)+_0x5a3842(0xbc)+_0x5a3842(0xa5)+'t,\x20maxCh'+_0x5a3842(0xd4)+_0x5a3842(0xd2)+'tent.som'+_0x5a3842(0xc3)+_0x5a3842(0xb3)+_0x5a3842(0x9a)+_0x5a3842(0xd5)+_0x5a3842(0xac)+_0x5a3842(0xce)+_0x5a3842(0x8c)+')\x20return'+_0x5a3842(0x8a)+'\x09\x09return'+_0x5a3842(0xb7)+_0x5a3842(0xa6)+_0x5a3842(0xc6)+_0x5a3842(0xc1)+_0x5a3842(0xcf)+_0x5a3842(0xa2)+_0x5a3842(0xcb)+_0x5a3842(0xaf)+_0x5a3842(0x87)+_0x5a3842(0xb8)+'nst\x20proj'+_0x5a3842(0x7a)+_0x5a3842(0xd8)+_0x5a3842(0x80)+_0x5a3842(0x94)+_0x5a3842(0xa0)+_0x5a3842(0xd6)+_0x5a3842(0xb5)+_0x5a3842(0x9c)+_0x5a3842(0xa4)+_0x5a3842(0xae)+_0x5a3842(0xb4)+_0x5a3842(0xaa)+_0x5a3842(0x8f)+_0x5a3842(0x82)+_0x5a3842(0x92)+_0x5a3842(0xbd)+_0x5a3842(0xab)+'nst\x20entr'+_0x5a3842(0xba)+_0x5a3842(0x88)+_0x5a3842(0x7d)+_0x5a3842(0x84)+_0x5a3842(0xc7)+'&\x20typeof'+_0x5a3842(0x8d)+_0x5a3842(0x96)+_0x5a3842(0xc2)+_0x5a3842(0x9b)+'y.text.t'+_0x5a3842(0xa1)+'\x0a\x09\x09\x09hasT'+_0x5a3842(0xa3)+_0x5a3842(0xbe)+'onst\x20tru'+_0x5a3842(0xbb)+'\x20truncat'+_0x5a3842(0xc4)+'toryText'+_0x5a3842(0xbf)+_0x5a3842(0x83)+_0x5a3842(0xc9)+'sForDisp'+_0x5a3842(0xad)+'y.text).'+_0x5a3842(0x81)+_0x5a3842(0xa8)+_0x5a3842(0xaa)+'ected.pu'+_0x5a3842(0x7c)+_0x5a3842(0x99)+_0x5a3842(0x7b)+_0x5a3842(0xa9)+'\x20truncat'+_0x5a3842(0xb2)+_0x5a3842(0x93)+_0x5a3842(0xb1)+_0x5a3842(0xcd)+_0x5a3842(0x7f)+_0x5a3842(0x89)+'k);\x0a\x09\x09}\x0a'+'\x09}\x0a\x09retu'+_0x5a3842(0xd3)+_0x5a3842(0x86)+_0x5a3842(0x8e)+_0x5a3842(0xd1)+_0x5a3842(0xa7)+_0x5a3842(0xb9)+'true\x0a\x09}\x20'+_0x5a3842(0xc5)+'}';return{'patched':!![],'source':_0x4c6a56['replace'](_0x1a7c7c,_0x418b45)};}function _0x9a0b(_0x342be5,_0x104069){_0x342be5=_0x342be5-0x79;const _0x7fdcdb=_0x7fdc();let _0x9a0b36=_0x7fdcdb[_0x342be5];return _0x9a0b36;}function _0x7fdc(){const _0x31b050=['\x09content','ected.pu','mMixedTo','1506576ELjraD',');\x0a\x09\x09\x09co','\x09\x09\x09});\x0a\x09','block\x20of','d.push(b','ext\x20===\x20','78XgShrs','substrin','\x09type:\x20\x22','\x09if\x20(!bl','\x20&&\x20entr','\x20||\x20type','1053586YKTtkU','function','308UqMBBz','\x20content','rim())\x20{',')\x20return','ext\x20=\x20tr','of\x20block','t(conten','istoryBl','ted,\x0a\x09\x09c','xChars);','\x09\x09\x09text:','\x0a\x09\x09\x09proj','\x09\x09}\x0a\x09\x09co','ypeof\x20bl','lay(entr','\x20!==\x20\x22ob','let\x20hasT','3679816AENUWz','\x09}\x20else\x20','ed.text\x0a',')\x20=>\x20{\x0a\x09','ject\x22)\x20{','\x20(!block','includes','\x20isToolH','lse;\x0a\x09co','hanged:\x20','y\x20=\x20bloc','ncated\x20=','olConten','ntinue;\x0a','ue;\x0a\x09\x09\x09c','(stripIn','Assistan','block.ty','\x22string\x22','e((block','eChatHis',':\x20null;\x0a','ockType(','\x22text\x22\x20&','patched','ctiveTag','348442qgWpmz','\x20null;\x0a\x09','already-','{\x0a\x09\x09\x09pro','ock\x20!==\x20','pe);\x0a\x09})','lock)',':\x20projec','if\x20(!con','rn\x20hasTe','ars)\x20{\x0a\x09','ock\x20||\x20t',')\x20{\x0a\x09\x09if','tTextFro','[];\x0a\x09for','5ViNTgk','ected\x20=\x20','text\x22,\x0a\x09','sh({\x0a\x09\x09\x09','(entry.t','\x20project','jected.p','\x20(const\x20','text,\x20ma','sh(block','lineDire','ype\x20===\x20','7606080IvAVjG','xt\x20?\x20{\x0a\x09','ext\x20=\x20fa','k;\x0a\x09\x09if\x20','ush(bloc','\x20false;\x0a','202251DeVSHQ','\x22object\x22','\x20entry.t'];_0x7fdc=function(){return _0x31b050;};return _0x7fdc();}
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 +1 @@
1
- (function(_0x3c3dfb,_0xcc6831){const _0x584285=_0x1b51,_0x3ac844=_0x3c3dfb();while(!![]){try{const _0x40a551=-parseInt(_0x584285(0xfc))/0x1*(-parseInt(_0x584285(0xfe))/0x2)+parseInt(_0x584285(0xe1))/0x3+parseInt(_0x584285(0xd8))/0x4+parseInt(_0x584285(0xe8))/0x5*(parseInt(_0x584285(0xe6))/0x6)+parseInt(_0x584285(0x107))/0x7*(parseInt(_0x584285(0xd3))/0x8)+parseInt(_0x584285(0x105))/0x9+parseInt(_0x584285(0xfb))/0xa*(-parseInt(_0x584285(0xfa))/0xb);if(_0x40a551===_0xcc6831)break;else _0x3ac844['push'](_0x3ac844['shift']());}catch(_0x4ef32b){_0x3ac844['push'](_0x3ac844['shift']());}}}(_0x2417,0x4b2ac));function createBridgeImport(_0xb0f849){const _0x1fe3a4=_0x1b51;return _0x1fe3a4(0x100)+_0x1fe3a4(0xdb)+_0x1fe3a4(0x104)+_0x1fe3a4(0x109)+'rom\x20\x22'+_0xb0f849+'\x22;';}function ensureBridgeImport(_0x4603b7,_0x5b39c7){const _0x47bffd=_0x1b51,_0x1b6ed5=createBridgeImport(_0x5b39c7);if(_0x4603b7[_0x47bffd(0xe9)](_0x1b6ed5))return _0x4603b7;const _0x45bffc=_0x4603b7[_0x47bffd(0xe2)](/^import .*;$/m);if(!_0x45bffc)return _0x1b6ed5+'\x0a'+_0x4603b7;return _0x4603b7['replace'](_0x45bffc[0x0],_0x45bffc[0x0]+'\x0a'+_0x1b6ed5);}function _0x2417(){const _0x1a888b=['not-foun','riteSess','t-provid','already-','378954cdAQXf','match','nction\x20w','\x20loadSes','s\x20=\x20{})','17526jsGbEH','-found','85dHhdQI','includes','orePath,','\x20opts);\x0a','function','length','sionBrid','e(storeP','sionStor','ic(param','{\x0a\x09retur','bridgeIm','bridge-i','n\x20await\x20','patched','-not-fou','body-not','arams)','11cOltBM','11297230dasOTn','18819gawCcO','SessionS','34vAyJmG','toreAtom','import\x20*','mport-no','essionSt','wujieSes','eSession','2155959dwfJCE','ge.loadS','3099131ZUBJHi','indexOf','Bridge\x20f','8DLuSIG','ath,\x20opt','portPath','slice','s);\x0a}','1037700noNDSj','ge.write','body-end','\x20as\x20wuji','n\x20wujieS'];_0x2417=function(){return _0x1a888b;};return _0x2417();}function findFunctionBodyStart(_0x5ec4a6,_0x13eb50){const _0x5c89da=_0x1b51,_0x41410a=_0x5ec4a6[_0x5c89da(0x108)]('(',_0x13eb50);if(_0x41410a===-0x1)return-0x1;let _0x1765cd=0x0,_0x1fa143=null,_0x5ccb98=![];for(let _0x401a3e=_0x41410a;_0x401a3e<_0x5ec4a6[_0x5c89da(0xed)];_0x401a3e+=0x1){const _0x2ab2af=_0x5ec4a6[_0x401a3e];if(_0x1fa143){if(_0x5ccb98){_0x5ccb98=![];continue;}if(_0x2ab2af==='\x5c'){_0x5ccb98=!![];continue;}if(_0x2ab2af===_0x1fa143)_0x1fa143=null;continue;}if(_0x2ab2af==='\x22'||_0x2ab2af==='\x27'||_0x2ab2af==='`'){_0x1fa143=_0x2ab2af;continue;}if(_0x2ab2af==='('){_0x1765cd+=0x1;continue;}if(_0x2ab2af===')'){_0x1765cd-=0x1;continue;}if(_0x2ab2af==='{'&&_0x1765cd===0x0)return _0x401a3e;}return-0x1;}function findMatchingBlockEnd(_0x54c193,_0xcd1b73){let _0x5b37a4=0x0,_0x22746c=null,_0x2d16be=![];for(let _0x5bd7e1=_0xcd1b73;_0x5bd7e1<_0x54c193['length'];_0x5bd7e1+=0x1){const _0x3e7fcf=_0x54c193[_0x5bd7e1];if(_0x22746c){if(_0x2d16be){_0x2d16be=![];continue;}if(_0x3e7fcf==='\x5c'){_0x2d16be=!![];continue;}if(_0x3e7fcf===_0x22746c)_0x22746c=null;continue;}if(_0x3e7fcf==='\x22'||_0x3e7fcf==='\x27'||_0x3e7fcf==='`'){_0x22746c=_0x3e7fcf;continue;}if(_0x3e7fcf==='{')_0x5b37a4+=0x1;if(_0x3e7fcf==='}')_0x5b37a4-=0x1;if(_0x5b37a4===0x0)return _0x5bd7e1+0x1;}return-0x1;}function findNextNonWhitespace(_0x7a72aa,_0x2b60a8){for(let _0x5bfc9e=_0x2b60a8;_0x5bfc9e<_0x7a72aa['length'];_0x5bfc9e+=0x1){if(!/\s/['test'](_0x7a72aa[_0x5bfc9e]))return _0x5bfc9e;}return-0x1;}function repairMalformedAlreadyPatchedFunction(_0x40307a,_0x474d2c){const _0x5e938a=_0x1b51,_0x4f740d=_0x40307a[_0x5e938a(0x108)](_0x474d2c);if(_0x4f740d===-0x1)return{'patched':![],'reason':_0x5e938a(0xdd)+'d'};const _0x4fcf21=findFunctionBodyStart(_0x40307a,_0x4f740d);if(_0x4fcf21===-0x1)return{'patched':![],'reason':_0x5e938a(0xf8)+_0x5e938a(0xe7)};const _0x300acd=findMatchingBlockEnd(_0x40307a,_0x4fcf21);if(_0x300acd===-0x1)return{'patched':![],'reason':_0x5e938a(0xda)+_0x5e938a(0xf7)+'nd'};const _0x306efe=findNextNonWhitespace(_0x40307a,_0x300acd);if(_0x40307a[_0x306efe]!==')')return{'patched':![],'reason':_0x5e938a(0xe0)+'patched'};const _0x293325=findNextNonWhitespace(_0x40307a,_0x306efe+0x1);if(_0x40307a[_0x293325]!=='{')return{'patched':![],'reason':_0x5e938a(0xe0)+_0x5e938a(0xf6)};const _0x5badf4=findMatchingBlockEnd(_0x40307a,_0x293325);if(_0x5badf4===-0x1)return{'patched':![],'reason':'body-end'+_0x5e938a(0xf7)+'nd'};return{'patched':!![],'source':_0x40307a[_0x5e938a(0xd6)](0x0,_0x300acd)+_0x40307a[_0x5e938a(0xd6)](_0x5badf4)};}function _0x1b51(_0x980b04,_0xf10d60){_0x980b04=_0x980b04-0xd3;const _0x2417e5=_0x2417();let _0x1b513b=_0x2417e5[_0x980b04];return _0x1b513b;}function replaceFunctionBody(_0x1ca992,_0x5b0c7f,_0x35884e){const _0x457c12=_0x1b51,_0x422ef2=_0x1ca992[_0x457c12(0x108)](_0x5b0c7f);if(_0x422ef2===-0x1)return{'patched':![],'reason':'not-foun'+'d'};const _0x12a4c2=findFunctionBodyStart(_0x1ca992,_0x422ef2);if(_0x12a4c2===-0x1)return{'patched':![],'reason':_0x457c12(0xf8)+_0x457c12(0xe7)};const _0x51fd5a=findMatchingBlockEnd(_0x1ca992,_0x12a4c2);if(_0x51fd5a===-0x1)return{'patched':![],'reason':_0x457c12(0xda)+_0x457c12(0xf7)+'nd'};const _0x5ac601=_0x5b0c7f+'\x20'+_0x35884e;return{'patched':!![],'source':_0x1ca992[_0x457c12(0xd6)](0x0,_0x422ef2)+_0x5ac601+_0x1ca992[_0x457c12(0xd6)](_0x51fd5a)};}export function patchSessionStoreLoadFromSource(_0x361000,_0x4ea438={}){const _0x389219=_0x1b51,_0xa6d965=_0x4ea438[_0x389219(0xf3)+_0x389219(0xd5)];if(!_0xa6d965)return{'patched':![],'reason':_0x389219(0xf4)+_0x389219(0x101)+_0x389219(0xdf)+'ed'};if(_0x361000[_0x389219(0xe9)](_0x389219(0x103)+'sionBrid'+_0x389219(0x106)+_0x389219(0x102)+'ore'))return repairMalformedAlreadyPatchedFunction(_0x361000,'function'+_0x389219(0xe4)+_0x389219(0xf0)+_0x389219(0xef)+_0x389219(0xd4)+_0x389219(0xe5));const _0x530a61=replaceFunctionBody(ensureBridgeImport(_0x361000,_0xa6d965),_0x389219(0xec)+_0x389219(0xe4)+_0x389219(0xf0)+_0x389219(0xef)+'ath,\x20opt'+_0x389219(0xe5),'{\x0a\x09retur'+_0x389219(0xdc)+'essionBr'+'idge.loa'+'dSession'+'Store(st'+_0x389219(0xea)+_0x389219(0xeb)+'}');return _0x530a61;}export function patchSessionStoreWriteFromSource(_0x5b7a8b,_0x56b85f={}){const _0x57bf6b=_0x1b51,_0x29a9ea=_0x56b85f[_0x57bf6b(0xf3)+'portPath'];if(!_0x29a9ea)return{'patched':![],'reason':_0x57bf6b(0xf4)+'mport-no'+_0x57bf6b(0xdf)+'ed'};const _0x42c205=replaceFunctionBody(ensureBridgeImport(_0x5b7a8b,_0x29a9ea),'async\x20fu'+_0x57bf6b(0xe3)+_0x57bf6b(0xde)+'ionStore'+'Atomic(p'+_0x57bf6b(0xf9),_0x57bf6b(0xf2)+_0x57bf6b(0xf5)+'wujieSes'+_0x57bf6b(0xee)+_0x57bf6b(0xd9)+_0x57bf6b(0xfd)+_0x57bf6b(0xff)+_0x57bf6b(0xf1)+_0x57bf6b(0xd7));if(!_0x42c205[_0x57bf6b(0xf6)])return _0x42c205;return _0x42c205;}
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 +1 @@
1
- (function(_0x30c49a,_0x5a71c2){const _0x21243c=_0x4997,_0x2bb473=_0x30c49a();while(!![]){try{const _0x5af561=-parseInt(_0x21243c(0x1ec))/0x1*(-parseInt(_0x21243c(0x1f0))/0x2)+parseInt(_0x21243c(0x1f5))/0x3*(parseInt(_0x21243c(0x200))/0x4)+parseInt(_0x21243c(0x1ed))/0x5+parseInt(_0x21243c(0x1f4))/0x6+-parseInt(_0x21243c(0x1f9))/0x7+-parseInt(_0x21243c(0x1fe))/0x8*(-parseInt(_0x21243c(0x1f8))/0x9)+-parseInt(_0x21243c(0x1f2))/0xa;if(_0x5af561===_0x5a71c2)break;else _0x2bb473['push'](_0x2bb473['shift']());}catch(_0x56304d){_0x2bb473['push'](_0x2bb473['shift']());}}}(_0x1854,0x5dd04));function _0x4997(_0x29bf57,_0x4d2113){_0x29bf57=_0x29bf57-0x1eb;const _0x1854be=_0x1854();let _0x4997b6=_0x1854be[_0x29bf57];return _0x4997b6;}function _0x1854(){const _0x35def8=['filter','26xXTyQh','entries','21170630Fjqkrg','ByDefaul','108636wvWQnd','39cjeqaC','uginIdsB','legacyPl','5237667GZylLQ','311507IQVZhp','local','yPluginI','pluginId','enabled','8ArNPTV','allow','222372VuFrrR','keys','length','54559VJGRUZ','2568895vmElWC','includes'];_0x1854=function(){return _0x35def8;};return _0x1854();}import{asRecord,asStringArray,dedupeStrings,getTrimmedString}from'../common/utils.mjs';export function syncRuntimeManifestPlugins(_0x22b617,_0x600356,_0x273745={}){const _0xef0ec6=_0x4997,_0x3d79d2=new Set(_0x273745['disabled'+_0xef0ec6(0x1f3)+'tPluginI'+'ds']??[]),_0x9043a=asRecord(_0x273745[_0xef0ec6(0x1f7)+_0xef0ec6(0x1f6)+_0xef0ec6(0x1fb)+'d']),_0x22a4b5={...asRecord(_0x22b617)},_0x26233e={...asRecord(_0x22a4b5[_0xef0ec6(0x1f1)])},_0x5e0174={...asRecord(_0x22a4b5['installs'])};let _0x4e5bc7=asStringArray(_0x22a4b5['allow']),_0x18e480=![];for(const _0x32950f of _0x600356??[]){const _0x2a1885=getTrimmedString(_0x32950f[_0xef0ec6(0x1fc)]);if(!_0x2a1885)continue;const _0x5556b5=asStringArray(_0x9043a[_0x2a1885]);for(const _0xe52ef4 of _0x5556b5){_0xe52ef4 in _0x26233e&&(_0x26233e[_0x2a1885]={...asRecord(_0x26233e[_0x2a1885]),...asRecord(_0x26233e[_0xe52ef4])},delete _0x26233e[_0xe52ef4],_0x18e480=!![]);}if(_0x5556b5[_0xef0ec6(0x1eb)]>0x0){const _0x4fa4a8=_0x4e5bc7[_0xef0ec6(0x1ef)](_0x3d6206=>!_0x5556b5[_0xef0ec6(0x1ee)](_0x3d6206));_0x4fa4a8[_0xef0ec6(0x1eb)]!==_0x4e5bc7[_0xef0ec6(0x1eb)]&&(_0x4e5bc7=_0x4fa4a8,_0x18e480=!![]);}!(_0x2a1885 in _0x26233e)&&(_0x26233e[_0x2a1885]={'enabled':!_0x3d79d2['has'](_0x2a1885)},_0x18e480=!![]);if(asRecord(_0x26233e[_0x2a1885])[_0xef0ec6(0x1fd)]!==![]){const _0x3623c8=dedupeStrings([..._0x4e5bc7,_0x2a1885]);_0x3623c8[_0xef0ec6(0x1eb)]!==_0x4e5bc7['length']&&(_0x4e5bc7=_0x3623c8,_0x18e480=!![]);}getTrimmedString(_0x32950f['source'])===_0xef0ec6(0x1fa)&&_0x2a1885 in _0x5e0174&&(delete _0x5e0174[_0x2a1885],_0x18e480=!![]);}_0x22a4b5[_0xef0ec6(0x1f1)]=_0x26233e,_0x22a4b5[_0xef0ec6(0x1ff)]=_0x4e5bc7;if(Object[_0xef0ec6(0x201)](_0x5e0174)[_0xef0ec6(0x1eb)]>0x0)_0x22a4b5['installs']=_0x5e0174;else delete _0x22a4b5['installs'];return{'plugins':_0x22a4b5,'changed':_0x18e480};}
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 +1 @@
1
- const _0x2ef730=_0x2213;(function(_0x37acc8,_0x1dfc46){const _0x4901e3=_0x2213,_0x738e47=_0x37acc8();while(!![]){try{const _0x4d0e0e=parseInt(_0x4901e3(0xa2))/0x1+-parseInt(_0x4901e3(0xc7))/0x2*(-parseInt(_0x4901e3(0xc9))/0x3)+parseInt(_0x4901e3(0xd1))/0x4*(parseInt(_0x4901e3(0x9d))/0x5)+parseInt(_0x4901e3(0xd7))/0x6*(-parseInt(_0x4901e3(0xad))/0x7)+-parseInt(_0x4901e3(0xba))/0x8+parseInt(_0x4901e3(0xae))/0x9*(-parseInt(_0x4901e3(0xc6))/0xa)+parseInt(_0x4901e3(0xbc))/0xb*(parseInt(_0x4901e3(0xa3))/0xc);if(_0x4d0e0e===_0x1dfc46)break;else _0x738e47['push'](_0x738e47['shift']());}catch(_0x5d8989){_0x738e47['push'](_0x738e47['shift']());}}}(_0x4d0f,0x62ef5));function _0x4d0f(){const _0x2856c4=['cutoffTe','role','readSess','3038488xoXGiP','assistan','9583871WFDKzP','agent','ey\x20is\x20re','onsMap','sessionK','content','isArray','agents','uired','ile','50MVlzoc','237898FPjiQg','sessionI','3ahrGYT','_INFINIT','number','lTs','join','includes','quired','sessionF','299516YIndLB','slice','.jsonl','pop','keepUnti','session','122826vtDvcr','d\x20is\x20req','string','message','cutoffRo','parse','agentId','push','isFinite','30CygibC','keys','length','main','type','120268UFzpZR','12xSAUkB','user','timestam','ionEntry','text','label','utf8','getSessi','has','map','203oBGYUM','325881maNzHe','upsertSe','entries','trim','ssionEnt','split','POSITIVE','filter','sessions'];_0x4d0f=function(){return _0x2856c4;};return _0x4d0f();}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([_0x2ef730(0xc0)+'ey','sessionI'+'d',_0x2ef730(0xa8),'sessionF'+_0x2ef730(0xc5)]);function extractAgentIdFromSessionKey(_0x35f02c){const _0x2324f6=_0x2ef730,_0x29b5e0=String(_0x35f02c||'')['split'](':'),_0x4f20ad=_0x29b5e0[0x1]?.[_0x2324f6(0xb1)]();return _0x4f20ad||_0x2324f6(0xa0);}function _0x2213(_0x56dc2e,_0xf43934){_0x56dc2e=_0x56dc2e-0x9a;const _0x4d0ff8=_0x4d0f();let _0x22139e=_0x4d0ff8[_0x56dc2e];return _0x22139e;}function resolveNewSessionFilePath(_0x50a77a,_0xe2fc51,_0xd2bc94,_0x54659c,_0x3e48aa){const _0x102f64=_0x2ef730,_0x4941d7=typeof _0xe2fc51[_0x102f64(0xd0)+_0x102f64(0xc5)]===_0x102f64(0xd9)?_0xe2fc51[_0x102f64(0xd0)+_0x102f64(0xc5)][_0x102f64(0xb1)]():'';if(_0x4941d7)return _0x4941d7;const _0x489f23=_0xd2bc94&&typeof _0xd2bc94['sessionF'+_0x102f64(0xc5)]==='string'?extname(_0xd2bc94[_0x102f64(0xd0)+'ile']['trim']()):'';return join(_0x50a77a,_0x102f64(0xc3),_0x3e48aa,_0x102f64(0xb6),''+_0x54659c+(_0x489f23||_0x102f64(0xd3)));}function cloneForkedSessionExtraFields(_0x4b06f6){const _0x39ebcc=_0x2ef730;if(!_0x4b06f6)return{};const _0x51ef2c={};for(const [_0x2ed64a,_0x2aba0a]of Object[_0x39ebcc(0xb0)](_0x4b06f6)){if(CLONED_AGENT_SESSION_EXCLUDED_FIELDS[_0x39ebcc(0xab)](_0x2ed64a))continue;_0x51ef2c[_0x2ed64a]=_0x2aba0a;}return _0x51ef2c;}async function copySessionFileIfNeeded(_0x2ddfb4,_0x15291d){const _0x10deb6=_0x2ef730;if(!_0x2ddfb4||!_0x15291d)return;const _0x225c5a=typeof _0x2ddfb4[_0x10deb6(0xd0)+_0x10deb6(0xc5)]==='string'?_0x2ddfb4[_0x10deb6(0xd0)+_0x10deb6(0xc5)][_0x10deb6(0xb1)]():'',_0x11d557=String(_0x15291d||'')[_0x10deb6(0xb1)]();if(!_0x225c5a||!_0x11d557||_0x225c5a===_0x11d557)return;if(!existsSync(_0x225c5a))return;await mkdir(dirname(_0x11d557),{'recursive':!![]}),await copyFile(_0x225c5a,_0x11d557);}function extractMessageEntryText(_0x3c3832){const _0x1f0446=_0x2ef730,_0x2778ef=asRecord(_0x3c3832[_0x1f0446(0xda)]),_0x4f1f4a=_0x2778ef[_0x1f0446(0xc1)];if(typeof _0x4f1f4a==='string')return _0x4f1f4a;if(!Array[_0x1f0446(0xc2)](_0x4f1f4a))return'';return _0x4f1f4a[_0x1f0446(0xac)](_0x25409a=>{const _0x30e490=_0x1f0446,_0x1f7df3=asRecord(_0x25409a);return _0x1f7df3['type']===_0x30e490(0xa7)&&typeof _0x1f7df3[_0x30e490(0xa7)]===_0x30e490(0xd9)?_0x1f7df3[_0x30e490(0xa7)]:'';})[_0x1f0446(0xb5)](Boolean)[_0x1f0446(0xcd)]('\x0a');}function extractMessageEntryRole(_0x1143b8){const _0x3e36e2=_0x2ef730,_0x4a073c=asRecord(_0x1143b8[_0x3e36e2(0xda)]);if(typeof _0x4a073c[_0x3e36e2(0xb8)]===_0x3e36e2(0xd9))return _0x4a073c['role'];if(typeof _0x1143b8[_0x3e36e2(0xb8)]===_0x3e36e2(0xd9))return _0x1143b8['role'];return'';}function parseJsonLine(_0xb72fe0){try{const _0x2adbb1=JSON['parse'](_0xb72fe0);return asRecord(_0x2adbb1);}catch{return null;}}function entryTimestampMs(_0x3f800e){const _0x2817f3=_0x2ef730,_0x17f7cf=_0x3f800e[_0x2817f3(0xa5)+'p'];if(typeof _0x17f7cf===_0x2817f3(0xd9)){const _0x3c8cd6=Date[_0x2817f3(0xdc)](_0x17f7cf);return Number['isFinite'](_0x3c8cd6)?_0x3c8cd6:null;}if(typeof _0x17f7cf==='number'&&Number[_0x2817f3(0x9c)](_0x17f7cf))return _0x17f7cf;return null;}async function trimSessionFileForFork(_0x48ac93,_0x52f367){const _0x500361=_0x2ef730;if(!_0x48ac93||!existsSync(_0x48ac93))return;const {keepUntilTs:_0x2b4364,cutoffRole:_0xcc263b,cutoffText:_0x2a3fa6}=_0x52f367,_0xe1bf5e=typeof _0x2b4364===_0x500361(0xcb)&&Number[_0x500361(0x9c)](_0x2b4364),_0xff70d3=typeof _0x2a3fa6===_0x500361(0xd9)?_0x2a3fa6[_0x500361(0xb1)]():'',_0xd9a9e6=_0xcc263b===_0x500361(0xbd)?_0x500361(0xbb)+'t':_0xcc263b===_0x500361(0xa4)?_0x500361(0xa4):'',_0x1c8013=Boolean(_0xd9a9e6&&_0xff70d3);if(!_0xe1bf5e&&!_0x1c8013)return;let _0x12d6a3='';try{_0x12d6a3=await readFile(_0x48ac93,_0x500361(0xa9));}catch{return;}const _0x385737=_0x12d6a3[_0x500361(0xb3)]('\x0a');let _0x72379=-0x1;const _0x4e88d6=_0xe1bf5e?_0x2b4364+0xa*0x3c*0x3e8:Number[_0x500361(0xb4)+_0x500361(0xca)+'Y'];if(_0x1c8013)for(let _0x5cb695=0x0;_0x5cb695<_0x385737[_0x500361(0x9f)];_0x5cb695+=0x1){const _0x34afcc=_0x385737[_0x5cb695][_0x500361(0xb1)]();if(!_0x34afcc)continue;const _0x24cfab=parseJsonLine(_0x34afcc);if(!_0x24cfab||_0x24cfab[_0x500361(0xa1)]!=='message')continue;if(extractMessageEntryRole(_0x24cfab)!==_0xd9a9e6)continue;const _0x28f77f=extractMessageEntryText(_0x24cfab)[_0x500361(0xb1)]();if(!_0x28f77f||!_0x28f77f[_0x500361(0xce)](_0xff70d3))continue;const _0x2c342c=entryTimestampMs(_0x24cfab);if(_0x2c342c!==null&&_0x2c342c>_0x4e88d6)continue;_0x72379=_0x5cb695;}let _0xb35a70=[];if(_0x72379>=0x0)_0xb35a70=_0x385737[_0x500361(0xd2)](0x0,_0x72379+0x1);else{if(_0xe1bf5e)for(const _0x5c07f3 of _0x385737){const _0x72d89a=_0x5c07f3[_0x500361(0xb1)]();if(!_0x72d89a)continue;const _0x4143c2=parseJsonLine(_0x72d89a);if(!_0x4143c2){_0xb35a70[_0x500361(0x9b)](_0x5c07f3);continue;}if(_0x4143c2['type']===_0x500361(0xd6)){_0xb35a70[_0x500361(0x9b)](_0x5c07f3);continue;}const _0x5d0a30=entryTimestampMs(_0x4143c2);if(_0x5d0a30===null||_0x5d0a30<=_0x2b4364)_0xb35a70[_0x500361(0x9b)](_0x5c07f3);}}while(_0xb35a70[_0x500361(0x9f)]>0x0&&_0xb35a70[_0xb35a70[_0x500361(0x9f)]-0x1]['trim']()==='')_0xb35a70[_0x500361(0xd4)]();await writeFile(_0x48ac93,_0xb35a70[_0x500361(0xcd)]('\x0a')+'\x0a',_0x500361(0xa9));}export function createAgentSessionsMapStore({stateDir:_0x18df20}){const _0xdac797=createSessionSqliteStore({'stateDir':_0x18df20});async function _0x2090f6(_0x4bd027={}){const _0x4344c9=_0x2213,_0x3b92c9=String(_0x4bd027[_0x4344c9(0x9a)]||_0x4344c9(0xa0));return await _0xdac797[_0x4344c9(0xaa)+_0x4344c9(0xbf)](_0x3b92c9);}async function _0x3d8c3b(_0x15e85c={}){const _0x11a8d6=_0x2213,_0x184d46=String(_0x15e85c['sessionK'+'ey']||'')[_0x11a8d6(0xb1)](),_0x3ab3dc=String(_0x15e85c[_0x11a8d6(0xc8)+'d']||'')[_0x11a8d6(0xb1)]();if(!_0x184d46)throw new Error('sessionK'+_0x11a8d6(0xbe)+_0x11a8d6(0xcf));if(!_0x3ab3dc)throw new Error(_0x11a8d6(0xc8)+_0x11a8d6(0xd8)+_0x11a8d6(0xc4));const _0x2effe1=extractAgentIdFromSessionKey(_0x184d46),_0x460058=asRecord(await _0xdac797['readSess'+'ionEntry'](_0x184d46)),_0x6d4ee1=String(_0x15e85c['sourceSe'+'ssionKey']||'')[_0x11a8d6(0xb1)](),_0x315221=_0x6d4ee1?extractAgentIdFromSessionKey(_0x6d4ee1):_0x2effe1,_0x4570cc=_0x6d4ee1?asRecord(await _0xdac797[_0x11a8d6(0xb9)+_0x11a8d6(0xa6)](_0x6d4ee1)):null,_0x54668d=_0x4570cc&&Object[_0x11a8d6(0x9e)](_0x4570cc)['length']>0x0,_0x1603bb=resolveNewSessionFilePath(_0x18df20,_0x460058,_0x54668d?_0x4570cc:null,_0x3ab3dc,_0x2effe1),_0x20fedb=typeof _0x15e85c[_0x11a8d6(0xd5)+_0x11a8d6(0xcc)]===_0x11a8d6(0xcb)&&Number['isFinite'](_0x15e85c[_0x11a8d6(0xd5)+_0x11a8d6(0xcc)])?_0x15e85c[_0x11a8d6(0xd5)+_0x11a8d6(0xcc)]:null,_0x3fa7ce=typeof _0x15e85c['cutoffRo'+'le']===_0x11a8d6(0xd9)?_0x15e85c[_0x11a8d6(0xdb)+'le']:null,_0x3486f9=typeof _0x15e85c['cutoffTe'+'xt']==='string'?_0x15e85c[_0x11a8d6(0xb7)+'xt']:null,_0x3ef207={..._0x460058,...cloneForkedSessionExtraFields(_0x54668d?_0x4570cc:null),'agentId':_0x2effe1,'sessionKey':_0x184d46,'sessionId':_0x3ab3dc,'sessionFile':_0x1603bb,..._0x54668d?{'forkedFromParent':!![]}:{}};return await copySessionFileIfNeeded(_0x54668d?_0x4570cc:null,_0x1603bb),_0x54668d&&(_0x20fedb!==null||_0x3fa7ce&&_0x3486f9)&&await trimSessionFileForFork(_0x1603bb,{'keepUntilTs':_0x20fedb,'cutoffRole':_0x3fa7ce,'cutoffText':_0x3486f9}),await _0xdac797[_0x11a8d6(0xaf)+_0x11a8d6(0xb2)+'ry']({'agentId':_0x2effe1,'sessionKey':_0x184d46,'entry':_0x3ef207}),await _0xdac797[_0x11a8d6(0xaa)+_0x11a8d6(0xbf)](_0x2effe1);}return{'get':_0x2090f6,'upsert':_0x3d8c3b};}
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 +1 @@
1
- (function(_0x536621,_0x5c9a5b){const _0x131329=_0x459e,_0xf311ea=_0x536621();while(!![]){try{const _0x491a14=-parseInt(_0x131329(0x1a9))/0x1+parseInt(_0x131329(0x1a3))/0x2+-parseInt(_0x131329(0x1b2))/0x3+parseInt(_0x131329(0x198))/0x4+parseInt(_0x131329(0x197))/0x5+parseInt(_0x131329(0x1a2))/0x6*(parseInt(_0x131329(0x1ab))/0x7)+-parseInt(_0x131329(0x1a4))/0x8;if(_0x491a14===_0x5c9a5b)break;else _0xf311ea['push'](_0xf311ea['shift']());}catch(_0x4d6ec5){_0xf311ea['push'](_0xf311ea['shift']());}}}(_0x50f8,0xf2f3b));import{join}from'node:path';function _0x459e(_0x2d0b91,_0x21169a){_0x2d0b91=_0x2d0b91-0x192;const _0x50f81d=_0x50f8();let _0x459e94=_0x50f81d[_0x2d0b91];return _0x459e94;}import{createSessionSqliteStore}from'./session-sqlite-store.mjs';function _0x50f8(){const _0x5a8e9c=['3957036uVdAwf','parse','/session','storePat','ync','indexOf','get','saveSess','index.sq','slice','3852174fmptyz','2978000gLqsuy','9653008qVjxGc','tch','stringif','ionStore','split','1700259MbjZgM','updateSe','7Mrehek','values','set','lite','reEntry','clear','close','385956xTanyQ','ssionSto','eEntryPa','eAtomic','/agents/','clone','writeSes','4551900GgIIdh'];_0x50f8=function(){return _0x5a8e9c;};return _0x50f8();}const BRIDGE_STORE_CACHE=new Map();function resolveStateDirFromStorePath(_0x395a6a){const _0x4bf059=_0x459e,_0x4d1dce=String(_0x395a6a||'')['replaceA'+'ll']('\x5c','/'),_0xadd824=_0x4bf059(0x194),_0x2c7c13=_0x4d1dce[_0x4bf059(0x19d)](_0xadd824);if(_0x2c7c13<0x0){const _0x1ccf75=_0x4d1dce[_0x4bf059(0x1a8)](_0x4bf059(0x19a)+'s/')[0x0];return _0x1ccf75||_0x4d1dce;}return _0x4d1dce[_0x4bf059(0x1a1)](0x0,_0x2c7c13);}function createBridgeStore(_0x13951e){const _0x14738b=_0x459e,_0x181b7f=resolveStateDirFromStorePath(_0x13951e),_0x477bc5=join(_0x181b7f,'sessions',_0x14738b(0x1a0)+_0x14738b(0x1ae)),_0x36f25b=_0x181b7f+'::'+_0x477bc5,_0x1a3e89=BRIDGE_STORE_CACHE[_0x14738b(0x19e)](_0x36f25b);if(_0x1a3e89)return _0x1a3e89;const _0x413ea2=createSessionSqliteStore({'stateDir':_0x181b7f,'dbPath':_0x477bc5});return BRIDGE_STORE_CACHE[_0x14738b(0x1ad)](_0x36f25b,_0x413ea2),_0x413ea2;}function cloneStoreObject(_0x359c98){const _0x6ccec8=_0x459e;return JSON[_0x6ccec8(0x199)](JSON[_0x6ccec8(0x1a6)+'y'](_0x359c98||{}));}export function loadSessionStore(_0x498afc,_0x154527={}){const _0x10c67c=_0x459e,_0x4236ec=createBridgeStore(_0x498afc),_0x3bc98c=_0x4236ec['readStor'+'eByPathS'+_0x10c67c(0x19c)](_0x498afc);return _0x154527[_0x10c67c(0x195)]===![]?_0x3bc98c:cloneStoreObject(_0x3bc98c);}export async function saveSessionStore(_0x335683,_0x4ee1fb){const _0x590563=_0x459e,_0x4f560e=createBridgeStore(_0x335683);return await _0x4f560e[_0x590563(0x19f)+_0x590563(0x1a7)](_0x335683,_0x4ee1fb);}export async function updateSessionStore(_0x116f46,_0x269e1c,_0x575dd1){const _0x336a08=_0x459e,_0x2301c0=createBridgeStore(_0x116f46);return await _0x2301c0[_0x336a08(0x1aa)+_0x336a08(0x1b3)+'re'](_0x116f46,_0x269e1c,_0x575dd1);}export async function updateSessionStoreEntry(_0x33a838){const _0x336e37=_0x459e,_0x4b8eca=createBridgeStore(_0x33a838[_0x336e37(0x19b)+'h']);return await _0x4b8eca['updateSe'+_0x336e37(0x1b3)+_0x336e37(0x1af)](_0x33a838);}export async function applySessionStoreEntryPatch(_0x459b66){const _0xe13b51=_0x459e,_0x33197b=createBridgeStore(_0x459b66[_0xe13b51(0x19b)+'h']);return await _0x33197b['applySes'+'sionStor'+_0xe13b51(0x192)+_0xe13b51(0x1a5)](_0x459b66);}export async function writeSessionStoreAtomic(_0x426b68){const _0x4e8162=_0x459e,_0x4f1ec2=createBridgeStore(_0x426b68['storePat'+'h']);return await _0x4f1ec2[_0x4e8162(0x196)+'sionStor'+_0x4e8162(0x193)](_0x426b68);}export async function closeBridgeStores(){const _0x5ed4fd=_0x459e,_0xe60091=[...BRIDGE_STORE_CACHE[_0x5ed4fd(0x1ac)]()];BRIDGE_STORE_CACHE[_0x5ed4fd(0x1b0)](),await Promise['all'](_0xe60091['map'](_0x260f0b=>_0x260f0b[_0x5ed4fd(0x1b1)]()));}
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)]()));}