@univerjs-pro/mcp 0.12.3-experimental.20251205-e439e48 → 0.12.3-experimental.20251205-71d07c3

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 _0x2fce(_0x2919f5,_0x51189a){_0x2919f5=_0x2919f5-0x10c;const _0x271bf3=_0x271b();let _0x2fcedf=_0x271bf3[_0x2919f5];return _0x2fcedf;}const _0x40dec0=_0x2fce;(function(_0x5075ae,_0x3e55d5){const _0x8eea77=_0x2fce,_0x4bf402=_0x5075ae();while(!![]){try{const _0x1cefea=parseInt(_0x8eea77(0x124))/0x1+parseInt(_0x8eea77(0x10f))/0x2+parseInt(_0x8eea77(0x128))/0x3+parseInt(_0x8eea77(0x11e))/0x4*(parseInt(_0x8eea77(0x12d))/0x5)+parseInt(_0x8eea77(0x115))/0x6*(parseInt(_0x8eea77(0x123))/0x7)+-parseInt(_0x8eea77(0x11c))/0x8+-parseInt(_0x8eea77(0x116))/0x9*(parseInt(_0x8eea77(0x120))/0xa);if(_0x1cefea===_0x3e55d5)break;else _0x4bf402['push'](_0x4bf402['shift']());}catch(_0x42aeac){_0x4bf402['push'](_0x4bf402['shift']());}}}(_0x271b,0xc8675));import{MCPEventId as _0x2a48d8,MCPEventService as _0x310700,IMCPToolRegistry as _0x4cf70b,MCPConnectionController as _0x5b5432}from'@univerjs-pro/mcp';import{FEventName as _0x5a8e59,FUniver as _0x3b814a}from'@univerjs/core/facade';import{toDisposable as _0x428189}from'@univerjs/core';class d{get[_0x40dec0(0x10e)](){const _0x410d7b=_0x40dec0;return _0x2a48d8[_0x410d7b(0x10e)];}get['McpToolCallReceived'](){return _0x2a48d8['McpToolCallReceived'];}get[_0x40dec0(0x11f)](){const _0x2d864c=_0x40dec0;return _0x2a48d8[_0x2d864c(0x11f)];}get[_0x40dec0(0x12e)](){const _0x15af1c=_0x40dec0;return _0x2a48d8[_0x15af1c(0x12e)];}}function _0x271b(){const _0x119881=['6HAHdro','12375567nWagKw','type','getConnectionStatus','_registerMCPFacadeEvents','data','subscribe','12267104eiRbyt','validateToolCall','24HzInEi','McpToolCallExecuted','10gKBkSE','disconnectMCP','executeTool','1090607WAZhvC','385642vCZEtv','registerEventHandler','connectMCP','McpToolCallReceived','3586278WQatVs','getAllMCPTools','Event','_initialize','get','1116830bYSljk','McpToolCallFailed','callMCPTool','extend','disconnect','McpConnectionStatusChanged','1304478BTOaGV','connect','fireEvent','_injector','validateMCPToolCall','event$'];_0x271b=function(){return _0x119881;};return _0x271b();}_0x5a8e59[_0x40dec0(0x10c)](d);class M extends _0x3b814a{[_0x40dec0(0x12b)](_0xeefff7){const _0x4fcb1c=_0x40dec0;this[_0x4fcb1c(0x119)](_0xeefff7);}[_0x40dec0(0x119)](_0x116ca1){const _0x576d5b=_0x40dec0,_0x375277=_0x116ca1[_0x576d5b(0x12c)](_0x310700);this[_0x576d5b(0x125)](this[_0x576d5b(0x12a)][_0x576d5b(0x10e)],()=>_0x428189(_0x375277[_0x576d5b(0x114)][_0x576d5b(0x11b)](_0x542b73=>{const _0xd9844c=_0x576d5b;_0x542b73[_0xd9844c(0x117)]===_0x2a48d8['McpConnectionStatusChanged']&&this[_0xd9844c(0x111)](this[_0xd9844c(0x12a)][_0xd9844c(0x10e)],_0x542b73[_0xd9844c(0x11a)]);}))),this['registerEventHandler'](this[_0x576d5b(0x12a)]['McpToolCallReceived'],()=>_0x428189(_0x375277[_0x576d5b(0x114)]['subscribe'](_0x4e8622=>{const _0x3b07c6=_0x576d5b;_0x4e8622[_0x3b07c6(0x117)]===_0x2a48d8[_0x3b07c6(0x127)]&&this[_0x3b07c6(0x111)](this[_0x3b07c6(0x12a)][_0x3b07c6(0x127)],_0x4e8622[_0x3b07c6(0x11a)]);}))),this[_0x576d5b(0x125)](this[_0x576d5b(0x12a)]['McpToolCallExecuted'],()=>_0x428189(_0x375277[_0x576d5b(0x114)][_0x576d5b(0x11b)](_0x5bf0b6=>{const _0x51408b=_0x576d5b;_0x5bf0b6[_0x51408b(0x117)]===_0x2a48d8['McpToolCallExecuted']&&this[_0x51408b(0x111)](this[_0x51408b(0x12a)][_0x51408b(0x11f)],_0x5bf0b6[_0x51408b(0x11a)]);}))),this[_0x576d5b(0x125)](this['Event'][_0x576d5b(0x12e)],()=>_0x428189(_0x375277[_0x576d5b(0x114)]['subscribe'](_0x1cf687=>{const _0x4b5615=_0x576d5b;_0x1cf687['type']===_0x2a48d8[_0x4b5615(0x12e)]&&this[_0x4b5615(0x111)](this['Event']['McpToolCallFailed'],_0x1cf687['data']);})));}[_0x40dec0(0x113)](_0x347106,_0x468f10){const _0x2bcb09=_0x40dec0;return this[_0x2bcb09(0x112)]['get'](_0x4cf70b)[_0x2bcb09(0x11d)](_0x347106,_0x468f10);}[_0x40dec0(0x129)](){const _0x46ad16=_0x40dec0;return this[_0x46ad16(0x112)][_0x46ad16(0x12c)](_0x4cf70b)['getAllTools']();}[_0x40dec0(0x12f)](_0x19d755,_0x1fedb3){const _0x5b2771=_0x40dec0;return this['_injector']['get'](_0x4cf70b)[_0x5b2771(0x122)](_0x19d755,_0x1fedb3);}['getMCPConnectionStatus'](){const _0x2ab0d1=_0x40dec0;return this[_0x2ab0d1(0x112)][_0x2ab0d1(0x12c)](_0x5b5432)[_0x2ab0d1(0x118)]();}[_0x40dec0(0x126)](){const _0x1a1ccb=_0x40dec0;this['_injector'][_0x1a1ccb(0x12c)](_0x5b5432)[_0x1a1ccb(0x110)]();}[_0x40dec0(0x121)](){const _0x154f74=_0x40dec0;this[_0x154f74(0x112)][_0x154f74(0x12c)](_0x5b5432)[_0x154f74(0x10d)]();}}_0x3b814a[_0x40dec0(0x10c)](M);