@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.
- 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/package.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
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(
|
|
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(
|
|
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
|
-
|
|
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(
|
|
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)]()));}
|