@univerjs-pro/mcp 0.12.1 → 0.12.2-nightly.202511241159

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/facade.js CHANGED
@@ -1 +1 @@
1
- const _0x3a8b42=_0x1d94;(function(_0x1fd6d6,_0x1ddf6c){const _0x51bf0a=_0x1d94,_0x1d5b7d=_0x1fd6d6();while(!![]){try{const _0x38409a=-parseInt(_0x51bf0a(0x10e))/0x1+parseInt(_0x51bf0a(0x108))/0x2*(parseInt(_0x51bf0a(0x110))/0x3)+parseInt(_0x51bf0a(0x113))/0x4+-parseInt(_0x51bf0a(0x115))/0x5*(parseInt(_0x51bf0a(0x102))/0x6)+-parseInt(_0x51bf0a(0xff))/0x7*(-parseInt(_0x51bf0a(0x10c))/0x8)+-parseInt(_0x51bf0a(0x117))/0x9+parseInt(_0x51bf0a(0x106))/0xa*(parseInt(_0x51bf0a(0x105))/0xb);if(_0x38409a===_0x1ddf6c)break;else _0x1d5b7d['push'](_0x1d5b7d['shift']());}catch(_0xb02eb6){_0x1d5b7d['push'](_0x1d5b7d['shift']());}}}(_0x2a75,0x45727));import{MCPEventId as _0x38c24c,MCPEventService as _0x4cb54b,IMCPToolRegistry as _0x1f592d,MCPConnectionController as _0x1dafdc}from'@univerjs-pro/mcp';import{FEventName as _0x2265bd,FUniver as _0x168de0}from'@univerjs/core/facade';import{toDisposable as _0x3b55e1}from'@univerjs/core';class d{get[_0x3a8b42(0xfe)](){const _0x36590b=_0x3a8b42;return _0x38c24c[_0x36590b(0xfe)];}get[_0x3a8b42(0x114)](){const _0x4992a4=_0x3a8b42;return _0x38c24c[_0x4992a4(0x114)];}get[_0x3a8b42(0x116)](){const _0x335c0c=_0x3a8b42;return _0x38c24c[_0x335c0c(0x116)];}get[_0x3a8b42(0x109)](){const _0x1bc615=_0x3a8b42;return _0x38c24c[_0x1bc615(0x109)];}}_0x2265bd[_0x3a8b42(0x10f)](d);function _0x1d94(_0x229eda,_0x215940){const _0x2a75af=_0x2a75();return _0x1d94=function(_0x1d9404,_0x1997f6){_0x1d9404=_0x1d9404-0xfe;let _0x5bf7bf=_0x2a75af[_0x1d9404];return _0x5bf7bf;},_0x1d94(_0x229eda,_0x215940);}class M extends _0x168de0{['_initialize'](_0x5dcf47){this['_registerMCPFacadeEvents'](_0x5dcf47);}[_0x3a8b42(0x11b)](_0x7a748a){const _0x2272c2=_0x3a8b42,_0x256491=_0x7a748a[_0x2272c2(0x103)](_0x4cb54b);this[_0x2272c2(0x10d)](this['Event'][_0x2272c2(0xfe)],()=>_0x3b55e1(_0x256491[_0x2272c2(0x111)][_0x2272c2(0x10a)](_0x13d483=>{const _0x3c8c02=_0x2272c2;_0x13d483[_0x3c8c02(0x112)]===_0x38c24c[_0x3c8c02(0xfe)]&&this['fireEvent'](this[_0x3c8c02(0x100)][_0x3c8c02(0xfe)],_0x13d483['data']);}))),this['registerEventHandler'](this[_0x2272c2(0x100)][_0x2272c2(0x114)],()=>_0x3b55e1(_0x256491[_0x2272c2(0x111)]['subscribe'](_0x1dc7c3=>{const _0xeabe3c=_0x2272c2;_0x1dc7c3[_0xeabe3c(0x112)]===_0x38c24c['McpToolCallReceived']&&this[_0xeabe3c(0x11a)](this[_0xeabe3c(0x100)][_0xeabe3c(0x114)],_0x1dc7c3[_0xeabe3c(0x104)]);}))),this[_0x2272c2(0x10d)](this['Event']['McpToolCallExecuted'],()=>_0x3b55e1(_0x256491['event$']['subscribe'](_0x3791aa=>{const _0x10b4e7=_0x2272c2;_0x3791aa['type']===_0x38c24c[_0x10b4e7(0x116)]&&this[_0x10b4e7(0x11a)](this[_0x10b4e7(0x100)][_0x10b4e7(0x116)],_0x3791aa[_0x10b4e7(0x104)]);}))),this[_0x2272c2(0x10d)](this[_0x2272c2(0x100)]['McpToolCallFailed'],()=>_0x3b55e1(_0x256491[_0x2272c2(0x111)][_0x2272c2(0x10a)](_0x490e2c=>{const _0x138110=_0x2272c2;_0x490e2c[_0x138110(0x112)]===_0x38c24c[_0x138110(0x109)]&&this[_0x138110(0x11a)](this[_0x138110(0x100)][_0x138110(0x109)],_0x490e2c[_0x138110(0x104)]);})));}['validateMCPToolCall'](_0x296404,_0x2ee423){const _0x18297b=_0x3a8b42;return this[_0x18297b(0x101)][_0x18297b(0x103)](_0x1f592d)['validateToolCall'](_0x296404,_0x2ee423);}[_0x3a8b42(0x118)](){const _0x246ada=_0x3a8b42;return this['_injector'][_0x246ada(0x103)](_0x1f592d)[_0x246ada(0x119)]();}[_0x3a8b42(0x11c)](_0x3ee54d,_0x24432e){const _0x41e5a5=_0x3a8b42;return this[_0x41e5a5(0x101)][_0x41e5a5(0x103)](_0x1f592d)['executeTool'](_0x3ee54d,_0x24432e);}[_0x3a8b42(0x107)](){const _0x532216=_0x3a8b42;return this[_0x532216(0x101)][_0x532216(0x103)](_0x1dafdc)['getConnectionStatus']();}['connectMCP'](){this['_injector']['get'](_0x1dafdc)['connect']();}[_0x3a8b42(0x10b)](){const _0x4645db=_0x3a8b42;this['_injector'][_0x4645db(0x103)](_0x1dafdc)['disconnect']();}}function _0x2a75(){const _0x3e486a=['743300bAJFbo','getMCPConnectionStatus','54178QFOFix','McpToolCallFailed','subscribe','disconnectMCP','54304rWBoQp','registerEventHandler','377032gjoZIm','extend','51bIqQFt','event$','type','1272452wgIvhc','McpToolCallReceived','335035UhqbqP','McpToolCallExecuted','639279aRLlmz','getAllMCPTools','getAllTools','fireEvent','_registerMCPFacadeEvents','callMCPTool','McpConnectionStatusChanged','14fFPpbw','Event','_injector','12IwNNcY','get','data','11OqyUNd'];_0x2a75=function(){return _0x3e486a;};return _0x2a75();}_0x168de0['extend'](M);
1
+ const _0x159f09=_0x1c14;(function(_0x3a4958,_0x5d83fe){const _0x4826d3=_0x1c14,_0x244338=_0x3a4958();while(!![]){try{const _0x1c65ba=parseInt(_0x4826d3(0x10e))/0x1*(parseInt(_0x4826d3(0x100))/0x2)+-parseInt(_0x4826d3(0x118))/0x3+-parseInt(_0x4826d3(0x119))/0x4+parseInt(_0x4826d3(0x105))/0x5*(-parseInt(_0x4826d3(0xfc))/0x6)+-parseInt(_0x4826d3(0x117))/0x7+-parseInt(_0x4826d3(0x10d))/0x8*(-parseInt(_0x4826d3(0x115))/0x9)+-parseInt(_0x4826d3(0x113))/0xa*(-parseInt(_0x4826d3(0xfb))/0xb);if(_0x1c65ba===_0x5d83fe)break;else _0x244338['push'](_0x244338['shift']());}catch(_0x5b9026){_0x244338['push'](_0x244338['shift']());}}}(_0x4346,0x4c96c));import{MCPEventId as _0x19f43f,MCPEventService as _0x4bbefe,IMCPToolRegistry as _0x1ee6d0,MCPConnectionController as _0x12ecc1}from'@univerjs-pro/mcp';import{FEventName as _0x474db4,FUniver as _0xb3bd8b}from'@univerjs/core/facade';import{toDisposable as _0x1e45f3}from'@univerjs/core';class d{get[_0x159f09(0xff)](){const _0x2c2f11=_0x159f09;return _0x19f43f[_0x2c2f11(0xff)];}get['McpToolCallReceived'](){const _0x20efb2=_0x159f09;return _0x19f43f[_0x20efb2(0x104)];}get['McpToolCallExecuted'](){const _0x3d7dab=_0x159f09;return _0x19f43f[_0x3d7dab(0x10f)];}get[_0x159f09(0x103)](){const _0x1349bc=_0x159f09;return _0x19f43f[_0x1349bc(0x103)];}}function _0x4346(){const _0xed8b34=['fireEvent','get','connectMCP','subscribe','24TZDCrI','153oXspOy','McpToolCallExecuted','connect','registerEventHandler','event$','1894450vMbajz','callMCPTool','250812ORoYjI','data','3765356snmody','529455JTBlcH','252132lACcfW','Event','getMCPConnectionStatus','executeTool','55GoobaR','24NKemFW','validateToolCall','_injector','McpConnectionStatusChanged','3626bEQpHA','getConnectionStatus','_registerMCPFacadeEvents','McpToolCallFailed','McpToolCallReceived','271355FeRjzm','getAllMCPTools','type','disconnectMCP'];_0x4346=function(){return _0xed8b34;};return _0x4346();}_0x474db4['extend'](d);class M extends _0xb3bd8b{['_initialize'](_0x42212b){this['_registerMCPFacadeEvents'](_0x42212b);}[_0x159f09(0x102)](_0x25eb03){const _0x2324a4=_0x159f09,_0x8335f7=_0x25eb03['get'](_0x4bbefe);this[_0x2324a4(0x111)](this['Event'][_0x2324a4(0xff)],()=>_0x1e45f3(_0x8335f7[_0x2324a4(0x112)][_0x2324a4(0x10c)](_0x215bb4=>{const _0x43747b=_0x2324a4;_0x215bb4[_0x43747b(0x107)]===_0x19f43f[_0x43747b(0xff)]&&this[_0x43747b(0x109)](this[_0x43747b(0x11a)][_0x43747b(0xff)],_0x215bb4[_0x43747b(0x116)]);}))),this['registerEventHandler'](this[_0x2324a4(0x11a)][_0x2324a4(0x104)],()=>_0x1e45f3(_0x8335f7[_0x2324a4(0x112)]['subscribe'](_0x3b1a1a=>{const _0xcb8a79=_0x2324a4;_0x3b1a1a[_0xcb8a79(0x107)]===_0x19f43f[_0xcb8a79(0x104)]&&this[_0xcb8a79(0x109)](this[_0xcb8a79(0x11a)][_0xcb8a79(0x104)],_0x3b1a1a[_0xcb8a79(0x116)]);}))),this[_0x2324a4(0x111)](this['Event'][_0x2324a4(0x10f)],()=>_0x1e45f3(_0x8335f7[_0x2324a4(0x112)]['subscribe'](_0x579b31=>{const _0x4c8deb=_0x2324a4;_0x579b31[_0x4c8deb(0x107)]===_0x19f43f[_0x4c8deb(0x10f)]&&this['fireEvent'](this[_0x4c8deb(0x11a)][_0x4c8deb(0x10f)],_0x579b31[_0x4c8deb(0x116)]);}))),this[_0x2324a4(0x111)](this[_0x2324a4(0x11a)][_0x2324a4(0x103)],()=>_0x1e45f3(_0x8335f7[_0x2324a4(0x112)][_0x2324a4(0x10c)](_0x51006b=>{const _0x289d2f=_0x2324a4;_0x51006b[_0x289d2f(0x107)]===_0x19f43f[_0x289d2f(0x103)]&&this[_0x289d2f(0x109)](this[_0x289d2f(0x11a)][_0x289d2f(0x103)],_0x51006b[_0x289d2f(0x116)]);})));}['validateMCPToolCall'](_0x54f4fd,_0x444030){const _0x264ef5=_0x159f09;return this['_injector'][_0x264ef5(0x10a)](_0x1ee6d0)[_0x264ef5(0xfd)](_0x54f4fd,_0x444030);}[_0x159f09(0x106)](){const _0x577d4a=_0x159f09;return this['_injector'][_0x577d4a(0x10a)](_0x1ee6d0)['getAllTools']();}[_0x159f09(0x114)](_0x435584,_0x54022c){const _0x5b866f=_0x159f09;return this[_0x5b866f(0xfe)][_0x5b866f(0x10a)](_0x1ee6d0)[_0x5b866f(0xfa)](_0x435584,_0x54022c);}[_0x159f09(0x11b)](){const _0x350163=_0x159f09;return this[_0x350163(0xfe)][_0x350163(0x10a)](_0x12ecc1)[_0x350163(0x101)]();}[_0x159f09(0x10b)](){const _0x266b57=_0x159f09;this['_injector'][_0x266b57(0x10a)](_0x12ecc1)[_0x266b57(0x110)]();}[_0x159f09(0x108)](){const _0x4c4235=_0x159f09;this[_0x4c4235(0xfe)][_0x4c4235(0x10a)](_0x12ecc1)['disconnect']();}}function _0x1c14(_0x157051,_0x39f59c){const _0x434649=_0x4346();return _0x1c14=function(_0x1c14e3,_0x1943f4){_0x1c14e3=_0x1c14e3-0xfa;let _0xc3c8de=_0x434649[_0x1c14e3];return _0xc3c8de;},_0x1c14(_0x157051,_0x39f59c);}_0xb3bd8b['extend'](M);