@univerjs-pro/mcp 0.12.3-experimental.20251205-71d07c3 → 0.12.3-nightly.202512060617

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/lib/es/facade.js CHANGED
@@ -1 +1 @@
1
- function _0x2fce(_0x2919f5,_0x51189a){_0x2919f5=_0x2919f5-0x10c;const _0x271bf3=_0x271b();let _0x2fcedf=_0x271bf3[_0x2919f5];return _0x2fcedf;}const _0x40dec0=_0x2fce;(function(_0x5075ae,_0x3e55d5){const _0x8eea77=_0x2fce,_0x4bf402=_0x5075ae();while(!![]){try{const _0x1cefea=parseInt(_0x8eea77(0x124))/0x1+parseInt(_0x8eea77(0x10f))/0x2+parseInt(_0x8eea77(0x128))/0x3+parseInt(_0x8eea77(0x11e))/0x4*(parseInt(_0x8eea77(0x12d))/0x5)+parseInt(_0x8eea77(0x115))/0x6*(parseInt(_0x8eea77(0x123))/0x7)+-parseInt(_0x8eea77(0x11c))/0x8+-parseInt(_0x8eea77(0x116))/0x9*(parseInt(_0x8eea77(0x120))/0xa);if(_0x1cefea===_0x3e55d5)break;else _0x4bf402['push'](_0x4bf402['shift']());}catch(_0x42aeac){_0x4bf402['push'](_0x4bf402['shift']());}}}(_0x271b,0xc8675));import{MCPEventId as _0x2a48d8,MCPEventService as _0x310700,IMCPToolRegistry as _0x4cf70b,MCPConnectionController as _0x5b5432}from'@univerjs-pro/mcp';import{FEventName as _0x5a8e59,FUniver as _0x3b814a}from'@univerjs/core/facade';import{toDisposable as _0x428189}from'@univerjs/core';class d{get[_0x40dec0(0x10e)](){const _0x410d7b=_0x40dec0;return _0x2a48d8[_0x410d7b(0x10e)];}get['McpToolCallReceived'](){return _0x2a48d8['McpToolCallReceived'];}get[_0x40dec0(0x11f)](){const _0x2d864c=_0x40dec0;return _0x2a48d8[_0x2d864c(0x11f)];}get[_0x40dec0(0x12e)](){const _0x15af1c=_0x40dec0;return _0x2a48d8[_0x15af1c(0x12e)];}}function _0x271b(){const _0x119881=['6HAHdro','12375567nWagKw','type','getConnectionStatus','_registerMCPFacadeEvents','data','subscribe','12267104eiRbyt','validateToolCall','24HzInEi','McpToolCallExecuted','10gKBkSE','disconnectMCP','executeTool','1090607WAZhvC','385642vCZEtv','registerEventHandler','connectMCP','McpToolCallReceived','3586278WQatVs','getAllMCPTools','Event','_initialize','get','1116830bYSljk','McpToolCallFailed','callMCPTool','extend','disconnect','McpConnectionStatusChanged','1304478BTOaGV','connect','fireEvent','_injector','validateMCPToolCall','event$'];_0x271b=function(){return _0x119881;};return _0x271b();}_0x5a8e59[_0x40dec0(0x10c)](d);class M extends _0x3b814a{[_0x40dec0(0x12b)](_0xeefff7){const _0x4fcb1c=_0x40dec0;this[_0x4fcb1c(0x119)](_0xeefff7);}[_0x40dec0(0x119)](_0x116ca1){const _0x576d5b=_0x40dec0,_0x375277=_0x116ca1[_0x576d5b(0x12c)](_0x310700);this[_0x576d5b(0x125)](this[_0x576d5b(0x12a)][_0x576d5b(0x10e)],()=>_0x428189(_0x375277[_0x576d5b(0x114)][_0x576d5b(0x11b)](_0x542b73=>{const _0xd9844c=_0x576d5b;_0x542b73[_0xd9844c(0x117)]===_0x2a48d8['McpConnectionStatusChanged']&&this[_0xd9844c(0x111)](this[_0xd9844c(0x12a)][_0xd9844c(0x10e)],_0x542b73[_0xd9844c(0x11a)]);}))),this['registerEventHandler'](this[_0x576d5b(0x12a)]['McpToolCallReceived'],()=>_0x428189(_0x375277[_0x576d5b(0x114)]['subscribe'](_0x4e8622=>{const _0x3b07c6=_0x576d5b;_0x4e8622[_0x3b07c6(0x117)]===_0x2a48d8[_0x3b07c6(0x127)]&&this[_0x3b07c6(0x111)](this[_0x3b07c6(0x12a)][_0x3b07c6(0x127)],_0x4e8622[_0x3b07c6(0x11a)]);}))),this[_0x576d5b(0x125)](this[_0x576d5b(0x12a)]['McpToolCallExecuted'],()=>_0x428189(_0x375277[_0x576d5b(0x114)][_0x576d5b(0x11b)](_0x5bf0b6=>{const _0x51408b=_0x576d5b;_0x5bf0b6[_0x51408b(0x117)]===_0x2a48d8['McpToolCallExecuted']&&this[_0x51408b(0x111)](this[_0x51408b(0x12a)][_0x51408b(0x11f)],_0x5bf0b6[_0x51408b(0x11a)]);}))),this[_0x576d5b(0x125)](this['Event'][_0x576d5b(0x12e)],()=>_0x428189(_0x375277[_0x576d5b(0x114)]['subscribe'](_0x1cf687=>{const _0x4b5615=_0x576d5b;_0x1cf687['type']===_0x2a48d8[_0x4b5615(0x12e)]&&this[_0x4b5615(0x111)](this['Event']['McpToolCallFailed'],_0x1cf687['data']);})));}[_0x40dec0(0x113)](_0x347106,_0x468f10){const _0x2bcb09=_0x40dec0;return this[_0x2bcb09(0x112)]['get'](_0x4cf70b)[_0x2bcb09(0x11d)](_0x347106,_0x468f10);}[_0x40dec0(0x129)](){const _0x46ad16=_0x40dec0;return this[_0x46ad16(0x112)][_0x46ad16(0x12c)](_0x4cf70b)['getAllTools']();}[_0x40dec0(0x12f)](_0x19d755,_0x1fedb3){const _0x5b2771=_0x40dec0;return this['_injector']['get'](_0x4cf70b)[_0x5b2771(0x122)](_0x19d755,_0x1fedb3);}['getMCPConnectionStatus'](){const _0x2ab0d1=_0x40dec0;return this[_0x2ab0d1(0x112)][_0x2ab0d1(0x12c)](_0x5b5432)[_0x2ab0d1(0x118)]();}[_0x40dec0(0x126)](){const _0x1a1ccb=_0x40dec0;this['_injector'][_0x1a1ccb(0x12c)](_0x5b5432)[_0x1a1ccb(0x110)]();}[_0x40dec0(0x121)](){const _0x154f74=_0x40dec0;this[_0x154f74(0x112)][_0x154f74(0x12c)](_0x5b5432)[_0x154f74(0x10d)]();}}_0x3b814a[_0x40dec0(0x10c)](M);
1
+ const _0x3debc=_0x37c5;(function(_0x4bcdaa,_0x212e2d){const _0x5df10d=_0x37c5,_0x5a248f=_0x4bcdaa();while(!![]){try{const _0x80d2ee=parseInt(_0x5df10d(0x1b3))/0x1+-parseInt(_0x5df10d(0x1ad))/0x2*(parseInt(_0x5df10d(0x1ae))/0x3)+-parseInt(_0x5df10d(0x1b5))/0x4+parseInt(_0x5df10d(0x1bb))/0x5+-parseInt(_0x5df10d(0x1a9))/0x6+parseInt(_0x5df10d(0x1ac))/0x7+parseInt(_0x5df10d(0x1a8))/0x8*(parseInt(_0x5df10d(0x1c0))/0x9);if(_0x80d2ee===_0x212e2d)break;else _0x5a248f['push'](_0x5a248f['shift']());}catch(_0x8bace3){_0x5a248f['push'](_0x5a248f['shift']());}}}(_0x47b8,0xac00d));import{MCPEventId as _0x51b9ab,MCPEventService as _0x139db7,IMCPToolRegistry as _0x377653,MCPConnectionController as _0x15dcbf}from'@univerjs-pro/mcp';import{FEventName as _0x287ebc,FUniver as _0xb9a970}from'@univerjs/core/facade';import{toDisposable as _0x3bac54}from'@univerjs/core';class d{get['McpConnectionStatusChanged'](){const _0xf956ec=_0x37c5;return _0x51b9ab[_0xf956ec(0x1aa)];}get['McpToolCallReceived'](){return _0x51b9ab['McpToolCallReceived'];}get[_0x3debc(0x1bd)](){const _0x18c57c=_0x3debc;return _0x51b9ab[_0x18c57c(0x1bd)];}get[_0x3debc(0x1b1)](){const _0x1af09c=_0x3debc;return _0x51b9ab[_0x1af09c(0x1b1)];}}_0x287ebc[_0x3debc(0x1c3)](d);function _0x37c5(_0x1aeed6,_0x48182b){_0x1aeed6=_0x1aeed6-0x1a4;const _0x47b82b=_0x47b8();let _0x37c501=_0x47b82b[_0x1aeed6];return _0x37c501;}function _0x47b8(){const _0x21052b=['844287KFqwCE','disconnect','get','McpToolCallFailed','McpToolCallReceived','871818edvVGi','disconnectMCP','3304172veYNCs','connect','getAllMCPTools','subscribe','registerEventHandler','executeTool','1895910DaGKMz','getConnectionStatus','McpToolCallExecuted','fireEvent','validateToolCall','9CWlfId','type','getMCPConnectionStatus','extend','data','event$','connectMCP','Event','callMCPTool','_registerMCPFacadeEvents','4064696iZpzEv','5622162mTlRWC','McpConnectionStatusChanged','_injector','6929559OpXBfD','2SGFkUZ'];_0x47b8=function(){return _0x21052b;};return _0x47b8();}class M extends _0xb9a970{['_initialize'](_0x454dda){const _0x45792e=_0x3debc;this[_0x45792e(0x1a7)](_0x454dda);}[_0x3debc(0x1a7)](_0x483f65){const _0x5d6bf5=_0x3debc,_0x208f67=_0x483f65['get'](_0x139db7);this[_0x5d6bf5(0x1b9)](this['Event'][_0x5d6bf5(0x1aa)],()=>_0x3bac54(_0x208f67[_0x5d6bf5(0x1c5)][_0x5d6bf5(0x1b8)](_0x71d9f8=>{const _0x2a9c25=_0x5d6bf5;_0x71d9f8['type']===_0x51b9ab['McpConnectionStatusChanged']&&this[_0x2a9c25(0x1be)](this[_0x2a9c25(0x1a5)][_0x2a9c25(0x1aa)],_0x71d9f8[_0x2a9c25(0x1c4)]);}))),this[_0x5d6bf5(0x1b9)](this['Event'][_0x5d6bf5(0x1b2)],()=>_0x3bac54(_0x208f67[_0x5d6bf5(0x1c5)]['subscribe'](_0x5c2d4c=>{const _0x3e79f8=_0x5d6bf5;_0x5c2d4c[_0x3e79f8(0x1c1)]===_0x51b9ab['McpToolCallReceived']&&this['fireEvent'](this['Event']['McpToolCallReceived'],_0x5c2d4c[_0x3e79f8(0x1c4)]);}))),this['registerEventHandler'](this[_0x5d6bf5(0x1a5)]['McpToolCallExecuted'],()=>_0x3bac54(_0x208f67['event$'][_0x5d6bf5(0x1b8)](_0x37dce6=>{const _0x28f71d=_0x5d6bf5;_0x37dce6[_0x28f71d(0x1c1)]===_0x51b9ab[_0x28f71d(0x1bd)]&&this['fireEvent'](this['Event'][_0x28f71d(0x1bd)],_0x37dce6[_0x28f71d(0x1c4)]);}))),this[_0x5d6bf5(0x1b9)](this['Event']['McpToolCallFailed'],()=>_0x3bac54(_0x208f67['event$'][_0x5d6bf5(0x1b8)](_0x38cb8b=>{const _0x513280=_0x5d6bf5;_0x38cb8b[_0x513280(0x1c1)]===_0x51b9ab['McpToolCallFailed']&&this[_0x513280(0x1be)](this[_0x513280(0x1a5)][_0x513280(0x1b1)],_0x38cb8b[_0x513280(0x1c4)]);})));}['validateMCPToolCall'](_0x36803b,_0x200a0c){const _0x5c179f=_0x3debc;return this['_injector'][_0x5c179f(0x1b0)](_0x377653)[_0x5c179f(0x1bf)](_0x36803b,_0x200a0c);}[_0x3debc(0x1b7)](){const _0x5c49cb=_0x3debc;return this[_0x5c49cb(0x1ab)][_0x5c49cb(0x1b0)](_0x377653)['getAllTools']();}[_0x3debc(0x1a6)](_0x4199db,_0x138821){const _0x32f86e=_0x3debc;return this[_0x32f86e(0x1ab)]['get'](_0x377653)[_0x32f86e(0x1ba)](_0x4199db,_0x138821);}[_0x3debc(0x1c2)](){const _0x46f28b=_0x3debc;return this[_0x46f28b(0x1ab)]['get'](_0x15dcbf)[_0x46f28b(0x1bc)]();}[_0x3debc(0x1a4)](){const _0x2b409d=_0x3debc;this[_0x2b409d(0x1ab)][_0x2b409d(0x1b0)](_0x15dcbf)[_0x2b409d(0x1b6)]();}[_0x3debc(0x1b4)](){const _0x449b1e=_0x3debc;this[_0x449b1e(0x1ab)]['get'](_0x15dcbf)[_0x449b1e(0x1af)]();}}_0xb9a970['extend'](M);