@univerjs-pro/mcp 0.12.3 → 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 _0x1fe127=_0x4cf7;(function(_0x1b37a7,_0x36a734){const _0x3dfc4b=_0x4cf7,_0x4028b7=_0x1b37a7();while(!![]){try{const _0x28426b=-parseInt(_0x3dfc4b(0x146))/0x1+-parseInt(_0x3dfc4b(0x138))/0x2*(-parseInt(_0x3dfc4b(0x142))/0x3)+parseInt(_0x3dfc4b(0x13e))/0x4+-parseInt(_0x3dfc4b(0x148))/0x5+parseInt(_0x3dfc4b(0x153))/0x6+parseInt(_0x3dfc4b(0x152))/0x7+-parseInt(_0x3dfc4b(0x13c))/0x8*(-parseInt(_0x3dfc4b(0x156))/0x9);if(_0x28426b===_0x36a734)break;else _0x4028b7['push'](_0x4028b7['shift']());}catch(_0x5a8352){_0x4028b7['push'](_0x4028b7['shift']());}}}(_0x2f76,0x2babb));function _0x2f76(){const _0x21fc2b=['9chfJdD','disconnect','event$','getAllTools','executeTool','2DztiSj','type','McpToolCallFailed','fireEvent','95224IFGVJE','connect','813200yFcMZk','_injector','getConnectionStatus','connectMCP','565932eSCSQn','validateToolCall','McpToolCallReceived','getAllMCPTools','264714ITXOVC','get','478925fqVcEA','_initialize','subscribe','callMCPTool','data','Event','getMCPConnectionStatus','McpConnectionStatusChanged','registerEventHandler','_registerMCPFacadeEvents','61558iWJmum','760398GwqqRc','extend','McpToolCallExecuted'];_0x2f76=function(){return _0x21fc2b;};return _0x2f76();}import{MCPEventId as _0x3bc679,MCPEventService as _0x2fbc66,IMCPToolRegistry as _0x29022e,MCPConnectionController as _0x1c2bd8}from'@univerjs-pro/mcp';function _0x4cf7(_0x5b3403,_0x59c357){const _0x2f766a=_0x2f76();return _0x4cf7=function(_0x4cf784,_0x514d32){_0x4cf784=_0x4cf784-0x134;let _0x5e6326=_0x2f766a[_0x4cf784];return _0x5e6326;},_0x4cf7(_0x5b3403,_0x59c357);}import{FEventName as _0x7de525,FUniver as _0x244512}from'@univerjs/core/facade';import{toDisposable as _0x55df3b}from'@univerjs/core';class d{get[_0x1fe127(0x14f)](){const _0x1bc193=_0x1fe127;return _0x3bc679[_0x1bc193(0x14f)];}get[_0x1fe127(0x144)](){const _0x3db256=_0x1fe127;return _0x3bc679[_0x3db256(0x144)];}get[_0x1fe127(0x155)](){const _0x4e20f1=_0x1fe127;return _0x3bc679[_0x4e20f1(0x155)];}get[_0x1fe127(0x13a)](){return _0x3bc679['McpToolCallFailed'];}}_0x7de525['extend'](d);class M extends _0x244512{[_0x1fe127(0x149)](_0x263aba){const _0x5a7a52=_0x1fe127;this[_0x5a7a52(0x151)](_0x263aba);}['_registerMCPFacadeEvents'](_0x270c22){const _0x4d3144=_0x1fe127,_0x4eb920=_0x270c22[_0x4d3144(0x147)](_0x2fbc66);this[_0x4d3144(0x150)](this[_0x4d3144(0x14d)]['McpConnectionStatusChanged'],()=>_0x55df3b(_0x4eb920[_0x4d3144(0x135)][_0x4d3144(0x14a)](_0x4e9346=>{const _0xc04e07=_0x4d3144;_0x4e9346[_0xc04e07(0x139)]===_0x3bc679[_0xc04e07(0x14f)]&&this[_0xc04e07(0x13b)](this[_0xc04e07(0x14d)][_0xc04e07(0x14f)],_0x4e9346[_0xc04e07(0x14c)]);}))),this['registerEventHandler'](this[_0x4d3144(0x14d)]['McpToolCallReceived'],()=>_0x55df3b(_0x4eb920[_0x4d3144(0x135)][_0x4d3144(0x14a)](_0x28ecb2=>{const _0x3df3b3=_0x4d3144;_0x28ecb2['type']===_0x3bc679['McpToolCallReceived']&&this[_0x3df3b3(0x13b)](this[_0x3df3b3(0x14d)][_0x3df3b3(0x144)],_0x28ecb2[_0x3df3b3(0x14c)]);}))),this[_0x4d3144(0x150)](this['Event'][_0x4d3144(0x155)],()=>_0x55df3b(_0x4eb920[_0x4d3144(0x135)]['subscribe'](_0x1420c4=>{const _0x4907a5=_0x4d3144;_0x1420c4[_0x4907a5(0x139)]===_0x3bc679['McpToolCallExecuted']&&this[_0x4907a5(0x13b)](this['Event'][_0x4907a5(0x155)],_0x1420c4[_0x4907a5(0x14c)]);}))),this[_0x4d3144(0x150)](this[_0x4d3144(0x14d)]['McpToolCallFailed'],()=>_0x55df3b(_0x4eb920[_0x4d3144(0x135)]['subscribe'](_0x4c15cf=>{const _0x45f90b=_0x4d3144;_0x4c15cf[_0x45f90b(0x139)]===_0x3bc679[_0x45f90b(0x13a)]&&this['fireEvent'](this['Event']['McpToolCallFailed'],_0x4c15cf[_0x45f90b(0x14c)]);})));}['validateMCPToolCall'](_0x3a7e2e,_0x5504f1){const _0x6f2bf=_0x1fe127;return this[_0x6f2bf(0x13f)][_0x6f2bf(0x147)](_0x29022e)[_0x6f2bf(0x143)](_0x3a7e2e,_0x5504f1);}[_0x1fe127(0x145)](){const _0x496eb1=_0x1fe127;return this[_0x496eb1(0x13f)][_0x496eb1(0x147)](_0x29022e)[_0x496eb1(0x136)]();}[_0x1fe127(0x14b)](_0x509164,_0xf07ff4){const _0x42985a=_0x1fe127;return this[_0x42985a(0x13f)]['get'](_0x29022e)[_0x42985a(0x137)](_0x509164,_0xf07ff4);}[_0x1fe127(0x14e)](){const _0x5f0132=_0x1fe127;return this['_injector'][_0x5f0132(0x147)](_0x1c2bd8)[_0x5f0132(0x140)]();}[_0x1fe127(0x141)](){const _0x244100=_0x1fe127;this[_0x244100(0x13f)]['get'](_0x1c2bd8)[_0x244100(0x13d)]();}['disconnectMCP'](){const _0x216edb=_0x1fe127;this[_0x216edb(0x13f)][_0x216edb(0x147)](_0x1c2bd8)[_0x216edb(0x134)]();}}_0x244512[_0x1fe127(0x154)](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);