@univerjs-pro/mcp 0.12.1 → 0.12.2-experimental.20251201-5b27b55

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 _0x167339=_0x45a9;(function(_0x33fb8a,_0x1e86be){const _0x502e52=_0x45a9,_0x211999=_0x33fb8a();while(!![]){try{const _0x2d2dcb=parseInt(_0x502e52(0x9a))/0x1+-parseInt(_0x502e52(0x8d))/0x2*(-parseInt(_0x502e52(0x9b))/0x3)+-parseInt(_0x502e52(0x82))/0x4*(parseInt(_0x502e52(0xa4))/0x5)+-parseInt(_0x502e52(0x8f))/0x6*(parseInt(_0x502e52(0x8e))/0x7)+-parseInt(_0x502e52(0xa1))/0x8*(parseInt(_0x502e52(0xa3))/0x9)+parseInt(_0x502e52(0x84))/0xa*(-parseInt(_0x502e52(0x92))/0xb)+parseInt(_0x502e52(0x89))/0xc;if(_0x2d2dcb===_0x1e86be)break;else _0x211999['push'](_0x211999['shift']());}catch(_0x21cc32){_0x211999['push'](_0x211999['shift']());}}}(_0x3a35,0x296b6));function _0x3a35(){const _0xd47f66=['7459116axtdUm','McpToolCallFailed','connect','subscribe','36390wREhKq','696794CKVjUu','18fGOEbE','validateToolCall','_injector','308319qagOYg','McpConnectionStatusChanged','disconnectMCP','fireEvent','data','connectMCP','_registerMCPFacadeEvents','registerEventHandler','52893AuCzqL','15wlVJHy','getConnectionStatus','callMCPTool','McpToolCallExecuted','extend','event$','34312woUznE','type','9eiGRpM','45545DIGKzu','getAllTools','getMCPConnectionStatus','McpToolCallReceived','104WKpHxd','get','20AwcmjC','validateMCPToolCall','executeTool','Event','_initialize'];_0x3a35=function(){return _0xd47f66;};return _0x3a35();}import{MCPEventId as _0x541849,MCPEventService as _0x3e974c,IMCPToolRegistry as _0x1147a9,MCPConnectionController as _0x1301de}from'@univerjs-pro/mcp';import{FEventName as _0x571207,FUniver as _0x1f7abd}from'@univerjs/core/facade';import{toDisposable as _0x4634ac}from'@univerjs/core';function _0x45a9(_0x4ce03e,_0xfdffa){const _0x3a35c9=_0x3a35();return _0x45a9=function(_0x45a9bd,_0x398388){_0x45a9bd=_0x45a9bd-0x82;let _0x5cbf03=_0x3a35c9[_0x45a9bd];return _0x5cbf03;},_0x45a9(_0x4ce03e,_0xfdffa);}class d{get['McpConnectionStatusChanged'](){const _0x566ab4=_0x45a9;return _0x541849[_0x566ab4(0x93)];}get[_0x167339(0xa7)](){return _0x541849['McpToolCallReceived'];}get[_0x167339(0x9e)](){const _0x3b9192=_0x167339;return _0x541849[_0x3b9192(0x9e)];}get[_0x167339(0x8a)](){return _0x541849['McpToolCallFailed'];}}_0x571207[_0x167339(0x9f)](d);class M extends _0x1f7abd{[_0x167339(0x88)](_0xf181f8){const _0x5c3ca2=_0x167339;this[_0x5c3ca2(0x98)](_0xf181f8);}[_0x167339(0x98)](_0x537f8e){const _0x585804=_0x167339,_0xb530df=_0x537f8e['get'](_0x3e974c);this[_0x585804(0x99)](this[_0x585804(0x87)][_0x585804(0x93)],()=>_0x4634ac(_0xb530df[_0x585804(0xa0)][_0x585804(0x8c)](_0x31dfb9=>{const _0x8625b8=_0x585804;_0x31dfb9[_0x8625b8(0xa2)]===_0x541849['McpConnectionStatusChanged']&&this[_0x8625b8(0x95)](this[_0x8625b8(0x87)][_0x8625b8(0x93)],_0x31dfb9[_0x8625b8(0x96)]);}))),this[_0x585804(0x99)](this[_0x585804(0x87)]['McpToolCallReceived'],()=>_0x4634ac(_0xb530df['event$'][_0x585804(0x8c)](_0x1a4565=>{const _0x58cdc7=_0x585804;_0x1a4565[_0x58cdc7(0xa2)]===_0x541849[_0x58cdc7(0xa7)]&&this['fireEvent'](this[_0x58cdc7(0x87)][_0x58cdc7(0xa7)],_0x1a4565['data']);}))),this[_0x585804(0x99)](this['Event'][_0x585804(0x9e)],()=>_0x4634ac(_0xb530df[_0x585804(0xa0)][_0x585804(0x8c)](_0x776507=>{const _0x58ce1a=_0x585804;_0x776507['type']===_0x541849['McpToolCallExecuted']&&this['fireEvent'](this['Event'][_0x58ce1a(0x9e)],_0x776507['data']);}))),this[_0x585804(0x99)](this[_0x585804(0x87)][_0x585804(0x8a)],()=>_0x4634ac(_0xb530df[_0x585804(0xa0)][_0x585804(0x8c)](_0x12a6f6=>{const _0x1291a2=_0x585804;_0x12a6f6[_0x1291a2(0xa2)]===_0x541849[_0x1291a2(0x8a)]&&this[_0x1291a2(0x95)](this['Event'][_0x1291a2(0x8a)],_0x12a6f6[_0x1291a2(0x96)]);})));}[_0x167339(0x85)](_0x35231b,_0x4ab81c){const _0x270977=_0x167339;return this['_injector'][_0x270977(0x83)](_0x1147a9)[_0x270977(0x90)](_0x35231b,_0x4ab81c);}['getAllMCPTools'](){const _0x458d1e=_0x167339;return this[_0x458d1e(0x91)][_0x458d1e(0x83)](_0x1147a9)[_0x458d1e(0xa5)]();}[_0x167339(0x9d)](_0x9a107c,_0x490c13){const _0x2b246f=_0x167339;return this[_0x2b246f(0x91)]['get'](_0x1147a9)[_0x2b246f(0x86)](_0x9a107c,_0x490c13);}[_0x167339(0xa6)](){const _0x37d40f=_0x167339;return this['_injector'][_0x37d40f(0x83)](_0x1301de)[_0x37d40f(0x9c)]();}[_0x167339(0x97)](){const _0x4cbfc3=_0x167339;this[_0x4cbfc3(0x91)][_0x4cbfc3(0x83)](_0x1301de)[_0x4cbfc3(0x8b)]();}[_0x167339(0x94)](){const _0x4a2e4f=_0x167339;this['_injector'][_0x4a2e4f(0x83)](_0x1301de)['disconnect']();}}_0x1f7abd[_0x167339(0x9f)](M);