@univerjs-pro/mcp 0.12.4-experimental.20251208-c4b8a44 → 0.12.4-experimental.20251210-b08bdee

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 _0x575305=_0x19e2;(function(_0x2e4125,_0x1d29b9){const _0x1c57d6=_0x19e2,_0x31122e=_0x2e4125();while(!![]){try{const _0x24fe48=-parseInt(_0x1c57d6(0xee))/0x1*(parseInt(_0x1c57d6(0xe4))/0x2)+-parseInt(_0x1c57d6(0xe5))/0x3+parseInt(_0x1c57d6(0xeb))/0x4+parseInt(_0x1c57d6(0xf0))/0x5+parseInt(_0x1c57d6(0xe6))/0x6+-parseInt(_0x1c57d6(0xf5))/0x7+-parseInt(_0x1c57d6(0xfb))/0x8;if(_0x24fe48===_0x1d29b9)break;else _0x31122e['push'](_0x31122e['shift']());}catch(_0x15482b){_0x31122e['push'](_0x31122e['shift']());}}}(_0x7724,0xc2749));function _0x7724(){const _0x46e075=['193814CAzysN','3492396OXEEwD','6044406DeHNLx','getMCPConnectionStatus','registerEventHandler','_injector','extend','5128500aXAwaK','data','getAllMCPTools','6RGWFTl','Event','6384540qjlgDR','type','get','McpToolCallReceived','McpToolCallExecuted','3668861adEMaD','disconnect','McpToolCallFailed','event$','fireEvent','validateToolCall','4001984TjpuCT','_initialize','validateMCPToolCall','McpConnectionStatusChanged','_registerMCPFacadeEvents','callMCPTool','connect','executeTool','subscribe'];_0x7724=function(){return _0x46e075;};return _0x7724();}import{MCPEventId as _0x48cdab,MCPEventService as _0x57b0b7,IMCPToolRegistry as _0x576535,MCPConnectionController as _0x4a58e9}from'@univerjs-pro/mcp';import{FEventName as _0x2873e5,FUniver as _0x455956}from'@univerjs/core/facade';import{toDisposable as _0x30b378}from'@univerjs/core';function _0x19e2(_0x237231,_0x12d5ac){_0x237231=_0x237231-0xe1;const _0x77240=_0x7724();let _0x19e287=_0x77240[_0x237231];return _0x19e287;}class d{get[_0x575305(0xfe)](){const _0x15e75d=_0x575305;return _0x48cdab[_0x15e75d(0xfe)];}get[_0x575305(0xf3)](){return _0x48cdab['McpToolCallReceived'];}get[_0x575305(0xf4)](){const _0x5de93f=_0x575305;return _0x48cdab[_0x5de93f(0xf4)];}get[_0x575305(0xf7)](){const _0xa6c366=_0x575305;return _0x48cdab[_0xa6c366(0xf7)];}}_0x2873e5[_0x575305(0xea)](d);class M extends _0x455956{[_0x575305(0xfc)](_0x524d3b){this['_registerMCPFacadeEvents'](_0x524d3b);}[_0x575305(0xff)](_0x237953){const _0x3815d7=_0x575305,_0x379740=_0x237953[_0x3815d7(0xf2)](_0x57b0b7);this['registerEventHandler'](this[_0x3815d7(0xef)][_0x3815d7(0xfe)],()=>_0x30b378(_0x379740[_0x3815d7(0xf8)]['subscribe'](_0x55e35f=>{const _0x3c4bd5=_0x3815d7;_0x55e35f[_0x3c4bd5(0xf1)]===_0x48cdab['McpConnectionStatusChanged']&&this[_0x3c4bd5(0xf9)](this[_0x3c4bd5(0xef)][_0x3c4bd5(0xfe)],_0x55e35f[_0x3c4bd5(0xec)]);}))),this[_0x3815d7(0xe8)](this[_0x3815d7(0xef)][_0x3815d7(0xf3)],()=>_0x30b378(_0x379740[_0x3815d7(0xf8)][_0x3815d7(0xe3)](_0xa8b94d=>{const _0x3a5879=_0x3815d7;_0xa8b94d[_0x3a5879(0xf1)]===_0x48cdab[_0x3a5879(0xf3)]&&this['fireEvent'](this[_0x3a5879(0xef)]['McpToolCallReceived'],_0xa8b94d['data']);}))),this['registerEventHandler'](this[_0x3815d7(0xef)][_0x3815d7(0xf4)],()=>_0x30b378(_0x379740[_0x3815d7(0xf8)]['subscribe'](_0x149608=>{const _0x3ed0d4=_0x3815d7;_0x149608[_0x3ed0d4(0xf1)]===_0x48cdab[_0x3ed0d4(0xf4)]&&this[_0x3ed0d4(0xf9)](this[_0x3ed0d4(0xef)][_0x3ed0d4(0xf4)],_0x149608[_0x3ed0d4(0xec)]);}))),this[_0x3815d7(0xe8)](this[_0x3815d7(0xef)][_0x3815d7(0xf7)],()=>_0x30b378(_0x379740[_0x3815d7(0xf8)][_0x3815d7(0xe3)](_0x24ae08=>{const _0x463f83=_0x3815d7;_0x24ae08[_0x463f83(0xf1)]===_0x48cdab[_0x463f83(0xf7)]&&this[_0x463f83(0xf9)](this[_0x463f83(0xef)]['McpToolCallFailed'],_0x24ae08[_0x463f83(0xec)]);})));}[_0x575305(0xfd)](_0x5ccb4d,_0x4c1335){const _0x20e112=_0x575305;return this[_0x20e112(0xe9)][_0x20e112(0xf2)](_0x576535)[_0x20e112(0xfa)](_0x5ccb4d,_0x4c1335);}[_0x575305(0xed)](){const _0x3be3a0=_0x575305;return this[_0x3be3a0(0xe9)][_0x3be3a0(0xf2)](_0x576535)['getAllTools']();}[_0x575305(0x100)](_0x3cb721,_0x3f116b){const _0x5ba9e3=_0x575305;return this['_injector'][_0x5ba9e3(0xf2)](_0x576535)[_0x5ba9e3(0xe2)](_0x3cb721,_0x3f116b);}[_0x575305(0xe7)](){const _0x81e261=_0x575305;return this[_0x81e261(0xe9)][_0x81e261(0xf2)](_0x4a58e9)['getConnectionStatus']();}['connectMCP'](){const _0x2deb85=_0x575305;this['_injector']['get'](_0x4a58e9)[_0x2deb85(0xe1)]();}['disconnectMCP'](){const _0x3bc074=_0x575305;this[_0x3bc074(0xe9)]['get'](_0x4a58e9)[_0x3bc074(0xf6)]();}}_0x455956[_0x575305(0xea)](M);
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);