@univerjs-pro/mcp 0.15.0 → 0.15.1

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 _0x5800e9=_0x3e03;(function(_0xb3b692,_0xd6187e){const _0x56098d=_0x3e03,_0x5585de=_0xb3b692();while(!![]){try{const _0x455c85=parseInt(_0x56098d(0x1f2))/0x1+parseInt(_0x56098d(0x1e7))/0x2*(-parseInt(_0x56098d(0x1ee))/0x3)+parseInt(_0x56098d(0x1e4))/0x4+-parseInt(_0x56098d(0x1d7))/0x5*(-parseInt(_0x56098d(0x1df))/0x6)+-parseInt(_0x56098d(0x1ec))/0x7+parseInt(_0x56098d(0x1d4))/0x8*(parseInt(_0x56098d(0x1dc))/0x9)+-parseInt(_0x56098d(0x1e6))/0xa;if(_0x455c85===_0xd6187e)break;else _0x5585de['push'](_0x5585de['shift']());}catch(_0x3beef2){_0x5585de['push'](_0x5585de['shift']());}}}(_0x1ddb,0x9164b));function _0x3e03(_0x1fb6fa,_0x12cf69){_0x1fb6fa=_0x1fb6fa-0x1d3;const _0x1ddb80=_0x1ddb();let _0x3e0325=_0x1ddb80[_0x1fb6fa];return _0x3e0325;}import{MCPEventId as _0x4283c4,MCPEventService as _0x215c1a,IMCPToolRegistry as _0x18eab5,MCPConnectionController as _0x1678c8}from'@univerjs-pro/mcp';import{FEventName as _0x4b3470,FUniver as _0x433b82}from'@univerjs/core/facade';import{toDisposable as _0x5abed3}from'@univerjs/core';class d{get[_0x5800e9(0x1dd)](){return _0x4283c4['McpConnectionStatusChanged'];}get[_0x5800e9(0x1ed)](){return _0x4283c4['McpToolCallReceived'];}get[_0x5800e9(0x1da)](){const _0x2c5fb8=_0x5800e9;return _0x4283c4[_0x2c5fb8(0x1da)];}get[_0x5800e9(0x1de)](){const _0x1fdfb3=_0x5800e9;return _0x4283c4[_0x1fdfb3(0x1de)];}}function _0x1ddb(){const _0x4a2169=['2418168nWNPGl','_injector','executeTool','7555JcPCTr','_registerMCPFacadeEvents','getAllTools','McpToolCallExecuted','validateToolCall','27KMoNRK','McpConnectionStatusChanged','McpToolCallFailed','2892SihDVo','Event','connectMCP','event$','_initialize','3719160oXyYkI','data','10975280hwjKHc','38YXvXfh','type','disconnectMCP','registerEventHandler','getMCPConnectionStatus','3126753sBBYdu','McpToolCallReceived','171141pJiOyG','extend','disconnect','get','658726jysTaI','fireEvent','connect','subscribe','getAllMCPTools','getConnectionStatus'];_0x1ddb=function(){return _0x4a2169;};return _0x1ddb();}_0x4b3470['extend'](d);class M extends _0x433b82{[_0x5800e9(0x1e3)](_0x233877){const _0x2a95b7=_0x5800e9;this[_0x2a95b7(0x1d8)](_0x233877);}['_registerMCPFacadeEvents'](_0x3330a7){const _0x78acc9=_0x5800e9,_0x2050fe=_0x3330a7[_0x78acc9(0x1f1)](_0x215c1a);this[_0x78acc9(0x1ea)](this['Event'][_0x78acc9(0x1dd)],()=>_0x5abed3(_0x2050fe[_0x78acc9(0x1e2)][_0x78acc9(0x1f5)](_0x292535=>{const _0x30b9e7=_0x78acc9;_0x292535[_0x30b9e7(0x1e8)]===_0x4283c4[_0x30b9e7(0x1dd)]&&this[_0x30b9e7(0x1f3)](this[_0x30b9e7(0x1e0)][_0x30b9e7(0x1dd)],_0x292535[_0x30b9e7(0x1e5)]);}))),this[_0x78acc9(0x1ea)](this[_0x78acc9(0x1e0)]['McpToolCallReceived'],()=>_0x5abed3(_0x2050fe[_0x78acc9(0x1e2)][_0x78acc9(0x1f5)](_0x4b7109=>{const _0x4dbf47=_0x78acc9;_0x4b7109[_0x4dbf47(0x1e8)]===_0x4283c4[_0x4dbf47(0x1ed)]&&this[_0x4dbf47(0x1f3)](this[_0x4dbf47(0x1e0)][_0x4dbf47(0x1ed)],_0x4b7109[_0x4dbf47(0x1e5)]);}))),this[_0x78acc9(0x1ea)](this[_0x78acc9(0x1e0)][_0x78acc9(0x1da)],()=>_0x5abed3(_0x2050fe['event$'][_0x78acc9(0x1f5)](_0x91834=>{const _0x338306=_0x78acc9;_0x91834['type']===_0x4283c4[_0x338306(0x1da)]&&this['fireEvent'](this['Event'][_0x338306(0x1da)],_0x91834[_0x338306(0x1e5)]);}))),this['registerEventHandler'](this[_0x78acc9(0x1e0)][_0x78acc9(0x1de)],()=>_0x5abed3(_0x2050fe[_0x78acc9(0x1e2)][_0x78acc9(0x1f5)](_0x4649b8=>{const _0x408ecb=_0x78acc9;_0x4649b8['type']===_0x4283c4[_0x408ecb(0x1de)]&&this[_0x408ecb(0x1f3)](this[_0x408ecb(0x1e0)][_0x408ecb(0x1de)],_0x4649b8[_0x408ecb(0x1e5)]);})));}['validateMCPToolCall'](_0x9c5d96,_0x23e57c){const _0x1b1075=_0x5800e9;return this[_0x1b1075(0x1d5)][_0x1b1075(0x1f1)](_0x18eab5)[_0x1b1075(0x1db)](_0x9c5d96,_0x23e57c);}[_0x5800e9(0x1f6)](){const _0x41415c=_0x5800e9;return this[_0x41415c(0x1d5)]['get'](_0x18eab5)[_0x41415c(0x1d9)]();}['callMCPTool'](_0x2f2658,_0x3a12){const _0x1e95f7=_0x5800e9;return this['_injector'][_0x1e95f7(0x1f1)](_0x18eab5)[_0x1e95f7(0x1d6)](_0x2f2658,_0x3a12);}[_0x5800e9(0x1eb)](){const _0x4828e7=_0x5800e9;return this[_0x4828e7(0x1d5)][_0x4828e7(0x1f1)](_0x1678c8)[_0x4828e7(0x1d3)]();}[_0x5800e9(0x1e1)](){const _0x4f1b20=_0x5800e9;this[_0x4f1b20(0x1d5)][_0x4f1b20(0x1f1)](_0x1678c8)[_0x4f1b20(0x1f4)]();}[_0x5800e9(0x1e9)](){const _0x1d11a2=_0x5800e9;this[_0x1d11a2(0x1d5)][_0x1d11a2(0x1f1)](_0x1678c8)[_0x1d11a2(0x1f0)]();}}_0x433b82[_0x5800e9(0x1ef)](M);
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);