@univerjs-pro/mcp 0.15.1 → 0.15.2-insiders.20260122-b1556b1

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 _0x1d7f4a=_0x7853;function _0x3404(){const _0x320c18=['McpToolCallFailed','getAllMCPTools','747515bveVxQ','connectMCP','McpConnectionStatusChanged','executeTool','disconnectMCP','McpToolCallExecuted','6NSZixu','McpToolCallReceived','registerEventHandler','Event','subscribe','fireEvent','type','extend','event$','callMCPTool','get','2759560eQYoZl','1194270yKmyGi','1185198zmmtxK','validateMCPToolCall','2500388GxxxcD','1645605qhmIOu','12213819NGpsIC','1CBSCdv','_initialize','_registerMCPFacadeEvents','_injector','validateToolCall','data'];_0x3404=function(){return _0x320c18;};return _0x3404();}(function(_0x1555b4,_0x5bc2b5){const _0x2e7e69=_0x7853,_0x58ffe9=_0x1555b4();while(!![]){try{const _0x7507c6=parseInt(_0x2e7e69(0x18b))/0x1*(parseInt(_0x2e7e69(0x185))/0x2)+parseInt(_0x2e7e69(0x189))/0x3+parseInt(_0x2e7e69(0x188))/0x4+parseInt(_0x2e7e69(0x193))/0x5*(parseInt(_0x2e7e69(0x199))/0x6)+parseInt(_0x2e7e69(0x186))/0x7+-parseInt(_0x2e7e69(0x184))/0x8+-parseInt(_0x2e7e69(0x18a))/0x9;if(_0x7507c6===_0x5bc2b5)break;else _0x58ffe9['push'](_0x58ffe9['shift']());}catch(_0x3787c8){_0x58ffe9['push'](_0x58ffe9['shift']());}}}(_0x3404,0x5e9dc));import{MCPEventId as _0x18d70f,MCPEventService as _0x7fd5ba,IMCPToolRegistry as _0x1db659,MCPConnectionController as _0x5d8c0}from'@univerjs-pro/mcp';import{FEventName as _0x44d09a,FUniver as _0x11a636}from'@univerjs/core/facade';function _0x7853(_0x38a226,_0x25574b){_0x38a226=_0x38a226-0x182;const _0x34043a=_0x3404();let _0x785336=_0x34043a[_0x38a226];return _0x785336;}import{toDisposable as _0x54b005}from'@univerjs/core';class d{get['McpConnectionStatusChanged'](){return _0x18d70f['McpConnectionStatusChanged'];}get[_0x1d7f4a(0x19a)](){const _0x36e390=_0x1d7f4a;return _0x18d70f[_0x36e390(0x19a)];}get[_0x1d7f4a(0x198)](){const _0x2d64cf=_0x1d7f4a;return _0x18d70f[_0x2d64cf(0x198)];}get['McpToolCallFailed'](){const _0x5f2a36=_0x1d7f4a;return _0x18d70f[_0x5f2a36(0x191)];}}_0x44d09a[_0x1d7f4a(0x1a0)](d);class M extends _0x11a636{[_0x1d7f4a(0x18c)](_0x1d3396){const _0x2b6988=_0x1d7f4a;this[_0x2b6988(0x18d)](_0x1d3396);}[_0x1d7f4a(0x18d)](_0x5b68d1){const _0x162c08=_0x1d7f4a,_0x1f35a5=_0x5b68d1[_0x162c08(0x183)](_0x7fd5ba);this[_0x162c08(0x19b)](this['Event']['McpConnectionStatusChanged'],()=>_0x54b005(_0x1f35a5[_0x162c08(0x1a1)]['subscribe'](_0x474234=>{const _0x1f62af=_0x162c08;_0x474234[_0x1f62af(0x19f)]===_0x18d70f[_0x1f62af(0x195)]&&this[_0x1f62af(0x19e)](this['Event'][_0x1f62af(0x195)],_0x474234[_0x1f62af(0x190)]);}))),this['registerEventHandler'](this[_0x162c08(0x19c)][_0x162c08(0x19a)],()=>_0x54b005(_0x1f35a5['event$'][_0x162c08(0x19d)](_0x31a8be=>{const _0x58113e=_0x162c08;_0x31a8be[_0x58113e(0x19f)]===_0x18d70f[_0x58113e(0x19a)]&&this['fireEvent'](this[_0x58113e(0x19c)]['McpToolCallReceived'],_0x31a8be[_0x58113e(0x190)]);}))),this[_0x162c08(0x19b)](this[_0x162c08(0x19c)][_0x162c08(0x198)],()=>_0x54b005(_0x1f35a5[_0x162c08(0x1a1)][_0x162c08(0x19d)](_0x510e17=>{const _0x31fd6a=_0x162c08;_0x510e17[_0x31fd6a(0x19f)]===_0x18d70f['McpToolCallExecuted']&&this['fireEvent'](this['Event'][_0x31fd6a(0x198)],_0x510e17[_0x31fd6a(0x190)]);}))),this['registerEventHandler'](this[_0x162c08(0x19c)][_0x162c08(0x191)],()=>_0x54b005(_0x1f35a5['event$'][_0x162c08(0x19d)](_0x5311df=>{const _0x4e007d=_0x162c08;_0x5311df[_0x4e007d(0x19f)]===_0x18d70f[_0x4e007d(0x191)]&&this[_0x4e007d(0x19e)](this['Event']['McpToolCallFailed'],_0x5311df[_0x4e007d(0x190)]);})));}[_0x1d7f4a(0x187)](_0x1af2b9,_0x2b0d22){const _0x5d8ae7=_0x1d7f4a;return this[_0x5d8ae7(0x18e)][_0x5d8ae7(0x183)](_0x1db659)[_0x5d8ae7(0x18f)](_0x1af2b9,_0x2b0d22);}[_0x1d7f4a(0x192)](){const _0xa4f309=_0x1d7f4a;return this['_injector'][_0xa4f309(0x183)](_0x1db659)['getAllTools']();}[_0x1d7f4a(0x182)](_0x1f45d1,_0x288498){const _0x1efd80=_0x1d7f4a;return this[_0x1efd80(0x18e)]['get'](_0x1db659)[_0x1efd80(0x196)](_0x1f45d1,_0x288498);}['getMCPConnectionStatus'](){const _0x577e59=_0x1d7f4a;return this[_0x577e59(0x18e)][_0x577e59(0x183)](_0x5d8c0)['getConnectionStatus']();}[_0x1d7f4a(0x194)](){this['_injector']['get'](_0x5d8c0)['connect']();}[_0x1d7f4a(0x197)](){const _0x4d5911=_0x1d7f4a;this['_injector'][_0x4d5911(0x183)](_0x5d8c0)['disconnect']();}}_0x11a636[_0x1d7f4a(0x1a0)](M);