@univerjs-pro/mcp 0.12.3 → 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 _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 _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);