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

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/cjs/facade.js CHANGED
@@ -1 +1 @@
1
- 'use strict';const _0x4b9bd6=_0x1d5f;(function(_0x567f6b,_0x1cd2fa){const _0x55b318=_0x1d5f,_0x11033b=_0x567f6b();while(!![]){try{const _0x2d95f4=-parseInt(_0x55b318(0xbc))/0x1*(-parseInt(_0x55b318(0xab))/0x2)+parseInt(_0x55b318(0xb6))/0x3*(-parseInt(_0x55b318(0xb0))/0x4)+-parseInt(_0x55b318(0xb4))/0x5+parseInt(_0x55b318(0xa8))/0x6+parseInt(_0x55b318(0xb8))/0x7*(-parseInt(_0x55b318(0xc5))/0x8)+-parseInt(_0x55b318(0xc6))/0x9+parseInt(_0x55b318(0xba))/0xa*(parseInt(_0x55b318(0xbb))/0xb);if(_0x2d95f4===_0x1cd2fa)break;else _0x11033b['push'](_0x11033b['shift']());}catch(_0x197b96){_0x11033b['push'](_0x11033b['shift']());}}}(_0x2a71,0x865fa));const e=require('@univerjs-pro/mcp'),i=require('@univerjs/core/facade'),l=require('@univerjs/core');function _0x1d5f(_0x3dcdca,_0x583366){const _0x2a717d=_0x2a71();return _0x1d5f=function(_0x1d5f00,_0x1df7dc){_0x1d5f00=_0x1d5f00-0x9e;let _0x383e4f=_0x2a717d[_0x1d5f00];return _0x383e4f;},_0x1d5f(_0x3dcdca,_0x583366);}class r{get[_0x4b9bd6(0xc1)](){const _0x2fffc1=_0x4b9bd6;return e['MCPEventId'][_0x2fffc1(0xc1)];}get[_0x4b9bd6(0xbe)](){const _0x29c703=_0x4b9bd6;return e[_0x29c703(0xb7)][_0x29c703(0xbe)];}get[_0x4b9bd6(0xae)](){const _0x411af3=_0x4b9bd6;return e[_0x411af3(0xb7)][_0x411af3(0xae)];}get['McpToolCallFailed'](){const _0x58073a=_0x4b9bd6;return e[_0x58073a(0xb7)]['McpToolCallFailed'];}}i['FEventName'][_0x4b9bd6(0x9e)](r);function _0x2a71(){const _0x32433c=['McpToolCallReceived','event$','data','McpConnectionStatusChanged','connect','get','MCPEventService','40uPSBnc','4342320HvAMMo','_injector','extend','executeTool','Event','getMCPConnectionStatus','IMCPToolRegistry','_initialize','validateMCPToolCall','McpToolCallFailed','subscribe','type','894150wTohRO','disconnectMCP','disconnect','287334RdaGyC','fireEvent','FUniver','McpToolCallExecuted','getAllTools','20948LkXguB','registerEventHandler','_registerMCPFacadeEvents','callMCPTool','3091485qbdxOk','connectMCP','207wgPacn','MCPEventId','627802ugQRhO','MCPConnectionController','26550JYlxUF','5412EnPvCv','7SpxYIj','toDisposable'];_0x2a71=function(){return _0x32433c;};return _0x2a71();}class s extends i[_0x4b9bd6(0xad)]{[_0x4b9bd6(0xa3)](_0x515cf5){const _0x2b5b60=_0x4b9bd6;this[_0x2b5b60(0xb2)](_0x515cf5);}[_0x4b9bd6(0xb2)](_0x3b0366){const _0x37df5e=_0x4b9bd6,_0x4ab20a=_0x3b0366[_0x37df5e(0xc3)](e[_0x37df5e(0xc4)]);this[_0x37df5e(0xb1)](this[_0x37df5e(0xa0)][_0x37df5e(0xc1)],()=>l[_0x37df5e(0xbd)](_0x4ab20a[_0x37df5e(0xbf)][_0x37df5e(0xa6)](_0x22a348=>{const _0x15287a=_0x37df5e;_0x22a348[_0x15287a(0xa7)]===e['MCPEventId'][_0x15287a(0xc1)]&&this['fireEvent'](this['Event'][_0x15287a(0xc1)],_0x22a348[_0x15287a(0xc0)]);}))),this[_0x37df5e(0xb1)](this['Event'][_0x37df5e(0xbe)],()=>l[_0x37df5e(0xbd)](_0x4ab20a[_0x37df5e(0xbf)][_0x37df5e(0xa6)](_0x25a4f9=>{const _0x1f456f=_0x37df5e;_0x25a4f9[_0x1f456f(0xa7)]===e[_0x1f456f(0xb7)]['McpToolCallReceived']&&this[_0x1f456f(0xac)](this[_0x1f456f(0xa0)][_0x1f456f(0xbe)],_0x25a4f9[_0x1f456f(0xc0)]);}))),this[_0x37df5e(0xb1)](this[_0x37df5e(0xa0)][_0x37df5e(0xae)],()=>l['toDisposable'](_0x4ab20a[_0x37df5e(0xbf)][_0x37df5e(0xa6)](_0xe0dff8=>{const _0xcbf46=_0x37df5e;_0xe0dff8[_0xcbf46(0xa7)]===e[_0xcbf46(0xb7)]['McpToolCallExecuted']&&this[_0xcbf46(0xac)](this[_0xcbf46(0xa0)][_0xcbf46(0xae)],_0xe0dff8[_0xcbf46(0xc0)]);}))),this[_0x37df5e(0xb1)](this['Event'][_0x37df5e(0xa5)],()=>l[_0x37df5e(0xbd)](_0x4ab20a[_0x37df5e(0xbf)][_0x37df5e(0xa6)](_0x118083=>{const _0x19ff84=_0x37df5e;_0x118083[_0x19ff84(0xa7)]===e[_0x19ff84(0xb7)]['McpToolCallFailed']&&this['fireEvent'](this[_0x19ff84(0xa0)][_0x19ff84(0xa5)],_0x118083[_0x19ff84(0xc0)]);})));}[_0x4b9bd6(0xa4)](_0x4ab947,_0x101d7d){const _0x4d344f=_0x4b9bd6;return this['_injector'][_0x4d344f(0xc3)](e['IMCPToolRegistry'])['validateToolCall'](_0x4ab947,_0x101d7d);}['getAllMCPTools'](){const _0x17d41c=_0x4b9bd6;return this[_0x17d41c(0xc7)][_0x17d41c(0xc3)](e[_0x17d41c(0xa2)])[_0x17d41c(0xaf)]();}[_0x4b9bd6(0xb3)](_0x21db5f,_0x5d02b7){const _0x34610f=_0x4b9bd6;return this[_0x34610f(0xc7)][_0x34610f(0xc3)](e[_0x34610f(0xa2)])[_0x34610f(0x9f)](_0x21db5f,_0x5d02b7);}[_0x4b9bd6(0xa1)](){const _0x152672=_0x4b9bd6;return this[_0x152672(0xc7)][_0x152672(0xc3)](e[_0x152672(0xb9)])['getConnectionStatus']();}[_0x4b9bd6(0xb5)](){const _0x4fb8b1=_0x4b9bd6;this[_0x4fb8b1(0xc7)][_0x4fb8b1(0xc3)](e[_0x4fb8b1(0xb9)])[_0x4fb8b1(0xc2)]();}[_0x4b9bd6(0xa9)](){const _0x2d6934=_0x4b9bd6;this[_0x2d6934(0xc7)][_0x2d6934(0xc3)](e[_0x2d6934(0xb9)])[_0x2d6934(0xaa)]();}}i[_0x4b9bd6(0xad)][_0x4b9bd6(0x9e)](s);
1
+ 'use strict';const _0x38c187=_0x4af5;(function(_0x4a1ed1,_0x17962e){const _0x5a77c1=_0x4af5,_0x48421e=_0x4a1ed1();while(!![]){try{const _0x4ff7e8=-parseInt(_0x5a77c1(0xc8))/0x1+parseInt(_0x5a77c1(0xab))/0x2*(parseInt(_0x5a77c1(0xc5))/0x3)+-parseInt(_0x5a77c1(0xaa))/0x4+-parseInt(_0x5a77c1(0xc2))/0x5+parseInt(_0x5a77c1(0xbe))/0x6+parseInt(_0x5a77c1(0xc7))/0x7+parseInt(_0x5a77c1(0xb7))/0x8;if(_0x4ff7e8===_0x17962e)break;else _0x48421e['push'](_0x48421e['shift']());}catch(_0xbe8650){_0x48421e['push'](_0x48421e['shift']());}}}(_0x47fd,0xee97f));const e=require('@univerjs-pro/mcp'),i=require('@univerjs/core/facade'),l=require('@univerjs/core');class r{get[_0x38c187(0xcc)](){const _0x5486d1=_0x38c187;return e[_0x5486d1(0xbd)]['McpConnectionStatusChanged'];}get['McpToolCallReceived'](){const _0x3d120f=_0x38c187;return e[_0x3d120f(0xbd)]['McpToolCallReceived'];}get[_0x38c187(0xbb)](){const _0x44d411=_0x38c187;return e[_0x44d411(0xbd)][_0x44d411(0xbb)];}get['McpToolCallFailed'](){const _0x48de67=_0x38c187;return e[_0x48de67(0xbd)][_0x48de67(0xb1)];}}function _0x4af5(_0x519633,_0x459898){_0x519633=_0x519633-0xaa;const _0x47fd9c=_0x47fd();let _0x4af5ab=_0x47fd9c[_0x519633];return _0x4af5ab;}i[_0x38c187(0xc6)][_0x38c187(0xc9)](r);function _0x47fd(){const _0x1d55c8=['McpConnectionStatusChanged','subscribe','registerEventHandler','event$','2095664qFQppb','1404cRgAGq','FUniver','getAllTools','get','getAllMCPTools','validateToolCall','McpToolCallFailed','validateMCPToolCall','MCPEventService','_injector','McpToolCallReceived','_initialize','20686624LjyAiq','getConnectionStatus','fireEvent','data','McpToolCallExecuted','IMCPToolRegistry','MCPEventId','1176522IgSnTg','type','toDisposable','Event','5833980SCgJay','callMCPTool','executeTool','4191BlZMYr','FEventName','2949716UFfVbP','1516006vzwGNj','extend','_registerMCPFacadeEvents','MCPConnectionController'];_0x47fd=function(){return _0x1d55c8;};return _0x47fd();}class s extends i[_0x38c187(0xac)]{[_0x38c187(0xb6)](_0x2c14d2){this['_registerMCPFacadeEvents'](_0x2c14d2);}[_0x38c187(0xca)](_0x44e4c0){const _0x460266=_0x38c187,_0x16f4aa=_0x44e4c0[_0x460266(0xae)](e[_0x460266(0xb3)]);this['registerEventHandler'](this[_0x460266(0xc1)]['McpConnectionStatusChanged'],()=>l[_0x460266(0xc0)](_0x16f4aa[_0x460266(0xcf)][_0x460266(0xcd)](_0x58be84=>{const _0x45108c=_0x460266;_0x58be84[_0x45108c(0xbf)]===e[_0x45108c(0xbd)][_0x45108c(0xcc)]&&this[_0x45108c(0xb9)](this[_0x45108c(0xc1)][_0x45108c(0xcc)],_0x58be84[_0x45108c(0xba)]);}))),this[_0x460266(0xce)](this[_0x460266(0xc1)][_0x460266(0xb5)],()=>l[_0x460266(0xc0)](_0x16f4aa['event$'][_0x460266(0xcd)](_0x55a708=>{const _0x1e6a75=_0x460266;_0x55a708[_0x1e6a75(0xbf)]===e['MCPEventId'][_0x1e6a75(0xb5)]&&this[_0x1e6a75(0xb9)](this[_0x1e6a75(0xc1)][_0x1e6a75(0xb5)],_0x55a708['data']);}))),this[_0x460266(0xce)](this['Event'][_0x460266(0xbb)],()=>l[_0x460266(0xc0)](_0x16f4aa['event$'][_0x460266(0xcd)](_0x19febe=>{const _0x7c6391=_0x460266;_0x19febe[_0x7c6391(0xbf)]===e[_0x7c6391(0xbd)][_0x7c6391(0xbb)]&&this[_0x7c6391(0xb9)](this[_0x7c6391(0xc1)]['McpToolCallExecuted'],_0x19febe['data']);}))),this[_0x460266(0xce)](this['Event'][_0x460266(0xb1)],()=>l['toDisposable'](_0x16f4aa['event$'][_0x460266(0xcd)](_0x7048a3=>{const _0x3f3198=_0x460266;_0x7048a3[_0x3f3198(0xbf)]===e[_0x3f3198(0xbd)]['McpToolCallFailed']&&this[_0x3f3198(0xb9)](this[_0x3f3198(0xc1)][_0x3f3198(0xb1)],_0x7048a3[_0x3f3198(0xba)]);})));}[_0x38c187(0xb2)](_0x414899,_0x56087c){const _0x5460eb=_0x38c187;return this[_0x5460eb(0xb4)]['get'](e[_0x5460eb(0xbc)])[_0x5460eb(0xb0)](_0x414899,_0x56087c);}[_0x38c187(0xaf)](){const _0x3756d3=_0x38c187;return this['_injector'][_0x3756d3(0xae)](e[_0x3756d3(0xbc)])[_0x3756d3(0xad)]();}[_0x38c187(0xc3)](_0x4e64ba,_0x2ce5de){const _0xaf7638=_0x38c187;return this[_0xaf7638(0xb4)][_0xaf7638(0xae)](e[_0xaf7638(0xbc)])[_0xaf7638(0xc4)](_0x4e64ba,_0x2ce5de);}['getMCPConnectionStatus'](){const _0x263e48=_0x38c187;return this[_0x263e48(0xb4)][_0x263e48(0xae)](e[_0x263e48(0xcb)])[_0x263e48(0xb8)]();}['connectMCP'](){const _0x319e7b=_0x38c187;this[_0x319e7b(0xb4)]['get'](e[_0x319e7b(0xcb)])['connect']();}['disconnectMCP'](){const _0x2e9c5e=_0x38c187;this['_injector'][_0x2e9c5e(0xae)](e['MCPConnectionController'])['disconnect']();}}i['FUniver'][_0x38c187(0xc9)](s);