@univerjs-pro/mcp 0.12.4-insiders.20251211-c28f914 → 0.12.4-insiders.20251212-6c41730

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 _0x379eb6=_0x348c;(function(_0x5ca720,_0x14bd42){const _0x10c67d=_0x348c,_0x262a24=_0x5ca720();while(!![]){try{const _0x8c76ae=parseInt(_0x10c67d(0x150))/0x1*(-parseInt(_0x10c67d(0x13d))/0x2)+-parseInt(_0x10c67d(0x13f))/0x3*(parseInt(_0x10c67d(0x13a))/0x4)+parseInt(_0x10c67d(0x148))/0x5+parseInt(_0x10c67d(0x136))/0x6+-parseInt(_0x10c67d(0x149))/0x7+parseInt(_0x10c67d(0x142))/0x8+-parseInt(_0x10c67d(0x14f))/0x9;if(_0x8c76ae===_0x14bd42)break;else _0x262a24['push'](_0x262a24['shift']());}catch(_0x2ef084){_0x262a24['push'](_0x262a24['shift']());}}}(_0x5a3d,0x36714));import{MCPEventId as _0x33270c,MCPEventService as _0x33f0ed,IMCPToolRegistry as _0x340d33,MCPConnectionController as _0x2153b6}from'@univerjs-pro/mcp';import{FEventName as _0x31e67e,FUniver as _0x375a4b}from'@univerjs/core/facade';import{toDisposable as _0x23bd0e}from'@univerjs/core';class d{get['McpConnectionStatusChanged'](){return _0x33270c['McpConnectionStatusChanged'];}get[_0x379eb6(0x139)](){return _0x33270c['McpToolCallReceived'];}get[_0x379eb6(0x154)](){const _0x1c6bb0=_0x379eb6;return _0x33270c[_0x1c6bb0(0x154)];}get[_0x379eb6(0x138)](){const _0x57be1a=_0x379eb6;return _0x33270c[_0x57be1a(0x138)];}}_0x31e67e[_0x379eb6(0x143)](d);function _0x5a3d(){const _0x4764df=['callMCPTool','_registerMCPFacadeEvents','get','McpToolCallExecuted','validateMCPToolCall','disconnect','2034780YKnNiS','data','McpToolCallFailed','McpToolCallReceived','3964RyUllx','executeTool','event$','14612QMjBlv','getAllMCPTools','1101orEfKZ','registerEventHandler','Event','2583456hiCkpz','extend','subscribe','_injector','type','_initialize','2088590aRaOfp','841876taHAVK','connect','McpConnectionStatusChanged','validateToolCall','getConnectionStatus','getAllTools','1448505zjIwBe','29wJDdkY'];_0x5a3d=function(){return _0x4764df;};return _0x5a3d();}class M extends _0x375a4b{[_0x379eb6(0x147)](_0x4de0ce){const _0x3ec72c=_0x379eb6;this[_0x3ec72c(0x152)](_0x4de0ce);}['_registerMCPFacadeEvents'](_0x1d6b4b){const _0x4b1d77=_0x379eb6,_0x5272a5=_0x1d6b4b[_0x4b1d77(0x153)](_0x33f0ed);this[_0x4b1d77(0x140)](this[_0x4b1d77(0x141)]['McpConnectionStatusChanged'],()=>_0x23bd0e(_0x5272a5[_0x4b1d77(0x13c)][_0x4b1d77(0x144)](_0x95371a=>{const _0x99f030=_0x4b1d77;_0x95371a[_0x99f030(0x146)]===_0x33270c[_0x99f030(0x14b)]&&this['fireEvent'](this[_0x99f030(0x141)][_0x99f030(0x14b)],_0x95371a[_0x99f030(0x137)]);}))),this[_0x4b1d77(0x140)](this[_0x4b1d77(0x141)][_0x4b1d77(0x139)],()=>_0x23bd0e(_0x5272a5[_0x4b1d77(0x13c)][_0x4b1d77(0x144)](_0x3b97cc=>{const _0x20160f=_0x4b1d77;_0x3b97cc[_0x20160f(0x146)]===_0x33270c['McpToolCallReceived']&&this['fireEvent'](this[_0x20160f(0x141)][_0x20160f(0x139)],_0x3b97cc[_0x20160f(0x137)]);}))),this['registerEventHandler'](this['Event']['McpToolCallExecuted'],()=>_0x23bd0e(_0x5272a5[_0x4b1d77(0x13c)][_0x4b1d77(0x144)](_0x59c79e=>{const _0x122c25=_0x4b1d77;_0x59c79e[_0x122c25(0x146)]===_0x33270c[_0x122c25(0x154)]&&this['fireEvent'](this[_0x122c25(0x141)][_0x122c25(0x154)],_0x59c79e[_0x122c25(0x137)]);}))),this[_0x4b1d77(0x140)](this[_0x4b1d77(0x141)][_0x4b1d77(0x138)],()=>_0x23bd0e(_0x5272a5['event$'][_0x4b1d77(0x144)](_0x59c373=>{const _0x41869a=_0x4b1d77;_0x59c373[_0x41869a(0x146)]===_0x33270c[_0x41869a(0x138)]&&this['fireEvent'](this[_0x41869a(0x141)][_0x41869a(0x138)],_0x59c373[_0x41869a(0x137)]);})));}[_0x379eb6(0x134)](_0x3194f9,_0x48ab48){const _0x5750b4=_0x379eb6;return this[_0x5750b4(0x145)][_0x5750b4(0x153)](_0x340d33)[_0x5750b4(0x14c)](_0x3194f9,_0x48ab48);}[_0x379eb6(0x13e)](){const _0x4da84b=_0x379eb6;return this['_injector'][_0x4da84b(0x153)](_0x340d33)[_0x4da84b(0x14e)]();}[_0x379eb6(0x151)](_0x2dbbd6,_0x52e530){const _0x424654=_0x379eb6;return this[_0x424654(0x145)][_0x424654(0x153)](_0x340d33)[_0x424654(0x13b)](_0x2dbbd6,_0x52e530);}['getMCPConnectionStatus'](){const _0x3eb7dc=_0x379eb6;return this['_injector'][_0x3eb7dc(0x153)](_0x2153b6)[_0x3eb7dc(0x14d)]();}['connectMCP'](){const _0x4502e3=_0x379eb6;this[_0x4502e3(0x145)]['get'](_0x2153b6)[_0x4502e3(0x14a)]();}['disconnectMCP'](){const _0x24e460=_0x379eb6;this[_0x24e460(0x145)][_0x24e460(0x153)](_0x2153b6)[_0x24e460(0x135)]();}}function _0x348c(_0x2d5ad0,_0x237161){_0x2d5ad0=_0x2d5ad0-0x134;const _0x5a3d0c=_0x5a3d();let _0x348c8b=_0x5a3d0c[_0x2d5ad0];return _0x348c8b;}_0x375a4b[_0x379eb6(0x143)](M);
1
+ const _0x2887c5=_0xb863;function _0xb863(_0x217cf0,_0x26edb7){_0x217cf0=_0x217cf0-0x1a0;const _0x2090b8=_0x2090();let _0xb8637b=_0x2090b8[_0x217cf0];return _0xb8637b;}(function(_0x2cc949,_0x4e9f4f){const _0x36470c=_0xb863,_0x23b773=_0x2cc949();while(!![]){try{const _0x37bc47=-parseInt(_0x36470c(0x1a7))/0x1+parseInt(_0x36470c(0x1c2))/0x2+-parseInt(_0x36470c(0x1a6))/0x3*(-parseInt(_0x36470c(0x1b7))/0x4)+-parseInt(_0x36470c(0x1af))/0x5*(-parseInt(_0x36470c(0x1b5))/0x6)+-parseInt(_0x36470c(0x1ae))/0x7+-parseInt(_0x36470c(0x1b8))/0x8+parseInt(_0x36470c(0x1a5))/0x9*(parseInt(_0x36470c(0x1c0))/0xa);if(_0x37bc47===_0x4e9f4f)break;else _0x23b773['push'](_0x23b773['shift']());}catch(_0x36bbce){_0x23b773['push'](_0x23b773['shift']());}}}(_0x2090,0xe5267));import{MCPEventId as _0x21b03d,MCPEventService as _0x4ec5e5,IMCPToolRegistry as _0x54b1de,MCPConnectionController as _0x41bab4}from'@univerjs-pro/mcp';import{FEventName as _0x2752f4,FUniver as _0x1617a3}from'@univerjs/core/facade';function _0x2090(){const _0x3450fb=['disconnectMCP','McpConnectionStatusChanged','event$','90hPWQfJ','171186TdcwXI','692557obSlAb','McpToolCallFailed','getConnectionStatus','get','fireEvent','callMCPTool','validateToolCall','3170685TSUPFN','135HGuTYA','_initialize','getAllTools','getMCPConnectionStatus','extend','executeTool','58734LSDAuW','connectMCP','16BWdGCj','12618936QBWtAH','_injector','registerEventHandler','McpToolCallReceived','type','connect','Event','getAllMCPTools','2167290ADQiiw','data','2003274hNwiCT','subscribe','McpToolCallExecuted','_registerMCPFacadeEvents'];_0x2090=function(){return _0x3450fb;};return _0x2090();}import{toDisposable as _0x13cb9f}from'@univerjs/core';class d{get['McpConnectionStatusChanged'](){return _0x21b03d['McpConnectionStatusChanged'];}get['McpToolCallReceived'](){return _0x21b03d['McpToolCallReceived'];}get[_0x2887c5(0x1a0)](){const _0x8c6ffe=_0x2887c5;return _0x21b03d[_0x8c6ffe(0x1a0)];}get[_0x2887c5(0x1a8)](){const _0x55c73f=_0x2887c5;return _0x21b03d[_0x55c73f(0x1a8)];}}_0x2752f4[_0x2887c5(0x1b3)](d);class M extends _0x1617a3{[_0x2887c5(0x1b0)](_0xe8dfb){const _0x4342cd=_0x2887c5;this[_0x4342cd(0x1a1)](_0xe8dfb);}[_0x2887c5(0x1a1)](_0x1bde4e){const _0x159de7=_0x2887c5,_0x4e4f1d=_0x1bde4e[_0x159de7(0x1aa)](_0x4ec5e5);this[_0x159de7(0x1ba)](this[_0x159de7(0x1be)][_0x159de7(0x1a3)],()=>_0x13cb9f(_0x4e4f1d[_0x159de7(0x1a4)][_0x159de7(0x1c3)](_0x461bda=>{const _0x50a532=_0x159de7;_0x461bda[_0x50a532(0x1bc)]===_0x21b03d[_0x50a532(0x1a3)]&&this['fireEvent'](this['Event']['McpConnectionStatusChanged'],_0x461bda[_0x50a532(0x1c1)]);}))),this[_0x159de7(0x1ba)](this[_0x159de7(0x1be)][_0x159de7(0x1bb)],()=>_0x13cb9f(_0x4e4f1d[_0x159de7(0x1a4)][_0x159de7(0x1c3)](_0x2a6a63=>{const _0x57e54e=_0x159de7;_0x2a6a63[_0x57e54e(0x1bc)]===_0x21b03d[_0x57e54e(0x1bb)]&&this[_0x57e54e(0x1ab)](this[_0x57e54e(0x1be)]['McpToolCallReceived'],_0x2a6a63['data']);}))),this[_0x159de7(0x1ba)](this[_0x159de7(0x1be)][_0x159de7(0x1a0)],()=>_0x13cb9f(_0x4e4f1d['event$'][_0x159de7(0x1c3)](_0x12fc7f=>{const _0x51baad=_0x159de7;_0x12fc7f[_0x51baad(0x1bc)]===_0x21b03d[_0x51baad(0x1a0)]&&this[_0x51baad(0x1ab)](this['Event'][_0x51baad(0x1a0)],_0x12fc7f['data']);}))),this[_0x159de7(0x1ba)](this['Event'][_0x159de7(0x1a8)],()=>_0x13cb9f(_0x4e4f1d['event$'][_0x159de7(0x1c3)](_0x54ab51=>{const _0x2ed997=_0x159de7;_0x54ab51[_0x2ed997(0x1bc)]===_0x21b03d[_0x2ed997(0x1a8)]&&this[_0x2ed997(0x1ab)](this['Event'][_0x2ed997(0x1a8)],_0x54ab51[_0x2ed997(0x1c1)]);})));}['validateMCPToolCall'](_0x41e665,_0x590e90){const _0x5b812c=_0x2887c5;return this['_injector'][_0x5b812c(0x1aa)](_0x54b1de)[_0x5b812c(0x1ad)](_0x41e665,_0x590e90);}[_0x2887c5(0x1bf)](){const _0x314d74=_0x2887c5;return this['_injector'][_0x314d74(0x1aa)](_0x54b1de)[_0x314d74(0x1b1)]();}[_0x2887c5(0x1ac)](_0x1edfa2,_0x5d6d7b){const _0x59996e=_0x2887c5;return this[_0x59996e(0x1b9)]['get'](_0x54b1de)[_0x59996e(0x1b4)](_0x1edfa2,_0x5d6d7b);}[_0x2887c5(0x1b2)](){const _0x54e989=_0x2887c5;return this[_0x54e989(0x1b9)]['get'](_0x41bab4)[_0x54e989(0x1a9)]();}[_0x2887c5(0x1b6)](){const _0x195f54=_0x2887c5;this[_0x195f54(0x1b9)][_0x195f54(0x1aa)](_0x41bab4)[_0x195f54(0x1bd)]();}[_0x2887c5(0x1a2)](){const _0x155404=_0x2887c5;this[_0x155404(0x1b9)][_0x155404(0x1aa)](_0x41bab4)['disconnect']();}}_0x1617a3[_0x2887c5(0x1b3)](M);