@univerjs-pro/mcp 0.15.1 → 0.15.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 _0x34abb3=_0x4a3b;(function(_0x703e67,_0x5b06dc){const _0x439ec4=_0x4a3b,_0x4fe0e1=_0x703e67();while(!![]){try{const _0x3be9d9=-parseInt(_0x439ec4(0x125))/0x1*(-parseInt(_0x439ec4(0x11d))/0x2)+parseInt(_0x439ec4(0x12a))/0x3+-parseInt(_0x439ec4(0x12f))/0x4+parseInt(_0x439ec4(0x130))/0x5*(-parseInt(_0x439ec4(0x112))/0x6)+parseInt(_0x439ec4(0x119))/0x7+-parseInt(_0x439ec4(0x121))/0x8+parseInt(_0x439ec4(0x114))/0x9;if(_0x3be9d9===_0x5b06dc)break;else _0x4fe0e1['push'](_0x4fe0e1['shift']());}catch(_0x48c2ff){_0x4fe0e1['push'](_0x4fe0e1['shift']());}}}(_0xe07b,0xd0bc4));import{MCPEventId as _0xb9ae35,MCPEventService as _0x4e9303,IMCPToolRegistry as _0x43b781,MCPConnectionController as _0x44a5ff}from'@univerjs-pro/mcp';import{FEventName as _0x4dc80f,FUniver as _0x40d588}from'@univerjs/core/facade';import{toDisposable as _0x1bed05}from'@univerjs/core';class d{get[_0x34abb3(0x12d)](){return _0xb9ae35['McpConnectionStatusChanged'];}get[_0x34abb3(0x123)](){const _0x4a9a5f=_0x34abb3;return _0xb9ae35[_0x4a9a5f(0x123)];}get['McpToolCallExecuted'](){const _0x12017f=_0x34abb3;return _0xb9ae35[_0x12017f(0x11f)];}get[_0x34abb3(0x11a)](){const _0x3fb046=_0x34abb3;return _0xb9ae35[_0x3fb046(0x11a)];}}function _0x4a3b(_0x111919,_0x88feaa){_0x111919=_0x111919-0x112;const _0xe07b58=_0xe07b();let _0x4a3ba9=_0xe07b58[_0x111919];return _0x4a3ba9;}_0x4dc80f[_0x34abb3(0x118)](d);function _0xe07b(){const _0x218a62=['29201OujyfD','getMCPConnectionStatus','_registerMCPFacadeEvents','callMCPTool','disconnect','1753170ZFnRHT','_injector','getAllTools','McpConnectionStatusChanged','executeTool','4217048PiaXQk','18345ocJCLE','disconnectMCP','getConnectionStatus','subscribe','get','2604OseDMY','type','29907216TIvQsI','Event','validateMCPToolCall','registerEventHandler','extend','470358esFCXV','McpToolCallFailed','validateToolCall','event$','6EDablz','_initialize','McpToolCallExecuted','fireEvent','4484984YPSIaH','data','McpToolCallReceived','getAllMCPTools'];_0xe07b=function(){return _0x218a62;};return _0xe07b();}class M extends _0x40d588{[_0x34abb3(0x11e)](_0x49e9ca){this['_registerMCPFacadeEvents'](_0x49e9ca);}[_0x34abb3(0x127)](_0x46f082){const _0x24f283=_0x34abb3,_0x22c37d=_0x46f082[_0x24f283(0x134)](_0x4e9303);this[_0x24f283(0x117)](this[_0x24f283(0x115)][_0x24f283(0x12d)],()=>_0x1bed05(_0x22c37d[_0x24f283(0x11c)][_0x24f283(0x133)](_0xbc3f41=>{const _0x180188=_0x24f283;_0xbc3f41[_0x180188(0x113)]===_0xb9ae35[_0x180188(0x12d)]&&this['fireEvent'](this[_0x180188(0x115)][_0x180188(0x12d)],_0xbc3f41[_0x180188(0x122)]);}))),this[_0x24f283(0x117)](this[_0x24f283(0x115)][_0x24f283(0x123)],()=>_0x1bed05(_0x22c37d[_0x24f283(0x11c)][_0x24f283(0x133)](_0xb9d5b4=>{const _0x459622=_0x24f283;_0xb9d5b4['type']===_0xb9ae35[_0x459622(0x123)]&&this[_0x459622(0x120)](this[_0x459622(0x115)][_0x459622(0x123)],_0xb9d5b4[_0x459622(0x122)]);}))),this[_0x24f283(0x117)](this[_0x24f283(0x115)]['McpToolCallExecuted'],()=>_0x1bed05(_0x22c37d[_0x24f283(0x11c)][_0x24f283(0x133)](_0x14189d=>{const _0x4b0dde=_0x24f283;_0x14189d[_0x4b0dde(0x113)]===_0xb9ae35[_0x4b0dde(0x11f)]&&this[_0x4b0dde(0x120)](this[_0x4b0dde(0x115)][_0x4b0dde(0x11f)],_0x14189d[_0x4b0dde(0x122)]);}))),this[_0x24f283(0x117)](this[_0x24f283(0x115)][_0x24f283(0x11a)],()=>_0x1bed05(_0x22c37d[_0x24f283(0x11c)][_0x24f283(0x133)](_0x1aff1e=>{const _0x4f6c85=_0x24f283;_0x1aff1e['type']===_0xb9ae35['McpToolCallFailed']&&this['fireEvent'](this[_0x4f6c85(0x115)]['McpToolCallFailed'],_0x1aff1e['data']);})));}[_0x34abb3(0x116)](_0x2dc93d,_0x58d040){const _0x58156f=_0x34abb3;return this[_0x58156f(0x12b)][_0x58156f(0x134)](_0x43b781)[_0x58156f(0x11b)](_0x2dc93d,_0x58d040);}[_0x34abb3(0x124)](){const _0x36e582=_0x34abb3;return this[_0x36e582(0x12b)][_0x36e582(0x134)](_0x43b781)[_0x36e582(0x12c)]();}[_0x34abb3(0x128)](_0x372750,_0xfa1e0){const _0xf65b58=_0x34abb3;return this[_0xf65b58(0x12b)][_0xf65b58(0x134)](_0x43b781)[_0xf65b58(0x12e)](_0x372750,_0xfa1e0);}[_0x34abb3(0x126)](){const _0x400d49=_0x34abb3;return this[_0x400d49(0x12b)][_0x400d49(0x134)](_0x44a5ff)[_0x400d49(0x132)]();}['connectMCP'](){const _0x31cdf6=_0x34abb3;this[_0x31cdf6(0x12b)]['get'](_0x44a5ff)['connect']();}[_0x34abb3(0x131)](){const _0x2bd87b=_0x34abb3;this['_injector'][_0x2bd87b(0x134)](_0x44a5ff)[_0x2bd87b(0x129)]();}}_0x40d588[_0x34abb3(0x118)](M);
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);