@univerjs-pro/mcp 0.15.2-insiders.20260119-edc718c → 0.15.2-insiders.20260122-b1556b1

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 _0x297f86=_0x5568;function _0x5568(_0x3e50ee,_0x3d9495){_0x3e50ee=_0x3e50ee-0x78;const _0x29d99a=_0x29d9();let _0x5568d9=_0x29d99a[_0x3e50ee];return _0x5568d9;}(function(_0x20b71a,_0x3d5b94){const _0x31ef2c=_0x5568,_0x4b7da4=_0x20b71a();while(!![]){try{const _0x4ec97e=-parseInt(_0x31ef2c(0x88))/0x1*(parseInt(_0x31ef2c(0x8d))/0x2)+parseInt(_0x31ef2c(0x99))/0x3*(parseInt(_0x31ef2c(0x8b))/0x4)+-parseInt(_0x31ef2c(0x94))/0x5*(parseInt(_0x31ef2c(0x83))/0x6)+-parseInt(_0x31ef2c(0x81))/0x7*(-parseInt(_0x31ef2c(0x8f))/0x8)+-parseInt(_0x31ef2c(0x98))/0x9*(parseInt(_0x31ef2c(0x96))/0xa)+parseInt(_0x31ef2c(0x7a))/0xb*(parseInt(_0x31ef2c(0x84))/0xc)+parseInt(_0x31ef2c(0x80))/0xd;if(_0x4ec97e===_0x3d5b94)break;else _0x4b7da4['push'](_0x4b7da4['shift']());}catch(_0x14236b){_0x4b7da4['push'](_0x4b7da4['shift']());}}}(_0x29d9,0xe98e3));import{MCPEventId as _0x1cea95,MCPEventService as _0x1a42f5,IMCPToolRegistry as _0x13318c,MCPConnectionController as _0x40a300}from'@univerjs-pro/mcp';import{FEventName as _0x1ac136,FUniver as _0x13c95e}from'@univerjs/core/facade';import{toDisposable as _0x57bcec}from'@univerjs/core';class d{get[_0x297f86(0x87)](){const _0xc124de=_0x297f86;return _0x1cea95[_0xc124de(0x87)];}get['McpToolCallReceived'](){return _0x1cea95['McpToolCallReceived'];}get[_0x297f86(0x7d)](){const _0x2c546f=_0x297f86;return _0x1cea95[_0x2c546f(0x7d)];}get['McpToolCallFailed'](){const _0x2f73dd=_0x297f86;return _0x1cea95[_0x2f73dd(0x9a)];}}_0x1ac136['extend'](d);class M extends _0x13c95e{[_0x297f86(0x9b)](_0x3d015d){const _0x1074d3=_0x297f86;this[_0x1074d3(0x8e)](_0x3d015d);}[_0x297f86(0x8e)](_0x595334){const _0x509028=_0x297f86,_0x4b0af8=_0x595334[_0x509028(0x82)](_0x1a42f5);this[_0x509028(0x85)](this[_0x509028(0x7b)][_0x509028(0x87)],()=>_0x57bcec(_0x4b0af8['event$']['subscribe'](_0x567d3f=>{const _0x4efe0c=_0x509028;_0x567d3f[_0x4efe0c(0x8c)]===_0x1cea95[_0x4efe0c(0x87)]&&this[_0x4efe0c(0x7c)](this[_0x4efe0c(0x7b)][_0x4efe0c(0x87)],_0x567d3f[_0x4efe0c(0x7e)]);}))),this['registerEventHandler'](this[_0x509028(0x7b)][_0x509028(0x79)],()=>_0x57bcec(_0x4b0af8[_0x509028(0x92)][_0x509028(0x97)](_0x2d87a6=>{const _0x3454dd=_0x509028;_0x2d87a6[_0x3454dd(0x8c)]===_0x1cea95[_0x3454dd(0x79)]&&this[_0x3454dd(0x7c)](this[_0x3454dd(0x7b)][_0x3454dd(0x79)],_0x2d87a6[_0x3454dd(0x7e)]);}))),this[_0x509028(0x85)](this[_0x509028(0x7b)][_0x509028(0x7d)],()=>_0x57bcec(_0x4b0af8['event$'][_0x509028(0x97)](_0x1f6781=>{const _0x35574f=_0x509028;_0x1f6781[_0x35574f(0x8c)]===_0x1cea95[_0x35574f(0x7d)]&&this[_0x35574f(0x7c)](this[_0x35574f(0x7b)][_0x35574f(0x7d)],_0x1f6781['data']);}))),this[_0x509028(0x85)](this[_0x509028(0x7b)][_0x509028(0x9a)],()=>_0x57bcec(_0x4b0af8[_0x509028(0x92)][_0x509028(0x97)](_0x308c62=>{const _0xca098=_0x509028;_0x308c62['type']===_0x1cea95[_0xca098(0x9a)]&&this[_0xca098(0x7c)](this[_0xca098(0x7b)][_0xca098(0x9a)],_0x308c62[_0xca098(0x7e)]);})));}['validateMCPToolCall'](_0xc98f22,_0x149822){const _0x5502ae=_0x297f86;return this[_0x5502ae(0x78)][_0x5502ae(0x82)](_0x13318c)['validateToolCall'](_0xc98f22,_0x149822);}['getAllMCPTools'](){const _0x34a878=_0x297f86;return this['_injector'][_0x34a878(0x82)](_0x13318c)[_0x34a878(0x93)]();}[_0x297f86(0x8a)](_0x4a7a1c,_0x3e02a6){const _0x57ce28=_0x297f86;return this['_injector'][_0x57ce28(0x82)](_0x13318c)['executeTool'](_0x4a7a1c,_0x3e02a6);}[_0x297f86(0x89)](){const _0x384a5b=_0x297f86;return this[_0x384a5b(0x78)]['get'](_0x40a300)[_0x384a5b(0x86)]();}[_0x297f86(0x7f)](){const _0x1efd71=_0x297f86;this[_0x1efd71(0x78)][_0x1efd71(0x82)](_0x40a300)['connect']();}[_0x297f86(0x95)](){const _0xedd6dc=_0x297f86;this[_0xedd6dc(0x78)][_0xedd6dc(0x82)](_0x40a300)[_0xedd6dc(0x90)]();}}function _0x29d9(){const _0x55ecd9=['event$','getAllTools','8604110zRKVdS','disconnectMCP','4720KBOhYO','subscribe','21771vLZjnB','3819369GLWfXG','McpToolCallFailed','_initialize','_injector','McpToolCallReceived','20010122SjMDLn','Event','fireEvent','McpToolCallExecuted','data','connectMCP','15041299SPDBUq','95837MsqYAC','get','6FqYoxV','12rsuWPP','registerEventHandler','getConnectionStatus','McpConnectionStatusChanged','6397lycnTx','getMCPConnectionStatus','callMCPTool','4DFsUpF','type','494BGWAYe','_registerMCPFacadeEvents','672pCUIQb','disconnect','extend'];_0x29d9=function(){return _0x55ecd9;};return _0x29d9();}_0x13c95e[_0x297f86(0x91)](M);
1
+ const _0x1d7f4a=_0x7853;function _0x3404(){const _0x320c18=['McpToolCallFailed','getAllMCPTools','747515bveVxQ','connectMCP','McpConnectionStatusChanged','executeTool','disconnectMCP','McpToolCallExecuted','6NSZixu','McpToolCallReceived','registerEventHandler','Event','subscribe','fireEvent','type','extend','event$','callMCPTool','get','2759560eQYoZl','1194270yKmyGi','1185198zmmtxK','validateMCPToolCall','2500388GxxxcD','1645605qhmIOu','12213819NGpsIC','1CBSCdv','_initialize','_registerMCPFacadeEvents','_injector','validateToolCall','data'];_0x3404=function(){return _0x320c18;};return _0x3404();}(function(_0x1555b4,_0x5bc2b5){const _0x2e7e69=_0x7853,_0x58ffe9=_0x1555b4();while(!![]){try{const _0x7507c6=parseInt(_0x2e7e69(0x18b))/0x1*(parseInt(_0x2e7e69(0x185))/0x2)+parseInt(_0x2e7e69(0x189))/0x3+parseInt(_0x2e7e69(0x188))/0x4+parseInt(_0x2e7e69(0x193))/0x5*(parseInt(_0x2e7e69(0x199))/0x6)+parseInt(_0x2e7e69(0x186))/0x7+-parseInt(_0x2e7e69(0x184))/0x8+-parseInt(_0x2e7e69(0x18a))/0x9;if(_0x7507c6===_0x5bc2b5)break;else _0x58ffe9['push'](_0x58ffe9['shift']());}catch(_0x3787c8){_0x58ffe9['push'](_0x58ffe9['shift']());}}}(_0x3404,0x5e9dc));import{MCPEventId as _0x18d70f,MCPEventService as _0x7fd5ba,IMCPToolRegistry as _0x1db659,MCPConnectionController as _0x5d8c0}from'@univerjs-pro/mcp';import{FEventName as _0x44d09a,FUniver as _0x11a636}from'@univerjs/core/facade';function _0x7853(_0x38a226,_0x25574b){_0x38a226=_0x38a226-0x182;const _0x34043a=_0x3404();let _0x785336=_0x34043a[_0x38a226];return _0x785336;}import{toDisposable as _0x54b005}from'@univerjs/core';class d{get['McpConnectionStatusChanged'](){return _0x18d70f['McpConnectionStatusChanged'];}get[_0x1d7f4a(0x19a)](){const _0x36e390=_0x1d7f4a;return _0x18d70f[_0x36e390(0x19a)];}get[_0x1d7f4a(0x198)](){const _0x2d64cf=_0x1d7f4a;return _0x18d70f[_0x2d64cf(0x198)];}get['McpToolCallFailed'](){const _0x5f2a36=_0x1d7f4a;return _0x18d70f[_0x5f2a36(0x191)];}}_0x44d09a[_0x1d7f4a(0x1a0)](d);class M extends _0x11a636{[_0x1d7f4a(0x18c)](_0x1d3396){const _0x2b6988=_0x1d7f4a;this[_0x2b6988(0x18d)](_0x1d3396);}[_0x1d7f4a(0x18d)](_0x5b68d1){const _0x162c08=_0x1d7f4a,_0x1f35a5=_0x5b68d1[_0x162c08(0x183)](_0x7fd5ba);this[_0x162c08(0x19b)](this['Event']['McpConnectionStatusChanged'],()=>_0x54b005(_0x1f35a5[_0x162c08(0x1a1)]['subscribe'](_0x474234=>{const _0x1f62af=_0x162c08;_0x474234[_0x1f62af(0x19f)]===_0x18d70f[_0x1f62af(0x195)]&&this[_0x1f62af(0x19e)](this['Event'][_0x1f62af(0x195)],_0x474234[_0x1f62af(0x190)]);}))),this['registerEventHandler'](this[_0x162c08(0x19c)][_0x162c08(0x19a)],()=>_0x54b005(_0x1f35a5['event$'][_0x162c08(0x19d)](_0x31a8be=>{const _0x58113e=_0x162c08;_0x31a8be[_0x58113e(0x19f)]===_0x18d70f[_0x58113e(0x19a)]&&this['fireEvent'](this[_0x58113e(0x19c)]['McpToolCallReceived'],_0x31a8be[_0x58113e(0x190)]);}))),this[_0x162c08(0x19b)](this[_0x162c08(0x19c)][_0x162c08(0x198)],()=>_0x54b005(_0x1f35a5[_0x162c08(0x1a1)][_0x162c08(0x19d)](_0x510e17=>{const _0x31fd6a=_0x162c08;_0x510e17[_0x31fd6a(0x19f)]===_0x18d70f['McpToolCallExecuted']&&this['fireEvent'](this['Event'][_0x31fd6a(0x198)],_0x510e17[_0x31fd6a(0x190)]);}))),this['registerEventHandler'](this[_0x162c08(0x19c)][_0x162c08(0x191)],()=>_0x54b005(_0x1f35a5['event$'][_0x162c08(0x19d)](_0x5311df=>{const _0x4e007d=_0x162c08;_0x5311df[_0x4e007d(0x19f)]===_0x18d70f[_0x4e007d(0x191)]&&this[_0x4e007d(0x19e)](this['Event']['McpToolCallFailed'],_0x5311df[_0x4e007d(0x190)]);})));}[_0x1d7f4a(0x187)](_0x1af2b9,_0x2b0d22){const _0x5d8ae7=_0x1d7f4a;return this[_0x5d8ae7(0x18e)][_0x5d8ae7(0x183)](_0x1db659)[_0x5d8ae7(0x18f)](_0x1af2b9,_0x2b0d22);}[_0x1d7f4a(0x192)](){const _0xa4f309=_0x1d7f4a;return this['_injector'][_0xa4f309(0x183)](_0x1db659)['getAllTools']();}[_0x1d7f4a(0x182)](_0x1f45d1,_0x288498){const _0x1efd80=_0x1d7f4a;return this[_0x1efd80(0x18e)]['get'](_0x1db659)[_0x1efd80(0x196)](_0x1f45d1,_0x288498);}['getMCPConnectionStatus'](){const _0x577e59=_0x1d7f4a;return this[_0x577e59(0x18e)][_0x577e59(0x183)](_0x5d8c0)['getConnectionStatus']();}[_0x1d7f4a(0x194)](){this['_injector']['get'](_0x5d8c0)['connect']();}[_0x1d7f4a(0x197)](){const _0x4d5911=_0x1d7f4a;this['_injector'][_0x4d5911(0x183)](_0x5d8c0)['disconnect']();}}_0x11a636[_0x1d7f4a(0x1a0)](M);