@univerjs-pro/mcp 0.15.2 → 0.15.3

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 _0x26d105=_0x3df6;(function(_0x23ca3e,_0x19bbe2){const _0x4a50a0=_0x3df6,_0x4c28f2=_0x23ca3e();while(!![]){try{const _0x2c84b6=-parseInt(_0x4a50a0(0x1eb))/0x1+parseInt(_0x4a50a0(0x1f9))/0x2+-parseInt(_0x4a50a0(0x1f3))/0x3+parseInt(_0x4a50a0(0x203))/0x4+-parseInt(_0x4a50a0(0x1f5))/0x5*(-parseInt(_0x4a50a0(0x200))/0x6)+-parseInt(_0x4a50a0(0x1e3))/0x7*(-parseInt(_0x4a50a0(0x1f2))/0x8)+-parseInt(_0x4a50a0(0x201))/0x9*(parseInt(_0x4a50a0(0x1f4))/0xa);if(_0x2c84b6===_0x19bbe2)break;else _0x4c28f2['push'](_0x4c28f2['shift']());}catch(_0x5dc2ab){_0x4c28f2['push'](_0x4c28f2['shift']());}}}(_0x5aae,0x353a6));import{MCPEventId as _0x220a1f,MCPEventService as _0x12b2f5,IMCPToolRegistry as _0x582e6d,MCPConnectionController as _0x7d7fc0}from'@univerjs-pro/mcp';import{FEventName as _0x26102b,FUniver as _0x312d24}from'@univerjs/core/facade';import{toDisposable as _0x1aaf28}from'@univerjs/core';class d{get[_0x26d105(0x1e6)](){return _0x220a1f['McpConnectionStatusChanged'];}get[_0x26d105(0x1ff)](){return _0x220a1f['McpToolCallReceived'];}get[_0x26d105(0x1e5)](){const _0x5c9df3=_0x26d105;return _0x220a1f[_0x5c9df3(0x1e5)];}get[_0x26d105(0x1f1)](){const _0x5b4f8c=_0x26d105;return _0x220a1f[_0x5b4f8c(0x1f1)];}}function _0x3df6(_0x1c638a,_0x21f219){_0x1c638a=_0x1c638a-0x1e3;const _0x5aaec4=_0x5aae();let _0x3df6b9=_0x5aaec4[_0x1c638a];return _0x3df6b9;}function _0x5aae(){const _0x31ba06=['279636gMyfJU','callMCPTool','event$','get','3787WQMMEt','data','McpToolCallExecuted','McpConnectionStatusChanged','connect','disconnectMCP','registerEventHandler','getMCPConnectionStatus','182572eMBMwf','Event','getConnectionStatus','getAllMCPTools','_registerMCPFacadeEvents','extend','McpToolCallFailed','5192ByzZVo','669033KQuGeQ','36710BltxFY','232855HxDRIq','disconnect','fireEvent','validateMCPToolCall','815896mVCtyX','subscribe','_initialize','_injector','type','executeTool','McpToolCallReceived','18QiVCeZ','846MAzgac','getAllTools'];_0x5aae=function(){return _0x31ba06;};return _0x5aae();}_0x26102b[_0x26d105(0x1f0)](d);class M extends _0x312d24{[_0x26d105(0x1fb)](_0x3fca7c){const _0x5b7b25=_0x26d105;this[_0x5b7b25(0x1ef)](_0x3fca7c);}[_0x26d105(0x1ef)](_0x14edfd){const _0x55b05d=_0x26d105,_0x343fd1=_0x14edfd[_0x55b05d(0x206)](_0x12b2f5);this[_0x55b05d(0x1e9)](this[_0x55b05d(0x1ec)][_0x55b05d(0x1e6)],()=>_0x1aaf28(_0x343fd1['event$'][_0x55b05d(0x1fa)](_0x14a000=>{const _0x1ffedd=_0x55b05d;_0x14a000['type']===_0x220a1f['McpConnectionStatusChanged']&&this[_0x1ffedd(0x1f7)](this[_0x1ffedd(0x1ec)]['McpConnectionStatusChanged'],_0x14a000[_0x1ffedd(0x1e4)]);}))),this[_0x55b05d(0x1e9)](this[_0x55b05d(0x1ec)][_0x55b05d(0x1ff)],()=>_0x1aaf28(_0x343fd1[_0x55b05d(0x205)][_0x55b05d(0x1fa)](_0x198a6d=>{const _0x3a9c30=_0x55b05d;_0x198a6d[_0x3a9c30(0x1fd)]===_0x220a1f[_0x3a9c30(0x1ff)]&&this[_0x3a9c30(0x1f7)](this[_0x3a9c30(0x1ec)][_0x3a9c30(0x1ff)],_0x198a6d[_0x3a9c30(0x1e4)]);}))),this[_0x55b05d(0x1e9)](this[_0x55b05d(0x1ec)][_0x55b05d(0x1e5)],()=>_0x1aaf28(_0x343fd1[_0x55b05d(0x205)][_0x55b05d(0x1fa)](_0x5e92cc=>{const _0x286eac=_0x55b05d;_0x5e92cc[_0x286eac(0x1fd)]===_0x220a1f[_0x286eac(0x1e5)]&&this[_0x286eac(0x1f7)](this[_0x286eac(0x1ec)]['McpToolCallExecuted'],_0x5e92cc['data']);}))),this[_0x55b05d(0x1e9)](this[_0x55b05d(0x1ec)]['McpToolCallFailed'],()=>_0x1aaf28(_0x343fd1['event$'][_0x55b05d(0x1fa)](_0x52cc6c=>{const _0x394454=_0x55b05d;_0x52cc6c[_0x394454(0x1fd)]===_0x220a1f['McpToolCallFailed']&&this[_0x394454(0x1f7)](this[_0x394454(0x1ec)][_0x394454(0x1f1)],_0x52cc6c[_0x394454(0x1e4)]);})));}[_0x26d105(0x1f8)](_0x238151,_0xbda2f3){const _0x579e34=_0x26d105;return this[_0x579e34(0x1fc)][_0x579e34(0x206)](_0x582e6d)['validateToolCall'](_0x238151,_0xbda2f3);}[_0x26d105(0x1ee)](){const _0x8e27c4=_0x26d105;return this['_injector'][_0x8e27c4(0x206)](_0x582e6d)[_0x8e27c4(0x202)]();}[_0x26d105(0x204)](_0x37c58b,_0x3fe93f){const _0x48a8f=_0x26d105;return this['_injector']['get'](_0x582e6d)[_0x48a8f(0x1fe)](_0x37c58b,_0x3fe93f);}[_0x26d105(0x1ea)](){const _0x3ca90e=_0x26d105;return this[_0x3ca90e(0x1fc)]['get'](_0x7d7fc0)[_0x3ca90e(0x1ed)]();}['connectMCP'](){const _0x4c52be=_0x26d105;this[_0x4c52be(0x1fc)][_0x4c52be(0x206)](_0x7d7fc0)[_0x4c52be(0x1e7)]();}[_0x26d105(0x1e8)](){const _0x1189f1=_0x26d105;this[_0x1189f1(0x1fc)][_0x1189f1(0x206)](_0x7d7fc0)[_0x1189f1(0x1f6)]();}}_0x312d24[_0x26d105(0x1f0)](M);
1
+ const _0x518570=_0x1c48;(function(_0x13a603,_0x1c51aa){const _0x4f4dbe=_0x1c48,_0x1ccd8e=_0x13a603();while(!![]){try{const _0x54ba16=-parseInt(_0x4f4dbe(0x1e0))/0x1*(-parseInt(_0x4f4dbe(0x1d2))/0x2)+parseInt(_0x4f4dbe(0x1d5))/0x3+parseInt(_0x4f4dbe(0x1db))/0x4+parseInt(_0x4f4dbe(0x1cb))/0x5+-parseInt(_0x4f4dbe(0x1c7))/0x6+-parseInt(_0x4f4dbe(0x1cd))/0x7+-parseInt(_0x4f4dbe(0x1de))/0x8*(-parseInt(_0x4f4dbe(0x1d9))/0x9);if(_0x54ba16===_0x1c51aa)break;else _0x1ccd8e['push'](_0x1ccd8e['shift']());}catch(_0x1d8786){_0x1ccd8e['push'](_0x1ccd8e['shift']());}}}(_0x5acd,0xbb660));import{MCPEventId as _0xee7a3e,MCPEventService as _0x6b8d5c,IMCPToolRegistry as _0x277349,MCPConnectionController as _0x4828d8}from'@univerjs-pro/mcp';import{FEventName as _0x821b58,FUniver as _0x14636a}from'@univerjs/core/facade';import{toDisposable as _0x5b32fd}from'@univerjs/core';class d{get['McpConnectionStatusChanged'](){return _0xee7a3e['McpConnectionStatusChanged'];}get[_0x518570(0x1d1)](){const _0x208415=_0x518570;return _0xee7a3e[_0x208415(0x1d1)];}get[_0x518570(0x1c4)](){const _0x1f66ce=_0x518570;return _0xee7a3e[_0x1f66ce(0x1c4)];}get['McpToolCallFailed'](){const _0x167037=_0x518570;return _0xee7a3e[_0x167037(0x1c8)];}}_0x821b58[_0x518570(0x1da)](d);function _0x1c48(_0x1ea422,_0x1a79b5){_0x1ea422=_0x1ea422-0x1c2;const _0x5acd0e=_0x5acd();let _0x1c4859=_0x5acd0e[_0x1ea422];return _0x1c4859;}class M extends _0x14636a{[_0x518570(0x1ce)](_0x44e8d8){const _0x551c24=_0x518570;this[_0x551c24(0x1d0)](_0x44e8d8);}[_0x518570(0x1d0)](_0x421783){const _0x49c052=_0x518570,_0x41ffbd=_0x421783[_0x49c052(0x1d3)](_0x6b8d5c);this['registerEventHandler'](this[_0x49c052(0x1dc)][_0x49c052(0x1d7)],()=>_0x5b32fd(_0x41ffbd[_0x49c052(0x1d6)][_0x49c052(0x1c6)](_0x2822c3=>{const _0x52e3fd=_0x49c052;_0x2822c3[_0x52e3fd(0x1c5)]===_0xee7a3e['McpConnectionStatusChanged']&&this[_0x52e3fd(0x1cf)](this[_0x52e3fd(0x1dc)]['McpConnectionStatusChanged'],_0x2822c3[_0x52e3fd(0x1d4)]);}))),this['registerEventHandler'](this[_0x49c052(0x1dc)][_0x49c052(0x1d1)],()=>_0x5b32fd(_0x41ffbd[_0x49c052(0x1d6)][_0x49c052(0x1c6)](_0x4d57ab=>{const _0x5c127f=_0x49c052;_0x4d57ab[_0x5c127f(0x1c5)]===_0xee7a3e[_0x5c127f(0x1d1)]&&this[_0x5c127f(0x1cf)](this[_0x5c127f(0x1dc)][_0x5c127f(0x1d1)],_0x4d57ab['data']);}))),this[_0x49c052(0x1dd)](this[_0x49c052(0x1dc)][_0x49c052(0x1c4)],()=>_0x5b32fd(_0x41ffbd[_0x49c052(0x1d6)]['subscribe'](_0x7d602d=>{const _0x437e64=_0x49c052;_0x7d602d[_0x437e64(0x1c5)]===_0xee7a3e[_0x437e64(0x1c4)]&&this[_0x437e64(0x1cf)](this[_0x437e64(0x1dc)]['McpToolCallExecuted'],_0x7d602d[_0x437e64(0x1d4)]);}))),this[_0x49c052(0x1dd)](this[_0x49c052(0x1dc)][_0x49c052(0x1c8)],()=>_0x5b32fd(_0x41ffbd['event$'][_0x49c052(0x1c6)](_0x32d626=>{const _0x538023=_0x49c052;_0x32d626[_0x538023(0x1c5)]===_0xee7a3e[_0x538023(0x1c8)]&&this[_0x538023(0x1cf)](this['Event'][_0x538023(0x1c8)],_0x32d626[_0x538023(0x1d4)]);})));}['validateMCPToolCall'](_0x2c2914,_0x40405e){const _0x49869f=_0x518570;return this[_0x49869f(0x1d8)]['get'](_0x277349)['validateToolCall'](_0x2c2914,_0x40405e);}[_0x518570(0x1df)](){const _0x5f7590=_0x518570;return this[_0x5f7590(0x1d8)]['get'](_0x277349)[_0x5f7590(0x1c2)]();}[_0x518570(0x1c9)](_0x12625e,_0x510dbf){const _0x1f5a87=_0x518570;return this[_0x1f5a87(0x1d8)][_0x1f5a87(0x1d3)](_0x277349)['executeTool'](_0x12625e,_0x510dbf);}['getMCPConnectionStatus'](){const _0xf84161=_0x518570;return this[_0xf84161(0x1d8)][_0xf84161(0x1d3)](_0x4828d8)['getConnectionStatus']();}['connectMCP'](){const _0x3f881a=_0x518570;this[_0x3f881a(0x1d8)][_0x3f881a(0x1d3)](_0x4828d8)[_0x3f881a(0x1cc)]();}[_0x518570(0x1ca)](){const _0x3be7ad=_0x518570;this['_injector']['get'](_0x4828d8)[_0x3be7ad(0x1c3)]();}}function _0x5acd(){const _0x2c9215=['event$','McpConnectionStatusChanged','_injector','27bFigrv','extend','787988OgpZuv','Event','registerEventHandler','3416144iqophY','getAllMCPTools','6pqNFnC','getAllTools','disconnect','McpToolCallExecuted','type','subscribe','989790FwuNtj','McpToolCallFailed','callMCPTool','disconnectMCP','745435qVWjNG','connect','9462579NvvsZp','_initialize','fireEvent','_registerMCPFacadeEvents','McpToolCallReceived','28860jBgCBC','get','data','1711884kzGkDi'];_0x5acd=function(){return _0x2c9215;};return _0x5acd();}_0x14636a['extend'](M);