@univerjs-pro/mcp 0.12.1 → 0.12.2

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 _0x112294=_0x24ff;function _0x5e84(){const _0x3fc57b=['data','1930750NTWvEF','event$','registerEventHandler','61015XNIVxW','16dIXzHa','McpConnectionStatusChanged','type','subscribe','getConnectionStatus','_registerMCPFacadeEvents','fireEvent','McpToolCallFailed','99smdWRq','8HlIVbi','McpToolCallExecuted','30462YZCeQq','McpToolCallReceived','extend','getMCPConnectionStatus','2257155etsBAM','callMCPTool','executeTool','_initialize','431304WxTDWq','get','Event','connect','getAllMCPTools','_injector','2283996GwkHFj','2253153UYyKXv','disconnectMCP'];_0x5e84=function(){return _0x3fc57b;};return _0x5e84();}(function(_0x33a9b3,_0x373a20){const _0x1a73e9=_0x24ff,_0x2f02f2=_0x33a9b3();while(!![]){try{const _0x20941c=-parseInt(_0x1a73e9(0xd6))/0x1+-parseInt(_0x1a73e9(0xc1))/0x2+-parseInt(_0x1a73e9(0xc9))/0x3*(parseInt(_0x1a73e9(0xd7))/0x4)+-parseInt(_0x1a73e9(0xc5))/0x5+-parseInt(_0x1a73e9(0xcf))/0x6+parseInt(_0x1a73e9(0xd0))/0x7*(-parseInt(_0x1a73e9(0xe0))/0x8)+parseInt(_0x1a73e9(0xdf))/0x9*(parseInt(_0x1a73e9(0xd3))/0xa);if(_0x20941c===_0x373a20)break;else _0x2f02f2['push'](_0x2f02f2['shift']());}catch(_0x55613e){_0x2f02f2['push'](_0x2f02f2['shift']());}}}(_0x5e84,0x4dc43));import{MCPEventId as _0x4df28c,MCPEventService as _0x2a9fae,IMCPToolRegistry as _0x135a0b,MCPConnectionController as _0x4a2ca9}from'@univerjs-pro/mcp';import{FEventName as _0x17dc42,FUniver as _0x41b191}from'@univerjs/core/facade';import{toDisposable as _0x34e319}from'@univerjs/core';function _0x24ff(_0x531c9f,_0x4603e6){const _0x5e84e7=_0x5e84();return _0x24ff=function(_0x24ff69,_0x2aea50){_0x24ff69=_0x24ff69-0xc0;let _0x3883da=_0x5e84e7[_0x24ff69];return _0x3883da;},_0x24ff(_0x531c9f,_0x4603e6);}class d{get['McpConnectionStatusChanged'](){const _0x42d9f5=_0x24ff;return _0x4df28c[_0x42d9f5(0xd8)];}get[_0x112294(0xc2)](){const _0x28d728=_0x112294;return _0x4df28c[_0x28d728(0xc2)];}get['McpToolCallExecuted'](){return _0x4df28c['McpToolCallExecuted'];}get['McpToolCallFailed'](){const _0x1aea0c=_0x112294;return _0x4df28c[_0x1aea0c(0xde)];}}_0x17dc42['extend'](d);class M extends _0x41b191{[_0x112294(0xc8)](_0x38ef07){const _0x12b712=_0x112294;this[_0x12b712(0xdc)](_0x38ef07);}['_registerMCPFacadeEvents'](_0xad1998){const _0x546cc3=_0x112294,_0x1d82db=_0xad1998[_0x546cc3(0xca)](_0x2a9fae);this[_0x546cc3(0xd5)](this[_0x546cc3(0xcb)][_0x546cc3(0xd8)],()=>_0x34e319(_0x1d82db[_0x546cc3(0xd4)][_0x546cc3(0xda)](_0x4bee60=>{const _0x4a9c69=_0x546cc3;_0x4bee60[_0x4a9c69(0xd9)]===_0x4df28c['McpConnectionStatusChanged']&&this[_0x4a9c69(0xdd)](this[_0x4a9c69(0xcb)][_0x4a9c69(0xd8)],_0x4bee60['data']);}))),this[_0x546cc3(0xd5)](this['Event'][_0x546cc3(0xc2)],()=>_0x34e319(_0x1d82db[_0x546cc3(0xd4)][_0x546cc3(0xda)](_0xac7aa9=>{const _0x46e6fd=_0x546cc3;_0xac7aa9[_0x46e6fd(0xd9)]===_0x4df28c[_0x46e6fd(0xc2)]&&this[_0x46e6fd(0xdd)](this[_0x46e6fd(0xcb)][_0x46e6fd(0xc2)],_0xac7aa9['data']);}))),this[_0x546cc3(0xd5)](this['Event'][_0x546cc3(0xc0)],()=>_0x34e319(_0x1d82db['event$']['subscribe'](_0x4b2a9e=>{const _0x1dfe80=_0x546cc3;_0x4b2a9e[_0x1dfe80(0xd9)]===_0x4df28c[_0x1dfe80(0xc0)]&&this[_0x1dfe80(0xdd)](this['Event'][_0x1dfe80(0xc0)],_0x4b2a9e[_0x1dfe80(0xd2)]);}))),this[_0x546cc3(0xd5)](this[_0x546cc3(0xcb)][_0x546cc3(0xde)],()=>_0x34e319(_0x1d82db['event$'][_0x546cc3(0xda)](_0x32e886=>{const _0x1c4465=_0x546cc3;_0x32e886[_0x1c4465(0xd9)]===_0x4df28c[_0x1c4465(0xde)]&&this['fireEvent'](this[_0x1c4465(0xcb)][_0x1c4465(0xde)],_0x32e886['data']);})));}['validateMCPToolCall'](_0x219e02,_0x30475a){const _0xee3f50=_0x112294;return this[_0xee3f50(0xce)][_0xee3f50(0xca)](_0x135a0b)['validateToolCall'](_0x219e02,_0x30475a);}[_0x112294(0xcd)](){const _0x3d8d68=_0x112294;return this[_0x3d8d68(0xce)][_0x3d8d68(0xca)](_0x135a0b)['getAllTools']();}[_0x112294(0xc6)](_0x43f6e6,_0x59bd68){const _0x250f30=_0x112294;return this[_0x250f30(0xce)][_0x250f30(0xca)](_0x135a0b)[_0x250f30(0xc7)](_0x43f6e6,_0x59bd68);}[_0x112294(0xc4)](){const _0x199c20=_0x112294;return this['_injector'][_0x199c20(0xca)](_0x4a2ca9)[_0x199c20(0xdb)]();}['connectMCP'](){const _0x3be4c2=_0x112294;this[_0x3be4c2(0xce)][_0x3be4c2(0xca)](_0x4a2ca9)[_0x3be4c2(0xcc)]();}[_0x112294(0xd1)](){const _0x4a8ad6=_0x112294;this[_0x4a8ad6(0xce)]['get'](_0x4a2ca9)['disconnect']();}}_0x41b191[_0x112294(0xc3)](M);