@univerjs-pro/mcp 0.12.3-nightly.202512060617 → 0.12.4

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
- 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);
1
+ const _0x508938=_0x2e92;(function(_0x4c6cf6,_0x1c4e78){const _0x14c57f=_0x2e92,_0x15bcaf=_0x4c6cf6();while(!![]){try{const _0x597ede=-parseInt(_0x14c57f(0x6e))/0x1*(-parseInt(_0x14c57f(0x68))/0x2)+parseInt(_0x14c57f(0x74))/0x3*(parseInt(_0x14c57f(0x79))/0x4)+parseInt(_0x14c57f(0x84))/0x5+parseInt(_0x14c57f(0x7c))/0x6+parseInt(_0x14c57f(0x75))/0x7*(parseInt(_0x14c57f(0x81))/0x8)+parseInt(_0x14c57f(0x7d))/0x9+-parseInt(_0x14c57f(0x85))/0xa*(parseInt(_0x14c57f(0x72))/0xb);if(_0x597ede===_0x1c4e78)break;else _0x15bcaf['push'](_0x15bcaf['shift']());}catch(_0x28ffd2){_0x15bcaf['push'](_0x15bcaf['shift']());}}}(_0x1849,0x92ea5));import{MCPEventId as _0x9687ae,MCPEventService as _0xc59db9,IMCPToolRegistry as _0x2c6b95,MCPConnectionController as _0x1ffd1e}from'@univerjs-pro/mcp';import{FEventName as _0x138801,FUniver as _0x5d1bde}from'@univerjs/core/facade';import{toDisposable as _0x478f93}from'@univerjs/core';function _0x1849(){const _0x3e61b0=['disconnectMCP','1909510uKvHyk','10KrlMbP','getMCPConnectionStatus','getAllTools','223738uMluRn','Event','McpToolCallExecuted','connectMCP','_injector','McpToolCallFailed','1zrZsJK','McpToolCallReceived','fireEvent','subscribe','22950026svjdhn','type','51qRoPiz','101521YJqJTm','McpConnectionStatusChanged','extend','callMCPTool','222520RUlBmp','event$','_registerMCPFacadeEvents','4108050ezvYcz','115749jcVMOx','registerEventHandler','data','_initialize','304UlfoEL','get'];_0x1849=function(){return _0x3e61b0;};return _0x1849();}class d{get[_0x508938(0x76)](){return _0x9687ae['McpConnectionStatusChanged'];}get[_0x508938(0x6f)](){const _0x28eed1=_0x508938;return _0x9687ae[_0x28eed1(0x6f)];}get[_0x508938(0x6a)](){const _0x791233=_0x508938;return _0x9687ae[_0x791233(0x6a)];}get[_0x508938(0x6d)](){return _0x9687ae['McpToolCallFailed'];}}_0x138801['extend'](d);function _0x2e92(_0x24b7ae,_0x19879e){_0x24b7ae=_0x24b7ae-0x67;const _0x1849e8=_0x1849();let _0x2e9272=_0x1849e8[_0x24b7ae];return _0x2e9272;}class M extends _0x5d1bde{[_0x508938(0x80)](_0x574f4b){const _0x10600b=_0x508938;this[_0x10600b(0x7b)](_0x574f4b);}[_0x508938(0x7b)](_0x5c58bd){const _0x3c4fb1=_0x508938,_0x1a5041=_0x5c58bd[_0x3c4fb1(0x82)](_0xc59db9);this['registerEventHandler'](this[_0x3c4fb1(0x69)]['McpConnectionStatusChanged'],()=>_0x478f93(_0x1a5041[_0x3c4fb1(0x7a)][_0x3c4fb1(0x71)](_0x53843a=>{const _0x39b6ec=_0x3c4fb1;_0x53843a[_0x39b6ec(0x73)]===_0x9687ae[_0x39b6ec(0x76)]&&this['fireEvent'](this['Event'][_0x39b6ec(0x76)],_0x53843a[_0x39b6ec(0x7f)]);}))),this[_0x3c4fb1(0x7e)](this['Event'][_0x3c4fb1(0x6f)],()=>_0x478f93(_0x1a5041[_0x3c4fb1(0x7a)][_0x3c4fb1(0x71)](_0x3b5bbf=>{const _0x2e2e6e=_0x3c4fb1;_0x3b5bbf[_0x2e2e6e(0x73)]===_0x9687ae[_0x2e2e6e(0x6f)]&&this[_0x2e2e6e(0x70)](this['Event'][_0x2e2e6e(0x6f)],_0x3b5bbf['data']);}))),this[_0x3c4fb1(0x7e)](this['Event'][_0x3c4fb1(0x6a)],()=>_0x478f93(_0x1a5041[_0x3c4fb1(0x7a)][_0x3c4fb1(0x71)](_0x39d3ff=>{const _0x5cca22=_0x3c4fb1;_0x39d3ff['type']===_0x9687ae['McpToolCallExecuted']&&this['fireEvent'](this['Event']['McpToolCallExecuted'],_0x39d3ff[_0x5cca22(0x7f)]);}))),this[_0x3c4fb1(0x7e)](this[_0x3c4fb1(0x69)][_0x3c4fb1(0x6d)],()=>_0x478f93(_0x1a5041[_0x3c4fb1(0x7a)][_0x3c4fb1(0x71)](_0xcb13c4=>{const _0x12d2cf=_0x3c4fb1;_0xcb13c4[_0x12d2cf(0x73)]===_0x9687ae['McpToolCallFailed']&&this['fireEvent'](this[_0x12d2cf(0x69)][_0x12d2cf(0x6d)],_0xcb13c4[_0x12d2cf(0x7f)]);})));}['validateMCPToolCall'](_0xa7aab0,_0x36425c){const _0x49ad4f=_0x508938;return this[_0x49ad4f(0x6c)]['get'](_0x2c6b95)['validateToolCall'](_0xa7aab0,_0x36425c);}['getAllMCPTools'](){const _0x35c25e=_0x508938;return this[_0x35c25e(0x6c)]['get'](_0x2c6b95)[_0x35c25e(0x67)]();}[_0x508938(0x78)](_0x50597f,_0x5279ab){const _0x4ec04e=_0x508938;return this[_0x4ec04e(0x6c)][_0x4ec04e(0x82)](_0x2c6b95)['executeTool'](_0x50597f,_0x5279ab);}[_0x508938(0x86)](){const _0x38afd4=_0x508938;return this[_0x38afd4(0x6c)][_0x38afd4(0x82)](_0x1ffd1e)['getConnectionStatus']();}[_0x508938(0x6b)](){const _0x237d04=_0x508938;this[_0x237d04(0x6c)][_0x237d04(0x82)](_0x1ffd1e)['connect']();}[_0x508938(0x83)](){const _0x37ffbf=_0x508938;this[_0x37ffbf(0x6c)][_0x37ffbf(0x82)](_0x1ffd1e)['disconnect']();}}_0x5d1bde[_0x508938(0x77)](M);