@univerjs-pro/mcp 0.12.4-experimental.20251210-b08bdee → 0.12.4-experimental.20251210-29c379a

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 _0x2399e6=_0x5233;(function(_0x133f0a,_0xab1e7){const _0x43f2f2=_0x5233,_0x1f2fdc=_0x133f0a();while(!![]){try{const _0x31978b=parseInt(_0x43f2f2(0x95))/0x1*(parseInt(_0x43f2f2(0x8c))/0x2)+parseInt(_0x43f2f2(0x87))/0x3*(-parseInt(_0x43f2f2(0xa2))/0x4)+parseInt(_0x43f2f2(0x89))/0x5+parseInt(_0x43f2f2(0x96))/0x6*(-parseInt(_0x43f2f2(0x8f))/0x7)+-parseInt(_0x43f2f2(0xa5))/0x8*(-parseInt(_0x43f2f2(0x82))/0x9)+parseInt(_0x43f2f2(0x9e))/0xa+-parseInt(_0x43f2f2(0x88))/0xb;if(_0x31978b===_0xab1e7)break;else _0x1f2fdc['push'](_0x1f2fdc['shift']());}catch(_0x3b647b){_0x1f2fdc['push'](_0x1f2fdc['shift']());}}}(_0x5b7f,0x1e334));function _0x5b7f(){const _0x3b38f6=['80UHpbeo','data','type','133290LthEKj','_injector','subscribe','extend','_initialize','18087pMMPiv','733546yqiTZG','600055paSXTk','connectMCP','McpToolCallExecuted','45454rLsTZz','event$','McpConnectionStatusChanged','4858WiRHUL','disconnect','registerEventHandler','executeTool','get','connect','9SegPkm','2130egzLSF','validateToolCall','Event','getMCPConnectionStatus','fireEvent','callMCPTool','getConnectionStatus','validateMCPToolCall','1449720ScHCNS','disconnectMCP','getAllTools','McpToolCallReceived','120OVEYwc','McpToolCallFailed','_registerMCPFacadeEvents'];_0x5b7f=function(){return _0x3b38f6;};return _0x5b7f();}import{MCPEventId as _0x160dc3,MCPEventService as _0x4805cc,IMCPToolRegistry as _0x2b4604,MCPConnectionController as _0x426d82}from'@univerjs-pro/mcp';function _0x5233(_0xbb70da,_0x3882cd){_0xbb70da=_0xbb70da-0x82;const _0x5b7f0a=_0x5b7f();let _0x52332c=_0x5b7f0a[_0xbb70da];return _0x52332c;}import{FEventName as _0x271231,FUniver as _0x2c8edf}from'@univerjs/core/facade';import{toDisposable as _0x34a43d}from'@univerjs/core';class d{get[_0x2399e6(0x8e)](){const _0x2524e8=_0x2399e6;return _0x160dc3[_0x2524e8(0x8e)];}get['McpToolCallReceived'](){const _0xbcc211=_0x2399e6;return _0x160dc3[_0xbcc211(0xa1)];}get[_0x2399e6(0x8b)](){const _0x370890=_0x2399e6;return _0x160dc3[_0x370890(0x8b)];}get[_0x2399e6(0xa3)](){const _0x3f8858=_0x2399e6;return _0x160dc3[_0x3f8858(0xa3)];}}_0x271231[_0x2399e6(0x85)](d);class M extends _0x2c8edf{[_0x2399e6(0x86)](_0x37ae96){const _0x1bd652=_0x2399e6;this[_0x1bd652(0xa4)](_0x37ae96);}[_0x2399e6(0xa4)](_0x277c84){const _0x5adfa0=_0x2399e6,_0x3ef4b4=_0x277c84['get'](_0x4805cc);this['registerEventHandler'](this[_0x5adfa0(0x98)]['McpConnectionStatusChanged'],()=>_0x34a43d(_0x3ef4b4['event$']['subscribe'](_0x34f372=>{const _0x4f3c58=_0x5adfa0;_0x34f372[_0x4f3c58(0xa7)]===_0x160dc3[_0x4f3c58(0x8e)]&&this[_0x4f3c58(0x9a)](this[_0x4f3c58(0x98)]['McpConnectionStatusChanged'],_0x34f372[_0x4f3c58(0xa6)]);}))),this[_0x5adfa0(0x91)](this[_0x5adfa0(0x98)]['McpToolCallReceived'],()=>_0x34a43d(_0x3ef4b4[_0x5adfa0(0x8d)]['subscribe'](_0x5d64cb=>{const _0x3752bf=_0x5adfa0;_0x5d64cb[_0x3752bf(0xa7)]===_0x160dc3[_0x3752bf(0xa1)]&&this[_0x3752bf(0x9a)](this[_0x3752bf(0x98)]['McpToolCallReceived'],_0x5d64cb[_0x3752bf(0xa6)]);}))),this[_0x5adfa0(0x91)](this[_0x5adfa0(0x98)][_0x5adfa0(0x8b)],()=>_0x34a43d(_0x3ef4b4[_0x5adfa0(0x8d)][_0x5adfa0(0x84)](_0x51da43=>{const _0x2817e5=_0x5adfa0;_0x51da43[_0x2817e5(0xa7)]===_0x160dc3[_0x2817e5(0x8b)]&&this['fireEvent'](this[_0x2817e5(0x98)][_0x2817e5(0x8b)],_0x51da43['data']);}))),this[_0x5adfa0(0x91)](this['Event'][_0x5adfa0(0xa3)],()=>_0x34a43d(_0x3ef4b4[_0x5adfa0(0x8d)][_0x5adfa0(0x84)](_0x44c8bf=>{const _0x55fa5c=_0x5adfa0;_0x44c8bf[_0x55fa5c(0xa7)]===_0x160dc3[_0x55fa5c(0xa3)]&&this['fireEvent'](this[_0x55fa5c(0x98)]['McpToolCallFailed'],_0x44c8bf[_0x55fa5c(0xa6)]);})));}[_0x2399e6(0x9d)](_0xd86454,_0x36f7c9){const _0x28eab2=_0x2399e6;return this['_injector']['get'](_0x2b4604)[_0x28eab2(0x97)](_0xd86454,_0x36f7c9);}['getAllMCPTools'](){const _0x113d5e=_0x2399e6;return this['_injector'][_0x113d5e(0x93)](_0x2b4604)[_0x113d5e(0xa0)]();}[_0x2399e6(0x9b)](_0x121987,_0x506fea){const _0x3954ae=_0x2399e6;return this[_0x3954ae(0x83)][_0x3954ae(0x93)](_0x2b4604)[_0x3954ae(0x92)](_0x121987,_0x506fea);}[_0x2399e6(0x99)](){const _0x5b8ae9=_0x2399e6;return this['_injector']['get'](_0x426d82)[_0x5b8ae9(0x9c)]();}[_0x2399e6(0x8a)](){const _0x4f2c93=_0x2399e6;this['_injector']['get'](_0x426d82)[_0x4f2c93(0x94)]();}[_0x2399e6(0x9f)](){const _0x2f0fb7=_0x2399e6;this[_0x2f0fb7(0x83)][_0x2f0fb7(0x93)](_0x426d82)[_0x2f0fb7(0x90)]();}}_0x2c8edf[_0x2399e6(0x85)](M);
1
+ const _0xe95a7=_0x49d5;(function(_0x4b5622,_0x23fd86){const _0x4660bb=_0x49d5,_0x6094ab=_0x4b5622();while(!![]){try{const _0x5b904d=parseInt(_0x4660bb(0x95))/0x1*(-parseInt(_0x4660bb(0x99))/0x2)+-parseInt(_0x4660bb(0x8e))/0x3+-parseInt(_0x4660bb(0x97))/0x4+parseInt(_0x4660bb(0x98))/0x5+-parseInt(_0x4660bb(0x7a))/0x6+-parseInt(_0x4660bb(0x7c))/0x7*(-parseInt(_0x4660bb(0x9b))/0x8)+parseInt(_0x4660bb(0x94))/0x9*(parseInt(_0x4660bb(0x85))/0xa);if(_0x5b904d===_0x23fd86)break;else _0x6094ab['push'](_0x6094ab['shift']());}catch(_0x56a4c0){_0x6094ab['push'](_0x6094ab['shift']());}}}(_0x29a9,0x8716c));import{MCPEventId as _0x4d023d,MCPEventService as _0x17efa8,IMCPToolRegistry as _0x1f8bc5,MCPConnectionController as _0x5a00de}from'@univerjs-pro/mcp';import{FEventName as _0x11c98b,FUniver as _0x9490b8}from'@univerjs/core/facade';function _0x29a9(){const _0x2d0c50=['connect','_injector','extend','executeTool','McpToolCallExecuted','170kPGuOm','connectMCP','registerEventHandler','type','data','event$','McpConnectionStatusChanged','getMCPConnectionStatus','getConnectionStatus','283509zifttK','validateToolCall','_initialize','_registerMCPFacadeEvents','McpToolCallFailed','fireEvent','1424349egDjLX','271965EGKUmM','get','2590180kNARth','972265BzSceM','8PMaSZm','McpToolCallReceived','680Psqwgw','6491208AySRRC','Event','47782swFJQz','subscribe','callMCPTool','validateMCPToolCall'];_0x29a9=function(){return _0x2d0c50;};return _0x29a9();}import{toDisposable as _0x379821}from'@univerjs/core';class d{get[_0xe95a7(0x8b)](){const _0x215a37=_0xe95a7;return _0x4d023d[_0x215a37(0x8b)];}get[_0xe95a7(0x9a)](){return _0x4d023d['McpToolCallReceived'];}get[_0xe95a7(0x84)](){const _0x450d00=_0xe95a7;return _0x4d023d[_0x450d00(0x84)];}get[_0xe95a7(0x92)](){const _0x2623a3=_0xe95a7;return _0x4d023d[_0x2623a3(0x92)];}}_0x11c98b[_0xe95a7(0x82)](d);class M extends _0x9490b8{[_0xe95a7(0x90)](_0x30ff5d){const _0x4ab210=_0xe95a7;this[_0x4ab210(0x91)](_0x30ff5d);}['_registerMCPFacadeEvents'](_0x2044ea){const _0x105afb=_0xe95a7,_0x2f57cd=_0x2044ea[_0x105afb(0x96)](_0x17efa8);this[_0x105afb(0x87)](this[_0x105afb(0x7b)][_0x105afb(0x8b)],()=>_0x379821(_0x2f57cd['event$'][_0x105afb(0x7d)](_0x46d080=>{const _0x2500b9=_0x105afb;_0x46d080[_0x2500b9(0x88)]===_0x4d023d[_0x2500b9(0x8b)]&&this['fireEvent'](this[_0x2500b9(0x7b)][_0x2500b9(0x8b)],_0x46d080['data']);}))),this[_0x105afb(0x87)](this['Event'][_0x105afb(0x9a)],()=>_0x379821(_0x2f57cd[_0x105afb(0x8a)]['subscribe'](_0x50f435=>{const _0x2862a4=_0x105afb;_0x50f435['type']===_0x4d023d[_0x2862a4(0x9a)]&&this[_0x2862a4(0x93)](this[_0x2862a4(0x7b)][_0x2862a4(0x9a)],_0x50f435[_0x2862a4(0x89)]);}))),this[_0x105afb(0x87)](this[_0x105afb(0x7b)][_0x105afb(0x84)],()=>_0x379821(_0x2f57cd[_0x105afb(0x8a)][_0x105afb(0x7d)](_0x52c8f1=>{const _0x41dca1=_0x105afb;_0x52c8f1['type']===_0x4d023d[_0x41dca1(0x84)]&&this[_0x41dca1(0x93)](this[_0x41dca1(0x7b)][_0x41dca1(0x84)],_0x52c8f1['data']);}))),this['registerEventHandler'](this['Event'][_0x105afb(0x92)],()=>_0x379821(_0x2f57cd[_0x105afb(0x8a)][_0x105afb(0x7d)](_0x32edc1=>{const _0x2aabed=_0x105afb;_0x32edc1['type']===_0x4d023d[_0x2aabed(0x92)]&&this['fireEvent'](this[_0x2aabed(0x7b)][_0x2aabed(0x92)],_0x32edc1['data']);})));}[_0xe95a7(0x7f)](_0x37b74a,_0x4a57df){const _0x336736=_0xe95a7;return this[_0x336736(0x81)][_0x336736(0x96)](_0x1f8bc5)[_0x336736(0x8f)](_0x37b74a,_0x4a57df);}['getAllMCPTools'](){const _0x1f52bc=_0xe95a7;return this[_0x1f52bc(0x81)][_0x1f52bc(0x96)](_0x1f8bc5)['getAllTools']();}[_0xe95a7(0x7e)](_0x5dbd63,_0x1d89fc){const _0x10a835=_0xe95a7;return this[_0x10a835(0x81)][_0x10a835(0x96)](_0x1f8bc5)[_0x10a835(0x83)](_0x5dbd63,_0x1d89fc);}[_0xe95a7(0x8c)](){const _0x10fe1b=_0xe95a7;return this['_injector']['get'](_0x5a00de)[_0x10fe1b(0x8d)]();}[_0xe95a7(0x86)](){const _0x5e76c7=_0xe95a7;this[_0x5e76c7(0x81)][_0x5e76c7(0x96)](_0x5a00de)[_0x5e76c7(0x80)]();}['disconnectMCP'](){const _0x57eac4=_0xe95a7;this[_0x57eac4(0x81)][_0x57eac4(0x96)](_0x5a00de)['disconnect']();}}function _0x49d5(_0x501001,_0x41559a){_0x501001=_0x501001-0x7a;const _0x29a98a=_0x29a9();let _0x49d57d=_0x29a98a[_0x501001];return _0x49d57d;}_0x9490b8[_0xe95a7(0x82)](M);