@univerjs-pro/mcp 0.14.0-insiders.20251227-b250a8d → 0.15.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 _0x4052bf=_0x5e72;(function(_0x5e2c34,_0xecc40e){const _0x2b7bf9=_0x5e72,_0x4e8f92=_0x5e2c34();while(!![]){try{const _0x5450d9=-parseInt(_0x2b7bf9(0x187))/0x1+parseInt(_0x2b7bf9(0x19a))/0x2*(-parseInt(_0x2b7bf9(0x1a5))/0x3)+parseInt(_0x2b7bf9(0x1a4))/0x4+-parseInt(_0x2b7bf9(0x196))/0x5*(-parseInt(_0x2b7bf9(0x18a))/0x6)+-parseInt(_0x2b7bf9(0x19f))/0x7*(parseInt(_0x2b7bf9(0x192))/0x8)+parseInt(_0x2b7bf9(0x1a8))/0x9+-parseInt(_0x2b7bf9(0x195))/0xa*(-parseInt(_0x2b7bf9(0x194))/0xb);if(_0x5450d9===_0xecc40e)break;else _0x4e8f92['push'](_0x4e8f92['shift']());}catch(_0x245901){_0x4e8f92['push'](_0x4e8f92['shift']());}}}(_0x2f59,0xef978));function _0x5e72(_0x3b5c5d,_0x1cc875){_0x3b5c5d=_0x3b5c5d-0x185;const _0x2f596f=_0x2f59();let _0x5e7225=_0x2f596f[_0x3b5c5d];return _0x5e7225;}import{MCPEventId as _0x530409,MCPEventService as _0x4a8b63,IMCPToolRegistry as _0x1f87c8,MCPConnectionController as _0x4d283b}from'@univerjs-pro/mcp';import{FEventName as _0x558c42,FUniver as _0x4b12b8}from'@univerjs/core/facade';import{toDisposable as _0xe7bab3}from'@univerjs/core';class d{get['McpConnectionStatusChanged'](){const _0x32a4e8=_0x5e72;return _0x530409[_0x32a4e8(0x18c)];}get[_0x4052bf(0x193)](){const _0x50fc86=_0x4052bf;return _0x530409[_0x50fc86(0x193)];}get[_0x4052bf(0x1a0)](){const _0x165330=_0x4052bf;return _0x530409[_0x165330(0x1a0)];}get[_0x4052bf(0x190)](){const _0x47172e=_0x4052bf;return _0x530409[_0x47172e(0x190)];}}function _0x2f59(){const _0x3e3e7d=['getAllTools','get','6sPCTkz','_registerMCPFacadeEvents','McpConnectionStatusChanged','Event','extend','type','McpToolCallFailed','executeTool','11777384imuFBP','McpToolCallReceived','28665131KXicnW','10lnLLfo','6231790EttljR','registerEventHandler','_injector','connect','2pTmmxK','fireEvent','validateToolCall','data','getConnectionStatus','7cBsutV','McpToolCallExecuted','callMCPTool','event$','disconnectMCP','3872544dSiEGQ','2683047kYohBo','disconnect','connectMCP','2809071kKlazc','getAllMCPTools','subscribe','_initialize','getMCPConnectionStatus','1784644vjZQrq'];_0x2f59=function(){return _0x3e3e7d;};return _0x2f59();}_0x558c42[_0x4052bf(0x18e)](d);class M extends _0x4b12b8{[_0x4052bf(0x185)](_0x455a4c){const _0x552801=_0x4052bf;this[_0x552801(0x18b)](_0x455a4c);}['_registerMCPFacadeEvents'](_0x1ca63e){const _0xa777e2=_0x4052bf,_0x941b32=_0x1ca63e[_0xa777e2(0x189)](_0x4a8b63);this['registerEventHandler'](this['Event'][_0xa777e2(0x18c)],()=>_0xe7bab3(_0x941b32[_0xa777e2(0x1a2)][_0xa777e2(0x1aa)](_0x53c070=>{const _0x724256=_0xa777e2;_0x53c070[_0x724256(0x18f)]===_0x530409['McpConnectionStatusChanged']&&this['fireEvent'](this[_0x724256(0x18d)][_0x724256(0x18c)],_0x53c070[_0x724256(0x19d)]);}))),this[_0xa777e2(0x197)](this[_0xa777e2(0x18d)][_0xa777e2(0x193)],()=>_0xe7bab3(_0x941b32['event$'][_0xa777e2(0x1aa)](_0x30bdfb=>{const _0xfe6a23=_0xa777e2;_0x30bdfb[_0xfe6a23(0x18f)]===_0x530409[_0xfe6a23(0x193)]&&this[_0xfe6a23(0x19b)](this[_0xfe6a23(0x18d)][_0xfe6a23(0x193)],_0x30bdfb[_0xfe6a23(0x19d)]);}))),this['registerEventHandler'](this[_0xa777e2(0x18d)][_0xa777e2(0x1a0)],()=>_0xe7bab3(_0x941b32[_0xa777e2(0x1a2)]['subscribe'](_0x4209a1=>{const _0x50ae02=_0xa777e2;_0x4209a1[_0x50ae02(0x18f)]===_0x530409[_0x50ae02(0x1a0)]&&this[_0x50ae02(0x19b)](this[_0x50ae02(0x18d)]['McpToolCallExecuted'],_0x4209a1[_0x50ae02(0x19d)]);}))),this[_0xa777e2(0x197)](this[_0xa777e2(0x18d)][_0xa777e2(0x190)],()=>_0xe7bab3(_0x941b32['event$'][_0xa777e2(0x1aa)](_0x2784c9=>{const _0x58f94b=_0xa777e2;_0x2784c9[_0x58f94b(0x18f)]===_0x530409[_0x58f94b(0x190)]&&this['fireEvent'](this[_0x58f94b(0x18d)][_0x58f94b(0x190)],_0x2784c9['data']);})));}['validateMCPToolCall'](_0x13c98b,_0x17b9e7){const _0x85331=_0x4052bf;return this[_0x85331(0x198)]['get'](_0x1f87c8)[_0x85331(0x19c)](_0x13c98b,_0x17b9e7);}[_0x4052bf(0x1a9)](){const _0x2bd43c=_0x4052bf;return this[_0x2bd43c(0x198)][_0x2bd43c(0x189)](_0x1f87c8)[_0x2bd43c(0x188)]();}[_0x4052bf(0x1a1)](_0x36f16e,_0x586561){const _0x5d5703=_0x4052bf;return this[_0x5d5703(0x198)][_0x5d5703(0x189)](_0x1f87c8)[_0x5d5703(0x191)](_0x36f16e,_0x586561);}[_0x4052bf(0x186)](){const _0x4532b5=_0x4052bf;return this['_injector'][_0x4532b5(0x189)](_0x4d283b)[_0x4532b5(0x19e)]();}[_0x4052bf(0x1a7)](){const _0x4203ea=_0x4052bf;this[_0x4203ea(0x198)]['get'](_0x4d283b)[_0x4203ea(0x199)]();}[_0x4052bf(0x1a3)](){const _0x5a4527=_0x4052bf;this[_0x5a4527(0x198)][_0x5a4527(0x189)](_0x4d283b)[_0x5a4527(0x1a6)]();}}_0x4b12b8[_0x4052bf(0x18e)](M);
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);