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

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 _0x2e2e(){const _0x1af23c=['_initialize','8FYqIRM','2058240ysiyVP','connectMCP','619192ZzPhSr','50zpNkYR','disconnectMCP','McpToolCallReceived','data','McpToolCallExecuted','subscribe','getAllTools','event$','get','434280SmorEI','getAllMCPTools','extend','disconnect','Event','57234aucmSn','executeTool','McpToolCallFailed','188553bEtZWB','McpConnectionStatusChanged','3322728qzERse','connect','getMCPConnectionStatus','_injector','565143cUDCDl','_registerMCPFacadeEvents','callMCPTool','registerEventHandler','type','fireEvent'];_0x2e2e=function(){return _0x1af23c;};return _0x2e2e();}const _0x5f5db4=_0xd318;(function(_0x30743b,_0x4d5847){const _0x389f2c=_0xd318,_0x20973e=_0x30743b();while(!![]){try{const _0x44a0cb=parseInt(_0x389f2c(0xdd))/0x1+-parseInt(_0x389f2c(0xcf))/0x2+-parseInt(_0x389f2c(0xd7))/0x3+-parseInt(_0x389f2c(0xc3))/0x4+-parseInt(_0x389f2c(0xc6))/0x5*(-parseInt(_0x389f2c(0xd4))/0x6)+-parseInt(_0x389f2c(0xc5))/0x7*(-parseInt(_0x389f2c(0xc2))/0x8)+parseInt(_0x389f2c(0xd9))/0x9;if(_0x44a0cb===_0x4d5847)break;else _0x20973e['push'](_0x20973e['shift']());}catch(_0x103a20){_0x20973e['push'](_0x20973e['shift']());}}}(_0x2e2e,0x4f02e));import{MCPEventId as _0x279967,MCPEventService as _0x2bef9b,IMCPToolRegistry as _0x4fd3c0,MCPConnectionController as _0x24257d}from'@univerjs-pro/mcp';import{FEventName as _0x4accb2,FUniver as _0x5ed306}from'@univerjs/core/facade';import{toDisposable as _0xe16677}from'@univerjs/core';class d{get[_0x5f5db4(0xd8)](){const _0x5e27cf=_0x5f5db4;return _0x279967[_0x5e27cf(0xd8)];}get['McpToolCallReceived'](){const _0x5f58d2=_0x5f5db4;return _0x279967[_0x5f58d2(0xc8)];}get[_0x5f5db4(0xca)](){const _0x361edf=_0x5f5db4;return _0x279967[_0x361edf(0xca)];}get[_0x5f5db4(0xd6)](){const _0x1cf78e=_0x5f5db4;return _0x279967[_0x1cf78e(0xd6)];}}_0x4accb2[_0x5f5db4(0xd1)](d);class M extends _0x5ed306{[_0x5f5db4(0xc1)](_0x1aac45){this['_registerMCPFacadeEvents'](_0x1aac45);}[_0x5f5db4(0xde)](_0x5d9c38){const _0x99f50c=_0x5f5db4,_0x1762de=_0x5d9c38[_0x99f50c(0xce)](_0x2bef9b);this[_0x99f50c(0xbe)](this[_0x99f50c(0xd3)][_0x99f50c(0xd8)],()=>_0xe16677(_0x1762de[_0x99f50c(0xcd)][_0x99f50c(0xcb)](_0x2fe8f5=>{const _0x117d53=_0x99f50c;_0x2fe8f5['type']===_0x279967['McpConnectionStatusChanged']&&this[_0x117d53(0xc0)](this[_0x117d53(0xd3)][_0x117d53(0xd8)],_0x2fe8f5[_0x117d53(0xc9)]);}))),this[_0x99f50c(0xbe)](this[_0x99f50c(0xd3)][_0x99f50c(0xc8)],()=>_0xe16677(_0x1762de['event$']['subscribe'](_0x1b066a=>{const _0x45e37a=_0x99f50c;_0x1b066a[_0x45e37a(0xbf)]===_0x279967[_0x45e37a(0xc8)]&&this['fireEvent'](this[_0x45e37a(0xd3)]['McpToolCallReceived'],_0x1b066a[_0x45e37a(0xc9)]);}))),this['registerEventHandler'](this[_0x99f50c(0xd3)][_0x99f50c(0xca)],()=>_0xe16677(_0x1762de[_0x99f50c(0xcd)][_0x99f50c(0xcb)](_0x517846=>{const _0x30f8cf=_0x99f50c;_0x517846[_0x30f8cf(0xbf)]===_0x279967[_0x30f8cf(0xca)]&&this[_0x30f8cf(0xc0)](this['Event'][_0x30f8cf(0xca)],_0x517846[_0x30f8cf(0xc9)]);}))),this[_0x99f50c(0xbe)](this[_0x99f50c(0xd3)][_0x99f50c(0xd6)],()=>_0xe16677(_0x1762de[_0x99f50c(0xcd)]['subscribe'](_0x4d38b3=>{const _0x1b750e=_0x99f50c;_0x4d38b3[_0x1b750e(0xbf)]===_0x279967[_0x1b750e(0xd6)]&&this[_0x1b750e(0xc0)](this[_0x1b750e(0xd3)]['McpToolCallFailed'],_0x4d38b3['data']);})));}['validateMCPToolCall'](_0x4afc9f,_0x58415e){const _0x3ef0c6=_0x5f5db4;return this['_injector'][_0x3ef0c6(0xce)](_0x4fd3c0)['validateToolCall'](_0x4afc9f,_0x58415e);}[_0x5f5db4(0xd0)](){const _0x19af63=_0x5f5db4;return this['_injector']['get'](_0x4fd3c0)[_0x19af63(0xcc)]();}[_0x5f5db4(0xbd)](_0x209919,_0x1348ee){const _0x1f9a8b=_0x5f5db4;return this['_injector']['get'](_0x4fd3c0)[_0x1f9a8b(0xd5)](_0x209919,_0x1348ee);}[_0x5f5db4(0xdb)](){const _0x448486=_0x5f5db4;return this[_0x448486(0xdc)][_0x448486(0xce)](_0x24257d)['getConnectionStatus']();}[_0x5f5db4(0xc4)](){const _0x463451=_0x5f5db4;this[_0x463451(0xdc)][_0x463451(0xce)](_0x24257d)[_0x463451(0xda)]();}[_0x5f5db4(0xc7)](){const _0x4b925d=_0x5f5db4;this[_0x4b925d(0xdc)]['get'](_0x24257d)[_0x4b925d(0xd2)]();}}function _0xd318(_0x185b06,_0x3557c0){const _0x2e2e95=_0x2e2e();return _0xd318=function(_0xd31803,_0x3c7f9a){_0xd31803=_0xd31803-0xbd;let _0x1ab2a0=_0x2e2e95[_0xd31803];return _0x1ab2a0;},_0xd318(_0x185b06,_0x3557c0);}_0x5ed306[_0x5f5db4(0xd1)](M);