@univerjs-pro/mcp 0.12.0 → 0.12.1

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 _0x167b34=_0x3b11;(function(_0x1154d8,_0x56c3a9){const _0x5478de=_0x3b11,_0x223a1b=_0x1154d8();while(!![]){try{const _0xff5144=parseInt(_0x5478de(0x1ea))/0x1+parseInt(_0x5478de(0x1e4))/0x2*(-parseInt(_0x5478de(0x1e3))/0x3)+parseInt(_0x5478de(0x1d5))/0x4*(-parseInt(_0x5478de(0x1ef))/0x5)+parseInt(_0x5478de(0x1e2))/0x6*(-parseInt(_0x5478de(0x1d1))/0x7)+-parseInt(_0x5478de(0x1f6))/0x8+-parseInt(_0x5478de(0x1f5))/0x9*(-parseInt(_0x5478de(0x1d2))/0xa)+-parseInt(_0x5478de(0x1e6))/0xb*(-parseInt(_0x5478de(0x1d8))/0xc);if(_0xff5144===_0x56c3a9)break;else _0x223a1b['push'](_0x223a1b['shift']());}catch(_0x493b6d){_0x223a1b['push'](_0x223a1b['shift']());}}}(_0xea1a,0x8bbc7));import{MCPEventId as _0x421603,MCPEventService as _0x40f393,IMCPToolRegistry as _0x4d69b9,MCPConnectionController as _0x216b4c}from'@univerjs-pro/mcp';import{FEventName as _0x31a3f8,FUniver as _0x463fa7}from'@univerjs/core/facade';function _0xea1a(){const _0xb2f006=['getAllTools','getAllMCPTools','event$','_injector','McpToolCallExecuted','subscribe','getConnectionStatus','disconnectMCP','get','2952OXiehv','156747IEjfdG','2lZZlMK','data','44cEPURa','validateToolCall','callMCPTool','executeTool','482306eBOuxO','registerEventHandler','disconnect','type','McpToolCallFailed','5yHpOtR','fireEvent','connect','McpToolCallReceived','Event','McpConnectionStatusChanged','585BJTWsn','3509344QLPBCl','getMCPConnectionStatus','588neVHvz','12310FBsSgv','_registerMCPFacadeEvents','_initialize','2587156shRraO','extend','connectMCP','3567216XXyyLk'];_0xea1a=function(){return _0xb2f006;};return _0xea1a();}function _0x3b11(_0x48b5a8,_0x5e38e6){const _0xea1a20=_0xea1a();return _0x3b11=function(_0x3b11d2,_0x4f0d8c){_0x3b11d2=_0x3b11d2-0x1d0;let _0x385292=_0xea1a20[_0x3b11d2];return _0x385292;},_0x3b11(_0x48b5a8,_0x5e38e6);}import{toDisposable as _0x571923}from'@univerjs/core';class d{get[_0x167b34(0x1f4)](){const _0x5d96bc=_0x167b34;return _0x421603[_0x5d96bc(0x1f4)];}get[_0x167b34(0x1f2)](){const _0x3a54c5=_0x167b34;return _0x421603[_0x3a54c5(0x1f2)];}get[_0x167b34(0x1dd)](){const _0xd73922=_0x167b34;return _0x421603[_0xd73922(0x1dd)];}get[_0x167b34(0x1ee)](){const _0x4e0170=_0x167b34;return _0x421603[_0x4e0170(0x1ee)];}}_0x31a3f8[_0x167b34(0x1d6)](d);class M extends _0x463fa7{[_0x167b34(0x1d4)](_0x48a0a2){const _0x218a1b=_0x167b34;this[_0x218a1b(0x1d3)](_0x48a0a2);}[_0x167b34(0x1d3)](_0x19a224){const _0x411ad6=_0x167b34,_0x241d95=_0x19a224[_0x411ad6(0x1e1)](_0x40f393);this['registerEventHandler'](this[_0x411ad6(0x1f3)]['McpConnectionStatusChanged'],()=>_0x571923(_0x241d95[_0x411ad6(0x1db)][_0x411ad6(0x1de)](_0xc47884=>{const _0x473d2e=_0x411ad6;_0xc47884[_0x473d2e(0x1ed)]===_0x421603[_0x473d2e(0x1f4)]&&this[_0x473d2e(0x1f0)](this[_0x473d2e(0x1f3)][_0x473d2e(0x1f4)],_0xc47884['data']);}))),this['registerEventHandler'](this['Event'][_0x411ad6(0x1f2)],()=>_0x571923(_0x241d95['event$'][_0x411ad6(0x1de)](_0x47babd=>{const _0x8924f5=_0x411ad6;_0x47babd[_0x8924f5(0x1ed)]===_0x421603[_0x8924f5(0x1f2)]&&this['fireEvent'](this['Event'][_0x8924f5(0x1f2)],_0x47babd[_0x8924f5(0x1e5)]);}))),this[_0x411ad6(0x1eb)](this['Event']['McpToolCallExecuted'],()=>_0x571923(_0x241d95[_0x411ad6(0x1db)][_0x411ad6(0x1de)](_0x43b526=>{const _0x4b02b9=_0x411ad6;_0x43b526[_0x4b02b9(0x1ed)]===_0x421603[_0x4b02b9(0x1dd)]&&this[_0x4b02b9(0x1f0)](this[_0x4b02b9(0x1f3)][_0x4b02b9(0x1dd)],_0x43b526['data']);}))),this[_0x411ad6(0x1eb)](this[_0x411ad6(0x1f3)][_0x411ad6(0x1ee)],()=>_0x571923(_0x241d95[_0x411ad6(0x1db)][_0x411ad6(0x1de)](_0x4e0792=>{const _0x3c9c57=_0x411ad6;_0x4e0792['type']===_0x421603[_0x3c9c57(0x1ee)]&&this[_0x3c9c57(0x1f0)](this[_0x3c9c57(0x1f3)][_0x3c9c57(0x1ee)],_0x4e0792['data']);})));}['validateMCPToolCall'](_0x2323cc,_0xe789a1){const _0x14ce7a=_0x167b34;return this['_injector'][_0x14ce7a(0x1e1)](_0x4d69b9)[_0x14ce7a(0x1e7)](_0x2323cc,_0xe789a1);}[_0x167b34(0x1da)](){const _0x4192a0=_0x167b34;return this[_0x4192a0(0x1dc)][_0x4192a0(0x1e1)](_0x4d69b9)[_0x4192a0(0x1d9)]();}[_0x167b34(0x1e8)](_0x5ecbe9,_0x4e8a68){const _0x28f1a2=_0x167b34;return this[_0x28f1a2(0x1dc)]['get'](_0x4d69b9)[_0x28f1a2(0x1e9)](_0x5ecbe9,_0x4e8a68);}[_0x167b34(0x1d0)](){const _0x1b8fb0=_0x167b34;return this[_0x1b8fb0(0x1dc)][_0x1b8fb0(0x1e1)](_0x216b4c)[_0x1b8fb0(0x1df)]();}[_0x167b34(0x1d7)](){const _0x20c3ae=_0x167b34;this[_0x20c3ae(0x1dc)][_0x20c3ae(0x1e1)](_0x216b4c)[_0x20c3ae(0x1f1)]();}[_0x167b34(0x1e0)](){const _0x2f8b37=_0x167b34;this['_injector'][_0x2f8b37(0x1e1)](_0x216b4c)[_0x2f8b37(0x1ec)]();}}_0x463fa7[_0x167b34(0x1d6)](M);
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);