@univerjs-pro/mcp 0.15.0 → 0.15.1-insiders.20260117-8ce4a01

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 _0x5800e9=_0x3e03;(function(_0xb3b692,_0xd6187e){const _0x56098d=_0x3e03,_0x5585de=_0xb3b692();while(!![]){try{const _0x455c85=parseInt(_0x56098d(0x1f2))/0x1+parseInt(_0x56098d(0x1e7))/0x2*(-parseInt(_0x56098d(0x1ee))/0x3)+parseInt(_0x56098d(0x1e4))/0x4+-parseInt(_0x56098d(0x1d7))/0x5*(-parseInt(_0x56098d(0x1df))/0x6)+-parseInt(_0x56098d(0x1ec))/0x7+parseInt(_0x56098d(0x1d4))/0x8*(parseInt(_0x56098d(0x1dc))/0x9)+-parseInt(_0x56098d(0x1e6))/0xa;if(_0x455c85===_0xd6187e)break;else _0x5585de['push'](_0x5585de['shift']());}catch(_0x3beef2){_0x5585de['push'](_0x5585de['shift']());}}}(_0x1ddb,0x9164b));function _0x3e03(_0x1fb6fa,_0x12cf69){_0x1fb6fa=_0x1fb6fa-0x1d3;const _0x1ddb80=_0x1ddb();let _0x3e0325=_0x1ddb80[_0x1fb6fa];return _0x3e0325;}import{MCPEventId as _0x4283c4,MCPEventService as _0x215c1a,IMCPToolRegistry as _0x18eab5,MCPConnectionController as _0x1678c8}from'@univerjs-pro/mcp';import{FEventName as _0x4b3470,FUniver as _0x433b82}from'@univerjs/core/facade';import{toDisposable as _0x5abed3}from'@univerjs/core';class d{get[_0x5800e9(0x1dd)](){return _0x4283c4['McpConnectionStatusChanged'];}get[_0x5800e9(0x1ed)](){return _0x4283c4['McpToolCallReceived'];}get[_0x5800e9(0x1da)](){const _0x2c5fb8=_0x5800e9;return _0x4283c4[_0x2c5fb8(0x1da)];}get[_0x5800e9(0x1de)](){const _0x1fdfb3=_0x5800e9;return _0x4283c4[_0x1fdfb3(0x1de)];}}function _0x1ddb(){const _0x4a2169=['2418168nWNPGl','_injector','executeTool','7555JcPCTr','_registerMCPFacadeEvents','getAllTools','McpToolCallExecuted','validateToolCall','27KMoNRK','McpConnectionStatusChanged','McpToolCallFailed','2892SihDVo','Event','connectMCP','event$','_initialize','3719160oXyYkI','data','10975280hwjKHc','38YXvXfh','type','disconnectMCP','registerEventHandler','getMCPConnectionStatus','3126753sBBYdu','McpToolCallReceived','171141pJiOyG','extend','disconnect','get','658726jysTaI','fireEvent','connect','subscribe','getAllMCPTools','getConnectionStatus'];_0x1ddb=function(){return _0x4a2169;};return _0x1ddb();}_0x4b3470['extend'](d);class M extends _0x433b82{[_0x5800e9(0x1e3)](_0x233877){const _0x2a95b7=_0x5800e9;this[_0x2a95b7(0x1d8)](_0x233877);}['_registerMCPFacadeEvents'](_0x3330a7){const _0x78acc9=_0x5800e9,_0x2050fe=_0x3330a7[_0x78acc9(0x1f1)](_0x215c1a);this[_0x78acc9(0x1ea)](this['Event'][_0x78acc9(0x1dd)],()=>_0x5abed3(_0x2050fe[_0x78acc9(0x1e2)][_0x78acc9(0x1f5)](_0x292535=>{const _0x30b9e7=_0x78acc9;_0x292535[_0x30b9e7(0x1e8)]===_0x4283c4[_0x30b9e7(0x1dd)]&&this[_0x30b9e7(0x1f3)](this[_0x30b9e7(0x1e0)][_0x30b9e7(0x1dd)],_0x292535[_0x30b9e7(0x1e5)]);}))),this[_0x78acc9(0x1ea)](this[_0x78acc9(0x1e0)]['McpToolCallReceived'],()=>_0x5abed3(_0x2050fe[_0x78acc9(0x1e2)][_0x78acc9(0x1f5)](_0x4b7109=>{const _0x4dbf47=_0x78acc9;_0x4b7109[_0x4dbf47(0x1e8)]===_0x4283c4[_0x4dbf47(0x1ed)]&&this[_0x4dbf47(0x1f3)](this[_0x4dbf47(0x1e0)][_0x4dbf47(0x1ed)],_0x4b7109[_0x4dbf47(0x1e5)]);}))),this[_0x78acc9(0x1ea)](this[_0x78acc9(0x1e0)][_0x78acc9(0x1da)],()=>_0x5abed3(_0x2050fe['event$'][_0x78acc9(0x1f5)](_0x91834=>{const _0x338306=_0x78acc9;_0x91834['type']===_0x4283c4[_0x338306(0x1da)]&&this['fireEvent'](this['Event'][_0x338306(0x1da)],_0x91834[_0x338306(0x1e5)]);}))),this['registerEventHandler'](this[_0x78acc9(0x1e0)][_0x78acc9(0x1de)],()=>_0x5abed3(_0x2050fe[_0x78acc9(0x1e2)][_0x78acc9(0x1f5)](_0x4649b8=>{const _0x408ecb=_0x78acc9;_0x4649b8['type']===_0x4283c4[_0x408ecb(0x1de)]&&this[_0x408ecb(0x1f3)](this[_0x408ecb(0x1e0)][_0x408ecb(0x1de)],_0x4649b8[_0x408ecb(0x1e5)]);})));}['validateMCPToolCall'](_0x9c5d96,_0x23e57c){const _0x1b1075=_0x5800e9;return this[_0x1b1075(0x1d5)][_0x1b1075(0x1f1)](_0x18eab5)[_0x1b1075(0x1db)](_0x9c5d96,_0x23e57c);}[_0x5800e9(0x1f6)](){const _0x41415c=_0x5800e9;return this[_0x41415c(0x1d5)]['get'](_0x18eab5)[_0x41415c(0x1d9)]();}['callMCPTool'](_0x2f2658,_0x3a12){const _0x1e95f7=_0x5800e9;return this['_injector'][_0x1e95f7(0x1f1)](_0x18eab5)[_0x1e95f7(0x1d6)](_0x2f2658,_0x3a12);}[_0x5800e9(0x1eb)](){const _0x4828e7=_0x5800e9;return this[_0x4828e7(0x1d5)][_0x4828e7(0x1f1)](_0x1678c8)[_0x4828e7(0x1d3)]();}[_0x5800e9(0x1e1)](){const _0x4f1b20=_0x5800e9;this[_0x4f1b20(0x1d5)][_0x4f1b20(0x1f1)](_0x1678c8)[_0x4f1b20(0x1f4)]();}[_0x5800e9(0x1e9)](){const _0x1d11a2=_0x5800e9;this[_0x1d11a2(0x1d5)][_0x1d11a2(0x1f1)](_0x1678c8)[_0x1d11a2(0x1f0)]();}}_0x433b82[_0x5800e9(0x1ef)](M);
1
+ const _0x561c1a=_0x36bb;(function(_0x223892,_0x124b43){const _0x573566=_0x36bb,_0x185add=_0x223892();while(!![]){try{const _0x2cc72a=parseInt(_0x573566(0x148))/0x1*(parseInt(_0x573566(0x15e))/0x2)+-parseInt(_0x573566(0x159))/0x3*(parseInt(_0x573566(0x144))/0x4)+parseInt(_0x573566(0x145))/0x5+parseInt(_0x573566(0x14f))/0x6+-parseInt(_0x573566(0x15b))/0x7+parseInt(_0x573566(0x149))/0x8*(parseInt(_0x573566(0x14e))/0x9)+-parseInt(_0x573566(0x146))/0xa;if(_0x2cc72a===_0x124b43)break;else _0x185add['push'](_0x185add['shift']());}catch(_0x31bef0){_0x185add['push'](_0x185add['shift']());}}}(_0x540e,0x44213));import{MCPEventId as _0x1f58fc,MCPEventService as _0x4bfdd9,IMCPToolRegistry as _0x2c086c,MCPConnectionController as _0x4b9d5e}from'@univerjs-pro/mcp';function _0x540e(){const _0x30e03d=['event$','fireEvent','McpToolCallExecuted','extend','disconnectMCP','288654JkrWSQ','data','3583734zmxOgL','validateMCPToolCall','_injector','2fomdRj','subscribe','McpConnectionStatusChanged','McpToolCallFailed','Event','connect','executeTool','_registerMCPFacadeEvents','20kxXoiv','2636820yBBkPt','3352920VTmknG','registerEventHandler','371251PbeDLy','2462864YbkYvt','McpToolCallReceived','getConnectionStatus','getAllMCPTools','type','9oaUXEW','2405580xBFWIT','validateToolCall','callMCPTool','getAllTools','get'];_0x540e=function(){return _0x30e03d;};return _0x540e();}import{FEventName as _0x588d45,FUniver as _0x28df5f}from'@univerjs/core/facade';import{toDisposable as _0x2001cf}from'@univerjs/core';function _0x36bb(_0x2a8465,_0xef5dc4){_0x2a8465=_0x2a8465-0x13f;const _0x540e6e=_0x540e();let _0x36bb1a=_0x540e6e[_0x2a8465];return _0x36bb1a;}class d{get[_0x561c1a(0x160)](){const _0x4833dd=_0x561c1a;return _0x1f58fc[_0x4833dd(0x160)];}get[_0x561c1a(0x14a)](){const _0x3e7a4d=_0x561c1a;return _0x1f58fc[_0x3e7a4d(0x14a)];}get[_0x561c1a(0x156)](){return _0x1f58fc['McpToolCallExecuted'];}get['McpToolCallFailed'](){return _0x1f58fc['McpToolCallFailed'];}}_0x588d45[_0x561c1a(0x157)](d);class M extends _0x28df5f{['_initialize'](_0x395c47){const _0xaaf02b=_0x561c1a;this[_0xaaf02b(0x143)](_0x395c47);}[_0x561c1a(0x143)](_0x443255){const _0x598910=_0x561c1a,_0x286ebd=_0x443255[_0x598910(0x153)](_0x4bfdd9);this[_0x598910(0x147)](this[_0x598910(0x140)]['McpConnectionStatusChanged'],()=>_0x2001cf(_0x286ebd[_0x598910(0x154)]['subscribe'](_0x5487cf=>{const _0x1e8bf0=_0x598910;_0x5487cf[_0x1e8bf0(0x14d)]===_0x1f58fc[_0x1e8bf0(0x160)]&&this[_0x1e8bf0(0x155)](this['Event'][_0x1e8bf0(0x160)],_0x5487cf[_0x1e8bf0(0x15a)]);}))),this['registerEventHandler'](this[_0x598910(0x140)][_0x598910(0x14a)],()=>_0x2001cf(_0x286ebd['event$'][_0x598910(0x15f)](_0x4dc21d=>{const _0xd55937=_0x598910;_0x4dc21d['type']===_0x1f58fc[_0xd55937(0x14a)]&&this['fireEvent'](this[_0xd55937(0x140)][_0xd55937(0x14a)],_0x4dc21d[_0xd55937(0x15a)]);}))),this[_0x598910(0x147)](this[_0x598910(0x140)][_0x598910(0x156)],()=>_0x2001cf(_0x286ebd[_0x598910(0x154)][_0x598910(0x15f)](_0x1fab3d=>{const _0x1e768f=_0x598910;_0x1fab3d[_0x1e768f(0x14d)]===_0x1f58fc['McpToolCallExecuted']&&this['fireEvent'](this['Event'][_0x1e768f(0x156)],_0x1fab3d[_0x1e768f(0x15a)]);}))),this['registerEventHandler'](this[_0x598910(0x140)][_0x598910(0x13f)],()=>_0x2001cf(_0x286ebd[_0x598910(0x154)][_0x598910(0x15f)](_0x1a536d=>{const _0x3b2a89=_0x598910;_0x1a536d[_0x3b2a89(0x14d)]===_0x1f58fc[_0x3b2a89(0x13f)]&&this[_0x3b2a89(0x155)](this[_0x3b2a89(0x140)][_0x3b2a89(0x13f)],_0x1a536d['data']);})));}[_0x561c1a(0x15c)](_0x51852a,_0x38b08b){const _0xe94755=_0x561c1a;return this[_0xe94755(0x15d)][_0xe94755(0x153)](_0x2c086c)[_0xe94755(0x150)](_0x51852a,_0x38b08b);}[_0x561c1a(0x14c)](){const _0x4d444d=_0x561c1a;return this[_0x4d444d(0x15d)][_0x4d444d(0x153)](_0x2c086c)[_0x4d444d(0x152)]();}[_0x561c1a(0x151)](_0x1bea69,_0x428454){const _0x41e034=_0x561c1a;return this['_injector'][_0x41e034(0x153)](_0x2c086c)[_0x41e034(0x142)](_0x1bea69,_0x428454);}['getMCPConnectionStatus'](){const _0xc2d33d=_0x561c1a;return this[_0xc2d33d(0x15d)]['get'](_0x4b9d5e)[_0xc2d33d(0x14b)]();}['connectMCP'](){const _0x1c171e=_0x561c1a;this[_0x1c171e(0x15d)][_0x1c171e(0x153)](_0x4b9d5e)[_0x1c171e(0x141)]();}[_0x561c1a(0x158)](){this['_injector']['get'](_0x4b9d5e)['disconnect']();}}_0x28df5f[_0x561c1a(0x157)](M);