@univerjs-pro/mcp 0.12.4 → 0.13.0-insiders.20251215-64041bb

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 _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);
1
+ const _0x4aacba=_0x32f8;(function(_0x16d759,_0x7426e1){const _0x2075eb=_0x32f8,_0x541573=_0x16d759();while(!![]){try{const _0x48840f=parseInt(_0x2075eb(0xef))/0x1+-parseInt(_0x2075eb(0xf6))/0x2*(-parseInt(_0x2075eb(0x107))/0x3)+parseInt(_0x2075eb(0xea))/0x4*(-parseInt(_0x2075eb(0xfb))/0x5)+parseInt(_0x2075eb(0xf9))/0x6+parseInt(_0x2075eb(0xe7))/0x7+parseInt(_0x2075eb(0xe9))/0x8*(parseInt(_0x2075eb(0xf8))/0x9)+-parseInt(_0x2075eb(0xe4))/0xa;if(_0x48840f===_0x7426e1)break;else _0x541573['push'](_0x541573['shift']());}catch(_0x375933){_0x541573['push'](_0x541573['shift']());}}}(_0x41ea,0x744b3));function _0x41ea(){const _0x3b3ded=['getAllMCPTools','getConnectionStatus','extend','get','_initialize','disconnect','576DrUBOt','event$','10694480ftRemD','disconnectMCP','getAllTools','1236571OlLlcu','connect','184bpReeb','1635088oovWix','type','callMCPTool','executeTool','registerEventHandler','943328lJUmTG','McpToolCallFailed','validateToolCall','McpToolCallExecuted','_registerMCPFacadeEvents','connectMCP','_injector','7836oxTExt','Event','142353mrQVjW','763818RoSgKo','data','10MGzqkK','subscribe','fireEvent','McpToolCallReceived','validateMCPToolCall','McpConnectionStatusChanged'];_0x41ea=function(){return _0x3b3ded;};return _0x41ea();}import{MCPEventId as _0x403e3b,MCPEventService as _0x1ae106,IMCPToolRegistry as _0x535714,MCPConnectionController as _0x1834b8}from'@univerjs-pro/mcp';function _0x32f8(_0x2524c4,_0x215778){_0x2524c4=_0x2524c4-0xe4;const _0x41eadf=_0x41ea();let _0x32f873=_0x41eadf[_0x2524c4];return _0x32f873;}import{FEventName as _0x2b6e27,FUniver as _0x246595}from'@univerjs/core/facade';import{toDisposable as _0x2ce8ee}from'@univerjs/core';class d{get['McpConnectionStatusChanged'](){const _0x1fbaef=_0x32f8;return _0x403e3b[_0x1fbaef(0x100)];}get[_0x4aacba(0xfe)](){const _0x493323=_0x4aacba;return _0x403e3b[_0x493323(0xfe)];}get['McpToolCallExecuted'](){return _0x403e3b['McpToolCallExecuted'];}get[_0x4aacba(0xf0)](){const _0x2e588d=_0x4aacba;return _0x403e3b[_0x2e588d(0xf0)];}}_0x2b6e27['extend'](d);class M extends _0x246595{[_0x4aacba(0x105)](_0x2a9ff2){this['_registerMCPFacadeEvents'](_0x2a9ff2);}[_0x4aacba(0xf3)](_0x20905d){const _0x266774=_0x4aacba,_0x4834ac=_0x20905d[_0x266774(0x104)](_0x1ae106);this[_0x266774(0xee)](this[_0x266774(0xf7)][_0x266774(0x100)],()=>_0x2ce8ee(_0x4834ac['event$'][_0x266774(0xfc)](_0x4c28b1=>{const _0x269500=_0x266774;_0x4c28b1[_0x269500(0xeb)]===_0x403e3b[_0x269500(0x100)]&&this[_0x269500(0xfd)](this[_0x269500(0xf7)]['McpConnectionStatusChanged'],_0x4c28b1[_0x269500(0xfa)]);}))),this[_0x266774(0xee)](this[_0x266774(0xf7)][_0x266774(0xfe)],()=>_0x2ce8ee(_0x4834ac[_0x266774(0x108)][_0x266774(0xfc)](_0x289d7f=>{const _0x2d816f=_0x266774;_0x289d7f[_0x2d816f(0xeb)]===_0x403e3b[_0x2d816f(0xfe)]&&this[_0x2d816f(0xfd)](this['Event'][_0x2d816f(0xfe)],_0x289d7f['data']);}))),this['registerEventHandler'](this[_0x266774(0xf7)][_0x266774(0xf2)],()=>_0x2ce8ee(_0x4834ac[_0x266774(0x108)]['subscribe'](_0x11dd4e=>{const _0x4ec70b=_0x266774;_0x11dd4e[_0x4ec70b(0xeb)]===_0x403e3b[_0x4ec70b(0xf2)]&&this[_0x4ec70b(0xfd)](this['Event'][_0x4ec70b(0xf2)],_0x11dd4e[_0x4ec70b(0xfa)]);}))),this[_0x266774(0xee)](this[_0x266774(0xf7)][_0x266774(0xf0)],()=>_0x2ce8ee(_0x4834ac[_0x266774(0x108)][_0x266774(0xfc)](_0x59a233=>{const _0x7043d1=_0x266774;_0x59a233[_0x7043d1(0xeb)]===_0x403e3b['McpToolCallFailed']&&this['fireEvent'](this['Event'][_0x7043d1(0xf0)],_0x59a233[_0x7043d1(0xfa)]);})));}[_0x4aacba(0xff)](_0x150c4f,_0x25ba99){const _0x5249f6=_0x4aacba;return this[_0x5249f6(0xf5)]['get'](_0x535714)[_0x5249f6(0xf1)](_0x150c4f,_0x25ba99);}[_0x4aacba(0x101)](){const _0x29903a=_0x4aacba;return this[_0x29903a(0xf5)][_0x29903a(0x104)](_0x535714)[_0x29903a(0xe6)]();}[_0x4aacba(0xec)](_0x30dc84,_0x4b75a2){const _0x106709=_0x4aacba;return this[_0x106709(0xf5)][_0x106709(0x104)](_0x535714)[_0x106709(0xed)](_0x30dc84,_0x4b75a2);}['getMCPConnectionStatus'](){const _0x5865f8=_0x4aacba;return this[_0x5865f8(0xf5)][_0x5865f8(0x104)](_0x1834b8)[_0x5865f8(0x102)]();}[_0x4aacba(0xf4)](){const _0x1b9268=_0x4aacba;this['_injector'][_0x1b9268(0x104)](_0x1834b8)[_0x1b9268(0xe8)]();}[_0x4aacba(0xe5)](){const _0x2bec69=_0x4aacba;this[_0x2bec69(0xf5)]['get'](_0x1834b8)[_0x2bec69(0x106)]();}}_0x246595[_0x4aacba(0x103)](M);