@univerjs-pro/mcp 0.12.3-nightly.202512060617 → 0.12.4-experimental.20251208-c4b8a44

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 _0x3debc=_0x37c5;(function(_0x4bcdaa,_0x212e2d){const _0x5df10d=_0x37c5,_0x5a248f=_0x4bcdaa();while(!![]){try{const _0x80d2ee=parseInt(_0x5df10d(0x1b3))/0x1+-parseInt(_0x5df10d(0x1ad))/0x2*(parseInt(_0x5df10d(0x1ae))/0x3)+-parseInt(_0x5df10d(0x1b5))/0x4+parseInt(_0x5df10d(0x1bb))/0x5+-parseInt(_0x5df10d(0x1a9))/0x6+parseInt(_0x5df10d(0x1ac))/0x7+parseInt(_0x5df10d(0x1a8))/0x8*(parseInt(_0x5df10d(0x1c0))/0x9);if(_0x80d2ee===_0x212e2d)break;else _0x5a248f['push'](_0x5a248f['shift']());}catch(_0x8bace3){_0x5a248f['push'](_0x5a248f['shift']());}}}(_0x47b8,0xac00d));import{MCPEventId as _0x51b9ab,MCPEventService as _0x139db7,IMCPToolRegistry as _0x377653,MCPConnectionController as _0x15dcbf}from'@univerjs-pro/mcp';import{FEventName as _0x287ebc,FUniver as _0xb9a970}from'@univerjs/core/facade';import{toDisposable as _0x3bac54}from'@univerjs/core';class d{get['McpConnectionStatusChanged'](){const _0xf956ec=_0x37c5;return _0x51b9ab[_0xf956ec(0x1aa)];}get['McpToolCallReceived'](){return _0x51b9ab['McpToolCallReceived'];}get[_0x3debc(0x1bd)](){const _0x18c57c=_0x3debc;return _0x51b9ab[_0x18c57c(0x1bd)];}get[_0x3debc(0x1b1)](){const _0x1af09c=_0x3debc;return _0x51b9ab[_0x1af09c(0x1b1)];}}_0x287ebc[_0x3debc(0x1c3)](d);function _0x37c5(_0x1aeed6,_0x48182b){_0x1aeed6=_0x1aeed6-0x1a4;const _0x47b82b=_0x47b8();let _0x37c501=_0x47b82b[_0x1aeed6];return _0x37c501;}function _0x47b8(){const _0x21052b=['844287KFqwCE','disconnect','get','McpToolCallFailed','McpToolCallReceived','871818edvVGi','disconnectMCP','3304172veYNCs','connect','getAllMCPTools','subscribe','registerEventHandler','executeTool','1895910DaGKMz','getConnectionStatus','McpToolCallExecuted','fireEvent','validateToolCall','9CWlfId','type','getMCPConnectionStatus','extend','data','event$','connectMCP','Event','callMCPTool','_registerMCPFacadeEvents','4064696iZpzEv','5622162mTlRWC','McpConnectionStatusChanged','_injector','6929559OpXBfD','2SGFkUZ'];_0x47b8=function(){return _0x21052b;};return _0x47b8();}class M extends _0xb9a970{['_initialize'](_0x454dda){const _0x45792e=_0x3debc;this[_0x45792e(0x1a7)](_0x454dda);}[_0x3debc(0x1a7)](_0x483f65){const _0x5d6bf5=_0x3debc,_0x208f67=_0x483f65['get'](_0x139db7);this[_0x5d6bf5(0x1b9)](this['Event'][_0x5d6bf5(0x1aa)],()=>_0x3bac54(_0x208f67[_0x5d6bf5(0x1c5)][_0x5d6bf5(0x1b8)](_0x71d9f8=>{const _0x2a9c25=_0x5d6bf5;_0x71d9f8['type']===_0x51b9ab['McpConnectionStatusChanged']&&this[_0x2a9c25(0x1be)](this[_0x2a9c25(0x1a5)][_0x2a9c25(0x1aa)],_0x71d9f8[_0x2a9c25(0x1c4)]);}))),this[_0x5d6bf5(0x1b9)](this['Event'][_0x5d6bf5(0x1b2)],()=>_0x3bac54(_0x208f67[_0x5d6bf5(0x1c5)]['subscribe'](_0x5c2d4c=>{const _0x3e79f8=_0x5d6bf5;_0x5c2d4c[_0x3e79f8(0x1c1)]===_0x51b9ab['McpToolCallReceived']&&this['fireEvent'](this['Event']['McpToolCallReceived'],_0x5c2d4c[_0x3e79f8(0x1c4)]);}))),this['registerEventHandler'](this[_0x5d6bf5(0x1a5)]['McpToolCallExecuted'],()=>_0x3bac54(_0x208f67['event$'][_0x5d6bf5(0x1b8)](_0x37dce6=>{const _0x28f71d=_0x5d6bf5;_0x37dce6[_0x28f71d(0x1c1)]===_0x51b9ab[_0x28f71d(0x1bd)]&&this['fireEvent'](this['Event'][_0x28f71d(0x1bd)],_0x37dce6[_0x28f71d(0x1c4)]);}))),this[_0x5d6bf5(0x1b9)](this['Event']['McpToolCallFailed'],()=>_0x3bac54(_0x208f67['event$'][_0x5d6bf5(0x1b8)](_0x38cb8b=>{const _0x513280=_0x5d6bf5;_0x38cb8b[_0x513280(0x1c1)]===_0x51b9ab['McpToolCallFailed']&&this[_0x513280(0x1be)](this[_0x513280(0x1a5)][_0x513280(0x1b1)],_0x38cb8b[_0x513280(0x1c4)]);})));}['validateMCPToolCall'](_0x36803b,_0x200a0c){const _0x5c179f=_0x3debc;return this['_injector'][_0x5c179f(0x1b0)](_0x377653)[_0x5c179f(0x1bf)](_0x36803b,_0x200a0c);}[_0x3debc(0x1b7)](){const _0x5c49cb=_0x3debc;return this[_0x5c49cb(0x1ab)][_0x5c49cb(0x1b0)](_0x377653)['getAllTools']();}[_0x3debc(0x1a6)](_0x4199db,_0x138821){const _0x32f86e=_0x3debc;return this[_0x32f86e(0x1ab)]['get'](_0x377653)[_0x32f86e(0x1ba)](_0x4199db,_0x138821);}[_0x3debc(0x1c2)](){const _0x46f28b=_0x3debc;return this[_0x46f28b(0x1ab)]['get'](_0x15dcbf)[_0x46f28b(0x1bc)]();}[_0x3debc(0x1a4)](){const _0x2b409d=_0x3debc;this[_0x2b409d(0x1ab)][_0x2b409d(0x1b0)](_0x15dcbf)[_0x2b409d(0x1b6)]();}[_0x3debc(0x1b4)](){const _0x449b1e=_0x3debc;this[_0x449b1e(0x1ab)]['get'](_0x15dcbf)[_0x449b1e(0x1af)]();}}_0xb9a970['extend'](M);
1
+ const _0x575305=_0x19e2;(function(_0x2e4125,_0x1d29b9){const _0x1c57d6=_0x19e2,_0x31122e=_0x2e4125();while(!![]){try{const _0x24fe48=-parseInt(_0x1c57d6(0xee))/0x1*(parseInt(_0x1c57d6(0xe4))/0x2)+-parseInt(_0x1c57d6(0xe5))/0x3+parseInt(_0x1c57d6(0xeb))/0x4+parseInt(_0x1c57d6(0xf0))/0x5+parseInt(_0x1c57d6(0xe6))/0x6+-parseInt(_0x1c57d6(0xf5))/0x7+-parseInt(_0x1c57d6(0xfb))/0x8;if(_0x24fe48===_0x1d29b9)break;else _0x31122e['push'](_0x31122e['shift']());}catch(_0x15482b){_0x31122e['push'](_0x31122e['shift']());}}}(_0x7724,0xc2749));function _0x7724(){const _0x46e075=['193814CAzysN','3492396OXEEwD','6044406DeHNLx','getMCPConnectionStatus','registerEventHandler','_injector','extend','5128500aXAwaK','data','getAllMCPTools','6RGWFTl','Event','6384540qjlgDR','type','get','McpToolCallReceived','McpToolCallExecuted','3668861adEMaD','disconnect','McpToolCallFailed','event$','fireEvent','validateToolCall','4001984TjpuCT','_initialize','validateMCPToolCall','McpConnectionStatusChanged','_registerMCPFacadeEvents','callMCPTool','connect','executeTool','subscribe'];_0x7724=function(){return _0x46e075;};return _0x7724();}import{MCPEventId as _0x48cdab,MCPEventService as _0x57b0b7,IMCPToolRegistry as _0x576535,MCPConnectionController as _0x4a58e9}from'@univerjs-pro/mcp';import{FEventName as _0x2873e5,FUniver as _0x455956}from'@univerjs/core/facade';import{toDisposable as _0x30b378}from'@univerjs/core';function _0x19e2(_0x237231,_0x12d5ac){_0x237231=_0x237231-0xe1;const _0x77240=_0x7724();let _0x19e287=_0x77240[_0x237231];return _0x19e287;}class d{get[_0x575305(0xfe)](){const _0x15e75d=_0x575305;return _0x48cdab[_0x15e75d(0xfe)];}get[_0x575305(0xf3)](){return _0x48cdab['McpToolCallReceived'];}get[_0x575305(0xf4)](){const _0x5de93f=_0x575305;return _0x48cdab[_0x5de93f(0xf4)];}get[_0x575305(0xf7)](){const _0xa6c366=_0x575305;return _0x48cdab[_0xa6c366(0xf7)];}}_0x2873e5[_0x575305(0xea)](d);class M extends _0x455956{[_0x575305(0xfc)](_0x524d3b){this['_registerMCPFacadeEvents'](_0x524d3b);}[_0x575305(0xff)](_0x237953){const _0x3815d7=_0x575305,_0x379740=_0x237953[_0x3815d7(0xf2)](_0x57b0b7);this['registerEventHandler'](this[_0x3815d7(0xef)][_0x3815d7(0xfe)],()=>_0x30b378(_0x379740[_0x3815d7(0xf8)]['subscribe'](_0x55e35f=>{const _0x3c4bd5=_0x3815d7;_0x55e35f[_0x3c4bd5(0xf1)]===_0x48cdab['McpConnectionStatusChanged']&&this[_0x3c4bd5(0xf9)](this[_0x3c4bd5(0xef)][_0x3c4bd5(0xfe)],_0x55e35f[_0x3c4bd5(0xec)]);}))),this[_0x3815d7(0xe8)](this[_0x3815d7(0xef)][_0x3815d7(0xf3)],()=>_0x30b378(_0x379740[_0x3815d7(0xf8)][_0x3815d7(0xe3)](_0xa8b94d=>{const _0x3a5879=_0x3815d7;_0xa8b94d[_0x3a5879(0xf1)]===_0x48cdab[_0x3a5879(0xf3)]&&this['fireEvent'](this[_0x3a5879(0xef)]['McpToolCallReceived'],_0xa8b94d['data']);}))),this['registerEventHandler'](this[_0x3815d7(0xef)][_0x3815d7(0xf4)],()=>_0x30b378(_0x379740[_0x3815d7(0xf8)]['subscribe'](_0x149608=>{const _0x3ed0d4=_0x3815d7;_0x149608[_0x3ed0d4(0xf1)]===_0x48cdab[_0x3ed0d4(0xf4)]&&this[_0x3ed0d4(0xf9)](this[_0x3ed0d4(0xef)][_0x3ed0d4(0xf4)],_0x149608[_0x3ed0d4(0xec)]);}))),this[_0x3815d7(0xe8)](this[_0x3815d7(0xef)][_0x3815d7(0xf7)],()=>_0x30b378(_0x379740[_0x3815d7(0xf8)][_0x3815d7(0xe3)](_0x24ae08=>{const _0x463f83=_0x3815d7;_0x24ae08[_0x463f83(0xf1)]===_0x48cdab[_0x463f83(0xf7)]&&this[_0x463f83(0xf9)](this[_0x463f83(0xef)]['McpToolCallFailed'],_0x24ae08[_0x463f83(0xec)]);})));}[_0x575305(0xfd)](_0x5ccb4d,_0x4c1335){const _0x20e112=_0x575305;return this[_0x20e112(0xe9)][_0x20e112(0xf2)](_0x576535)[_0x20e112(0xfa)](_0x5ccb4d,_0x4c1335);}[_0x575305(0xed)](){const _0x3be3a0=_0x575305;return this[_0x3be3a0(0xe9)][_0x3be3a0(0xf2)](_0x576535)['getAllTools']();}[_0x575305(0x100)](_0x3cb721,_0x3f116b){const _0x5ba9e3=_0x575305;return this['_injector'][_0x5ba9e3(0xf2)](_0x576535)[_0x5ba9e3(0xe2)](_0x3cb721,_0x3f116b);}[_0x575305(0xe7)](){const _0x81e261=_0x575305;return this[_0x81e261(0xe9)][_0x81e261(0xf2)](_0x4a58e9)['getConnectionStatus']();}['connectMCP'](){const _0x2deb85=_0x575305;this['_injector']['get'](_0x4a58e9)[_0x2deb85(0xe1)]();}['disconnectMCP'](){const _0x3bc074=_0x575305;this[_0x3bc074(0xe9)]['get'](_0x4a58e9)[_0x3bc074(0xf6)]();}}_0x455956[_0x575305(0xea)](M);