@univerjs-pro/mcp 0.14.0 → 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/es/facade.js CHANGED
@@ -1 +1 @@
1
- function _0x19cf(_0x59b185,_0x3e24d3){_0x59b185=_0x59b185-0x1ba;const _0x214211=_0x2142();let _0x19cf9f=_0x214211[_0x59b185];return _0x19cf9f;}const _0x291164=_0x19cf;(function(_0x47b322,_0x5b13d7){const _0x1aa244=_0x19cf,_0x4f586e=_0x47b322();while(!![]){try{const _0x2af162=-parseInt(_0x1aa244(0x1ba))/0x1*(parseInt(_0x1aa244(0x1c6))/0x2)+parseInt(_0x1aa244(0x1cc))/0x3*(parseInt(_0x1aa244(0x1d4))/0x4)+-parseInt(_0x1aa244(0x1c2))/0x5*(parseInt(_0x1aa244(0x1ce))/0x6)+parseInt(_0x1aa244(0x1bd))/0x7*(parseInt(_0x1aa244(0x1c4))/0x8)+-parseInt(_0x1aa244(0x1c3))/0x9+parseInt(_0x1aa244(0x1c9))/0xa+-parseInt(_0x1aa244(0x1cf))/0xb;if(_0x2af162===_0x5b13d7)break;else _0x4f586e['push'](_0x4f586e['shift']());}catch(_0x1bdba9){_0x4f586e['push'](_0x4f586e['shift']());}}}(_0x2142,0xf3a8a));import{MCPEventId as _0x12e99d,MCPEventService as _0x158152,IMCPToolRegistry as _0x277ada,MCPConnectionController as _0x3b7ec0}from'@univerjs-pro/mcp';import{FEventName as _0x5367ca,FUniver as _0x33bbb5}from'@univerjs/core/facade';import{toDisposable as _0x25b98b}from'@univerjs/core';function _0x2142(){const _0x12315c=['1rLXVAf','McpToolCallReceived','data','728QGyoKO','fireEvent','getConnectionStatus','disconnect','McpToolCallExecuted','5246575sNPseu','11758842ULmXnO','41896NlrhQU','subscribe','1799158LzWfGO','event$','getAllTools','18945130UPQRhV','type','_injector','801jGvfbW','get','6unzNTg','269852FrowAR','extend','connect','_initialize','Event','27548JDXkQW','callMCPTool','_registerMCPFacadeEvents','validateToolCall','registerEventHandler','McpToolCallFailed','McpConnectionStatusChanged'];_0x2142=function(){return _0x12315c;};return _0x2142();}class d{get['McpConnectionStatusChanged'](){const _0xf343d=_0x19cf;return _0x12e99d[_0xf343d(0x1da)];}get['McpToolCallReceived'](){const _0x43ab90=_0x19cf;return _0x12e99d[_0x43ab90(0x1bb)];}get['McpToolCallExecuted'](){const _0x3a09f7=_0x19cf;return _0x12e99d[_0x3a09f7(0x1c1)];}get[_0x291164(0x1d9)](){return _0x12e99d['McpToolCallFailed'];}}_0x5367ca[_0x291164(0x1d0)](d);class M extends _0x33bbb5{[_0x291164(0x1d2)](_0x10b2e5){this['_registerMCPFacadeEvents'](_0x10b2e5);}[_0x291164(0x1d6)](_0xf95886){const _0x56a68e=_0x291164,_0x29d92e=_0xf95886['get'](_0x158152);this[_0x56a68e(0x1d8)](this[_0x56a68e(0x1d3)][_0x56a68e(0x1da)],()=>_0x25b98b(_0x29d92e[_0x56a68e(0x1c7)]['subscribe'](_0x418b56=>{const _0x1b0162=_0x56a68e;_0x418b56[_0x1b0162(0x1ca)]===_0x12e99d[_0x1b0162(0x1da)]&&this[_0x1b0162(0x1be)](this['Event'][_0x1b0162(0x1da)],_0x418b56[_0x1b0162(0x1bc)]);}))),this[_0x56a68e(0x1d8)](this[_0x56a68e(0x1d3)]['McpToolCallReceived'],()=>_0x25b98b(_0x29d92e[_0x56a68e(0x1c7)]['subscribe'](_0x40a9a8=>{const _0x46bcd2=_0x56a68e;_0x40a9a8[_0x46bcd2(0x1ca)]===_0x12e99d['McpToolCallReceived']&&this[_0x46bcd2(0x1be)](this['Event']['McpToolCallReceived'],_0x40a9a8['data']);}))),this[_0x56a68e(0x1d8)](this['Event'][_0x56a68e(0x1c1)],()=>_0x25b98b(_0x29d92e[_0x56a68e(0x1c7)][_0x56a68e(0x1c5)](_0x1720b0=>{const _0x4b4949=_0x56a68e;_0x1720b0['type']===_0x12e99d[_0x4b4949(0x1c1)]&&this[_0x4b4949(0x1be)](this[_0x4b4949(0x1d3)]['McpToolCallExecuted'],_0x1720b0[_0x4b4949(0x1bc)]);}))),this[_0x56a68e(0x1d8)](this[_0x56a68e(0x1d3)][_0x56a68e(0x1d9)],()=>_0x25b98b(_0x29d92e[_0x56a68e(0x1c7)][_0x56a68e(0x1c5)](_0x138890=>{const _0x16c0c7=_0x56a68e;_0x138890[_0x16c0c7(0x1ca)]===_0x12e99d[_0x16c0c7(0x1d9)]&&this['fireEvent'](this['Event']['McpToolCallFailed'],_0x138890['data']);})));}['validateMCPToolCall'](_0x12f3fd,_0x48e09d){const _0x5700e1=_0x291164;return this[_0x5700e1(0x1cb)]['get'](_0x277ada)[_0x5700e1(0x1d7)](_0x12f3fd,_0x48e09d);}['getAllMCPTools'](){const _0x5e0539=_0x291164;return this[_0x5e0539(0x1cb)][_0x5e0539(0x1cd)](_0x277ada)[_0x5e0539(0x1c8)]();}[_0x291164(0x1d5)](_0x42e245,_0x570c41){const _0x307f94=_0x291164;return this[_0x307f94(0x1cb)][_0x307f94(0x1cd)](_0x277ada)['executeTool'](_0x42e245,_0x570c41);}['getMCPConnectionStatus'](){const _0x56e865=_0x291164;return this['_injector'][_0x56e865(0x1cd)](_0x3b7ec0)[_0x56e865(0x1bf)]();}['connectMCP'](){const _0x17576d=_0x291164;this[_0x17576d(0x1cb)][_0x17576d(0x1cd)](_0x3b7ec0)[_0x17576d(0x1d1)]();}['disconnectMCP'](){const _0x468a3d=_0x291164;this[_0x468a3d(0x1cb)]['get'](_0x3b7ec0)[_0x468a3d(0x1c0)]();}}_0x33bbb5[_0x291164(0x1d0)](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);