@univerjs-pro/mcp 0.10.14-nightly.202511070939 → 0.10.14-nightly.202511080715

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
- function _0x1b8d(_0x36e8e5,_0x885c75){const _0x299c89=_0x299c();return _0x1b8d=function(_0x1b8dbe,_0x53240b){_0x1b8dbe=_0x1b8dbe-0x1b0;let _0x2aa782=_0x299c89[_0x1b8dbe];return _0x2aa782;},_0x1b8d(_0x36e8e5,_0x885c75);}function _0x299c(){const _0x59b1e2=['getConnectionStatus','type','McpConnectionStatusChanged','_initialize','callMCPTool','registerEventHandler','4110720QyWGuj','252840myHOVl','getMCPConnectionStatus','227421NudclX','data','McpToolCallFailed','validateToolCall','validateMCPToolCall','McpToolCallReceived','connect','_registerMCPFacadeEvents','_injector','connectMCP','extend','disconnect','1315244VVqloW','disconnectMCP','512bdOJFj','get','997616boTWqD','subscribe','McpToolCallExecuted','Event','681oAsbym','getAllTools','fireEvent','event$','1350202GDNRhe','executeTool'];_0x299c=function(){return _0x59b1e2;};return _0x299c();}const _0x3f0174=_0x1b8d;(function(_0x53cfd6,_0x319040){const _0x1f23cd=_0x1b8d,_0x2bb612=_0x53cfd6();while(!![]){try{const _0x21be2f=-parseInt(_0x1f23cd(0x1ba))/0x1*(parseInt(_0x1f23cd(0x1b4))/0x2)+parseInt(_0x1f23cd(0x1c9))/0x3+-parseInt(_0x1f23cd(0x1b2))/0x4+parseInt(_0x1f23cd(0x1c7))/0x5+parseInt(_0x1f23cd(0x1c6))/0x6+parseInt(_0x1f23cd(0x1be))/0x7+-parseInt(_0x1f23cd(0x1b6))/0x8;if(_0x21be2f===_0x319040)break;else _0x2bb612['push'](_0x2bb612['shift']());}catch(_0x1420a3){_0x2bb612['push'](_0x2bb612['shift']());}}}(_0x299c,0x5bed4));import{MCPEventId as _0x22a0fc,MCPEventService as _0x14393c,IMCPToolRegistry as _0x45ca99,MCPConnectionController as _0x30a07e}from'@univerjs-pro/mcp';import{FEventName as _0x2350e1,FUniver as _0x4dad25}from'@univerjs/core/facade';import{toDisposable as _0x30906a}from'@univerjs/core';class d{get[_0x3f0174(0x1c2)](){const _0x540d59=_0x3f0174;return _0x22a0fc[_0x540d59(0x1c2)];}get['McpToolCallReceived'](){const _0x5b1bb8=_0x3f0174;return _0x22a0fc[_0x5b1bb8(0x1ce)];}get[_0x3f0174(0x1b8)](){const _0x32ee9e=_0x3f0174;return _0x22a0fc[_0x32ee9e(0x1b8)];}get[_0x3f0174(0x1cb)](){const _0x593967=_0x3f0174;return _0x22a0fc[_0x593967(0x1cb)];}}_0x2350e1[_0x3f0174(0x1b0)](d);class M extends _0x4dad25{[_0x3f0174(0x1c3)](_0xdc79e9){const _0x3bbb67=_0x3f0174;this[_0x3bbb67(0x1d0)](_0xdc79e9);}[_0x3f0174(0x1d0)](_0x116ef8){const _0x4dcab7=_0x3f0174,_0x4a5a38=_0x116ef8['get'](_0x14393c);this[_0x4dcab7(0x1c5)](this['Event']['McpConnectionStatusChanged'],()=>_0x30906a(_0x4a5a38[_0x4dcab7(0x1bd)][_0x4dcab7(0x1b7)](_0x23b57b=>{const _0x223947=_0x4dcab7;_0x23b57b[_0x223947(0x1c1)]===_0x22a0fc[_0x223947(0x1c2)]&&this[_0x223947(0x1bc)](this[_0x223947(0x1b9)][_0x223947(0x1c2)],_0x23b57b[_0x223947(0x1ca)]);}))),this['registerEventHandler'](this['Event'][_0x4dcab7(0x1ce)],()=>_0x30906a(_0x4a5a38[_0x4dcab7(0x1bd)][_0x4dcab7(0x1b7)](_0x277a74=>{const _0x90dce2=_0x4dcab7;_0x277a74['type']===_0x22a0fc[_0x90dce2(0x1ce)]&&this[_0x90dce2(0x1bc)](this[_0x90dce2(0x1b9)][_0x90dce2(0x1ce)],_0x277a74['data']);}))),this[_0x4dcab7(0x1c5)](this[_0x4dcab7(0x1b9)]['McpToolCallExecuted'],()=>_0x30906a(_0x4a5a38['event$']['subscribe'](_0x341aba=>{const _0x13c56f=_0x4dcab7;_0x341aba[_0x13c56f(0x1c1)]===_0x22a0fc['McpToolCallExecuted']&&this[_0x13c56f(0x1bc)](this[_0x13c56f(0x1b9)][_0x13c56f(0x1b8)],_0x341aba[_0x13c56f(0x1ca)]);}))),this['registerEventHandler'](this[_0x4dcab7(0x1b9)]['McpToolCallFailed'],()=>_0x30906a(_0x4a5a38[_0x4dcab7(0x1bd)][_0x4dcab7(0x1b7)](_0x1cc5c4=>{const _0x2f9a6e=_0x4dcab7;_0x1cc5c4[_0x2f9a6e(0x1c1)]===_0x22a0fc['McpToolCallFailed']&&this[_0x2f9a6e(0x1bc)](this[_0x2f9a6e(0x1b9)][_0x2f9a6e(0x1cb)],_0x1cc5c4[_0x2f9a6e(0x1ca)]);})));}[_0x3f0174(0x1cd)](_0x46095c,_0x4479ea){const _0x1806d8=_0x3f0174;return this[_0x1806d8(0x1d1)]['get'](_0x45ca99)[_0x1806d8(0x1cc)](_0x46095c,_0x4479ea);}['getAllMCPTools'](){const _0x5ec13f=_0x3f0174;return this[_0x5ec13f(0x1d1)][_0x5ec13f(0x1b5)](_0x45ca99)[_0x5ec13f(0x1bb)]();}[_0x3f0174(0x1c4)](_0x3b025a,_0x21216a){const _0x3b22e6=_0x3f0174;return this['_injector'][_0x3b22e6(0x1b5)](_0x45ca99)[_0x3b22e6(0x1bf)](_0x3b025a,_0x21216a);}[_0x3f0174(0x1c8)](){const _0x2e33d2=_0x3f0174;return this['_injector']['get'](_0x30a07e)[_0x2e33d2(0x1c0)]();}[_0x3f0174(0x1d2)](){const _0x52b8b5=_0x3f0174;this[_0x52b8b5(0x1d1)][_0x52b8b5(0x1b5)](_0x30a07e)[_0x52b8b5(0x1cf)]();}[_0x3f0174(0x1b3)](){const _0xde3daa=_0x3f0174;this[_0xde3daa(0x1d1)]['get'](_0x30a07e)[_0xde3daa(0x1b1)]();}}_0x4dad25[_0x3f0174(0x1b0)](M);
1
+ const _0x47c031=_0x3cdc;function _0x3cdc(_0x373567,_0x2e11e6){const _0x1f4690=_0x1f46();return _0x3cdc=function(_0x3cdc62,_0xb935e5){_0x3cdc62=_0x3cdc62-0x91;let _0x2dea20=_0x1f4690[_0x3cdc62];return _0x2dea20;},_0x3cdc(_0x373567,_0x2e11e6);}(function(_0x2ab511,_0x2bd38a){const _0x2e70b2=_0x3cdc,_0x52b137=_0x2ab511();while(!![]){try{const _0x25121c=-parseInt(_0x2e70b2(0x9f))/0x1+-parseInt(_0x2e70b2(0xa5))/0x2+parseInt(_0x2e70b2(0xac))/0x3*(-parseInt(_0x2e70b2(0xb0))/0x4)+parseInt(_0x2e70b2(0xaf))/0x5*(parseInt(_0x2e70b2(0xa1))/0x6)+parseInt(_0x2e70b2(0xa2))/0x7+-parseInt(_0x2e70b2(0x96))/0x8*(-parseInt(_0x2e70b2(0xb4))/0x9)+-parseInt(_0x2e70b2(0xaa))/0xa*(-parseInt(_0x2e70b2(0xae))/0xb);if(_0x25121c===_0x2bd38a)break;else _0x52b137['push'](_0x52b137['shift']());}catch(_0x54a0db){_0x52b137['push'](_0x52b137['shift']());}}}(_0x1f46,0x74501));import{MCPEventId as _0x3e3d6b,MCPEventService as _0x2f8f08,IMCPToolRegistry as _0x41ee38,MCPConnectionController as _0x145323}from'@univerjs-pro/mcp';import{FEventName as _0x48e64b,FUniver as _0x34efbd}from'@univerjs/core/facade';import{toDisposable as _0x3ddc62}from'@univerjs/core';class d{get['McpConnectionStatusChanged'](){const _0x3bfd76=_0x3cdc;return _0x3e3d6b[_0x3bfd76(0x93)];}get[_0x47c031(0xa9)](){const _0x1d37e3=_0x47c031;return _0x3e3d6b[_0x1d37e3(0xa9)];}get['McpToolCallExecuted'](){const _0x510967=_0x47c031;return _0x3e3d6b[_0x510967(0x97)];}get[_0x47c031(0xa3)](){const _0x468278=_0x47c031;return _0x3e3d6b[_0x468278(0xa3)];}}_0x48e64b[_0x47c031(0x99)](d);class M extends _0x34efbd{[_0x47c031(0xad)](_0x53e9e4){const _0x30a61e=_0x47c031;this[_0x30a61e(0xa7)](_0x53e9e4);}['_registerMCPFacadeEvents'](_0x10a9d1){const _0x10d745=_0x47c031,_0x15c31f=_0x10a9d1[_0x10d745(0x9b)](_0x2f8f08);this[_0x10d745(0xa4)](this[_0x10d745(0xab)]['McpConnectionStatusChanged'],()=>_0x3ddc62(_0x15c31f[_0x10d745(0xa0)][_0x10d745(0x9c)](_0x596fa7=>{const _0x58ac3c=_0x10d745;_0x596fa7[_0x58ac3c(0x92)]===_0x3e3d6b[_0x58ac3c(0x93)]&&this['fireEvent'](this[_0x58ac3c(0xab)]['McpConnectionStatusChanged'],_0x596fa7[_0x58ac3c(0x98)]);}))),this[_0x10d745(0xa4)](this[_0x10d745(0xab)][_0x10d745(0xa9)],()=>_0x3ddc62(_0x15c31f['event$'][_0x10d745(0x9c)](_0x1c8431=>{const _0x456290=_0x10d745;_0x1c8431[_0x456290(0x92)]===_0x3e3d6b[_0x456290(0xa9)]&&this[_0x456290(0x9a)](this[_0x456290(0xab)][_0x456290(0xa9)],_0x1c8431[_0x456290(0x98)]);}))),this[_0x10d745(0xa4)](this['Event'][_0x10d745(0x97)],()=>_0x3ddc62(_0x15c31f['event$']['subscribe'](_0x3477a9=>{const _0x5a294a=_0x10d745;_0x3477a9[_0x5a294a(0x92)]===_0x3e3d6b['McpToolCallExecuted']&&this['fireEvent'](this[_0x5a294a(0xab)][_0x5a294a(0x97)],_0x3477a9[_0x5a294a(0x98)]);}))),this['registerEventHandler'](this[_0x10d745(0xab)][_0x10d745(0xa3)],()=>_0x3ddc62(_0x15c31f['event$'][_0x10d745(0x9c)](_0x28b281=>{const _0x209110=_0x10d745;_0x28b281[_0x209110(0x92)]===_0x3e3d6b[_0x209110(0xa3)]&&this[_0x209110(0x9a)](this['Event']['McpToolCallFailed'],_0x28b281['data']);})));}['validateMCPToolCall'](_0x3ddb5a,_0x8340a1){const _0x4bb653=_0x47c031;return this[_0x4bb653(0x9e)][_0x4bb653(0x9b)](_0x41ee38)[_0x4bb653(0xa8)](_0x3ddb5a,_0x8340a1);}[_0x47c031(0xa6)](){const _0x3c897e=_0x47c031;return this[_0x3c897e(0x9e)][_0x3c897e(0x9b)](_0x41ee38)[_0x3c897e(0xb2)]();}[_0x47c031(0x95)](_0x38c0f9,_0x3d6cf6){const _0x11bc17=_0x47c031;return this[_0x11bc17(0x9e)][_0x11bc17(0x9b)](_0x41ee38)['executeTool'](_0x38c0f9,_0x3d6cf6);}[_0x47c031(0x91)](){const _0x574d9f=_0x47c031;return this[_0x574d9f(0x9e)][_0x574d9f(0x9b)](_0x145323)[_0x574d9f(0xb1)]();}['connectMCP'](){const _0x12d7a3=_0x47c031;this[_0x12d7a3(0x9e)][_0x12d7a3(0x9b)](_0x145323)[_0x12d7a3(0x94)]();}[_0x47c031(0x9d)](){const _0x5f288f=_0x47c031;this['_injector']['get'](_0x145323)[_0x5f288f(0xb3)]();}}function _0x1f46(){const _0xf33f38=['disconnectMCP','_injector','906494puaHgB','event$','45282krkQhW','2972536DOpsVf','McpToolCallFailed','registerEventHandler','1146016mHLMXT','getAllMCPTools','_registerMCPFacadeEvents','validateToolCall','McpToolCallReceived','30ilVwlw','Event','12zxUxeo','_initialize','3889479oAFeux','235slYCCJ','216076hwadVR','getConnectionStatus','getAllTools','disconnect','2986839LHUmEF','getMCPConnectionStatus','type','McpConnectionStatusChanged','connect','callMCPTool','8WwMAuw','McpToolCallExecuted','data','extend','fireEvent','get','subscribe'];_0x1f46=function(){return _0xf33f38;};return _0x1f46();}_0x34efbd[_0x47c031(0x99)](M);