@univerjs-pro/mcp 0.12.2 → 0.12.3

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 _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 _0x1fe127=_0x4cf7;(function(_0x1b37a7,_0x36a734){const _0x3dfc4b=_0x4cf7,_0x4028b7=_0x1b37a7();while(!![]){try{const _0x28426b=-parseInt(_0x3dfc4b(0x146))/0x1+-parseInt(_0x3dfc4b(0x138))/0x2*(-parseInt(_0x3dfc4b(0x142))/0x3)+parseInt(_0x3dfc4b(0x13e))/0x4+-parseInt(_0x3dfc4b(0x148))/0x5+parseInt(_0x3dfc4b(0x153))/0x6+parseInt(_0x3dfc4b(0x152))/0x7+-parseInt(_0x3dfc4b(0x13c))/0x8*(-parseInt(_0x3dfc4b(0x156))/0x9);if(_0x28426b===_0x36a734)break;else _0x4028b7['push'](_0x4028b7['shift']());}catch(_0x5a8352){_0x4028b7['push'](_0x4028b7['shift']());}}}(_0x2f76,0x2babb));function _0x2f76(){const _0x21fc2b=['9chfJdD','disconnect','event$','getAllTools','executeTool','2DztiSj','type','McpToolCallFailed','fireEvent','95224IFGVJE','connect','813200yFcMZk','_injector','getConnectionStatus','connectMCP','565932eSCSQn','validateToolCall','McpToolCallReceived','getAllMCPTools','264714ITXOVC','get','478925fqVcEA','_initialize','subscribe','callMCPTool','data','Event','getMCPConnectionStatus','McpConnectionStatusChanged','registerEventHandler','_registerMCPFacadeEvents','61558iWJmum','760398GwqqRc','extend','McpToolCallExecuted'];_0x2f76=function(){return _0x21fc2b;};return _0x2f76();}import{MCPEventId as _0x3bc679,MCPEventService as _0x2fbc66,IMCPToolRegistry as _0x29022e,MCPConnectionController as _0x1c2bd8}from'@univerjs-pro/mcp';function _0x4cf7(_0x5b3403,_0x59c357){const _0x2f766a=_0x2f76();return _0x4cf7=function(_0x4cf784,_0x514d32){_0x4cf784=_0x4cf784-0x134;let _0x5e6326=_0x2f766a[_0x4cf784];return _0x5e6326;},_0x4cf7(_0x5b3403,_0x59c357);}import{FEventName as _0x7de525,FUniver as _0x244512}from'@univerjs/core/facade';import{toDisposable as _0x55df3b}from'@univerjs/core';class d{get[_0x1fe127(0x14f)](){const _0x1bc193=_0x1fe127;return _0x3bc679[_0x1bc193(0x14f)];}get[_0x1fe127(0x144)](){const _0x3db256=_0x1fe127;return _0x3bc679[_0x3db256(0x144)];}get[_0x1fe127(0x155)](){const _0x4e20f1=_0x1fe127;return _0x3bc679[_0x4e20f1(0x155)];}get[_0x1fe127(0x13a)](){return _0x3bc679['McpToolCallFailed'];}}_0x7de525['extend'](d);class M extends _0x244512{[_0x1fe127(0x149)](_0x263aba){const _0x5a7a52=_0x1fe127;this[_0x5a7a52(0x151)](_0x263aba);}['_registerMCPFacadeEvents'](_0x270c22){const _0x4d3144=_0x1fe127,_0x4eb920=_0x270c22[_0x4d3144(0x147)](_0x2fbc66);this[_0x4d3144(0x150)](this[_0x4d3144(0x14d)]['McpConnectionStatusChanged'],()=>_0x55df3b(_0x4eb920[_0x4d3144(0x135)][_0x4d3144(0x14a)](_0x4e9346=>{const _0xc04e07=_0x4d3144;_0x4e9346[_0xc04e07(0x139)]===_0x3bc679[_0xc04e07(0x14f)]&&this[_0xc04e07(0x13b)](this[_0xc04e07(0x14d)][_0xc04e07(0x14f)],_0x4e9346[_0xc04e07(0x14c)]);}))),this['registerEventHandler'](this[_0x4d3144(0x14d)]['McpToolCallReceived'],()=>_0x55df3b(_0x4eb920[_0x4d3144(0x135)][_0x4d3144(0x14a)](_0x28ecb2=>{const _0x3df3b3=_0x4d3144;_0x28ecb2['type']===_0x3bc679['McpToolCallReceived']&&this[_0x3df3b3(0x13b)](this[_0x3df3b3(0x14d)][_0x3df3b3(0x144)],_0x28ecb2[_0x3df3b3(0x14c)]);}))),this[_0x4d3144(0x150)](this['Event'][_0x4d3144(0x155)],()=>_0x55df3b(_0x4eb920[_0x4d3144(0x135)]['subscribe'](_0x1420c4=>{const _0x4907a5=_0x4d3144;_0x1420c4[_0x4907a5(0x139)]===_0x3bc679['McpToolCallExecuted']&&this[_0x4907a5(0x13b)](this['Event'][_0x4907a5(0x155)],_0x1420c4[_0x4907a5(0x14c)]);}))),this[_0x4d3144(0x150)](this[_0x4d3144(0x14d)]['McpToolCallFailed'],()=>_0x55df3b(_0x4eb920[_0x4d3144(0x135)]['subscribe'](_0x4c15cf=>{const _0x45f90b=_0x4d3144;_0x4c15cf[_0x45f90b(0x139)]===_0x3bc679[_0x45f90b(0x13a)]&&this['fireEvent'](this['Event']['McpToolCallFailed'],_0x4c15cf[_0x45f90b(0x14c)]);})));}['validateMCPToolCall'](_0x3a7e2e,_0x5504f1){const _0x6f2bf=_0x1fe127;return this[_0x6f2bf(0x13f)][_0x6f2bf(0x147)](_0x29022e)[_0x6f2bf(0x143)](_0x3a7e2e,_0x5504f1);}[_0x1fe127(0x145)](){const _0x496eb1=_0x1fe127;return this[_0x496eb1(0x13f)][_0x496eb1(0x147)](_0x29022e)[_0x496eb1(0x136)]();}[_0x1fe127(0x14b)](_0x509164,_0xf07ff4){const _0x42985a=_0x1fe127;return this[_0x42985a(0x13f)]['get'](_0x29022e)[_0x42985a(0x137)](_0x509164,_0xf07ff4);}[_0x1fe127(0x14e)](){const _0x5f0132=_0x1fe127;return this['_injector'][_0x5f0132(0x147)](_0x1c2bd8)[_0x5f0132(0x140)]();}[_0x1fe127(0x141)](){const _0x244100=_0x1fe127;this[_0x244100(0x13f)]['get'](_0x1c2bd8)[_0x244100(0x13d)]();}['disconnectMCP'](){const _0x216edb=_0x1fe127;this[_0x216edb(0x13f)][_0x216edb(0x147)](_0x1c2bd8)[_0x216edb(0x134)]();}}_0x244512[_0x1fe127(0x154)](M);