@univerjs-pro/mcp 0.12.1 → 0.12.2-experimental.20251129-0fa20cd

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 _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
+ function _0x2378(_0x53a615,_0x3b3c66){const _0x5b3291=_0x5b32();return _0x2378=function(_0x237873,_0x18a433){_0x237873=_0x237873-0x113;let _0x4aaad4=_0x5b3291[_0x237873];return _0x4aaad4;},_0x2378(_0x53a615,_0x3b3c66);}const _0x5efaea=_0x2378;(function(_0x52c21d,_0x10ab89){const _0x346c0f=_0x2378,_0x17cb3f=_0x52c21d();while(!![]){try{const _0x599629=parseInt(_0x346c0f(0x114))/0x1+-parseInt(_0x346c0f(0x12f))/0x2+parseInt(_0x346c0f(0x11f))/0x3*(parseInt(_0x346c0f(0x125))/0x4)+parseInt(_0x346c0f(0x12a))/0x5+parseInt(_0x346c0f(0x11e))/0x6+-parseInt(_0x346c0f(0x132))/0x7+-parseInt(_0x346c0f(0x115))/0x8;if(_0x599629===_0x10ab89)break;else _0x17cb3f['push'](_0x17cb3f['shift']());}catch(_0x596282){_0x17cb3f['push'](_0x17cb3f['shift']());}}}(_0x5b32,0x59b96));import{MCPEventId as _0x26723d,MCPEventService as _0x38eb75,IMCPToolRegistry as _0x41ce5a,MCPConnectionController as _0x2c912a}from'@univerjs-pro/mcp';import{FEventName as _0x18f4f3,FUniver as _0x432796}from'@univerjs/core/facade';import{toDisposable as _0x5db522}from'@univerjs/core';function _0x5b32(){const _0x553bf5=['_injector','1771725tMXgwW','validateToolCall','disconnect','getAllMCPTools','getConnectionStatus','226284wvRFqY','_registerMCPFacadeEvents','get','2023231HTgaeU','registerEventHandler','data','503949jGkJXk','6901680OVCNaQ','getAllTools','subscribe','Event','disconnectMCP','McpToolCallFailed','extend','McpToolCallReceived','executeTool','428730qHmXCF','651XIZhEk','connectMCP','fireEvent','callMCPTool','event$','type','12952pCbvXJ','McpToolCallExecuted','McpConnectionStatusChanged','validateMCPToolCall'];_0x5b32=function(){return _0x553bf5;};return _0x5b32();}class d{get[_0x5efaea(0x127)](){const _0x5a4ec5=_0x5efaea;return _0x26723d[_0x5a4ec5(0x127)];}get[_0x5efaea(0x11c)](){return _0x26723d['McpToolCallReceived'];}get[_0x5efaea(0x126)](){return _0x26723d['McpToolCallExecuted'];}get[_0x5efaea(0x11a)](){return _0x26723d['McpToolCallFailed'];}}_0x18f4f3[_0x5efaea(0x11b)](d);class M extends _0x432796{['_initialize'](_0x924601){const _0x34f45a=_0x5efaea;this[_0x34f45a(0x130)](_0x924601);}['_registerMCPFacadeEvents'](_0x3d6800){const _0x28d333=_0x5efaea,_0x4ee02d=_0x3d6800[_0x28d333(0x131)](_0x38eb75);this[_0x28d333(0x133)](this[_0x28d333(0x118)]['McpConnectionStatusChanged'],()=>_0x5db522(_0x4ee02d[_0x28d333(0x123)][_0x28d333(0x117)](_0x586fde=>{const _0xbc4e96=_0x28d333;_0x586fde['type']===_0x26723d['McpConnectionStatusChanged']&&this[_0xbc4e96(0x121)](this[_0xbc4e96(0x118)][_0xbc4e96(0x127)],_0x586fde[_0xbc4e96(0x113)]);}))),this[_0x28d333(0x133)](this[_0x28d333(0x118)][_0x28d333(0x11c)],()=>_0x5db522(_0x4ee02d[_0x28d333(0x123)]['subscribe'](_0x20b396=>{const _0x3cdc04=_0x28d333;_0x20b396[_0x3cdc04(0x124)]===_0x26723d[_0x3cdc04(0x11c)]&&this[_0x3cdc04(0x121)](this[_0x3cdc04(0x118)]['McpToolCallReceived'],_0x20b396[_0x3cdc04(0x113)]);}))),this[_0x28d333(0x133)](this['Event'][_0x28d333(0x126)],()=>_0x5db522(_0x4ee02d['event$'][_0x28d333(0x117)](_0x43445d=>{const _0x309065=_0x28d333;_0x43445d['type']===_0x26723d[_0x309065(0x126)]&&this['fireEvent'](this[_0x309065(0x118)][_0x309065(0x126)],_0x43445d['data']);}))),this[_0x28d333(0x133)](this['Event']['McpToolCallFailed'],()=>_0x5db522(_0x4ee02d[_0x28d333(0x123)][_0x28d333(0x117)](_0x2864b1=>{const _0x2e7b9b=_0x28d333;_0x2864b1['type']===_0x26723d[_0x2e7b9b(0x11a)]&&this['fireEvent'](this[_0x2e7b9b(0x118)][_0x2e7b9b(0x11a)],_0x2864b1[_0x2e7b9b(0x113)]);})));}[_0x5efaea(0x128)](_0x3ee0a0,_0x563bae){const _0x2e11bf=_0x5efaea;return this['_injector'][_0x2e11bf(0x131)](_0x41ce5a)[_0x2e11bf(0x12b)](_0x3ee0a0,_0x563bae);}[_0x5efaea(0x12d)](){const _0x39e751=_0x5efaea;return this[_0x39e751(0x129)][_0x39e751(0x131)](_0x41ce5a)[_0x39e751(0x116)]();}[_0x5efaea(0x122)](_0x236281,_0x223c0d){const _0x3d32ce=_0x5efaea;return this['_injector'][_0x3d32ce(0x131)](_0x41ce5a)[_0x3d32ce(0x11d)](_0x236281,_0x223c0d);}['getMCPConnectionStatus'](){const _0x26b421=_0x5efaea;return this[_0x26b421(0x129)][_0x26b421(0x131)](_0x2c912a)[_0x26b421(0x12e)]();}[_0x5efaea(0x120)](){const _0x140329=_0x5efaea;this[_0x140329(0x129)][_0x140329(0x131)](_0x2c912a)['connect']();}[_0x5efaea(0x119)](){const _0x5ee57d=_0x5efaea;this['_injector'][_0x5ee57d(0x131)](_0x2c912a)[_0x5ee57d(0x12c)]();}}_0x432796[_0x5efaea(0x11b)](M);