@univerjs-pro/mcp 0.12.3-experimental.20251205-e439e48 → 0.12.3-experimental.20251205-8c9a6bf

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 _0x15b8(){const _0x1baa16=['_injector','McpConnectionStatusChanged','6311781KOhpvN','data','subscribe','639955ogjjvZ','46473SwbLGF','validateToolCall','getConnectionStatus','validateMCPToolCall','connectMCP','event$','5985546uXksSh','fireEvent','registerEventHandler','executeTool','Event','_registerMCPFacadeEvents','get','McpToolCallFailed','5240GhUkfe','42xAvQEf','5843488fAPVyn','extend','McpToolCallReceived','type','10177100OighGO','_initialize','40nTggvY','McpToolCallExecuted','getMCPConnectionStatus','disconnectMCP','disconnect','154QqyvEK'];_0x15b8=function(){return _0x1baa16;};return _0x15b8();}const _0x10f4de=_0x22c1;(function(_0x1e8b89,_0x2246fb){const _0x7512f7=_0x22c1,_0x4ff383=_0x1e8b89();while(!![]){try{const _0xaf3bec=-parseInt(_0x7512f7(0xbf))/0x1*(parseInt(_0x7512f7(0xb2))/0x2)+parseInt(_0x7512f7(0xc6))/0x3*(-parseInt(_0x7512f7(0xba))/0x4)+-parseInt(_0x7512f7(0xc5))/0x5*(-parseInt(_0x7512f7(0xb3))/0x6)+-parseInt(_0x7512f7(0xaa))/0x7+-parseInt(_0x7512f7(0xb4))/0x8+parseInt(_0x7512f7(0xc2))/0x9+parseInt(_0x7512f7(0xb8))/0xa;if(_0xaf3bec===_0x2246fb)break;else _0x4ff383['push'](_0x4ff383['shift']());}catch(_0x186ea6){_0x4ff383['push'](_0x4ff383['shift']());}}}(_0x15b8,0x7300c));import{MCPEventId as _0xf2bc6d,MCPEventService as _0x3b91d9,IMCPToolRegistry as _0x4b5cb9,MCPConnectionController as _0x25baaf}from'@univerjs-pro/mcp';import{FEventName as _0x5d03f8,FUniver as _0x103a8d}from'@univerjs/core/facade';import{toDisposable as _0x3f3bcc}from'@univerjs/core';class d{get['McpConnectionStatusChanged'](){const _0x4a83c1=_0x22c1;return _0xf2bc6d[_0x4a83c1(0xc1)];}get['McpToolCallReceived'](){const _0x419b1c=_0x22c1;return _0xf2bc6d[_0x419b1c(0xb6)];}get[_0x10f4de(0xbb)](){const _0x385ecc=_0x10f4de;return _0xf2bc6d[_0x385ecc(0xbb)];}get['McpToolCallFailed'](){const _0x864503=_0x10f4de;return _0xf2bc6d[_0x864503(0xb1)];}}_0x5d03f8[_0x10f4de(0xb5)](d);function _0x22c1(_0x397d1f,_0x589349){_0x397d1f=_0x397d1f-0xa6;const _0x15b82b=_0x15b8();let _0x22c15b=_0x15b82b[_0x397d1f];return _0x22c15b;}class M extends _0x103a8d{[_0x10f4de(0xb9)](_0x3fa9e8){this['_registerMCPFacadeEvents'](_0x3fa9e8);}[_0x10f4de(0xaf)](_0x1ba1eb){const _0x5e6959=_0x10f4de,_0x46f158=_0x1ba1eb[_0x5e6959(0xb0)](_0x3b91d9);this['registerEventHandler'](this['Event']['McpConnectionStatusChanged'],()=>_0x3f3bcc(_0x46f158[_0x5e6959(0xa9)][_0x5e6959(0xc4)](_0x43453c=>{const _0x66b7da=_0x5e6959;_0x43453c[_0x66b7da(0xb7)]===_0xf2bc6d[_0x66b7da(0xc1)]&&this[_0x66b7da(0xab)](this[_0x66b7da(0xae)][_0x66b7da(0xc1)],_0x43453c[_0x66b7da(0xc3)]);}))),this[_0x5e6959(0xac)](this[_0x5e6959(0xae)]['McpToolCallReceived'],()=>_0x3f3bcc(_0x46f158[_0x5e6959(0xa9)][_0x5e6959(0xc4)](_0x2532a4=>{const _0x1ab1bf=_0x5e6959;_0x2532a4[_0x1ab1bf(0xb7)]===_0xf2bc6d[_0x1ab1bf(0xb6)]&&this['fireEvent'](this[_0x1ab1bf(0xae)][_0x1ab1bf(0xb6)],_0x2532a4[_0x1ab1bf(0xc3)]);}))),this[_0x5e6959(0xac)](this[_0x5e6959(0xae)][_0x5e6959(0xbb)],()=>_0x3f3bcc(_0x46f158[_0x5e6959(0xa9)][_0x5e6959(0xc4)](_0x350b6b=>{const _0x9b6c1d=_0x5e6959;_0x350b6b[_0x9b6c1d(0xb7)]===_0xf2bc6d[_0x9b6c1d(0xbb)]&&this[_0x9b6c1d(0xab)](this['Event']['McpToolCallExecuted'],_0x350b6b[_0x9b6c1d(0xc3)]);}))),this[_0x5e6959(0xac)](this[_0x5e6959(0xae)][_0x5e6959(0xb1)],()=>_0x3f3bcc(_0x46f158[_0x5e6959(0xa9)][_0x5e6959(0xc4)](_0x2602e4=>{const _0x1c852f=_0x5e6959;_0x2602e4[_0x1c852f(0xb7)]===_0xf2bc6d[_0x1c852f(0xb1)]&&this['fireEvent'](this[_0x1c852f(0xae)]['McpToolCallFailed'],_0x2602e4[_0x1c852f(0xc3)]);})));}[_0x10f4de(0xa7)](_0x8c1061,_0x3cecb6){const _0x5c4295=_0x10f4de;return this[_0x5c4295(0xc0)][_0x5c4295(0xb0)](_0x4b5cb9)[_0x5c4295(0xc7)](_0x8c1061,_0x3cecb6);}['getAllMCPTools'](){return this['_injector']['get'](_0x4b5cb9)['getAllTools']();}['callMCPTool'](_0xcff2c9,_0x3d754f){const _0x5e66f9=_0x10f4de;return this[_0x5e66f9(0xc0)][_0x5e66f9(0xb0)](_0x4b5cb9)[_0x5e66f9(0xad)](_0xcff2c9,_0x3d754f);}[_0x10f4de(0xbc)](){const _0x37b185=_0x10f4de;return this[_0x37b185(0xc0)][_0x37b185(0xb0)](_0x25baaf)[_0x37b185(0xa6)]();}[_0x10f4de(0xa8)](){const _0x376e42=_0x10f4de;this[_0x376e42(0xc0)][_0x376e42(0xb0)](_0x25baaf)['connect']();}[_0x10f4de(0xbd)](){const _0x40c61d=_0x10f4de;this[_0x40c61d(0xc0)][_0x40c61d(0xb0)](_0x25baaf)[_0x40c61d(0xbe)]();}}_0x103a8d[_0x10f4de(0xb5)](M);
1
+ function _0x9fe3(_0x2f925c,_0x2c5c55){_0x2f925c=_0x2f925c-0x1a1;const _0x56da9=_0x56da();let _0x9fe318=_0x56da9[_0x2f925c];return _0x9fe318;}const _0xd5380f=_0x9fe3;(function(_0x46fa19,_0x47abfb){const _0x8b5053=_0x9fe3,_0x3b800a=_0x46fa19();while(!![]){try{const _0x4a7491=parseInt(_0x8b5053(0x1b9))/0x1*(-parseInt(_0x8b5053(0x1bd))/0x2)+parseInt(_0x8b5053(0x1ae))/0x3+-parseInt(_0x8b5053(0x1b3))/0x4*(-parseInt(_0x8b5053(0x1a1))/0x5)+-parseInt(_0x8b5053(0x1a4))/0x6*(-parseInt(_0x8b5053(0x1b2))/0x7)+-parseInt(_0x8b5053(0x1bb))/0x8+parseInt(_0x8b5053(0x1a9))/0x9+parseInt(_0x8b5053(0x1af))/0xa;if(_0x4a7491===_0x47abfb)break;else _0x3b800a['push'](_0x3b800a['shift']());}catch(_0xbc1d53){_0x3b800a['push'](_0x3b800a['shift']());}}}(_0x56da,0x29697));function _0x56da(){const _0x18305f=['data','event$','McpConnectionStatusChanged','1307592JksOCB','get','_registerMCPFacadeEvents','extend','validateMCPToolCall','455607SHPiwL','1124900VbakoE','_injector','connectMCP','109501IrQiUS','601184gkPPHR','McpToolCallFailed','McpToolCallReceived','fireEvent','executeTool','getConnectionStatus','132463YRaYSO','getAllTools','2630024uZYUdh','Event','4JcShlw','disconnectMCP','_initialize','McpToolCallExecuted','5USPszg','disconnect','subscribe','78PWZLCa','registerEventHandler'];_0x56da=function(){return _0x18305f;};return _0x56da();}import{MCPEventId as _0x4dc01e,MCPEventService as _0x3f273a,IMCPToolRegistry as _0x16e30d,MCPConnectionController as _0x2d36cd}from'@univerjs-pro/mcp';import{FEventName as _0x515f18,FUniver as _0x411935}from'@univerjs/core/facade';import{toDisposable as _0x3dd532}from'@univerjs/core';class d{get['McpConnectionStatusChanged'](){const _0x4294c3=_0x9fe3;return _0x4dc01e[_0x4294c3(0x1a8)];}get[_0xd5380f(0x1b5)](){const _0x10d584=_0xd5380f;return _0x4dc01e[_0x10d584(0x1b5)];}get[_0xd5380f(0x1c0)](){const _0x490bd4=_0xd5380f;return _0x4dc01e[_0x490bd4(0x1c0)];}get['McpToolCallFailed'](){const _0x151e20=_0xd5380f;return _0x4dc01e[_0x151e20(0x1b4)];}}_0x515f18[_0xd5380f(0x1ac)](d);class M extends _0x411935{[_0xd5380f(0x1bf)](_0xe0d175){const _0x9d97e5=_0xd5380f;this[_0x9d97e5(0x1ab)](_0xe0d175);}['_registerMCPFacadeEvents'](_0x307700){const _0x1b4879=_0xd5380f,_0x1aa55a=_0x307700[_0x1b4879(0x1aa)](_0x3f273a);this[_0x1b4879(0x1a5)](this[_0x1b4879(0x1bc)][_0x1b4879(0x1a8)],()=>_0x3dd532(_0x1aa55a[_0x1b4879(0x1a7)][_0x1b4879(0x1a3)](_0x2a819d=>{const _0x390e6c=_0x1b4879;_0x2a819d['type']===_0x4dc01e[_0x390e6c(0x1a8)]&&this[_0x390e6c(0x1b6)](this[_0x390e6c(0x1bc)][_0x390e6c(0x1a8)],_0x2a819d[_0x390e6c(0x1a6)]);}))),this[_0x1b4879(0x1a5)](this[_0x1b4879(0x1bc)][_0x1b4879(0x1b5)],()=>_0x3dd532(_0x1aa55a[_0x1b4879(0x1a7)][_0x1b4879(0x1a3)](_0xaead60=>{const _0x552dee=_0x1b4879;_0xaead60['type']===_0x4dc01e['McpToolCallReceived']&&this[_0x552dee(0x1b6)](this[_0x552dee(0x1bc)][_0x552dee(0x1b5)],_0xaead60[_0x552dee(0x1a6)]);}))),this[_0x1b4879(0x1a5)](this[_0x1b4879(0x1bc)][_0x1b4879(0x1c0)],()=>_0x3dd532(_0x1aa55a[_0x1b4879(0x1a7)]['subscribe'](_0x1086a7=>{const _0x16d7d6=_0x1b4879;_0x1086a7['type']===_0x4dc01e[_0x16d7d6(0x1c0)]&&this[_0x16d7d6(0x1b6)](this['Event'][_0x16d7d6(0x1c0)],_0x1086a7['data']);}))),this[_0x1b4879(0x1a5)](this[_0x1b4879(0x1bc)]['McpToolCallFailed'],()=>_0x3dd532(_0x1aa55a[_0x1b4879(0x1a7)]['subscribe'](_0x4c4118=>{const _0x5e6902=_0x1b4879;_0x4c4118['type']===_0x4dc01e[_0x5e6902(0x1b4)]&&this['fireEvent'](this[_0x5e6902(0x1bc)][_0x5e6902(0x1b4)],_0x4c4118[_0x5e6902(0x1a6)]);})));}[_0xd5380f(0x1ad)](_0x182174,_0x35b253){const _0x4ad52c=_0xd5380f;return this['_injector'][_0x4ad52c(0x1aa)](_0x16e30d)['validateToolCall'](_0x182174,_0x35b253);}['getAllMCPTools'](){const _0x368c3f=_0xd5380f;return this['_injector']['get'](_0x16e30d)[_0x368c3f(0x1ba)]();}['callMCPTool'](_0x39c18e,_0x2531f5){const _0x3b333e=_0xd5380f;return this['_injector'][_0x3b333e(0x1aa)](_0x16e30d)[_0x3b333e(0x1b7)](_0x39c18e,_0x2531f5);}['getMCPConnectionStatus'](){const _0x1509d0=_0xd5380f;return this[_0x1509d0(0x1b0)]['get'](_0x2d36cd)[_0x1509d0(0x1b8)]();}[_0xd5380f(0x1b1)](){const _0x17aaa2=_0xd5380f;this['_injector'][_0x17aaa2(0x1aa)](_0x2d36cd)['connect']();}[_0xd5380f(0x1be)](){const _0x2394e0=_0xd5380f;this[_0x2394e0(0x1b0)][_0x2394e0(0x1aa)](_0x2d36cd)[_0x2394e0(0x1a2)]();}}_0x411935['extend'](M);