@univerjs-pro/mcp 0.12.3 → 0.12.4-experimental.20251210-8d33c6e

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 _0x1fe127=_0x4cf7;(function(_0x1b37a7,_0x36a734){const _0x3dfc4b=_0x4cf7,_0x4028b7=_0x1b37a7();while(!![]){try{const _0x28426b=-parseInt(_0x3dfc4b(0x146))/0x1+-parseInt(_0x3dfc4b(0x138))/0x2*(-parseInt(_0x3dfc4b(0x142))/0x3)+parseInt(_0x3dfc4b(0x13e))/0x4+-parseInt(_0x3dfc4b(0x148))/0x5+parseInt(_0x3dfc4b(0x153))/0x6+parseInt(_0x3dfc4b(0x152))/0x7+-parseInt(_0x3dfc4b(0x13c))/0x8*(-parseInt(_0x3dfc4b(0x156))/0x9);if(_0x28426b===_0x36a734)break;else _0x4028b7['push'](_0x4028b7['shift']());}catch(_0x5a8352){_0x4028b7['push'](_0x4028b7['shift']());}}}(_0x2f76,0x2babb));function _0x2f76(){const _0x21fc2b=['9chfJdD','disconnect','event$','getAllTools','executeTool','2DztiSj','type','McpToolCallFailed','fireEvent','95224IFGVJE','connect','813200yFcMZk','_injector','getConnectionStatus','connectMCP','565932eSCSQn','validateToolCall','McpToolCallReceived','getAllMCPTools','264714ITXOVC','get','478925fqVcEA','_initialize','subscribe','callMCPTool','data','Event','getMCPConnectionStatus','McpConnectionStatusChanged','registerEventHandler','_registerMCPFacadeEvents','61558iWJmum','760398GwqqRc','extend','McpToolCallExecuted'];_0x2f76=function(){return _0x21fc2b;};return _0x2f76();}import{MCPEventId as _0x3bc679,MCPEventService as _0x2fbc66,IMCPToolRegistry as _0x29022e,MCPConnectionController as _0x1c2bd8}from'@univerjs-pro/mcp';function _0x4cf7(_0x5b3403,_0x59c357){const _0x2f766a=_0x2f76();return _0x4cf7=function(_0x4cf784,_0x514d32){_0x4cf784=_0x4cf784-0x134;let _0x5e6326=_0x2f766a[_0x4cf784];return _0x5e6326;},_0x4cf7(_0x5b3403,_0x59c357);}import{FEventName as _0x7de525,FUniver as _0x244512}from'@univerjs/core/facade';import{toDisposable as _0x55df3b}from'@univerjs/core';class d{get[_0x1fe127(0x14f)](){const _0x1bc193=_0x1fe127;return _0x3bc679[_0x1bc193(0x14f)];}get[_0x1fe127(0x144)](){const _0x3db256=_0x1fe127;return _0x3bc679[_0x3db256(0x144)];}get[_0x1fe127(0x155)](){const _0x4e20f1=_0x1fe127;return _0x3bc679[_0x4e20f1(0x155)];}get[_0x1fe127(0x13a)](){return _0x3bc679['McpToolCallFailed'];}}_0x7de525['extend'](d);class M extends _0x244512{[_0x1fe127(0x149)](_0x263aba){const _0x5a7a52=_0x1fe127;this[_0x5a7a52(0x151)](_0x263aba);}['_registerMCPFacadeEvents'](_0x270c22){const _0x4d3144=_0x1fe127,_0x4eb920=_0x270c22[_0x4d3144(0x147)](_0x2fbc66);this[_0x4d3144(0x150)](this[_0x4d3144(0x14d)]['McpConnectionStatusChanged'],()=>_0x55df3b(_0x4eb920[_0x4d3144(0x135)][_0x4d3144(0x14a)](_0x4e9346=>{const _0xc04e07=_0x4d3144;_0x4e9346[_0xc04e07(0x139)]===_0x3bc679[_0xc04e07(0x14f)]&&this[_0xc04e07(0x13b)](this[_0xc04e07(0x14d)][_0xc04e07(0x14f)],_0x4e9346[_0xc04e07(0x14c)]);}))),this['registerEventHandler'](this[_0x4d3144(0x14d)]['McpToolCallReceived'],()=>_0x55df3b(_0x4eb920[_0x4d3144(0x135)][_0x4d3144(0x14a)](_0x28ecb2=>{const _0x3df3b3=_0x4d3144;_0x28ecb2['type']===_0x3bc679['McpToolCallReceived']&&this[_0x3df3b3(0x13b)](this[_0x3df3b3(0x14d)][_0x3df3b3(0x144)],_0x28ecb2[_0x3df3b3(0x14c)]);}))),this[_0x4d3144(0x150)](this['Event'][_0x4d3144(0x155)],()=>_0x55df3b(_0x4eb920[_0x4d3144(0x135)]['subscribe'](_0x1420c4=>{const _0x4907a5=_0x4d3144;_0x1420c4[_0x4907a5(0x139)]===_0x3bc679['McpToolCallExecuted']&&this[_0x4907a5(0x13b)](this['Event'][_0x4907a5(0x155)],_0x1420c4[_0x4907a5(0x14c)]);}))),this[_0x4d3144(0x150)](this[_0x4d3144(0x14d)]['McpToolCallFailed'],()=>_0x55df3b(_0x4eb920[_0x4d3144(0x135)]['subscribe'](_0x4c15cf=>{const _0x45f90b=_0x4d3144;_0x4c15cf[_0x45f90b(0x139)]===_0x3bc679[_0x45f90b(0x13a)]&&this['fireEvent'](this['Event']['McpToolCallFailed'],_0x4c15cf[_0x45f90b(0x14c)]);})));}['validateMCPToolCall'](_0x3a7e2e,_0x5504f1){const _0x6f2bf=_0x1fe127;return this[_0x6f2bf(0x13f)][_0x6f2bf(0x147)](_0x29022e)[_0x6f2bf(0x143)](_0x3a7e2e,_0x5504f1);}[_0x1fe127(0x145)](){const _0x496eb1=_0x1fe127;return this[_0x496eb1(0x13f)][_0x496eb1(0x147)](_0x29022e)[_0x496eb1(0x136)]();}[_0x1fe127(0x14b)](_0x509164,_0xf07ff4){const _0x42985a=_0x1fe127;return this[_0x42985a(0x13f)]['get'](_0x29022e)[_0x42985a(0x137)](_0x509164,_0xf07ff4);}[_0x1fe127(0x14e)](){const _0x5f0132=_0x1fe127;return this['_injector'][_0x5f0132(0x147)](_0x1c2bd8)[_0x5f0132(0x140)]();}[_0x1fe127(0x141)](){const _0x244100=_0x1fe127;this[_0x244100(0x13f)]['get'](_0x1c2bd8)[_0x244100(0x13d)]();}['disconnectMCP'](){const _0x216edb=_0x1fe127;this[_0x216edb(0x13f)][_0x216edb(0x147)](_0x1c2bd8)[_0x216edb(0x134)]();}}_0x244512[_0x1fe127(0x154)](M);
1
+ const _0x1f0daa=_0x2ee8;(function(_0x5179d1,_0x572aaa){const _0x3f3b0a=_0x2ee8,_0x35dcf8=_0x5179d1();while(!![]){try{const _0x8f3fdd=parseInt(_0x3f3b0a(0x121))/0x1*(-parseInt(_0x3f3b0a(0x110))/0x2)+parseInt(_0x3f3b0a(0x11e))/0x3+parseInt(_0x3f3b0a(0x10b))/0x4+parseInt(_0x3f3b0a(0x125))/0x5+-parseInt(_0x3f3b0a(0x109))/0x6*(parseInt(_0x3f3b0a(0x11d))/0x7)+parseInt(_0x3f3b0a(0x11a))/0x8*(-parseInt(_0x3f3b0a(0x115))/0x9)+parseInt(_0x3f3b0a(0x11b))/0xa;if(_0x8f3fdd===_0x572aaa)break;else _0x35dcf8['push'](_0x35dcf8['shift']());}catch(_0xb451f5){_0x35dcf8['push'](_0x35dcf8['shift']());}}}(_0x563b,0xaf5e9));import{MCPEventId as _0x20ec8b,MCPEventService as _0x5e89c0,IMCPToolRegistry as _0xf4461e,MCPConnectionController as _0x492974}from'@univerjs-pro/mcp';import{FEventName as _0x1e63f5,FUniver as _0x6655de}from'@univerjs/core/facade';function _0x563b(){const _0x1e1c33=['1PoGxkY','registerEventHandler','callMCPTool','McpToolCallFailed','6048295ATiyeQ','getConnectionStatus','McpToolCallReceived','executeTool','1307490IlRvNW','Event','4056340zZVHHr','disconnect','subscribe','getAllTools','fireEvent','1413998ZqPZAp','_injector','_initialize','get','event$','531negpaI','_registerMCPFacadeEvents','validateMCPToolCall','disconnectMCP','McpToolCallExecuted','166088ckrQIO','4329540xecFKo','McpConnectionStatusChanged','35LJiSST','3249264sxQQOz','data','type'];_0x563b=function(){return _0x1e1c33;};return _0x563b();}function _0x2ee8(_0x2aaeae,_0x1464d5){_0x2aaeae=_0x2aaeae-0x108;const _0x563bab=_0x563b();let _0x2ee8d9=_0x563bab[_0x2aaeae];return _0x2ee8d9;}import{toDisposable as _0x2503e2}from'@univerjs/core';class d{get[_0x1f0daa(0x11c)](){const _0xf5b5e1=_0x1f0daa;return _0x20ec8b[_0xf5b5e1(0x11c)];}get[_0x1f0daa(0x127)](){const _0x1ef0de=_0x1f0daa;return _0x20ec8b[_0x1ef0de(0x127)];}get[_0x1f0daa(0x119)](){const _0x430826=_0x1f0daa;return _0x20ec8b[_0x430826(0x119)];}get[_0x1f0daa(0x124)](){const _0x577b1e=_0x1f0daa;return _0x20ec8b[_0x577b1e(0x124)];}}_0x1e63f5['extend'](d);class M extends _0x6655de{[_0x1f0daa(0x112)](_0x330ee3){const _0x5f5078=_0x1f0daa;this[_0x5f5078(0x116)](_0x330ee3);}[_0x1f0daa(0x116)](_0x1f1003){const _0xa04717=_0x1f0daa,_0x168679=_0x1f1003[_0xa04717(0x113)](_0x5e89c0);this[_0xa04717(0x122)](this['Event'][_0xa04717(0x11c)],()=>_0x2503e2(_0x168679[_0xa04717(0x114)]['subscribe'](_0x49b885=>{const _0x47a759=_0xa04717;_0x49b885[_0x47a759(0x120)]===_0x20ec8b[_0x47a759(0x11c)]&&this['fireEvent'](this['Event'][_0x47a759(0x11c)],_0x49b885['data']);}))),this['registerEventHandler'](this[_0xa04717(0x10a)]['McpToolCallReceived'],()=>_0x2503e2(_0x168679[_0xa04717(0x114)][_0xa04717(0x10d)](_0x5530a6=>{const _0x423f25=_0xa04717;_0x5530a6['type']===_0x20ec8b['McpToolCallReceived']&&this[_0x423f25(0x10f)](this[_0x423f25(0x10a)][_0x423f25(0x127)],_0x5530a6[_0x423f25(0x11f)]);}))),this[_0xa04717(0x122)](this[_0xa04717(0x10a)][_0xa04717(0x119)],()=>_0x2503e2(_0x168679[_0xa04717(0x114)][_0xa04717(0x10d)](_0x4620a9=>{const _0x3bde64=_0xa04717;_0x4620a9[_0x3bde64(0x120)]===_0x20ec8b[_0x3bde64(0x119)]&&this[_0x3bde64(0x10f)](this[_0x3bde64(0x10a)][_0x3bde64(0x119)],_0x4620a9[_0x3bde64(0x11f)]);}))),this[_0xa04717(0x122)](this['Event']['McpToolCallFailed'],()=>_0x2503e2(_0x168679['event$']['subscribe'](_0x42555c=>{const _0xebc95c=_0xa04717;_0x42555c[_0xebc95c(0x120)]===_0x20ec8b['McpToolCallFailed']&&this[_0xebc95c(0x10f)](this['Event'][_0xebc95c(0x124)],_0x42555c[_0xebc95c(0x11f)]);})));}[_0x1f0daa(0x117)](_0x3d8578,_0xa90752){const _0x52a9c4=_0x1f0daa;return this[_0x52a9c4(0x111)][_0x52a9c4(0x113)](_0xf4461e)['validateToolCall'](_0x3d8578,_0xa90752);}['getAllMCPTools'](){const _0x17ab8f=_0x1f0daa;return this[_0x17ab8f(0x111)][_0x17ab8f(0x113)](_0xf4461e)[_0x17ab8f(0x10e)]();}[_0x1f0daa(0x123)](_0x534d1a,_0x15e264){const _0x2c684f=_0x1f0daa;return this[_0x2c684f(0x111)][_0x2c684f(0x113)](_0xf4461e)[_0x2c684f(0x108)](_0x534d1a,_0x15e264);}['getMCPConnectionStatus'](){const _0x332e31=_0x1f0daa;return this[_0x332e31(0x111)][_0x332e31(0x113)](_0x492974)[_0x332e31(0x126)]();}['connectMCP'](){const _0x4731e8=_0x1f0daa;this[_0x4731e8(0x111)]['get'](_0x492974)['connect']();}[_0x1f0daa(0x118)](){const _0x7f9af3=_0x1f0daa;this['_injector'][_0x7f9af3(0x113)](_0x492974)[_0x7f9af3(0x10c)]();}}_0x6655de['extend'](M);