@univerjs-pro/mcp 0.15.0-insiders.20260108-47c73e3 → 0.15.0-insiders.20260108-7b9120d

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 _0x4a9f5b=_0x1941;function _0x57a3(){const _0x77d03d=['McpToolCallFailed','McpToolCallReceived','disconnect','connect','56ULygTs','type','event$','getAllTools','966102DJMBXe','executeTool','_registerMCPFacadeEvents','757274CWFKyU','5kUZrhU','fireEvent','1oQbAzd','_injector','27QBiPwW','get','2433sqGRon','6484DcsPgd','data','McpToolCallExecuted','subscribe','McpConnectionStatusChanged','validateToolCall','805410XMHwKE','extend','disconnectMCP','getMCPConnectionStatus','getConnectionStatus','_initialize','validateMCPToolCall','72dudtqm','12431653FeMApS','495047aSEpoP','937882AUyDNG','registerEventHandler','Event','getAllMCPTools'];_0x57a3=function(){return _0x77d03d;};return _0x57a3();}(function(_0x392da6,_0x542bde){const _0x56e77e=_0x1941,_0x48536c=_0x392da6();while(!![]){try{const _0x1e3cda=-parseInt(_0x56e77e(0x7c))/0x1*(-parseInt(_0x56e77e(0x79))/0x2)+parseInt(_0x56e77e(0x80))/0x3*(parseInt(_0x56e77e(0x81))/0x4)+parseInt(_0x56e77e(0x7a))/0x5*(parseInt(_0x56e77e(0x76))/0x6)+parseInt(_0x56e77e(0x69))/0x7*(-parseInt(_0x56e77e(0x72))/0x8)+parseInt(_0x56e77e(0x7e))/0x9*(-parseInt(_0x56e77e(0x87))/0xa)+parseInt(_0x56e77e(0x6a))/0xb*(parseInt(_0x56e77e(0x67))/0xc)+-parseInt(_0x56e77e(0x68))/0xd;if(_0x1e3cda===_0x542bde)break;else _0x48536c['push'](_0x48536c['shift']());}catch(_0x234709){_0x48536c['push'](_0x48536c['shift']());}}}(_0x57a3,0xa448a));import{MCPEventId as _0x6e57ef,MCPEventService as _0x37876c,IMCPToolRegistry as _0x4b49c5,MCPConnectionController as _0x47dcea}from'@univerjs-pro/mcp';function _0x1941(_0x2ba8ae,_0x12fc69){_0x2ba8ae=_0x2ba8ae-0x65;const _0x57a3a6=_0x57a3();let _0x1941d8=_0x57a3a6[_0x2ba8ae];return _0x1941d8;}import{FEventName as _0x378fe3,FUniver as _0x2fc3ef}from'@univerjs/core/facade';import{toDisposable as _0x107388}from'@univerjs/core';class d{get['McpConnectionStatusChanged'](){const _0x3f2eed=_0x1941;return _0x6e57ef[_0x3f2eed(0x85)];}get['McpToolCallReceived'](){const _0x369b5b=_0x1941;return _0x6e57ef[_0x369b5b(0x6f)];}get[_0x4a9f5b(0x83)](){const _0xcf8fb1=_0x4a9f5b;return _0x6e57ef[_0xcf8fb1(0x83)];}get[_0x4a9f5b(0x6e)](){const _0x5d0715=_0x4a9f5b;return _0x6e57ef[_0x5d0715(0x6e)];}}_0x378fe3[_0x4a9f5b(0x88)](d);class M extends _0x2fc3ef{[_0x4a9f5b(0x65)](_0x49f27d){const _0x1f4f89=_0x4a9f5b;this[_0x1f4f89(0x78)](_0x49f27d);}[_0x4a9f5b(0x78)](_0x15ba4b){const _0x24526f=_0x4a9f5b,_0x37d052=_0x15ba4b['get'](_0x37876c);this[_0x24526f(0x6b)](this[_0x24526f(0x6c)]['McpConnectionStatusChanged'],()=>_0x107388(_0x37d052[_0x24526f(0x74)][_0x24526f(0x84)](_0x46b7e2=>{const _0x43f9be=_0x24526f;_0x46b7e2[_0x43f9be(0x73)]===_0x6e57ef[_0x43f9be(0x85)]&&this[_0x43f9be(0x7b)](this['Event'][_0x43f9be(0x85)],_0x46b7e2['data']);}))),this[_0x24526f(0x6b)](this[_0x24526f(0x6c)]['McpToolCallReceived'],()=>_0x107388(_0x37d052[_0x24526f(0x74)][_0x24526f(0x84)](_0x592d21=>{const _0x69a8c=_0x24526f;_0x592d21[_0x69a8c(0x73)]===_0x6e57ef['McpToolCallReceived']&&this[_0x69a8c(0x7b)](this[_0x69a8c(0x6c)][_0x69a8c(0x6f)],_0x592d21[_0x69a8c(0x82)]);}))),this[_0x24526f(0x6b)](this['Event'][_0x24526f(0x83)],()=>_0x107388(_0x37d052[_0x24526f(0x74)]['subscribe'](_0x212092=>{const _0x7ffd62=_0x24526f;_0x212092[_0x7ffd62(0x73)]===_0x6e57ef[_0x7ffd62(0x83)]&&this['fireEvent'](this[_0x7ffd62(0x6c)][_0x7ffd62(0x83)],_0x212092[_0x7ffd62(0x82)]);}))),this[_0x24526f(0x6b)](this[_0x24526f(0x6c)][_0x24526f(0x6e)],()=>_0x107388(_0x37d052[_0x24526f(0x74)][_0x24526f(0x84)](_0x153282=>{const _0x15f2bc=_0x24526f;_0x153282['type']===_0x6e57ef[_0x15f2bc(0x6e)]&&this[_0x15f2bc(0x7b)](this[_0x15f2bc(0x6c)][_0x15f2bc(0x6e)],_0x153282[_0x15f2bc(0x82)]);})));}[_0x4a9f5b(0x66)](_0x512669,_0x86addd){const _0x9d6ec1=_0x4a9f5b;return this['_injector']['get'](_0x4b49c5)[_0x9d6ec1(0x86)](_0x512669,_0x86addd);}[_0x4a9f5b(0x6d)](){const _0x5edc22=_0x4a9f5b;return this[_0x5edc22(0x7d)]['get'](_0x4b49c5)[_0x5edc22(0x75)]();}['callMCPTool'](_0xfb32e4,_0x2fc971){const _0x44998b=_0x4a9f5b;return this[_0x44998b(0x7d)][_0x44998b(0x7f)](_0x4b49c5)[_0x44998b(0x77)](_0xfb32e4,_0x2fc971);}[_0x4a9f5b(0x8a)](){const _0x41b9be=_0x4a9f5b;return this[_0x41b9be(0x7d)][_0x41b9be(0x7f)](_0x47dcea)[_0x41b9be(0x8b)]();}['connectMCP'](){const _0x38e2ad=_0x4a9f5b;this[_0x38e2ad(0x7d)][_0x38e2ad(0x7f)](_0x47dcea)[_0x38e2ad(0x71)]();}[_0x4a9f5b(0x89)](){const _0x5730db=_0x4a9f5b;this[_0x5730db(0x7d)][_0x5730db(0x7f)](_0x47dcea)[_0x5730db(0x70)]();}}_0x2fc3ef[_0x4a9f5b(0x88)](M);
1
+ const _0x11c006=_0x3a92;(function(_0x1323e6,_0x239296){const _0x42e0aa=_0x3a92,_0x59aacb=_0x1323e6();while(!![]){try{const _0x5438fa=parseInt(_0x42e0aa(0xbc))/0x1+-parseInt(_0x42e0aa(0xac))/0x2+parseInt(_0x42e0aa(0xbe))/0x3*(parseInt(_0x42e0aa(0xb2))/0x4)+-parseInt(_0x42e0aa(0xbb))/0x5+-parseInt(_0x42e0aa(0xb6))/0x6+-parseInt(_0x42e0aa(0xbf))/0x7+parseInt(_0x42e0aa(0xad))/0x8;if(_0x5438fa===_0x239296)break;else _0x59aacb['push'](_0x59aacb['shift']());}catch(_0x5bec41){_0x59aacb['push'](_0x59aacb['shift']());}}}(_0x37a0,0x45c22));function _0x37a0(){const _0x4094b2=['getAllMCPTools','1485855yClpeO','210484TdMmQr','_initialize','36ZAcUre','3767127beGtEu','get','McpToolCallReceived','getMCPConnectionStatus','_injector','data','validateToolCall','subscribe','executeTool','disconnect','getConnectionStatus','connectMCP','event$','McpConnectionStatusChanged','1061730wohukF','12012688NXFNky','getAllTools','type','registerEventHandler','fireEvent','1812xcNbzC','McpToolCallFailed','Event','_registerMCPFacadeEvents','393474Dacnls','extend','callMCPTool','McpToolCallExecuted'];_0x37a0=function(){return _0x4094b2;};return _0x37a0();}import{MCPEventId as _0x157220,MCPEventService as _0x5840b0,IMCPToolRegistry as _0x5de207,MCPConnectionController as _0x22a1d9}from'@univerjs-pro/mcp';import{FEventName as _0x3ff436,FUniver as _0x33c00f}from'@univerjs/core/facade';function _0x3a92(_0x20713f,_0x23589f){_0x20713f=_0x20713f-0xa0;const _0x37a0f7=_0x37a0();let _0x3a9222=_0x37a0f7[_0x20713f];return _0x3a9222;}import{toDisposable as _0x549e08}from'@univerjs/core';class d{get[_0x11c006(0xab)](){const _0x111aa1=_0x11c006;return _0x157220[_0x111aa1(0xab)];}get['McpToolCallReceived'](){const _0x3b9e2e=_0x11c006;return _0x157220[_0x3b9e2e(0xa0)];}get['McpToolCallExecuted'](){const _0x2c6b92=_0x11c006;return _0x157220[_0x2c6b92(0xb9)];}get[_0x11c006(0xb3)](){const _0x544b4c=_0x11c006;return _0x157220[_0x544b4c(0xb3)];}}_0x3ff436[_0x11c006(0xb7)](d);class M extends _0x33c00f{[_0x11c006(0xbd)](_0x32db4d){const _0xd70e0e=_0x11c006;this[_0xd70e0e(0xb5)](_0x32db4d);}[_0x11c006(0xb5)](_0x2311dc){const _0x2c4a21=_0x11c006,_0x2b5294=_0x2311dc['get'](_0x5840b0);this[_0x2c4a21(0xb0)](this[_0x2c4a21(0xb4)][_0x2c4a21(0xab)],()=>_0x549e08(_0x2b5294['event$'][_0x2c4a21(0xa5)](_0x398881=>{const _0xcd90ae=_0x2c4a21;_0x398881[_0xcd90ae(0xaf)]===_0x157220[_0xcd90ae(0xab)]&&this[_0xcd90ae(0xb1)](this[_0xcd90ae(0xb4)][_0xcd90ae(0xab)],_0x398881[_0xcd90ae(0xa3)]);}))),this[_0x2c4a21(0xb0)](this[_0x2c4a21(0xb4)][_0x2c4a21(0xa0)],()=>_0x549e08(_0x2b5294[_0x2c4a21(0xaa)][_0x2c4a21(0xa5)](_0x3cabf0=>{const _0x1923a6=_0x2c4a21;_0x3cabf0[_0x1923a6(0xaf)]===_0x157220[_0x1923a6(0xa0)]&&this['fireEvent'](this[_0x1923a6(0xb4)][_0x1923a6(0xa0)],_0x3cabf0[_0x1923a6(0xa3)]);}))),this[_0x2c4a21(0xb0)](this['Event'][_0x2c4a21(0xb9)],()=>_0x549e08(_0x2b5294[_0x2c4a21(0xaa)][_0x2c4a21(0xa5)](_0xefd010=>{const _0x55c7b9=_0x2c4a21;_0xefd010[_0x55c7b9(0xaf)]===_0x157220[_0x55c7b9(0xb9)]&&this['fireEvent'](this[_0x55c7b9(0xb4)][_0x55c7b9(0xb9)],_0xefd010['data']);}))),this[_0x2c4a21(0xb0)](this[_0x2c4a21(0xb4)][_0x2c4a21(0xb3)],()=>_0x549e08(_0x2b5294[_0x2c4a21(0xaa)][_0x2c4a21(0xa5)](_0x422949=>{const _0x2fa2b3=_0x2c4a21;_0x422949[_0x2fa2b3(0xaf)]===_0x157220['McpToolCallFailed']&&this[_0x2fa2b3(0xb1)](this[_0x2fa2b3(0xb4)][_0x2fa2b3(0xb3)],_0x422949[_0x2fa2b3(0xa3)]);})));}['validateMCPToolCall'](_0x56b736,_0x12c1e7){const _0x31c399=_0x11c006;return this[_0x31c399(0xa2)]['get'](_0x5de207)[_0x31c399(0xa4)](_0x56b736,_0x12c1e7);}[_0x11c006(0xba)](){const _0xbc550=_0x11c006;return this[_0xbc550(0xa2)][_0xbc550(0xc0)](_0x5de207)[_0xbc550(0xae)]();}[_0x11c006(0xb8)](_0x3c9344,_0x30cfb8){const _0x1ffd0c=_0x11c006;return this['_injector']['get'](_0x5de207)[_0x1ffd0c(0xa6)](_0x3c9344,_0x30cfb8);}[_0x11c006(0xa1)](){const _0x13b8c1=_0x11c006;return this['_injector'][_0x13b8c1(0xc0)](_0x22a1d9)[_0x13b8c1(0xa8)]();}[_0x11c006(0xa9)](){const _0x41eebb=_0x11c006;this[_0x41eebb(0xa2)]['get'](_0x22a1d9)['connect']();}['disconnectMCP'](){const _0x246dcb=_0x11c006;this[_0x246dcb(0xa2)]['get'](_0x22a1d9)[_0x246dcb(0xa7)]();}}_0x33c00f[_0x11c006(0xb7)](M);