@wujie-shell/core 4.0.1 → 4.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bin/wujie-shell.mjs +1 -1
- package/dist/src/agents/bundled-agent-skills.mjs +1 -1
- package/dist/src/agents/bundled-agents.mjs +1 -1
- package/dist/src/chat/media-archive.mjs +1 -1
- package/dist/src/chat/queue.mjs +1 -1
- package/dist/src/common/diagnostics.mjs +1 -1
- package/dist/src/common/logging.mjs +1 -1
- package/dist/src/common/runtime-logger.mjs +1 -1
- package/dist/src/common/user-events.mjs +1 -1
- package/dist/src/common/utils.mjs +1 -1
- package/dist/src/config/controller.mjs +1 -1
- package/dist/src/connectors/config-utils.mjs +1 -1
- package/dist/src/connectors/constants.mjs +1 -1
- package/dist/src/connectors/controller.mjs +1 -1
- package/dist/src/connectors/kdocs-cli.mjs +1 -1
- package/dist/src/electron/main.mjs +1 -1
- package/dist/src/electron/preload.mjs +1 -1
- package/dist/src/files/generated-files-store.mjs +1 -1
- package/dist/src/files/handlers.mjs +1 -1
- package/dist/src/gateway/chat-delta.mjs +1 -1
- package/dist/src/gateway/controller.mjs +1 -1
- package/dist/src/gateway/ws-client.mjs +1 -1
- package/dist/src/index.mjs +1 -1
- package/dist/src/log-reporting/handlers.mjs +1 -1
- package/dist/src/log-reporting/report-logs.mjs +1 -1
- package/dist/src/models/handlers.mjs +1 -1
- package/dist/src/preferences/store.mjs +1 -1
- package/dist/src/runtime/index.mjs +1 -1
- package/dist/src/runtime/patch-channel-plugin-runtime.mjs +1 -1
- package/dist/src/runtime/patch-chat-history-mixed-tool-content.mjs +1 -1
- package/dist/src/runtime/patch-session-store-sqlite.mjs +1 -1
- package/dist/src/runtime/plugin-sync.mjs +1 -1
- package/dist/src/sessions/agent-sessions-map-store.mjs +1 -1
- package/dist/src/sessions/runtime-bridge.mjs +1 -1
- package/dist/src/sessions/session-sqlite-store.mjs +1 -1
- package/dist/src/skills/import.mjs +1 -1
- package/dist/src/skills/market.mjs +1 -1
- package/dist/src/terminal/manager.mjs +1 -1
- package/dist/src/updates/controller.mjs +1 -1
- package/dist/src/updates/loader.mjs +1 -1
- package/package.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function _0x178e(_0x4432f8,_0x261f23){_0x4432f8=_0x4432f8-0x79;const _0x20a201=_0x20a2();let _0x178e7b=_0x20a201[_0x4432f8];return _0x178e7b;}(function(_0x25ad5c,_0x2530ab){const _0x3b1fda=_0x178e,_0x3cacd6=_0x25ad5c();while(!![]){try{const _0x391a4c=parseInt(_0x3b1fda(0xa6))/0x1+parseInt(_0x3b1fda(0xbd))/0x2*(parseInt(_0x3b1fda(0xb6))/0x3)+parseInt(_0x3b1fda(0x79))/0x4+parseInt(_0x3b1fda(0x7f))/0x5*(-parseInt(_0x3b1fda(0x80))/0x6)+parseInt(_0x3b1fda(0xce))/0x7+-parseInt(_0x3b1fda(0xcf))/0x8+-parseInt(_0x3b1fda(0xa4))/0x9;if(_0x391a4c===_0x2530ab)break;else _0x3cacd6['push'](_0x3cacd6['shift']());}catch(_0x422294){_0x3cacd6['push'](_0x3cacd6['shift']());}}}(_0x20a2,0x5287e));export function patchMixedToolContentFromSource(_0x181684){const _0x544f53=_0x178e,_0x22275f=_0x544f53(0xaf)+_0x544f53(0xd0)+_0x544f53(0xa3)+_0x544f53(0x90)+_0x544f53(0xc6)+_0x544f53(0x82)+'t',_0x13502a=_0x181684['indexOf'](_0x22275f);if(_0x13502a===-0x1)return{'patched':![],'reason':_0x544f53(0xb0)+'d'};let _0x14e9f9=0x0,_0x2f9a51=![],_0xd717b=_0x13502a;for(let _0x20d644=_0x13502a;_0x20d644<_0x181684['length'];_0x20d644+=0x1){_0x181684[_0x20d644]==='{'&&(_0x14e9f9+=0x1,_0x2f9a51=!![]);_0x181684[_0x20d644]==='}'&&(_0x14e9f9-=0x1);if(_0x2f9a51&&_0x14e9f9===0x0){_0xd717b=_0x20d644+0x1;break;}}const _0x228d69=_0x181684[_0x544f53(0x9f)+'g'](_0x13502a,_0xd717b);if(_0x228d69['includes']('projecte'+'d.push(b'+_0x544f53(0x86)))return{'patched':![],'reason':_0x544f53(0x9c)+_0x544f53(0xb1)};const _0x309c14='function'+_0x544f53(0xd0)+_0x544f53(0xa3)+_0x544f53(0x90)+_0x544f53(0xc6)+_0x544f53(0x82)+_0x544f53(0xbb)+'t,\x20maxCh'+_0x544f53(0xa1)+_0x544f53(0xa7)+'tent.som'+_0x544f53(0xc8)+_0x544f53(0x8f)+_0x544f53(0xbc)+_0x544f53(0xa0)+_0x544f53(0xa2)+_0x544f53(0xd2)+_0x544f53(0xc4)+_0x544f53(0xcc)+_0x544f53(0x84)+_0x544f53(0xad)+'\x20isToolH'+'istoryBl'+_0x544f53(0x87)+_0x544f53(0x97)+_0x544f53(0x92)+')\x20return'+_0x544f53(0xab)+_0x544f53(0x7e)+_0x544f53(0xcd)+_0x544f53(0xca)+'nst\x20proj'+'ected\x20=\x20'+'[];\x0a\x09for'+_0x544f53(0xb5)+_0x544f53(0xc0)+_0x544f53(0x83)+_0x544f53(0xc9)+_0x544f53(0xc3)+_0x544f53(0xb9)+_0x544f53(0xcb)+_0x544f53(0xae)+_0x544f53(0x7d)+_0x544f53(0xc7)+'ected.pu'+_0x544f53(0xb7)+_0x544f53(0x95)+'ntinue;\x0a'+'\x09\x09}\x0a\x09\x09co'+_0x544f53(0x93)+'y\x20=\x20bloc'+_0x544f53(0x88)+_0x544f53(0xa5)+_0x544f53(0x81)+_0x544f53(0x96)+_0x544f53(0xc5)+_0x544f53(0xaa)+'ext\x20===\x20'+_0x544f53(0xc2)+_0x544f53(0x99)+_0x544f53(0xb2)+_0x544f53(0xc1)+_0x544f53(0x7b)+'ext\x20=\x20tr'+_0x544f53(0xd1)+_0x544f53(0x9d)+_0x544f53(0x91)+_0x544f53(0xac)+'eChatHis'+'toryText'+'(stripIn'+_0x544f53(0x7a)+_0x544f53(0x8b)+_0x544f53(0xa9)+_0x544f53(0xb8)+_0x544f53(0x8d)+_0x544f53(0x8c)+'xChars);'+_0x544f53(0xc7)+_0x544f53(0x9a)+_0x544f53(0xa8)+_0x544f53(0xbe)+_0x544f53(0x85)+_0x544f53(0x9b)+_0x544f53(0xac)+_0x544f53(0x98)+_0x544f53(0x94)+_0x544f53(0xb4)+_0x544f53(0x9e)+_0x544f53(0x8a)+_0x544f53(0xb3)+_0x544f53(0x89)+_0x544f53(0xbf)+_0x544f53(0x7c)+'xt\x20?\x20{\x0a\x09'+_0x544f53(0x8e)+':\x20projec'+'ted,\x0a\x09\x09c'+'hanged:\x20'+'true\x0a\x09}\x20'+':\x20null;\x0a'+'}';return{'patched':!![],'source':_0x181684[_0x544f53(0xba)](_0x228d69,_0x309c14)};}function _0x20a2(){const _0x56436d=['mMixedTo','\x0a\x09\x09\x09proj','e((block',')\x20{\x0a\x09\x09if','lse;\x0a\x09co','of\x20block',')\x20return','ext\x20=\x20fa','2238733EWmVeh','1542016PxtBUe','\x20project','ue;\x0a\x09\x09\x09c','ock\x20!==\x20','1991068lUtgBm','lineDire','\x0a\x09\x09\x09hasT','rn\x20hasTe','ject\x22)\x20{','let\x20hasT','35amjJhk','124842xkbWGH','ype\x20===\x20','olConten','\x20content','\x20false;\x0a','text\x22,\x0a\x09','lock)','ockType(','k;\x0a\x09\x09if\x20','k);\x0a\x09\x09}\x0a','jected.p','ctiveTag','text,\x20ma','y.text).','\x09content',')\x20=>\x20{\x0a\x09','tTextFro','ncated\x20=','pe);\x0a\x09})','nst\x20entr','\x09\x09\x09});\x0a\x09',');\x0a\x09\x09\x09co','\x22text\x22\x20&','block.ty','ed.text\x0a','\x20&&\x20entr','ected.pu','\x09\x09\x09text:','already-','onst\x20tru','{\x0a\x09\x09\x09pro','substrin','ock\x20||\x20t','ars)\x20{\x0a\x09','ypeof\x20bl','Assistan','6717339LqkJTS','(entry.t','384376qTnQCY','if\x20(!con','sh({\x0a\x09\x09\x09','sForDisp','\x20entry.t','\x20null;\x0a\x09','\x20truncat','\x09\x09return','\x20!==\x20\x22ob','function','not-foun','patched','y.text.t','ush(bloc','\x09}\x20else\x20','\x20(const\x20','34872HOqzQh','sh(block','lay(entr','\x20||\x20type','replace','t(conten','\x09if\x20(!bl','38zBphWV','\x09type:\x20\x22','\x09}\x0a\x09retu','block\x20of','rim())\x20{','\x22string\x22','\x20(!block','\x22object\x22','&\x20typeof'];_0x20a2=function(){return _0x56436d;};return _0x20a2();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x278bab,_0x2c7109){const _0xca025d=_0x16b1,_0x460141=_0x278bab();while(!![]){try{const _0x57545f=parseInt(_0xca025d(0xf8))/0x1*(-parseInt(_0xca025d(0xd6))/0x2)+parseInt(_0xca025d(0xed))/0x3*(-parseInt(_0xca025d(0xdd))/0x4)+parseInt(_0xca025d(0xe1))/0x5+-parseInt(_0xca025d(0xe6))/0x6*(parseInt(_0xca025d(0x101))/0x7)+-parseInt(_0xca025d(0xee))/0x8+parseInt(_0xca025d(0xec))/0x9*(-parseInt(_0xca025d(0xe0))/0xa)+-parseInt(_0xca025d(0x102))/0xb*(-parseInt(_0xca025d(0xf9))/0xc);if(_0x57545f===_0x2c7109)break;else _0x460141['push'](_0x460141['shift']());}catch(_0x5c7ee2){_0x460141['push'](_0x460141['shift']());}}}(_0xb134,0x392be));function createBridgeImport(_0x54e0d1){const _0x3e1618=_0x16b1;return'import\x20*'+_0x3e1618(0xd2)+'eSession'+_0x3e1618(0xf2)+'rom\x20\x22'+_0x54e0d1+'\x22;';}function ensureBridgeImport(_0x5b2e35,_0x27dbd8){const _0x50346b=_0x16b1,_0x4aafa0=createBridgeImport(_0x27dbd8);if(_0x5b2e35[_0x50346b(0xf0)](_0x4aafa0))return _0x5b2e35;const _0x4643a6=_0x5b2e35[_0x50346b(0xcf)](/^import .*;$/m);if(!_0x4643a6)return _0x4aafa0+'\x0a'+_0x5b2e35;return _0x5b2e35[_0x50346b(0xf3)](_0x4643a6[0x0],_0x4643a6[0x0]+'\x0a'+_0x4aafa0);}function findFunctionBodyStart(_0x72a35f,_0x6d2680){const _0x58e324=_0x16b1,_0x5c9ba7=_0x72a35f['indexOf']('(',_0x6d2680);if(_0x5c9ba7===-0x1)return-0x1;let _0x37850c=0x0,_0x545df3=null,_0x26ce5a=![];for(let _0x4b8f11=_0x5c9ba7;_0x4b8f11<_0x72a35f[_0x58e324(0xf7)];_0x4b8f11+=0x1){const _0x45599d=_0x72a35f[_0x4b8f11];if(_0x545df3){if(_0x26ce5a){_0x26ce5a=![];continue;}if(_0x45599d==='\x5c'){_0x26ce5a=!![];continue;}if(_0x45599d===_0x545df3)_0x545df3=null;continue;}if(_0x45599d==='\x22'||_0x45599d==='\x27'||_0x45599d==='`'){_0x545df3=_0x45599d;continue;}if(_0x45599d==='('){_0x37850c+=0x1;continue;}if(_0x45599d===')'){_0x37850c-=0x1;continue;}if(_0x45599d==='{'&&_0x37850c===0x0)return _0x4b8f11;}return-0x1;}function findMatchingBlockEnd(_0x5ee3c6,_0x4d3460){const _0xa403ce=_0x16b1;let _0x237d91=0x0,_0x5f0545=null,_0x42ec3f=![];for(let _0x522804=_0x4d3460;_0x522804<_0x5ee3c6[_0xa403ce(0xf7)];_0x522804+=0x1){const _0x341fef=_0x5ee3c6[_0x522804];if(_0x5f0545){if(_0x42ec3f){_0x42ec3f=![];continue;}if(_0x341fef==='\x5c'){_0x42ec3f=!![];continue;}if(_0x341fef===_0x5f0545)_0x5f0545=null;continue;}if(_0x341fef==='\x22'||_0x341fef==='\x27'||_0x341fef==='`'){_0x5f0545=_0x341fef;continue;}if(_0x341fef==='{')_0x237d91+=0x1;if(_0x341fef==='}')_0x237d91-=0x1;if(_0x237d91===0x0)return _0x522804+0x1;}return-0x1;}function findNextNonWhitespace(_0x1b6bb8,_0x29914d){const _0x1ae6e2=_0x16b1;for(let _0x3075b4=_0x29914d;_0x3075b4<_0x1b6bb8['length'];_0x3075b4+=0x1){if(!/\s/[_0x1ae6e2(0xcc)](_0x1b6bb8[_0x3075b4]))return _0x3075b4;}return-0x1;}function repairMalformedAlreadyPatchedFunction(_0xe4b87e,_0x3f70d3){const _0x11c8f2=_0x16b1,_0x27b235=_0xe4b87e[_0x11c8f2(0xe2)](_0x3f70d3);if(_0x27b235===-0x1)return{'patched':![],'reason':'not-foun'+'d'};const _0x5b7acd=findFunctionBodyStart(_0xe4b87e,_0x27b235);if(_0x5b7acd===-0x1)return{'patched':![],'reason':_0x11c8f2(0xda)+'-found'};const _0x2504f9=findMatchingBlockEnd(_0xe4b87e,_0x5b7acd);if(_0x2504f9===-0x1)return{'patched':![],'reason':_0x11c8f2(0xdf)+_0x11c8f2(0xe9)+'nd'};const _0x25b002=findNextNonWhitespace(_0xe4b87e,_0x2504f9);if(_0xe4b87e[_0x25b002]!==')')return{'patched':![],'reason':_0x11c8f2(0xd1)+_0x11c8f2(0xef)};const _0x5171c9=findNextNonWhitespace(_0xe4b87e,_0x25b002+0x1);if(_0xe4b87e[_0x5171c9]!=='{')return{'patched':![],'reason':'already-'+_0x11c8f2(0xef)};const _0x4ed5ec=findMatchingBlockEnd(_0xe4b87e,_0x5171c9);if(_0x4ed5ec===-0x1)return{'patched':![],'reason':_0x11c8f2(0xdf)+_0x11c8f2(0xe9)+'nd'};return{'patched':!![],'source':_0xe4b87e[_0x11c8f2(0xd5)](0x0,_0x2504f9)+_0xe4b87e[_0x11c8f2(0xd5)](_0x4ed5ec)};}function replaceFunctionBody(_0x445321,_0x22bd32,_0x1bfded){const _0x5870aa=_0x16b1,_0x48ca61=_0x445321[_0x5870aa(0xe2)](_0x22bd32);if(_0x48ca61===-0x1)return{'patched':![],'reason':_0x5870aa(0xd3)+'d'};const _0x47fe00=findFunctionBodyStart(_0x445321,_0x48ca61);if(_0x47fe00===-0x1)return{'patched':![],'reason':_0x5870aa(0xda)+'-found'};const _0x50f58a=findMatchingBlockEnd(_0x445321,_0x47fe00);if(_0x50f58a===-0x1)return{'patched':![],'reason':'body-end'+_0x5870aa(0xe9)+'nd'};const _0x54d793=_0x22bd32+'\x20'+_0x1bfded;return{'patched':!![],'source':_0x445321[_0x5870aa(0xd5)](0x0,_0x48ca61)+_0x54d793+_0x445321[_0x5870aa(0xd5)](_0x50f58a)};}function _0x16b1(_0xe135ab,_0x418967){_0xe135ab=_0xe135ab-0xcc;const _0xb13471=_0xb134();let _0x16b1b5=_0xb13471[_0xe135ab];return _0x16b1b5;}function _0xb134(){const _0x5cc0bf=['arams)','ath,\x20opt','e(storeP','toreAtom','function','3256841pPvkMj','3616701hFMxlF','test','ge.write','ic(param','match','t-provid','already-','\x20as\x20wuji','not-foun','Atomic(p','slice','6ldqYev','nction\x20w','Store(st','portPath','body-not','orePath,','bridge-i','92uNNrdP','idge.loa','body-end','745410dUMCZx','1719305UiQRRX','indexOf','{\x0a\x09retur','wujieSes','ore','6ydSIUJ','sionBrid','mport-no','-not-fou','async\x20fu','bridgeIm','9EzIzrA','9003gXEGCk','1265136STFkrv','patched','includes','s\x20=\x20{})','Bridge\x20f','replace','n\x20wujieS','sionStor','n\x20await\x20','length','109697ArmBQg','36ysXqUJ','s);\x0a}','SessionS'];_0xb134=function(){return _0x5cc0bf;};return _0xb134();}export function patchSessionStoreLoadFromSource(_0x4bed1e,_0x32ec88={}){const _0x16ec97=_0x16b1,_0x1766fc=_0x32ec88[_0x16ec97(0xeb)+_0x16ec97(0xd9)];if(!_0x1766fc)return{'patched':![],'reason':_0x16ec97(0xdc)+_0x16ec97(0xe8)+_0x16ec97(0xd0)+'ed'};if(_0x4bed1e['includes'](_0x16ec97(0xe4)+_0x16ec97(0xe7)+'ge.loadS'+'essionSt'+_0x16ec97(0xe5)))return repairMalformedAlreadyPatchedFunction(_0x4bed1e,_0x16ec97(0x100)+'\x20loadSes'+_0x16ec97(0xf5)+_0x16ec97(0xfe)+'ath,\x20opt'+'s\x20=\x20{})');const _0x62fa2d=replaceFunctionBody(ensureBridgeImport(_0x4bed1e,_0x1766fc),_0x16ec97(0x100)+'\x20loadSes'+_0x16ec97(0xf5)+_0x16ec97(0xfe)+_0x16ec97(0xfd)+_0x16ec97(0xf1),_0x16ec97(0xe3)+_0x16ec97(0xf4)+'essionBr'+_0x16ec97(0xde)+'dSession'+_0x16ec97(0xd8)+_0x16ec97(0xdb)+'\x20opts);\x0a'+'}');return _0x62fa2d;}export function patchSessionStoreWriteFromSource(_0xf61b74,_0xc61baf={}){const _0x559e4a=_0x16b1,_0x21c557=_0xc61baf['bridgeIm'+_0x559e4a(0xd9)];if(!_0x21c557)return{'patched':![],'reason':_0x559e4a(0xdc)+_0x559e4a(0xe8)+_0x559e4a(0xd0)+'ed'};const _0x4ca55d=replaceFunctionBody(ensureBridgeImport(_0xf61b74,_0x21c557),_0x559e4a(0xea)+_0x559e4a(0xd7)+'riteSess'+'ionStore'+_0x559e4a(0xd4)+_0x559e4a(0xfc),'{\x0a\x09retur'+_0x559e4a(0xf6)+_0x559e4a(0xe4)+_0x559e4a(0xe7)+_0x559e4a(0xcd)+_0x559e4a(0xfb)+_0x559e4a(0xff)+_0x559e4a(0xce)+_0x559e4a(0xfa));if(!_0x4ca55d['patched'])return _0x4ca55d;return _0x4ca55d;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x3de0b0,_0x234248){const _0x48e471=_0x52ed,_0x395031=_0x3de0b0();while(!![]){try{const _0x4cae63=parseInt(_0x48e471(0x1e4))/0x1+parseInt(_0x48e471(0x1e8))/0x2*(parseInt(_0x48e471(0x1e7))/0x3)+-parseInt(_0x48e471(0x1de))/0x4*(-parseInt(_0x48e471(0x1e3))/0x5)+parseInt(_0x48e471(0x1f2))/0x6+-parseInt(_0x48e471(0x1ec))/0x7*(-parseInt(_0x48e471(0x1f4))/0x8)+-parseInt(_0x48e471(0x1f0))/0x9*(-parseInt(_0x48e471(0x1df))/0xa)+-parseInt(_0x48e471(0x1e5))/0xb;if(_0x4cae63===_0x234248)break;else _0x395031['push'](_0x395031['shift']());}catch(_0x1eadb1){_0x395031['push'](_0x395031['shift']());}}}(_0x596e,0x7504c));import{asRecord,asStringArray,dedupeStrings,getTrimmedString}from'../common/utils.mjs';export function syncRuntimeManifestPlugins(_0x1a0bb7,_0x563b25,_0x53f080={}){const _0x8b89ad=_0x52ed,_0x31ac95=new Set(_0x53f080[_0x8b89ad(0x1ed)+_0x8b89ad(0x1f6)+'tPluginI'+'ds']??[]),_0x3b3e52=asRecord(_0x53f080[_0x8b89ad(0x1f7)+_0x8b89ad(0x1e6)+'yPluginI'+'d']),_0x35400a={...asRecord(_0x1a0bb7)},_0x4bd3fe={...asRecord(_0x35400a['entries'])},_0x179f32={...asRecord(_0x35400a[_0x8b89ad(0x1f3)])};let _0xddb012=asStringArray(_0x35400a[_0x8b89ad(0x1eb)]),_0x3e6648=![];for(const _0x5cf5ea of _0x563b25??[]){const _0x58db54=getTrimmedString(_0x5cf5ea[_0x8b89ad(0x1f1)]);if(!_0x58db54)continue;const _0x201b6e=asStringArray(_0x3b3e52[_0x58db54]);for(const _0xd54050 of _0x201b6e){_0xd54050 in _0x4bd3fe&&(_0x4bd3fe[_0x58db54]={...asRecord(_0x4bd3fe[_0x58db54]),...asRecord(_0x4bd3fe[_0xd54050])},delete _0x4bd3fe[_0xd54050],_0x3e6648=!![]);}if(_0x201b6e['length']>0x0){const _0xe32334=_0xddb012[_0x8b89ad(0x1e2)](_0x480bb9=>!_0x201b6e['includes'](_0x480bb9));_0xe32334[_0x8b89ad(0x1e0)]!==_0xddb012[_0x8b89ad(0x1e0)]&&(_0xddb012=_0xe32334,_0x3e6648=!![]);}!(_0x58db54 in _0x4bd3fe)&&(_0x4bd3fe[_0x58db54]={'enabled':!_0x31ac95[_0x8b89ad(0x1ea)](_0x58db54)},_0x3e6648=!![]);if(asRecord(_0x4bd3fe[_0x58db54])[_0x8b89ad(0x1ef)]!==![]){const _0x3f9a27=dedupeStrings([..._0xddb012,_0x58db54]);_0x3f9a27[_0x8b89ad(0x1e0)]!==_0xddb012['length']&&(_0xddb012=_0x3f9a27,_0x3e6648=!![]);}getTrimmedString(_0x5cf5ea[_0x8b89ad(0x1e1)])===_0x8b89ad(0x1ee)&&_0x58db54 in _0x179f32&&(delete _0x179f32[_0x58db54],_0x3e6648=!![]);}_0x35400a[_0x8b89ad(0x1f5)]=_0x4bd3fe,_0x35400a[_0x8b89ad(0x1eb)]=_0xddb012;if(Object[_0x8b89ad(0x1e9)](_0x179f32)[_0x8b89ad(0x1e0)]>0x0)_0x35400a['installs']=_0x179f32;else delete _0x35400a[_0x8b89ad(0x1f3)];return{'plugins':_0x35400a,'changed':_0x3e6648};}function _0x52ed(_0x541ccf,_0x81ae8b){_0x541ccf=_0x541ccf-0x1de;const _0x596eee=_0x596e();let _0x52ed46=_0x596eee[_0x541ccf];return _0x52ed46;}function _0x596e(){const _0x136abc=['2546bQwaKh','keys','has','allow','394324DcDRMU','disabled','local','enabled','1251lenOXR','pluginId','357060UVyTsJ','installs','16SJpXSu','entries','ByDefaul','legacyPl','4geheCB','4670gjzqhL','length','source','filter','2511390FoLOkH','686600BeXJAf','16028430BBQTMR','uginIdsB','1203SqKmtp'];_0x596e=function(){return _0x136abc;};return _0x596e();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const _0x3c7291=_0x564e;(function(_0x5d2373,_0x3bc101){const _0x881ba8=_0x564e,_0x34345e=_0x5d2373();while(!![]){try{const _0x119b8c=-parseInt(_0x881ba8(0x8f))/0x1*(-parseInt(_0x881ba8(0x72))/0x2)+-parseInt(_0x881ba8(0x6b))/0x3*(parseInt(_0x881ba8(0x7f))/0x4)+-parseInt(_0x881ba8(0x66))/0x5+-parseInt(_0x881ba8(0x9d))/0x6*(parseInt(_0x881ba8(0x74))/0x7)+-parseInt(_0x881ba8(0x88))/0x8+parseInt(_0x881ba8(0x97))/0x9*(parseInt(_0x881ba8(0xa2))/0xa)+-parseInt(_0x881ba8(0x8b))/0xb*(-parseInt(_0x881ba8(0x7e))/0xc);if(_0x119b8c===_0x3bc101)break;else _0x34345e['push'](_0x34345e['shift']());}catch(_0x3aece4){_0x34345e['push'](_0x34345e['shift']());}}}(_0x23e3,0x492a5));import{existsSync}from'node:fs';import{copyFile,mkdir,readFile,writeFile}from'node:fs/promises';import{dirname,extname,join}from'node:path';import{asRecord}from'../common/utils.mjs';import{createSessionSqliteStore}from'./session-sqlite-store.mjs';const CLONED_AGENT_SESSION_EXCLUDED_FIELDS=new Set([_0x3c7291(0x69)+'ey',_0x3c7291(0x87)+'d',_0x3c7291(0x85),_0x3c7291(0x73)+_0x3c7291(0x9a)]);function extractAgentIdFromSessionKey(_0xfb6915){const _0x24e7ab=_0x3c7291,_0x405951=String(_0xfb6915||'')[_0x24e7ab(0x8d)](':'),_0x7c80d2=_0x405951[0x1]?.[_0x24e7ab(0x6e)]();return _0x7c80d2||_0x24e7ab(0x89);}function _0x23e3(){const _0x22accf=['entries','onsMap','label','user','sessionI','445848FpgsCP','main','assistan','1320CUCfqY','has','split','POSITIVE','1841XJWlNX','includes','.jsonl','role','sessions','text','_INFINIT','slice','479835hqKeSO','isArray','agents','ile','map','d\x20is\x20req','102aMkwZt','session','pop','parse','upsertSe','60HxDGWN','lTs','ey\x20is\x20re','2532225AiRHdp','ionEntry','sourceSe','sessionK','keys','92772xJAQUa','cutoffTe','message','trim','push','getSessi','cutoffRo','202pCeRzS','sessionF','58814SprJwR','content','keepUnti','agent','ssionEnt','number','readSess','ssionKey','type','join','62256pDIgTv','16gXjzCb','isFinite','length','string'];_0x23e3=function(){return _0x22accf;};return _0x23e3();}function resolveNewSessionFilePath(_0xcac24e,_0x1d1d58,_0xdfe1a8,_0x7f8cf4,_0x35e20a){const _0xc3899f=_0x3c7291,_0x5747ff=typeof _0x1d1d58['sessionF'+_0xc3899f(0x9a)]==='string'?_0x1d1d58[_0xc3899f(0x73)+_0xc3899f(0x9a)]['trim']():'';if(_0x5747ff)return _0x5747ff;const _0x4a58c2=_0xdfe1a8&&typeof _0xdfe1a8[_0xc3899f(0x73)+_0xc3899f(0x9a)]===_0xc3899f(0x82)?extname(_0xdfe1a8[_0xc3899f(0x73)+_0xc3899f(0x9a)][_0xc3899f(0x6e)]()):'';return join(_0xcac24e,_0xc3899f(0x99),_0x35e20a,_0xc3899f(0x93),''+_0x7f8cf4+(_0x4a58c2||_0xc3899f(0x91)));}function cloneForkedSessionExtraFields(_0x39b204){const _0x557d75=_0x3c7291;if(!_0x39b204)return{};const _0x451825={};for(const [_0x297538,_0x400086]of Object[_0x557d75(0x83)](_0x39b204)){if(CLONED_AGENT_SESSION_EXCLUDED_FIELDS[_0x557d75(0x8c)](_0x297538))continue;_0x451825[_0x297538]=_0x400086;}return _0x451825;}async function copySessionFileIfNeeded(_0x1b97cc,_0x1b6b3f){const _0x31e142=_0x3c7291;if(!_0x1b97cc||!_0x1b6b3f)return;const _0x1b96aa=typeof _0x1b97cc[_0x31e142(0x73)+_0x31e142(0x9a)]===_0x31e142(0x82)?_0x1b97cc[_0x31e142(0x73)+_0x31e142(0x9a)][_0x31e142(0x6e)]():'',_0x2fad6f=String(_0x1b6b3f||'')[_0x31e142(0x6e)]();if(!_0x1b96aa||!_0x2fad6f||_0x1b96aa===_0x2fad6f)return;if(!existsSync(_0x1b96aa))return;await mkdir(dirname(_0x2fad6f),{'recursive':!![]}),await copyFile(_0x1b96aa,_0x2fad6f);}function extractMessageEntryText(_0x4230b3){const _0x25a266=_0x3c7291,_0x23fcba=asRecord(_0x4230b3[_0x25a266(0x6d)]),_0x11a147=_0x23fcba[_0x25a266(0x75)];if(typeof _0x11a147===_0x25a266(0x82))return _0x11a147;if(!Array[_0x25a266(0x98)](_0x11a147))return'';return _0x11a147[_0x25a266(0x9b)](_0x1c1c74=>{const _0x462249=_0x25a266,_0x4a81ef=asRecord(_0x1c1c74);return _0x4a81ef[_0x462249(0x7c)]==='text'&&typeof _0x4a81ef[_0x462249(0x94)]===_0x462249(0x82)?_0x4a81ef[_0x462249(0x94)]:'';})['filter'](Boolean)[_0x25a266(0x7d)]('\x0a');}function extractMessageEntryRole(_0xaa98fb){const _0x2c32be=_0x3c7291,_0x3ca7d7=asRecord(_0xaa98fb[_0x2c32be(0x6d)]);if(typeof _0x3ca7d7['role']===_0x2c32be(0x82))return _0x3ca7d7[_0x2c32be(0x92)];if(typeof _0xaa98fb[_0x2c32be(0x92)]==='string')return _0xaa98fb[_0x2c32be(0x92)];return'';}function parseJsonLine(_0x57a251){const _0x2dbe95=_0x3c7291;try{const _0x21c96d=JSON[_0x2dbe95(0xa0)](_0x57a251);return asRecord(_0x21c96d);}catch{return null;}}function entryTimestampMs(_0x5066ce){const _0x30d4ad=_0x3c7291,_0x193358=_0x5066ce['timestam'+'p'];if(typeof _0x193358===_0x30d4ad(0x82)){const _0x25110f=Date[_0x30d4ad(0xa0)](_0x193358);return Number['isFinite'](_0x25110f)?_0x25110f:null;}if(typeof _0x193358===_0x30d4ad(0x79)&&Number[_0x30d4ad(0x80)](_0x193358))return _0x193358;return null;}function _0x564e(_0x73b90d,_0x100c28){_0x73b90d=_0x73b90d-0x64;const _0x23e3c3=_0x23e3();let _0x564eed=_0x23e3c3[_0x73b90d];return _0x564eed;}async function trimSessionFileForFork(_0x4512fa,_0x53cb63){const _0x2a388e=_0x3c7291;if(!_0x4512fa||!existsSync(_0x4512fa))return;const {keepUntilTs:_0x41b39a,cutoffRole:_0x415811,cutoffText:_0x4fa425}=_0x53cb63,_0x6a2895=typeof _0x41b39a===_0x2a388e(0x79)&&Number[_0x2a388e(0x80)](_0x41b39a),_0x30b837=typeof _0x4fa425===_0x2a388e(0x82)?_0x4fa425[_0x2a388e(0x6e)]():'',_0x14e6a2=_0x415811===_0x2a388e(0x77)?_0x2a388e(0x8a)+'t':_0x415811===_0x2a388e(0x86)?_0x2a388e(0x86):'',_0x136730=Boolean(_0x14e6a2&&_0x30b837);if(!_0x6a2895&&!_0x136730)return;let _0x16e36b='';try{_0x16e36b=await readFile(_0x4512fa,'utf8');}catch{return;}const _0x2607d7=_0x16e36b[_0x2a388e(0x8d)]('\x0a');let _0x3b9852=-0x1;const _0x36553f=_0x6a2895?_0x41b39a+0xa*0x3c*0x3e8:Number[_0x2a388e(0x8e)+_0x2a388e(0x95)+'Y'];if(_0x136730)for(let _0x593877=0x0;_0x593877<_0x2607d7[_0x2a388e(0x81)];_0x593877+=0x1){const _0x32070c=_0x2607d7[_0x593877][_0x2a388e(0x6e)]();if(!_0x32070c)continue;const _0x50044b=parseJsonLine(_0x32070c);if(!_0x50044b||_0x50044b[_0x2a388e(0x7c)]!=='message')continue;if(extractMessageEntryRole(_0x50044b)!==_0x14e6a2)continue;const _0xd0c118=extractMessageEntryText(_0x50044b)[_0x2a388e(0x6e)]();if(!_0xd0c118||!_0xd0c118[_0x2a388e(0x90)](_0x30b837))continue;const _0x59a223=entryTimestampMs(_0x50044b);if(_0x59a223!==null&&_0x59a223>_0x36553f)continue;_0x3b9852=_0x593877;}let _0x4f5925=[];if(_0x3b9852>=0x0)_0x4f5925=_0x2607d7[_0x2a388e(0x96)](0x0,_0x3b9852+0x1);else{if(_0x6a2895)for(const _0xd3259 of _0x2607d7){const _0x4dde2e=_0xd3259[_0x2a388e(0x6e)]();if(!_0x4dde2e)continue;const _0x6513f0=parseJsonLine(_0x4dde2e);if(!_0x6513f0){_0x4f5925['push'](_0xd3259);continue;}if(_0x6513f0['type']===_0x2a388e(0x9e)){_0x4f5925[_0x2a388e(0x6f)](_0xd3259);continue;}const _0x497893=entryTimestampMs(_0x6513f0);if(_0x497893===null||_0x497893<=_0x41b39a)_0x4f5925[_0x2a388e(0x6f)](_0xd3259);}}while(_0x4f5925[_0x2a388e(0x81)]>0x0&&_0x4f5925[_0x4f5925[_0x2a388e(0x81)]-0x1]['trim']()==='')_0x4f5925[_0x2a388e(0x9f)]();await writeFile(_0x4512fa,_0x4f5925[_0x2a388e(0x7d)]('\x0a')+'\x0a','utf8');}export function createAgentSessionsMapStore({stateDir:_0xb55c6e}){const _0x555839=createSessionSqliteStore({'stateDir':_0xb55c6e});async function _0x1bbfab(_0x3bed30={}){const _0x3b4979=_0x564e,_0x23bcd1=String(_0x3bed30['agentId']||'main');return await _0x555839[_0x3b4979(0x70)+'onsMap'](_0x23bcd1);}async function _0x4dfc5c(_0x5644f5={}){const _0x20b5e8=_0x564e,_0x29abb8=String(_0x5644f5[_0x20b5e8(0x69)+'ey']||'')[_0x20b5e8(0x6e)](),_0x3b958b=String(_0x5644f5[_0x20b5e8(0x87)+'d']||'')['trim']();if(!_0x29abb8)throw new Error('sessionK'+_0x20b5e8(0x65)+'quired');if(!_0x3b958b)throw new Error(_0x20b5e8(0x87)+_0x20b5e8(0x9c)+'uired');const _0xe68deb=extractAgentIdFromSessionKey(_0x29abb8),_0x463d02=asRecord(await _0x555839[_0x20b5e8(0x7a)+_0x20b5e8(0x67)](_0x29abb8)),_0x5a634d=String(_0x5644f5[_0x20b5e8(0x68)+_0x20b5e8(0x7b)]||'')[_0x20b5e8(0x6e)](),_0x194a03=_0x5a634d?extractAgentIdFromSessionKey(_0x5a634d):_0xe68deb,_0x5ac581=_0x5a634d?asRecord(await _0x555839[_0x20b5e8(0x7a)+_0x20b5e8(0x67)](_0x5a634d)):null,_0x2955a6=_0x5ac581&&Object[_0x20b5e8(0x6a)](_0x5ac581)[_0x20b5e8(0x81)]>0x0,_0x35cccb=resolveNewSessionFilePath(_0xb55c6e,_0x463d02,_0x2955a6?_0x5ac581:null,_0x3b958b,_0xe68deb),_0x188ccd=typeof _0x5644f5['keepUnti'+_0x20b5e8(0x64)]==='number'&&Number['isFinite'](_0x5644f5[_0x20b5e8(0x76)+_0x20b5e8(0x64)])?_0x5644f5[_0x20b5e8(0x76)+'lTs']:null,_0x4205a1=typeof _0x5644f5[_0x20b5e8(0x71)+'le']==='string'?_0x5644f5[_0x20b5e8(0x71)+'le']:null,_0x4af0c2=typeof _0x5644f5[_0x20b5e8(0x6c)+'xt']==='string'?_0x5644f5[_0x20b5e8(0x6c)+'xt']:null,_0x15a0b9={..._0x463d02,...cloneForkedSessionExtraFields(_0x2955a6?_0x5ac581:null),'agentId':_0xe68deb,'sessionKey':_0x29abb8,'sessionId':_0x3b958b,'sessionFile':_0x35cccb,..._0x2955a6?{'forkedFromParent':!![]}:{}};return await copySessionFileIfNeeded(_0x2955a6?_0x5ac581:null,_0x35cccb),_0x2955a6&&(_0x188ccd!==null||_0x4205a1&&_0x4af0c2)&&await trimSessionFileForFork(_0x35cccb,{'keepUntilTs':_0x188ccd,'cutoffRole':_0x4205a1,'cutoffText':_0x4af0c2}),await _0x555839[_0x20b5e8(0xa1)+_0x20b5e8(0x78)+'ry']({'agentId':_0xe68deb,'sessionKey':_0x29abb8,'entry':_0x15a0b9}),await _0x555839[_0x20b5e8(0x70)+_0x20b5e8(0x84)](_0xe68deb);}return{'get':_0x1bbfab,'upsert':_0x4dfc5c};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x517852,_0x11f72e){const _0x4398dd=_0x1dd9,_0x41773e=_0x517852();while(!![]){try{const _0xf03447=parseInt(_0x4398dd(0xe6))/0x1+parseInt(_0x4398dd(0xe4))/0x2*(-parseInt(_0x4398dd(0xe2))/0x3)+-parseInt(_0x4398dd(0xc6))/0x4*(-parseInt(_0x4398dd(0xdd))/0x5)+parseInt(_0x4398dd(0xe9))/0x6+parseInt(_0x4398dd(0xda))/0x7*(-parseInt(_0x4398dd(0xe5))/0x8)+-parseInt(_0x4398dd(0xd4))/0x9+parseInt(_0x4398dd(0xca))/0xa*(-parseInt(_0x4398dd(0xcb))/0xb);if(_0xf03447===_0x11f72e)break;else _0x41773e['push'](_0x41773e['shift']());}catch(_0x1ea16d){_0x41773e['push'](_0x41773e['shift']());}}}(_0x3a35,0x23787));import{join}from'node:path';import{createSessionSqliteStore}from'./session-sqlite-store.mjs';const BRIDGE_STORE_CACHE=new Map();function _0x1dd9(_0x457962,_0x2c401b){_0x457962=_0x457962-0xc6;const _0x3a35f4=_0x3a35();let _0x1dd906=_0x3a35f4[_0x457962];return _0x1dd906;}function resolveStateDirFromStorePath(_0x2faa24){const _0x5eeb56=_0x1dd9,_0x30d073=String(_0x2faa24||'')[_0x5eeb56(0xc9)+'ll']('\x5c','/'),_0x201dda='/agents/',_0xe9b2dd=_0x30d073[_0x5eeb56(0xd9)](_0x201dda);if(_0xe9b2dd<0x0){const _0xce899a=_0x30d073[_0x5eeb56(0xd7)](_0x5eeb56(0xdc)+'s/')[0x0];return _0xce899a||_0x30d073;}return _0x30d073[_0x5eeb56(0xdf)](0x0,_0xe9b2dd);}function createBridgeStore(_0x7aa0f0){const _0x5c8216=_0x1dd9,_0x1661a8=resolveStateDirFromStorePath(_0x7aa0f0),_0x522729=join(_0x1661a8,_0x5c8216(0xcd),_0x5c8216(0xeb)+_0x5c8216(0xe7)),_0x217d87=_0x1661a8+'::'+_0x522729,_0x57fd82=BRIDGE_STORE_CACHE[_0x5c8216(0xd3)](_0x217d87);if(_0x57fd82)return _0x57fd82;const _0x56225e=createSessionSqliteStore({'stateDir':_0x1661a8,'dbPath':_0x522729});return BRIDGE_STORE_CACHE[_0x5c8216(0xcc)](_0x217d87,_0x56225e),_0x56225e;}function cloneStoreObject(_0x2abc97){return JSON['parse'](JSON['stringif'+'y'](_0x2abc97||{}));}export function loadSessionStore(_0x3040fa,_0xf1e652={}){const _0x62bca9=_0x1dd9,_0x596ec6=createBridgeStore(_0x3040fa),_0x5bf61f=_0x596ec6[_0x62bca9(0xd2)+_0x62bca9(0xe1)+'ync'](_0x3040fa);return _0xf1e652[_0x62bca9(0xd6)]===![]?_0x5bf61f:cloneStoreObject(_0x5bf61f);}function _0x3a35(){const _0x9e0f69=['266209JGNKGx','lite','reEntry','1425414HwRbNB','storePat','index.sq','8GxYkHt','ionStore','all','replaceA','2415230uRHUTR','11HsApFA','set','sessions','writeSes','ssionSto','applySes','eAtomic','readStor','get','837675dZwPdm','updateSe','clone','split','sionStor','indexOf','924jVLgWw','map','/session','235990ZDcAwl','tch','slice','clear','eByPathS','15ugZpNz','close','47210SoyMbB','16ZqjRmy'];_0x3a35=function(){return _0x9e0f69;};return _0x3a35();}export async function saveSessionStore(_0x1cb122,_0x5704c7){const _0x519639=_0x1dd9,_0x229268=createBridgeStore(_0x1cb122);return await _0x229268['saveSess'+_0x519639(0xc7)](_0x1cb122,_0x5704c7);}export async function updateSessionStore(_0x43541e,_0x4088ed,_0x2104ba){const _0x52a0f3=_0x1dd9,_0x2c22a3=createBridgeStore(_0x43541e);return await _0x2c22a3['updateSe'+_0x52a0f3(0xcf)+'re'](_0x43541e,_0x4088ed,_0x2104ba);}export async function updateSessionStoreEntry(_0x214907){const _0x5a69f9=_0x1dd9,_0x15edc5=createBridgeStore(_0x214907[_0x5a69f9(0xea)+'h']);return await _0x15edc5[_0x5a69f9(0xd5)+'ssionSto'+_0x5a69f9(0xe8)](_0x214907);}export async function applySessionStoreEntryPatch(_0x13ca71){const _0x4302b2=_0x1dd9,_0x181489=createBridgeStore(_0x13ca71[_0x4302b2(0xea)+'h']);return await _0x181489[_0x4302b2(0xd0)+_0x4302b2(0xd8)+'eEntryPa'+_0x4302b2(0xde)](_0x13ca71);}export async function writeSessionStoreAtomic(_0x42bf79){const _0x4513ba=_0x1dd9,_0x7ce20a=createBridgeStore(_0x42bf79[_0x4513ba(0xea)+'h']);return await _0x7ce20a[_0x4513ba(0xce)+_0x4513ba(0xd8)+_0x4513ba(0xd1)](_0x42bf79);}export async function closeBridgeStores(){const _0x5a53a4=_0x1dd9,_0x548ef3=[...BRIDGE_STORE_CACHE['values']()];BRIDGE_STORE_CACHE[_0x5a53a4(0xe0)](),await Promise[_0x5a53a4(0xc8)](_0x548ef3[_0x5a53a4(0xdb)](_0x3daabb=>_0x3daabb[_0x5a53a4(0xe3)]()));}
|