@univerjs-pro/mcp 0.12.2 → 0.12.3-experimental.20251204-1549a8e

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 _0x112294=_0x24ff;function _0x5e84(){const _0x3fc57b=['data','1930750NTWvEF','event$','registerEventHandler','61015XNIVxW','16dIXzHa','McpConnectionStatusChanged','type','subscribe','getConnectionStatus','_registerMCPFacadeEvents','fireEvent','McpToolCallFailed','99smdWRq','8HlIVbi','McpToolCallExecuted','30462YZCeQq','McpToolCallReceived','extend','getMCPConnectionStatus','2257155etsBAM','callMCPTool','executeTool','_initialize','431304WxTDWq','get','Event','connect','getAllMCPTools','_injector','2283996GwkHFj','2253153UYyKXv','disconnectMCP'];_0x5e84=function(){return _0x3fc57b;};return _0x5e84();}(function(_0x33a9b3,_0x373a20){const _0x1a73e9=_0x24ff,_0x2f02f2=_0x33a9b3();while(!![]){try{const _0x20941c=-parseInt(_0x1a73e9(0xd6))/0x1+-parseInt(_0x1a73e9(0xc1))/0x2+-parseInt(_0x1a73e9(0xc9))/0x3*(parseInt(_0x1a73e9(0xd7))/0x4)+-parseInt(_0x1a73e9(0xc5))/0x5+-parseInt(_0x1a73e9(0xcf))/0x6+parseInt(_0x1a73e9(0xd0))/0x7*(-parseInt(_0x1a73e9(0xe0))/0x8)+parseInt(_0x1a73e9(0xdf))/0x9*(parseInt(_0x1a73e9(0xd3))/0xa);if(_0x20941c===_0x373a20)break;else _0x2f02f2['push'](_0x2f02f2['shift']());}catch(_0x55613e){_0x2f02f2['push'](_0x2f02f2['shift']());}}}(_0x5e84,0x4dc43));import{MCPEventId as _0x4df28c,MCPEventService as _0x2a9fae,IMCPToolRegistry as _0x135a0b,MCPConnectionController as _0x4a2ca9}from'@univerjs-pro/mcp';import{FEventName as _0x17dc42,FUniver as _0x41b191}from'@univerjs/core/facade';import{toDisposable as _0x34e319}from'@univerjs/core';function _0x24ff(_0x531c9f,_0x4603e6){const _0x5e84e7=_0x5e84();return _0x24ff=function(_0x24ff69,_0x2aea50){_0x24ff69=_0x24ff69-0xc0;let _0x3883da=_0x5e84e7[_0x24ff69];return _0x3883da;},_0x24ff(_0x531c9f,_0x4603e6);}class d{get['McpConnectionStatusChanged'](){const _0x42d9f5=_0x24ff;return _0x4df28c[_0x42d9f5(0xd8)];}get[_0x112294(0xc2)](){const _0x28d728=_0x112294;return _0x4df28c[_0x28d728(0xc2)];}get['McpToolCallExecuted'](){return _0x4df28c['McpToolCallExecuted'];}get['McpToolCallFailed'](){const _0x1aea0c=_0x112294;return _0x4df28c[_0x1aea0c(0xde)];}}_0x17dc42['extend'](d);class M extends _0x41b191{[_0x112294(0xc8)](_0x38ef07){const _0x12b712=_0x112294;this[_0x12b712(0xdc)](_0x38ef07);}['_registerMCPFacadeEvents'](_0xad1998){const _0x546cc3=_0x112294,_0x1d82db=_0xad1998[_0x546cc3(0xca)](_0x2a9fae);this[_0x546cc3(0xd5)](this[_0x546cc3(0xcb)][_0x546cc3(0xd8)],()=>_0x34e319(_0x1d82db[_0x546cc3(0xd4)][_0x546cc3(0xda)](_0x4bee60=>{const _0x4a9c69=_0x546cc3;_0x4bee60[_0x4a9c69(0xd9)]===_0x4df28c['McpConnectionStatusChanged']&&this[_0x4a9c69(0xdd)](this[_0x4a9c69(0xcb)][_0x4a9c69(0xd8)],_0x4bee60['data']);}))),this[_0x546cc3(0xd5)](this['Event'][_0x546cc3(0xc2)],()=>_0x34e319(_0x1d82db[_0x546cc3(0xd4)][_0x546cc3(0xda)](_0xac7aa9=>{const _0x46e6fd=_0x546cc3;_0xac7aa9[_0x46e6fd(0xd9)]===_0x4df28c[_0x46e6fd(0xc2)]&&this[_0x46e6fd(0xdd)](this[_0x46e6fd(0xcb)][_0x46e6fd(0xc2)],_0xac7aa9['data']);}))),this[_0x546cc3(0xd5)](this['Event'][_0x546cc3(0xc0)],()=>_0x34e319(_0x1d82db['event$']['subscribe'](_0x4b2a9e=>{const _0x1dfe80=_0x546cc3;_0x4b2a9e[_0x1dfe80(0xd9)]===_0x4df28c[_0x1dfe80(0xc0)]&&this[_0x1dfe80(0xdd)](this['Event'][_0x1dfe80(0xc0)],_0x4b2a9e[_0x1dfe80(0xd2)]);}))),this[_0x546cc3(0xd5)](this[_0x546cc3(0xcb)][_0x546cc3(0xde)],()=>_0x34e319(_0x1d82db['event$'][_0x546cc3(0xda)](_0x32e886=>{const _0x1c4465=_0x546cc3;_0x32e886[_0x1c4465(0xd9)]===_0x4df28c[_0x1c4465(0xde)]&&this['fireEvent'](this[_0x1c4465(0xcb)][_0x1c4465(0xde)],_0x32e886['data']);})));}['validateMCPToolCall'](_0x219e02,_0x30475a){const _0xee3f50=_0x112294;return this[_0xee3f50(0xce)][_0xee3f50(0xca)](_0x135a0b)['validateToolCall'](_0x219e02,_0x30475a);}[_0x112294(0xcd)](){const _0x3d8d68=_0x112294;return this[_0x3d8d68(0xce)][_0x3d8d68(0xca)](_0x135a0b)['getAllTools']();}[_0x112294(0xc6)](_0x43f6e6,_0x59bd68){const _0x250f30=_0x112294;return this[_0x250f30(0xce)][_0x250f30(0xca)](_0x135a0b)[_0x250f30(0xc7)](_0x43f6e6,_0x59bd68);}[_0x112294(0xc4)](){const _0x199c20=_0x112294;return this['_injector'][_0x199c20(0xca)](_0x4a2ca9)[_0x199c20(0xdb)]();}['connectMCP'](){const _0x3be4c2=_0x112294;this[_0x3be4c2(0xce)][_0x3be4c2(0xca)](_0x4a2ca9)[_0x3be4c2(0xcc)]();}[_0x112294(0xd1)](){const _0x4a8ad6=_0x112294;this[_0x4a8ad6(0xce)]['get'](_0x4a2ca9)['disconnect']();}}_0x41b191[_0x112294(0xc3)](M);
1
+ const _0x23fdb7=_0xbbde;(function(_0x197b9b,_0x7fd5b5){const _0x9a04ff=_0xbbde,_0x569ff5=_0x197b9b();while(!![]){try{const _0x502437=-parseInt(_0x9a04ff(0x121))/0x1+-parseInt(_0x9a04ff(0x127))/0x2*(parseInt(_0x9a04ff(0x11b))/0x3)+parseInt(_0x9a04ff(0x13d))/0x4*(-parseInt(_0x9a04ff(0x129))/0x5)+-parseInt(_0x9a04ff(0x13e))/0x6*(-parseInt(_0x9a04ff(0x126))/0x7)+parseInt(_0x9a04ff(0x12b))/0x8*(-parseInt(_0x9a04ff(0x125))/0x9)+-parseInt(_0x9a04ff(0x11d))/0xa+parseInt(_0x9a04ff(0x138))/0xb*(parseInt(_0x9a04ff(0x12f))/0xc);if(_0x502437===_0x7fd5b5)break;else _0x569ff5['push'](_0x569ff5['shift']());}catch(_0x47b98b){_0x569ff5['push'](_0x569ff5['shift']());}}}(_0x315b,0xe49ce));import{MCPEventId as _0x48ba99,MCPEventService as _0x359c4b,IMCPToolRegistry as _0x14d45a,MCPConnectionController as _0x21f0f4}from'@univerjs-pro/mcp';function _0xbbde(_0x469dc8,_0x87023e){_0x469dc8=_0x469dc8-0x119;const _0x315b61=_0x315b();let _0xbbde25=_0x315b61[_0x469dc8];return _0xbbde25;}import{FEventName as _0x550c9b,FUniver as _0x3002ac}from'@univerjs/core/facade';function _0x315b(){const _0x5bfaf7=['disconnect','44275TnQHIE','validateToolCall','callMCPTool','getAllTools','27POiJuh','12213670YMFgmC','1128588StZTjA','getConnectionStatus','5ytUNZG','registerEventHandler','4219800gKzMgI','get','_initialize','disconnectMCP','48EdgTuu','executeTool','McpToolCallExecuted','connect','_injector','getMCPConnectionStatus','extend','_registerMCPFacadeEvents','Event','8217176VxYyxJ','McpConnectionStatusChanged','getAllMCPTools','validateMCPToolCall','event$','3718460oBOnup','6aHcJna','subscribe','type','fireEvent','6NcznoM','data','1115730KoelKm','McpToolCallFailed','McpToolCallReceived'];_0x315b=function(){return _0x5bfaf7;};return _0x315b();}import{toDisposable as _0xae5d85}from'@univerjs/core';class d{get['McpConnectionStatusChanged'](){const _0x21eb05=_0xbbde;return _0x48ba99[_0x21eb05(0x139)];}get[_0x23fdb7(0x11f)](){const _0x36b1b2=_0x23fdb7;return _0x48ba99[_0x36b1b2(0x11f)];}get[_0x23fdb7(0x131)](){const _0x25e200=_0x23fdb7;return _0x48ba99[_0x25e200(0x131)];}get[_0x23fdb7(0x11e)](){const _0x5be9c0=_0x23fdb7;return _0x48ba99[_0x5be9c0(0x11e)];}}_0x550c9b[_0x23fdb7(0x135)](d);class M extends _0x3002ac{[_0x23fdb7(0x12d)](_0x3f26ef){const _0x473ead=_0x23fdb7;this[_0x473ead(0x136)](_0x3f26ef);}[_0x23fdb7(0x136)](_0x3ceeed){const _0x4cbd50=_0x23fdb7,_0x2bb8da=_0x3ceeed['get'](_0x359c4b);this[_0x4cbd50(0x12a)](this['Event']['McpConnectionStatusChanged'],()=>_0xae5d85(_0x2bb8da[_0x4cbd50(0x13c)][_0x4cbd50(0x13f)](_0x47a8ed=>{const _0x2699cc=_0x4cbd50;_0x47a8ed[_0x2699cc(0x119)]===_0x48ba99['McpConnectionStatusChanged']&&this[_0x2699cc(0x11a)](this[_0x2699cc(0x137)]['McpConnectionStatusChanged'],_0x47a8ed['data']);}))),this['registerEventHandler'](this[_0x4cbd50(0x137)][_0x4cbd50(0x11f)],()=>_0xae5d85(_0x2bb8da[_0x4cbd50(0x13c)]['subscribe'](_0x5a3afd=>{const _0x12412a=_0x4cbd50;_0x5a3afd['type']===_0x48ba99['McpToolCallReceived']&&this[_0x12412a(0x11a)](this['Event']['McpToolCallReceived'],_0x5a3afd[_0x12412a(0x11c)]);}))),this[_0x4cbd50(0x12a)](this[_0x4cbd50(0x137)][_0x4cbd50(0x131)],()=>_0xae5d85(_0x2bb8da[_0x4cbd50(0x13c)][_0x4cbd50(0x13f)](_0x342df4=>{const _0x44e7e0=_0x4cbd50;_0x342df4[_0x44e7e0(0x119)]===_0x48ba99[_0x44e7e0(0x131)]&&this[_0x44e7e0(0x11a)](this[_0x44e7e0(0x137)]['McpToolCallExecuted'],_0x342df4[_0x44e7e0(0x11c)]);}))),this[_0x4cbd50(0x12a)](this['Event']['McpToolCallFailed'],()=>_0xae5d85(_0x2bb8da[_0x4cbd50(0x13c)][_0x4cbd50(0x13f)](_0x721c90=>{const _0x34c7f9=_0x4cbd50;_0x721c90['type']===_0x48ba99[_0x34c7f9(0x11e)]&&this[_0x34c7f9(0x11a)](this[_0x34c7f9(0x137)][_0x34c7f9(0x11e)],_0x721c90[_0x34c7f9(0x11c)]);})));}[_0x23fdb7(0x13b)](_0x417090,_0x5eca90){const _0x3bbe9c=_0x23fdb7;return this[_0x3bbe9c(0x133)][_0x3bbe9c(0x12c)](_0x14d45a)[_0x3bbe9c(0x122)](_0x417090,_0x5eca90);}[_0x23fdb7(0x13a)](){const _0x25b914=_0x23fdb7;return this[_0x25b914(0x133)][_0x25b914(0x12c)](_0x14d45a)[_0x25b914(0x124)]();}[_0x23fdb7(0x123)](_0x352b66,_0x5aca7b){const _0x4fbf03=_0x23fdb7;return this['_injector'][_0x4fbf03(0x12c)](_0x14d45a)[_0x4fbf03(0x130)](_0x352b66,_0x5aca7b);}[_0x23fdb7(0x134)](){const _0x1016bd=_0x23fdb7;return this['_injector']['get'](_0x21f0f4)[_0x1016bd(0x128)]();}['connectMCP'](){const _0xcff9c7=_0x23fdb7;this[_0xcff9c7(0x133)][_0xcff9c7(0x12c)](_0x21f0f4)[_0xcff9c7(0x132)]();}[_0x23fdb7(0x12e)](){const _0x175b38=_0x23fdb7;this[_0x175b38(0x133)]['get'](_0x21f0f4)[_0x175b38(0x120)]();}}_0x3002ac[_0x23fdb7(0x135)](M);