@univerjs-pro/mcp 0.12.1 → 0.12.2-experimental.20251129-0fa20cd

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';function _0x1842(_0x5ca790,_0x50fbb2){const _0x5c3896=_0x5c38();return _0x1842=function(_0x18421f,_0x2e4224){_0x18421f=_0x18421f-0x13b;let _0x572fb0=_0x5c3896[_0x18421f];return _0x572fb0;},_0x1842(_0x5ca790,_0x50fbb2);}const _0x5bf1e7=_0x1842;(function(_0x5459bb,_0x2f8ac6){const _0x91839=_0x1842,_0x1afdb9=_0x5459bb();while(!![]){try{const _0x472774=parseInt(_0x91839(0x14f))/0x1+parseInt(_0x91839(0x164))/0x2*(-parseInt(_0x91839(0x147))/0x3)+parseInt(_0x91839(0x162))/0x4*(-parseInt(_0x91839(0x14d))/0x5)+parseInt(_0x91839(0x148))/0x6+-parseInt(_0x91839(0x142))/0x7+parseInt(_0x91839(0x14e))/0x8*(parseInt(_0x91839(0x156))/0x9)+-parseInt(_0x91839(0x160))/0xa*(parseInt(_0x91839(0x144))/0xb);if(_0x472774===_0x2f8ac6)break;else _0x1afdb9['push'](_0x1afdb9['shift']());}catch(_0x50756e){_0x1afdb9['push'](_0x1afdb9['shift']());}}}(_0x5c38,0xafde1));const e=require('@univerjs-pro/mcp'),i=require('@univerjs/core/facade'),l=require('@univerjs/core');class r{get[_0x5bf1e7(0x158)](){const _0x47c998=_0x5bf1e7;return e[_0x47c998(0x157)][_0x47c998(0x158)];}get['McpToolCallReceived'](){const _0x1d36d8=_0x5bf1e7;return e['MCPEventId'][_0x1d36d8(0x143)];}get['McpToolCallExecuted'](){const _0x1b8f9a=_0x5bf1e7;return e[_0x1b8f9a(0x157)][_0x1b8f9a(0x15f)];}get['McpToolCallFailed'](){const _0x51872b=_0x5bf1e7;return e['MCPEventId'][_0x51872b(0x15d)];}}function _0x5c38(){const _0x39cab0=['disconnect','subscribe','_initialize','extend','Event','event$','7619857kfynSN','McpToolCallReceived','488917QQCVJc','getAllMCPTools','IMCPToolRegistry','9ygIWOa','6225510bfYpyj','getAllTools','registerEventHandler','get','type','65oezyJz','712NTOYXX','867079wkXieL','connectMCP','FUniver','fireEvent','FEventName','_injector','_registerMCPFacadeEvents','58185kgdzgF','MCPEventId','McpConnectionStatusChanged','callMCPTool','connect','validateToolCall','getConnectionStatus','McpToolCallFailed','validateMCPToolCall','McpToolCallExecuted','40yyVpoc','getMCPConnectionStatus','134824PAlRPr','disconnectMCP','36786DtVwqY','data','MCPConnectionController','toDisposable'];_0x5c38=function(){return _0x39cab0;};return _0x5c38();}i[_0x5bf1e7(0x153)][_0x5bf1e7(0x13f)](r);class s extends i[_0x5bf1e7(0x151)]{[_0x5bf1e7(0x13e)](_0x28ebda){const _0x38e3ea=_0x5bf1e7;this[_0x38e3ea(0x155)](_0x28ebda);}[_0x5bf1e7(0x155)](_0x30d59d){const _0x4b936a=_0x5bf1e7,_0x1eb556=_0x30d59d['get'](e['MCPEventService']);this[_0x4b936a(0x14a)](this[_0x4b936a(0x140)][_0x4b936a(0x158)],()=>l['toDisposable'](_0x1eb556[_0x4b936a(0x141)][_0x4b936a(0x13d)](_0x2f3c2d=>{const _0x1334a3=_0x4b936a;_0x2f3c2d[_0x1334a3(0x14c)]===e[_0x1334a3(0x157)][_0x1334a3(0x158)]&&this[_0x1334a3(0x152)](this[_0x1334a3(0x140)]['McpConnectionStatusChanged'],_0x2f3c2d[_0x1334a3(0x165)]);}))),this['registerEventHandler'](this[_0x4b936a(0x140)]['McpToolCallReceived'],()=>l[_0x4b936a(0x13b)](_0x1eb556[_0x4b936a(0x141)][_0x4b936a(0x13d)](_0x51ebe1=>{const _0x453b7b=_0x4b936a;_0x51ebe1['type']===e[_0x453b7b(0x157)]['McpToolCallReceived']&&this[_0x453b7b(0x152)](this[_0x453b7b(0x140)]['McpToolCallReceived'],_0x51ebe1[_0x453b7b(0x165)]);}))),this['registerEventHandler'](this[_0x4b936a(0x140)][_0x4b936a(0x15f)],()=>l[_0x4b936a(0x13b)](_0x1eb556[_0x4b936a(0x141)][_0x4b936a(0x13d)](_0x30a828=>{const _0x3003d1=_0x4b936a;_0x30a828[_0x3003d1(0x14c)]===e[_0x3003d1(0x157)][_0x3003d1(0x15f)]&&this[_0x3003d1(0x152)](this[_0x3003d1(0x140)][_0x3003d1(0x15f)],_0x30a828[_0x3003d1(0x165)]);}))),this['registerEventHandler'](this[_0x4b936a(0x140)][_0x4b936a(0x15d)],()=>l['toDisposable'](_0x1eb556[_0x4b936a(0x141)][_0x4b936a(0x13d)](_0x5206a1=>{const _0xbc6cfe=_0x4b936a;_0x5206a1[_0xbc6cfe(0x14c)]===e[_0xbc6cfe(0x157)][_0xbc6cfe(0x15d)]&&this[_0xbc6cfe(0x152)](this[_0xbc6cfe(0x140)]['McpToolCallFailed'],_0x5206a1['data']);})));}[_0x5bf1e7(0x15e)](_0x549dda,_0x59aeb6){const _0x46ad06=_0x5bf1e7;return this['_injector']['get'](e[_0x46ad06(0x146)])[_0x46ad06(0x15b)](_0x549dda,_0x59aeb6);}[_0x5bf1e7(0x145)](){const _0x1dc71f=_0x5bf1e7;return this['_injector'][_0x1dc71f(0x14b)](e['IMCPToolRegistry'])[_0x1dc71f(0x149)]();}[_0x5bf1e7(0x159)](_0x299a03,_0x17b489){const _0x325028=_0x5bf1e7;return this[_0x325028(0x154)][_0x325028(0x14b)](e['IMCPToolRegistry'])['executeTool'](_0x299a03,_0x17b489);}[_0x5bf1e7(0x161)](){const _0x5c2e39=_0x5bf1e7;return this[_0x5c2e39(0x154)][_0x5c2e39(0x14b)](e[_0x5c2e39(0x166)])[_0x5c2e39(0x15c)]();}[_0x5bf1e7(0x150)](){const _0x15516b=_0x5bf1e7;this[_0x15516b(0x154)][_0x15516b(0x14b)](e[_0x15516b(0x166)])[_0x15516b(0x15a)]();}[_0x5bf1e7(0x163)](){const _0x32e188=_0x5bf1e7;this[_0x32e188(0x154)][_0x32e188(0x14b)](e[_0x32e188(0x166)])[_0x32e188(0x13c)]();}}i[_0x5bf1e7(0x151)]['extend'](s);
1
+ 'use strict';const _0xcdc53f=_0x5554;(function(_0x1828a9,_0x4a7366){const _0x1a926e=_0x5554,_0x1f54d1=_0x1828a9();while(!![]){try{const _0x491415=-parseInt(_0x1a926e(0x184))/0x1*(-parseInt(_0x1a926e(0x17c))/0x2)+parseInt(_0x1a926e(0x181))/0x3+-parseInt(_0x1a926e(0x17f))/0x4*(-parseInt(_0x1a926e(0x179))/0x5)+-parseInt(_0x1a926e(0x165))/0x6+parseInt(_0x1a926e(0x17b))/0x7+-parseInt(_0x1a926e(0x16c))/0x8+parseInt(_0x1a926e(0x15f))/0x9*(-parseInt(_0x1a926e(0x16f))/0xa);if(_0x491415===_0x4a7366)break;else _0x1f54d1['push'](_0x1f54d1['shift']());}catch(_0x342997){_0x1f54d1['push'](_0x1f54d1['shift']());}}}(_0xc8b5,0x5f4d8));function _0x5554(_0x13ee8e,_0x3e3321){const _0xc8b546=_0xc8b5();return _0x5554=function(_0x5554f9,_0x87d044){_0x5554f9=_0x5554f9-0x15e;let _0x354232=_0xc8b546[_0x5554f9];return _0x354232;},_0x5554(_0x13ee8e,_0x3e3321);}const e=require('@univerjs-pro/mcp'),i=require('@univerjs/core/facade'),l=require('@univerjs/core');function _0xc8b5(){const _0x59843a=['fireEvent','extend','McpToolCallExecuted','5455616CmrdUV','_initialize','get','40vGfVws','executeTool','IMCPToolRegistry','type','toDisposable','subscribe','McpConnectionStatusChanged','MCPEventId','_injector','FEventName','30ofPGks','getConnectionStatus','3930283olungl','4myxLOx','event$','validateMCPToolCall','132760vgXDpC','disconnect','2239920ycDGVY','registerEventHandler','getAllTools','138670SIambx','FUniver','_registerMCPFacadeEvents','data','370521aqTgQQ','McpToolCallReceived','MCPConnectionController','McpToolCallFailed','MCPEventService','getMCPConnectionStatus','3285606jwfyuc','callMCPTool','Event','validateToolCall'];_0xc8b5=function(){return _0x59843a;};return _0xc8b5();}class r{get['McpConnectionStatusChanged'](){const _0x343a24=_0x5554;return e[_0x343a24(0x176)][_0x343a24(0x175)];}get[_0xcdc53f(0x160)](){return e['MCPEventId']['McpToolCallReceived'];}get[_0xcdc53f(0x16b)](){const _0x258457=_0xcdc53f;return e[_0x258457(0x176)]['McpToolCallExecuted'];}get[_0xcdc53f(0x162)](){const _0x381368=_0xcdc53f;return e[_0x381368(0x176)]['McpToolCallFailed'];}}i[_0xcdc53f(0x178)][_0xcdc53f(0x16a)](r);class s extends i['FUniver']{[_0xcdc53f(0x16d)](_0x34b3fb){const _0xed7258=_0xcdc53f;this[_0xed7258(0x186)](_0x34b3fb);}[_0xcdc53f(0x186)](_0x248ff6){const _0x19bda4=_0xcdc53f,_0x17c2a1=_0x248ff6[_0x19bda4(0x16e)](e[_0x19bda4(0x163)]);this[_0x19bda4(0x182)](this[_0x19bda4(0x167)][_0x19bda4(0x175)],()=>l[_0x19bda4(0x173)](_0x17c2a1[_0x19bda4(0x17d)][_0x19bda4(0x174)](_0x569a95=>{const _0x283880=_0x19bda4;_0x569a95['type']===e[_0x283880(0x176)][_0x283880(0x175)]&&this[_0x283880(0x169)](this[_0x283880(0x167)][_0x283880(0x175)],_0x569a95[_0x283880(0x15e)]);}))),this['registerEventHandler'](this[_0x19bda4(0x167)][_0x19bda4(0x160)],()=>l[_0x19bda4(0x173)](_0x17c2a1[_0x19bda4(0x17d)][_0x19bda4(0x174)](_0x565475=>{const _0x240d4a=_0x19bda4;_0x565475['type']===e[_0x240d4a(0x176)][_0x240d4a(0x160)]&&this[_0x240d4a(0x169)](this[_0x240d4a(0x167)][_0x240d4a(0x160)],_0x565475[_0x240d4a(0x15e)]);}))),this['registerEventHandler'](this[_0x19bda4(0x167)][_0x19bda4(0x16b)],()=>l[_0x19bda4(0x173)](_0x17c2a1[_0x19bda4(0x17d)][_0x19bda4(0x174)](_0xf85ab5=>{const _0x567474=_0x19bda4;_0xf85ab5['type']===e[_0x567474(0x176)][_0x567474(0x16b)]&&this[_0x567474(0x169)](this[_0x567474(0x167)]['McpToolCallExecuted'],_0xf85ab5[_0x567474(0x15e)]);}))),this[_0x19bda4(0x182)](this[_0x19bda4(0x167)][_0x19bda4(0x162)],()=>l[_0x19bda4(0x173)](_0x17c2a1[_0x19bda4(0x17d)][_0x19bda4(0x174)](_0x545228=>{const _0x5ac0b4=_0x19bda4;_0x545228[_0x5ac0b4(0x172)]===e[_0x5ac0b4(0x176)]['McpToolCallFailed']&&this[_0x5ac0b4(0x169)](this[_0x5ac0b4(0x167)][_0x5ac0b4(0x162)],_0x545228[_0x5ac0b4(0x15e)]);})));}[_0xcdc53f(0x17e)](_0x8baa2c,_0x2176eb){const _0x41bef6=_0xcdc53f;return this[_0x41bef6(0x177)]['get'](e['IMCPToolRegistry'])[_0x41bef6(0x168)](_0x8baa2c,_0x2176eb);}['getAllMCPTools'](){const _0xf7b4e0=_0xcdc53f;return this[_0xf7b4e0(0x177)][_0xf7b4e0(0x16e)](e[_0xf7b4e0(0x171)])[_0xf7b4e0(0x183)]();}[_0xcdc53f(0x166)](_0xe017ff,_0x59ed3c){const _0x385444=_0xcdc53f;return this[_0x385444(0x177)][_0x385444(0x16e)](e[_0x385444(0x171)])[_0x385444(0x170)](_0xe017ff,_0x59ed3c);}[_0xcdc53f(0x164)](){const _0x471abb=_0xcdc53f;return this[_0x471abb(0x177)][_0x471abb(0x16e)](e['MCPConnectionController'])[_0x471abb(0x17a)]();}['connectMCP'](){const _0x240006=_0xcdc53f;this[_0x240006(0x177)][_0x240006(0x16e)](e[_0x240006(0x161)])['connect']();}['disconnectMCP'](){const _0x525189=_0xcdc53f;this['_injector']['get'](e[_0x525189(0x161)])[_0x525189(0x180)]();}}i[_0xcdc53f(0x185)][_0xcdc53f(0x16a)](s);