@univerjs-pro/mcp 0.11.0-nightly.202511151013 → 0.12.0

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 _0x18ff59=_0x45e3;(function(_0x148e13,_0x77e248){const _0x147473=_0x45e3,_0x51894b=_0x148e13();while(!![]){try{const _0x55c5d1=-parseInt(_0x147473(0xfe))/0x1+-parseInt(_0x147473(0xfc))/0x2*(-parseInt(_0x147473(0xeb))/0x3)+parseInt(_0x147473(0x106))/0x4*(-parseInt(_0x147473(0xf8))/0x5)+parseInt(_0x147473(0xf6))/0x6*(-parseInt(_0x147473(0x104))/0x7)+parseInt(_0x147473(0xef))/0x8+parseInt(_0x147473(0xf2))/0x9*(-parseInt(_0x147473(0x100))/0xa)+parseInt(_0x147473(0xf4))/0xb;if(_0x55c5d1===_0x77e248)break;else _0x51894b['push'](_0x51894b['shift']());}catch(_0x25edec){_0x51894b['push'](_0x51894b['shift']());}}}(_0x5aa5,0x37723));import{MCPEventId as _0xe2cfe6,MCPEventService as _0x4e0975,IMCPToolRegistry as _0x1c9385,MCPConnectionController as _0x102446}from'@univerjs-pro/mcp';import{FEventName as _0x205f5b,FUniver as _0x39c2ed}from'@univerjs/core/facade';import{toDisposable as _0x51cb1a}from'@univerjs/core';class d{get[_0x18ff59(0xe7)](){const _0x465d58=_0x18ff59;return _0xe2cfe6[_0x465d58(0xe7)];}get[_0x18ff59(0xf7)](){const _0x53563e=_0x18ff59;return _0xe2cfe6[_0x53563e(0xf7)];}get[_0x18ff59(0xf9)](){const _0x7ded49=_0x18ff59;return _0xe2cfe6[_0x7ded49(0xf9)];}get[_0x18ff59(0x101)](){const _0x54ea90=_0x18ff59;return _0xe2cfe6[_0x54ea90(0x101)];}}function _0x45e3(_0x4fcd85,_0x44e907){const _0x5aa59c=_0x5aa5();return _0x45e3=function(_0x45e308,_0x97675e){_0x45e308=_0x45e308-0xe7;let _0xbdf186=_0x5aa59c[_0x45e308];return _0xbdf186;},_0x45e3(_0x4fcd85,_0x44e907);}_0x205f5b[_0x18ff59(0xed)](d);class M extends _0x39c2ed{['_initialize'](_0x5610cf){this['_registerMCPFacadeEvents'](_0x5610cf);}[_0x18ff59(0xf5)](_0x1af58d){const _0x3aa624=_0x18ff59,_0xaf9dab=_0x1af58d['get'](_0x4e0975);this[_0x3aa624(0x102)](this[_0x3aa624(0xfa)]['McpConnectionStatusChanged'],()=>_0x51cb1a(_0xaf9dab['event$'][_0x3aa624(0xf3)](_0x2fd84f=>{const _0x121c18=_0x3aa624;_0x2fd84f[_0x121c18(0xf0)]===_0xe2cfe6[_0x121c18(0xe7)]&&this[_0x121c18(0xfb)](this['Event'][_0x121c18(0xe7)],_0x2fd84f[_0x121c18(0x109)]);}))),this[_0x3aa624(0x102)](this['Event'][_0x3aa624(0xf7)],()=>_0x51cb1a(_0xaf9dab[_0x3aa624(0xf1)][_0x3aa624(0xf3)](_0xfd96a5=>{const _0x36ceb1=_0x3aa624;_0xfd96a5['type']===_0xe2cfe6[_0x36ceb1(0xf7)]&&this[_0x36ceb1(0xfb)](this[_0x36ceb1(0xfa)][_0x36ceb1(0xf7)],_0xfd96a5[_0x36ceb1(0x109)]);}))),this[_0x3aa624(0x102)](this['Event'][_0x3aa624(0xf9)],()=>_0x51cb1a(_0xaf9dab['event$'][_0x3aa624(0xf3)](_0x8d6e43=>{const _0x2d3532=_0x3aa624;_0x8d6e43['type']===_0xe2cfe6[_0x2d3532(0xf9)]&&this[_0x2d3532(0xfb)](this[_0x2d3532(0xfa)][_0x2d3532(0xf9)],_0x8d6e43['data']);}))),this[_0x3aa624(0x102)](this[_0x3aa624(0xfa)][_0x3aa624(0x101)],()=>_0x51cb1a(_0xaf9dab[_0x3aa624(0xf1)][_0x3aa624(0xf3)](_0x11475b=>{const _0x1ed5de=_0x3aa624;_0x11475b['type']===_0xe2cfe6['McpToolCallFailed']&&this[_0x1ed5de(0xfb)](this[_0x1ed5de(0xfa)][_0x1ed5de(0x101)],_0x11475b['data']);})));}[_0x18ff59(0xfd)](_0x4cad2d,_0x4827fe){const _0x418dc4=_0x18ff59;return this['_injector']['get'](_0x1c9385)[_0x418dc4(0x108)](_0x4cad2d,_0x4827fe);}[_0x18ff59(0x105)](){const _0x514ce0=_0x18ff59;return this['_injector'][_0x514ce0(0xe9)](_0x1c9385)[_0x514ce0(0xea)]();}[_0x18ff59(0xec)](_0x31c85f,_0xa1a9ae){const _0x70135d=_0x18ff59;return this[_0x70135d(0xe8)][_0x70135d(0xe9)](_0x1c9385)['executeTool'](_0x31c85f,_0xa1a9ae);}['getMCPConnectionStatus'](){const _0x337387=_0x18ff59;return this['_injector']['get'](_0x102446)[_0x337387(0xee)]();}[_0x18ff59(0xff)](){const _0x3f4ea0=_0x18ff59;this[_0x3f4ea0(0xe8)][_0x3f4ea0(0xe9)](_0x102446)['connect']();}[_0x18ff59(0x107)](){const _0xc6cc33=_0x18ff59;this['_injector'][_0xc6cc33(0xe9)](_0x102446)[_0xc6cc33(0x103)]();}}function _0x5aa5(){const _0x3491a9=['registerEventHandler','disconnect','73346dzjUBm','getAllMCPTools','1551216kWbTWk','disconnectMCP','validateToolCall','data','McpConnectionStatusChanged','_injector','get','getAllTools','3hwcMJl','callMCPTool','extend','getConnectionStatus','2013688FpUejE','type','event$','1233lcMCpR','subscribe','5950670CicMVJ','_registerMCPFacadeEvents','96pUdvDP','McpToolCallReceived','5IFADDW','McpToolCallExecuted','Event','fireEvent','700046VvaPHM','validateMCPToolCall','299043gjrdem','connectMCP','4460yzyIXK','McpToolCallFailed'];_0x5aa5=function(){return _0x3491a9;};return _0x5aa5();}_0x39c2ed[_0x18ff59(0xed)](M);
1
+ const _0x167b34=_0x3b11;(function(_0x1154d8,_0x56c3a9){const _0x5478de=_0x3b11,_0x223a1b=_0x1154d8();while(!![]){try{const _0xff5144=parseInt(_0x5478de(0x1ea))/0x1+parseInt(_0x5478de(0x1e4))/0x2*(-parseInt(_0x5478de(0x1e3))/0x3)+parseInt(_0x5478de(0x1d5))/0x4*(-parseInt(_0x5478de(0x1ef))/0x5)+parseInt(_0x5478de(0x1e2))/0x6*(-parseInt(_0x5478de(0x1d1))/0x7)+-parseInt(_0x5478de(0x1f6))/0x8+-parseInt(_0x5478de(0x1f5))/0x9*(-parseInt(_0x5478de(0x1d2))/0xa)+-parseInt(_0x5478de(0x1e6))/0xb*(-parseInt(_0x5478de(0x1d8))/0xc);if(_0xff5144===_0x56c3a9)break;else _0x223a1b['push'](_0x223a1b['shift']());}catch(_0x493b6d){_0x223a1b['push'](_0x223a1b['shift']());}}}(_0xea1a,0x8bbc7));import{MCPEventId as _0x421603,MCPEventService as _0x40f393,IMCPToolRegistry as _0x4d69b9,MCPConnectionController as _0x216b4c}from'@univerjs-pro/mcp';import{FEventName as _0x31a3f8,FUniver as _0x463fa7}from'@univerjs/core/facade';function _0xea1a(){const _0xb2f006=['getAllTools','getAllMCPTools','event$','_injector','McpToolCallExecuted','subscribe','getConnectionStatus','disconnectMCP','get','2952OXiehv','156747IEjfdG','2lZZlMK','data','44cEPURa','validateToolCall','callMCPTool','executeTool','482306eBOuxO','registerEventHandler','disconnect','type','McpToolCallFailed','5yHpOtR','fireEvent','connect','McpToolCallReceived','Event','McpConnectionStatusChanged','585BJTWsn','3509344QLPBCl','getMCPConnectionStatus','588neVHvz','12310FBsSgv','_registerMCPFacadeEvents','_initialize','2587156shRraO','extend','connectMCP','3567216XXyyLk'];_0xea1a=function(){return _0xb2f006;};return _0xea1a();}function _0x3b11(_0x48b5a8,_0x5e38e6){const _0xea1a20=_0xea1a();return _0x3b11=function(_0x3b11d2,_0x4f0d8c){_0x3b11d2=_0x3b11d2-0x1d0;let _0x385292=_0xea1a20[_0x3b11d2];return _0x385292;},_0x3b11(_0x48b5a8,_0x5e38e6);}import{toDisposable as _0x571923}from'@univerjs/core';class d{get[_0x167b34(0x1f4)](){const _0x5d96bc=_0x167b34;return _0x421603[_0x5d96bc(0x1f4)];}get[_0x167b34(0x1f2)](){const _0x3a54c5=_0x167b34;return _0x421603[_0x3a54c5(0x1f2)];}get[_0x167b34(0x1dd)](){const _0xd73922=_0x167b34;return _0x421603[_0xd73922(0x1dd)];}get[_0x167b34(0x1ee)](){const _0x4e0170=_0x167b34;return _0x421603[_0x4e0170(0x1ee)];}}_0x31a3f8[_0x167b34(0x1d6)](d);class M extends _0x463fa7{[_0x167b34(0x1d4)](_0x48a0a2){const _0x218a1b=_0x167b34;this[_0x218a1b(0x1d3)](_0x48a0a2);}[_0x167b34(0x1d3)](_0x19a224){const _0x411ad6=_0x167b34,_0x241d95=_0x19a224[_0x411ad6(0x1e1)](_0x40f393);this['registerEventHandler'](this[_0x411ad6(0x1f3)]['McpConnectionStatusChanged'],()=>_0x571923(_0x241d95[_0x411ad6(0x1db)][_0x411ad6(0x1de)](_0xc47884=>{const _0x473d2e=_0x411ad6;_0xc47884[_0x473d2e(0x1ed)]===_0x421603[_0x473d2e(0x1f4)]&&this[_0x473d2e(0x1f0)](this[_0x473d2e(0x1f3)][_0x473d2e(0x1f4)],_0xc47884['data']);}))),this['registerEventHandler'](this['Event'][_0x411ad6(0x1f2)],()=>_0x571923(_0x241d95['event$'][_0x411ad6(0x1de)](_0x47babd=>{const _0x8924f5=_0x411ad6;_0x47babd[_0x8924f5(0x1ed)]===_0x421603[_0x8924f5(0x1f2)]&&this['fireEvent'](this['Event'][_0x8924f5(0x1f2)],_0x47babd[_0x8924f5(0x1e5)]);}))),this[_0x411ad6(0x1eb)](this['Event']['McpToolCallExecuted'],()=>_0x571923(_0x241d95[_0x411ad6(0x1db)][_0x411ad6(0x1de)](_0x43b526=>{const _0x4b02b9=_0x411ad6;_0x43b526[_0x4b02b9(0x1ed)]===_0x421603[_0x4b02b9(0x1dd)]&&this[_0x4b02b9(0x1f0)](this[_0x4b02b9(0x1f3)][_0x4b02b9(0x1dd)],_0x43b526['data']);}))),this[_0x411ad6(0x1eb)](this[_0x411ad6(0x1f3)][_0x411ad6(0x1ee)],()=>_0x571923(_0x241d95[_0x411ad6(0x1db)][_0x411ad6(0x1de)](_0x4e0792=>{const _0x3c9c57=_0x411ad6;_0x4e0792['type']===_0x421603[_0x3c9c57(0x1ee)]&&this[_0x3c9c57(0x1f0)](this[_0x3c9c57(0x1f3)][_0x3c9c57(0x1ee)],_0x4e0792['data']);})));}['validateMCPToolCall'](_0x2323cc,_0xe789a1){const _0x14ce7a=_0x167b34;return this['_injector'][_0x14ce7a(0x1e1)](_0x4d69b9)[_0x14ce7a(0x1e7)](_0x2323cc,_0xe789a1);}[_0x167b34(0x1da)](){const _0x4192a0=_0x167b34;return this[_0x4192a0(0x1dc)][_0x4192a0(0x1e1)](_0x4d69b9)[_0x4192a0(0x1d9)]();}[_0x167b34(0x1e8)](_0x5ecbe9,_0x4e8a68){const _0x28f1a2=_0x167b34;return this[_0x28f1a2(0x1dc)]['get'](_0x4d69b9)[_0x28f1a2(0x1e9)](_0x5ecbe9,_0x4e8a68);}[_0x167b34(0x1d0)](){const _0x1b8fb0=_0x167b34;return this[_0x1b8fb0(0x1dc)][_0x1b8fb0(0x1e1)](_0x216b4c)[_0x1b8fb0(0x1df)]();}[_0x167b34(0x1d7)](){const _0x20c3ae=_0x167b34;this[_0x20c3ae(0x1dc)][_0x20c3ae(0x1e1)](_0x216b4c)[_0x20c3ae(0x1f1)]();}[_0x167b34(0x1e0)](){const _0x2f8b37=_0x167b34;this['_injector'][_0x2f8b37(0x1e1)](_0x216b4c)[_0x2f8b37(0x1ec)]();}}_0x463fa7[_0x167b34(0x1d6)](M);