@univerjs-pro/mcp 0.15.0-insiders.20251227-453e4ff → 0.15.0-insiders.20260106-79b11f9

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
- const _0x114039=_0x5f05;(function(_0x2d9dfc,_0x1c9e6a){const _0x4a602d=_0x5f05,_0x59ee8a=_0x2d9dfc();while(!![]){try{const _0x4fb6e9=parseInt(_0x4a602d(0xdd))/0x1+parseInt(_0x4a602d(0xd6))/0x2*(parseInt(_0x4a602d(0xd5))/0x3)+-parseInt(_0x4a602d(0xe3))/0x4+-parseInt(_0x4a602d(0xcd))/0x5*(-parseInt(_0x4a602d(0xcc))/0x6)+-parseInt(_0x4a602d(0xe7))/0x7+parseInt(_0x4a602d(0xcb))/0x8*(-parseInt(_0x4a602d(0xd4))/0x9)+-parseInt(_0x4a602d(0xd8))/0xa*(-parseInt(_0x4a602d(0xd3))/0xb);if(_0x4fb6e9===_0x1c9e6a)break;else _0x59ee8a['push'](_0x59ee8a['shift']());}catch(_0x577ff4){_0x59ee8a['push'](_0x59ee8a['shift']());}}}(_0x4f69,0x2c9df));import{MCPEventId as _0x4047db,MCPEventService as _0xa1996,IMCPToolRegistry as _0x5f30fc,MCPConnectionController as _0x28ab88}from'@univerjs-pro/mcp';import{FEventName as _0x362b81,FUniver as _0x39a4a1}from'@univerjs/core/facade';import{toDisposable as _0x41ef66}from'@univerjs/core';function _0x5f05(_0x321376,_0x303d20){_0x321376=_0x321376-0xca;const _0x4f69e0=_0x4f69();let _0x5f0513=_0x4f69e0[_0x321376];return _0x5f0513;}class d{get[_0x114039(0xe5)](){const _0x2af237=_0x114039;return _0x4047db[_0x2af237(0xe5)];}get[_0x114039(0xeb)](){const _0x2a7307=_0x114039;return _0x4047db[_0x2a7307(0xeb)];}get['McpToolCallExecuted'](){const _0x7bd8c3=_0x114039;return _0x4047db[_0x7bd8c3(0xd2)];}get[_0x114039(0xec)](){return _0x4047db['McpToolCallFailed'];}}_0x362b81[_0x114039(0xe1)](d);class M extends _0x39a4a1{[_0x114039(0xda)](_0x289cda){const _0x32f0a8=_0x114039;this[_0x32f0a8(0xde)](_0x289cda);}[_0x114039(0xde)](_0x4e4fed){const _0x38f145=_0x114039,_0x53e814=_0x4e4fed[_0x38f145(0xe4)](_0xa1996);this[_0x38f145(0xd1)](this['Event'][_0x38f145(0xe5)],()=>_0x41ef66(_0x53e814['event$'][_0x38f145(0xdc)](_0x68491f=>{const _0x1c8fd2=_0x38f145;_0x68491f[_0x1c8fd2(0xe2)]===_0x4047db['McpConnectionStatusChanged']&&this[_0x1c8fd2(0xd9)](this['Event'][_0x1c8fd2(0xe5)],_0x68491f['data']);}))),this['registerEventHandler'](this['Event'][_0x38f145(0xeb)],()=>_0x41ef66(_0x53e814[_0x38f145(0xd7)]['subscribe'](_0x280e98=>{const _0x2d6731=_0x38f145;_0x280e98[_0x2d6731(0xe2)]===_0x4047db[_0x2d6731(0xeb)]&&this[_0x2d6731(0xd9)](this['Event']['McpToolCallReceived'],_0x280e98[_0x2d6731(0xca)]);}))),this['registerEventHandler'](this[_0x38f145(0xce)][_0x38f145(0xd2)],()=>_0x41ef66(_0x53e814[_0x38f145(0xd7)][_0x38f145(0xdc)](_0x42b5d9=>{const _0x384565=_0x38f145;_0x42b5d9[_0x384565(0xe2)]===_0x4047db[_0x384565(0xd2)]&&this[_0x384565(0xd9)](this[_0x384565(0xce)][_0x384565(0xd2)],_0x42b5d9[_0x384565(0xca)]);}))),this[_0x38f145(0xd1)](this['Event'][_0x38f145(0xec)],()=>_0x41ef66(_0x53e814[_0x38f145(0xd7)]['subscribe'](_0x564494=>{const _0x5628ee=_0x38f145;_0x564494['type']===_0x4047db[_0x5628ee(0xec)]&&this[_0x5628ee(0xd9)](this[_0x5628ee(0xce)]['McpToolCallFailed'],_0x564494[_0x5628ee(0xca)]);})));}['validateMCPToolCall'](_0x4c882d,_0x4d94be){const _0x21ed09=_0x114039;return this['_injector'][_0x21ed09(0xe4)](_0x5f30fc)[_0x21ed09(0xe6)](_0x4c882d,_0x4d94be);}[_0x114039(0xcf)](){const _0x1d60e0=_0x114039;return this['_injector'][_0x1d60e0(0xe4)](_0x5f30fc)['getAllTools']();}[_0x114039(0xdf)](_0x58f1ed,_0x24b2dd){const _0x14a812=_0x114039;return this['_injector'][_0x14a812(0xe4)](_0x5f30fc)['executeTool'](_0x58f1ed,_0x24b2dd);}[_0x114039(0xe8)](){const _0x5ebfa9=_0x114039;return this[_0x5ebfa9(0xdb)][_0x5ebfa9(0xe4)](_0x28ab88)[_0x5ebfa9(0xea)]();}['connectMCP'](){const _0x2dc514=_0x114039;this[_0x2dc514(0xdb)][_0x2dc514(0xe4)](_0x28ab88)[_0x2dc514(0xe9)]();}[_0x114039(0xe0)](){const _0x373ef1=_0x114039;this['_injector']['get'](_0x28ab88)[_0x373ef1(0xd0)]();}}_0x39a4a1[_0x114039(0xe1)](M);function _0x4f69(){const _0x399dc6=['20oJmSVU','fireEvent','_initialize','_injector','subscribe','168510pYOpCl','_registerMCPFacadeEvents','callMCPTool','disconnectMCP','extend','type','452172PPHvYO','get','McpConnectionStatusChanged','validateToolCall','1312717IlDHGR','getMCPConnectionStatus','connect','getConnectionStatus','McpToolCallReceived','McpToolCallFailed','data','8UEeaRA','6JLoBGx','161325vyEnBM','Event','getAllMCPTools','disconnect','registerEventHandler','McpToolCallExecuted','1625723TJjrgV','331578wbbRlo','6PmCZTq','23806YRwmLl','event$'];_0x4f69=function(){return _0x399dc6;};return _0x4f69();}
1
+ const _0x4fdb95=_0x5c10;(function(_0x1dfcd1,_0x2250fc){const _0x3f3a6f=_0x5c10,_0x288135=_0x1dfcd1();while(!![]){try{const _0xea03a1=parseInt(_0x3f3a6f(0x10b))/0x1*(-parseInt(_0x3f3a6f(0xf0))/0x2)+parseInt(_0x3f3a6f(0x107))/0x3+-parseInt(_0x3f3a6f(0x104))/0x4+parseInt(_0x3f3a6f(0xef))/0x5*(-parseInt(_0x3f3a6f(0xf1))/0x6)+-parseInt(_0x3f3a6f(0xfc))/0x7*(-parseInt(_0x3f3a6f(0xfd))/0x8)+-parseInt(_0x3f3a6f(0xfe))/0x9*(-parseInt(_0x3f3a6f(0x105))/0xa)+parseInt(_0x3f3a6f(0x10a))/0xb;if(_0xea03a1===_0x2250fc)break;else _0x288135['push'](_0x288135['shift']());}catch(_0xff8936){_0x288135['push'](_0x288135['shift']());}}}(_0x5b20,0x48bc3));import{MCPEventId as _0x560e5b,MCPEventService as _0x221519,IMCPToolRegistry as _0x35c3a7,MCPConnectionController as _0x3925ec}from'@univerjs-pro/mcp';import{FEventName as _0x3419d9,FUniver as _0x449221}from'@univerjs/core/facade';import{toDisposable as _0x60c165}from'@univerjs/core';class d{get['McpConnectionStatusChanged'](){return _0x560e5b['McpConnectionStatusChanged'];}get[_0x4fdb95(0xf9)](){const _0x2f5f7f=_0x4fdb95;return _0x560e5b[_0x2f5f7f(0xf9)];}get[_0x4fdb95(0xf5)](){const _0x510f68=_0x4fdb95;return _0x560e5b[_0x510f68(0xf5)];}get[_0x4fdb95(0x109)](){return _0x560e5b['McpToolCallFailed'];}}_0x3419d9[_0x4fdb95(0x100)](d);class M extends _0x449221{[_0x4fdb95(0xf7)](_0x51ce29){this['_registerMCPFacadeEvents'](_0x51ce29);}['_registerMCPFacadeEvents'](_0x32818c){const _0x14dd5f=_0x4fdb95,_0x3ff3b3=_0x32818c[_0x14dd5f(0xfa)](_0x221519);this[_0x14dd5f(0xf2)](this[_0x14dd5f(0x101)][_0x14dd5f(0xed)],()=>_0x60c165(_0x3ff3b3[_0x14dd5f(0xfb)][_0x14dd5f(0xf6)](_0x43d30f=>{const _0x28cb73=_0x14dd5f;_0x43d30f[_0x28cb73(0xf8)]===_0x560e5b[_0x28cb73(0xed)]&&this[_0x28cb73(0x103)](this[_0x28cb73(0x101)][_0x28cb73(0xed)],_0x43d30f['data']);}))),this[_0x14dd5f(0xf2)](this[_0x14dd5f(0x101)][_0x14dd5f(0xf9)],()=>_0x60c165(_0x3ff3b3[_0x14dd5f(0xfb)][_0x14dd5f(0xf6)](_0x4183d2=>{const _0x5cd972=_0x14dd5f;_0x4183d2[_0x5cd972(0xf8)]===_0x560e5b[_0x5cd972(0xf9)]&&this[_0x5cd972(0x103)](this[_0x5cd972(0x101)][_0x5cd972(0xf9)],_0x4183d2[_0x5cd972(0xf3)]);}))),this[_0x14dd5f(0xf2)](this[_0x14dd5f(0x101)]['McpToolCallExecuted'],()=>_0x60c165(_0x3ff3b3[_0x14dd5f(0xfb)][_0x14dd5f(0xf6)](_0x4fe346=>{const _0x1d5cfe=_0x14dd5f;_0x4fe346[_0x1d5cfe(0xf8)]===_0x560e5b[_0x1d5cfe(0xf5)]&&this[_0x1d5cfe(0x103)](this[_0x1d5cfe(0x101)][_0x1d5cfe(0xf5)],_0x4fe346[_0x1d5cfe(0xf3)]);}))),this[_0x14dd5f(0xf2)](this[_0x14dd5f(0x101)][_0x14dd5f(0x109)],()=>_0x60c165(_0x3ff3b3[_0x14dd5f(0xfb)][_0x14dd5f(0xf6)](_0x5d739a=>{const _0x32e25e=_0x14dd5f;_0x5d739a['type']===_0x560e5b[_0x32e25e(0x109)]&&this[_0x32e25e(0x103)](this[_0x32e25e(0x101)]['McpToolCallFailed'],_0x5d739a[_0x32e25e(0xf3)]);})));}['validateMCPToolCall'](_0x47554d,_0x5b6cde){const _0x1f751c=_0x4fdb95;return this[_0x1f751c(0xf4)]['get'](_0x35c3a7)[_0x1f751c(0x106)](_0x47554d,_0x5b6cde);}[_0x4fdb95(0xec)](){const _0x10c890=_0x4fdb95;return this[_0x10c890(0xf4)]['get'](_0x35c3a7)['getAllTools']();}['callMCPTool'](_0x2d4bd4,_0x3ab9c8){const _0x3b44e0=_0x4fdb95;return this[_0x3b44e0(0xf4)][_0x3b44e0(0xfa)](_0x35c3a7)['executeTool'](_0x2d4bd4,_0x3ab9c8);}[_0x4fdb95(0xee)](){const _0x14fb3d=_0x4fdb95;return this[_0x14fb3d(0xf4)]['get'](_0x3925ec)['getConnectionStatus']();}[_0x4fdb95(0xff)](){const _0x656376=_0x4fdb95;this[_0x656376(0xf4)]['get'](_0x3925ec)['connect']();}[_0x4fdb95(0x102)](){const _0x1793fa=_0x4fdb95;this[_0x1793fa(0xf4)]['get'](_0x3925ec)[_0x1793fa(0x108)]();}}_0x449221[_0x4fdb95(0x100)](M);function _0x5c10(_0x274293,_0x244ca6){_0x274293=_0x274293-0xec;const _0x5b20a4=_0x5b20();let _0x5c10d9=_0x5b20a4[_0x274293];return _0x5c10d9;}function _0x5b20(){const _0x347767=['connectMCP','extend','Event','disconnectMCP','fireEvent','862008ajsIoE','18230mQervm','validateToolCall','16518QDUkVz','disconnect','McpToolCallFailed','6342138VFHZRR','3KmgXxd','getAllMCPTools','McpConnectionStatusChanged','getMCPConnectionStatus','95VrvuRl','174096uypVpz','158034Jdivry','registerEventHandler','data','_injector','McpToolCallExecuted','subscribe','_initialize','type','McpToolCallReceived','get','event$','1001xKUpRJ','11128lBWBbQ','2439EYGCYh'];_0x5b20=function(){return _0x347767;};return _0x5b20();}