@univerjs-pro/mcp 0.12.0 → 0.12.1

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 _0x57b5b4=_0x2230;(function(_0xee67b5,_0x17433e){const _0x1df1c7=_0x2230,_0x51d18d=_0xee67b5();while(!![]){try{const _0x4f948e=-parseInt(_0x1df1c7(0x15a))/0x1+parseInt(_0x1df1c7(0x13b))/0x2+-parseInt(_0x1df1c7(0x145))/0x3+-parseInt(_0x1df1c7(0x152))/0x4+parseInt(_0x1df1c7(0x161))/0x5*(-parseInt(_0x1df1c7(0x14f))/0x6)+parseInt(_0x1df1c7(0x149))/0x7*(-parseInt(_0x1df1c7(0x164))/0x8)+parseInt(_0x1df1c7(0x143))/0x9*(parseInt(_0x1df1c7(0x13e))/0xa);if(_0x4f948e===_0x17433e)break;else _0x51d18d['push'](_0x51d18d['shift']());}catch(_0x3e82f9){_0x51d18d['push'](_0x51d18d['shift']());}}}(_0x4bc1,0x640e4));function _0x2230(_0x6fe2a8,_0x3a2b32){const _0x4bc112=_0x4bc1();return _0x2230=function(_0x223054,_0x1c1ae4){_0x223054=_0x223054-0x13b;let _0x4dbbef=_0x4bc112[_0x223054];return _0x4dbbef;},_0x2230(_0x6fe2a8,_0x3a2b32);}const e=require('@univerjs-pro/mcp'),i=require('@univerjs/core/facade'),l=require('@univerjs/core');class r{get[_0x57b5b4(0x13f)](){const _0x202252=_0x57b5b4;return e[_0x202252(0x14e)]['McpConnectionStatusChanged'];}get['McpToolCallReceived'](){const _0x510c2f=_0x57b5b4;return e[_0x510c2f(0x14e)]['McpToolCallReceived'];}get[_0x57b5b4(0x13c)](){const _0x44b0ba=_0x57b5b4;return e[_0x44b0ba(0x14e)][_0x44b0ba(0x13c)];}get['McpToolCallFailed'](){const _0x294c38=_0x57b5b4;return e[_0x294c38(0x14e)][_0x294c38(0x148)];}}i[_0x57b5b4(0x150)][_0x57b5b4(0x151)](r);class s extends i[_0x57b5b4(0x14a)]{[_0x57b5b4(0x147)](_0x48e4b6){const _0x595b44=_0x57b5b4;this[_0x595b44(0x146)](_0x48e4b6);}['_registerMCPFacadeEvents'](_0x338cda){const _0x592f92=_0x57b5b4,_0x4f3351=_0x338cda[_0x592f92(0x156)](e[_0x592f92(0x162)]);this[_0x592f92(0x13d)](this[_0x592f92(0x157)][_0x592f92(0x13f)],()=>l['toDisposable'](_0x4f3351[_0x592f92(0x14b)][_0x592f92(0x163)](_0x2d0004=>{const _0x11bb1a=_0x592f92;_0x2d0004[_0x11bb1a(0x154)]===e[_0x11bb1a(0x14e)][_0x11bb1a(0x13f)]&&this['fireEvent'](this[_0x11bb1a(0x157)][_0x11bb1a(0x13f)],_0x2d0004[_0x11bb1a(0x153)]);}))),this[_0x592f92(0x13d)](this[_0x592f92(0x157)][_0x592f92(0x158)],()=>l[_0x592f92(0x142)](_0x4f3351[_0x592f92(0x14b)][_0x592f92(0x163)](_0x3fb463=>{const _0x2d8fbd=_0x592f92;_0x3fb463[_0x2d8fbd(0x154)]===e['MCPEventId'][_0x2d8fbd(0x158)]&&this['fireEvent'](this[_0x2d8fbd(0x157)][_0x2d8fbd(0x158)],_0x3fb463[_0x2d8fbd(0x153)]);}))),this[_0x592f92(0x13d)](this[_0x592f92(0x157)][_0x592f92(0x13c)],()=>l[_0x592f92(0x142)](_0x4f3351[_0x592f92(0x14b)][_0x592f92(0x163)](_0x25cd06=>{const _0xf47826=_0x592f92;_0x25cd06[_0xf47826(0x154)]===e[_0xf47826(0x14e)][_0xf47826(0x13c)]&&this['fireEvent'](this[_0xf47826(0x157)]['McpToolCallExecuted'],_0x25cd06[_0xf47826(0x153)]);}))),this[_0x592f92(0x13d)](this[_0x592f92(0x157)][_0x592f92(0x148)],()=>l[_0x592f92(0x142)](_0x4f3351[_0x592f92(0x14b)]['subscribe'](_0x38ab8c=>{const _0x1c197f=_0x592f92;_0x38ab8c[_0x1c197f(0x154)]===e[_0x1c197f(0x14e)]['McpToolCallFailed']&&this[_0x1c197f(0x15b)](this[_0x1c197f(0x157)][_0x1c197f(0x148)],_0x38ab8c[_0x1c197f(0x153)]);})));}[_0x57b5b4(0x159)](_0x5b7365,_0x480c3a){const _0x3b2643=_0x57b5b4;return this[_0x3b2643(0x14c)][_0x3b2643(0x156)](e['IMCPToolRegistry'])['validateToolCall'](_0x5b7365,_0x480c3a);}[_0x57b5b4(0x14d)](){const _0x2174d4=_0x57b5b4;return this[_0x2174d4(0x14c)][_0x2174d4(0x156)](e[_0x2174d4(0x15f)])['getAllTools']();}['callMCPTool'](_0x3b9514,_0x1d06d5){const _0x11955e=_0x57b5b4;return this[_0x11955e(0x14c)][_0x11955e(0x156)](e['IMCPToolRegistry'])[_0x11955e(0x15e)](_0x3b9514,_0x1d06d5);}[_0x57b5b4(0x15c)](){const _0x46d387=_0x57b5b4;return this[_0x46d387(0x14c)]['get'](e['MCPConnectionController'])[_0x46d387(0x140)]();}[_0x57b5b4(0x144)](){const _0x1ebcad=_0x57b5b4;this['_injector'][_0x1ebcad(0x156)](e[_0x1ebcad(0x141)])[_0x1ebcad(0x15d)]();}[_0x57b5b4(0x160)](){const _0x4c7804=_0x57b5b4;this[_0x4c7804(0x14c)][_0x4c7804(0x156)](e[_0x4c7804(0x141)])[_0x4c7804(0x155)]();}}i['FUniver'][_0x57b5b4(0x151)](s);function _0x4bc1(){const _0x3284c3=['_registerMCPFacadeEvents','_initialize','McpToolCallFailed','315cBSrmW','FUniver','event$','_injector','getAllMCPTools','MCPEventId','3405774ShlLSV','FEventName','extend','219792Sbfzef','data','type','disconnect','get','Event','McpToolCallReceived','validateMCPToolCall','224044YobklC','fireEvent','getMCPConnectionStatus','connect','executeTool','IMCPToolRegistry','disconnectMCP','5ucViNF','MCPEventService','subscribe','126656pGdcjR','170776NqefsN','McpToolCallExecuted','registerEventHandler','24950580xlIyvl','McpConnectionStatusChanged','getConnectionStatus','MCPConnectionController','toDisposable','9JXpzoj','connectMCP','1834671RdKyYD'];_0x4bc1=function(){return _0x3284c3;};return _0x4bc1();}
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);