@univerjs-pro/mcp 0.12.4-insiders.20251213-692494c → 0.13.0

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/es/facade.js CHANGED
@@ -1 +1 @@
1
- const _0x4beae6=_0x24b5;(function(_0x318829,_0x88c15c){const _0x5a081c=_0x24b5,_0x37c190=_0x318829();while(!![]){try{const _0x30a1f6=parseInt(_0x5a081c(0xf8))/0x1*(parseInt(_0x5a081c(0xfb))/0x2)+parseInt(_0x5a081c(0x104))/0x3+parseInt(_0x5a081c(0x117))/0x4*(-parseInt(_0x5a081c(0xf2))/0x5)+parseInt(_0x5a081c(0x10b))/0x6+-parseInt(_0x5a081c(0x112))/0x7+parseInt(_0x5a081c(0x114))/0x8*(-parseInt(_0x5a081c(0xfa))/0x9)+-parseInt(_0x5a081c(0xf5))/0xa*(-parseInt(_0x5a081c(0x107))/0xb);if(_0x30a1f6===_0x88c15c)break;else _0x37c190['push'](_0x37c190['shift']());}catch(_0xcf7708){_0x37c190['push'](_0x37c190['shift']());}}}(_0x1fa4,0xe36c3));function _0x24b5(_0x5b1922,_0xfd6ece){_0x5b1922=_0x5b1922-0xf2;const _0x1fa41d=_0x1fa4();let _0x24b5cc=_0x1fa41d[_0x5b1922];return _0x24b5cc;}import{MCPEventId as _0x729f32,MCPEventService as _0x47f49d,IMCPToolRegistry as _0x194991,MCPConnectionController as _0x2d7f14}from'@univerjs-pro/mcp';import{FEventName as _0x1d321c,FUniver as _0x4e7a01}from'@univerjs/core/facade';import{toDisposable as _0x4624d1}from'@univerjs/core';function _0x1fa4(){const _0x3b7feb=['42570chkqeI','getConnectionStatus','disconnect','get','211062ozIvzp','McpToolCallReceived','getAllMCPTools','extend','disconnectMCP','subscribe','validateToolCall','8230152qhiPtB','McpToolCallExecuted','8aFsjnf','type','getMCPConnectionStatus','5545000IFrwLD','5zIGPOz','getAllTools','validateMCPToolCall','6010HcmNpK','McpConnectionStatusChanged','connectMCP','7MLtDIg','callMCPTool','8841951FcScHE','528062PoCZJl','data','_injector','connect','Event','registerEventHandler','_initialize','fireEvent','event$','800052IFmkCL','McpToolCallFailed','_registerMCPFacadeEvents'];_0x1fa4=function(){return _0x3b7feb;};return _0x1fa4();}class d{get[_0x4beae6(0xf6)](){return _0x729f32['McpConnectionStatusChanged'];}get[_0x4beae6(0x10c)](){const _0x119354=_0x4beae6;return _0x729f32[_0x119354(0x10c)];}get[_0x4beae6(0x113)](){const _0x2a7ef5=_0x4beae6;return _0x729f32[_0x2a7ef5(0x113)];}get['McpToolCallFailed'](){const _0x4f76d5=_0x4beae6;return _0x729f32[_0x4f76d5(0x105)];}}_0x1d321c[_0x4beae6(0x10e)](d);class M extends _0x4e7a01{[_0x4beae6(0x101)](_0x3be2e6){const _0x1b69cd=_0x4beae6;this[_0x1b69cd(0x106)](_0x3be2e6);}[_0x4beae6(0x106)](_0x517cfc){const _0x286bb5=_0x4beae6,_0x5704b4=_0x517cfc[_0x286bb5(0x10a)](_0x47f49d);this[_0x286bb5(0x100)](this[_0x286bb5(0xff)][_0x286bb5(0xf6)],()=>_0x4624d1(_0x5704b4[_0x286bb5(0x103)][_0x286bb5(0x110)](_0xaadcdc=>{const _0x216a87=_0x286bb5;_0xaadcdc['type']===_0x729f32[_0x216a87(0xf6)]&&this['fireEvent'](this[_0x216a87(0xff)][_0x216a87(0xf6)],_0xaadcdc[_0x216a87(0xfc)]);}))),this['registerEventHandler'](this[_0x286bb5(0xff)][_0x286bb5(0x10c)],()=>_0x4624d1(_0x5704b4[_0x286bb5(0x103)][_0x286bb5(0x110)](_0x112623=>{const _0x449605=_0x286bb5;_0x112623['type']===_0x729f32[_0x449605(0x10c)]&&this[_0x449605(0x102)](this[_0x449605(0xff)][_0x449605(0x10c)],_0x112623[_0x449605(0xfc)]);}))),this[_0x286bb5(0x100)](this[_0x286bb5(0xff)]['McpToolCallExecuted'],()=>_0x4624d1(_0x5704b4[_0x286bb5(0x103)]['subscribe'](_0x4ac3ee=>{const _0x18b256=_0x286bb5;_0x4ac3ee[_0x18b256(0x115)]===_0x729f32[_0x18b256(0x113)]&&this[_0x18b256(0x102)](this[_0x18b256(0xff)]['McpToolCallExecuted'],_0x4ac3ee[_0x18b256(0xfc)]);}))),this[_0x286bb5(0x100)](this[_0x286bb5(0xff)][_0x286bb5(0x105)],()=>_0x4624d1(_0x5704b4['event$'][_0x286bb5(0x110)](_0x4a0112=>{const _0x3e921a=_0x286bb5;_0x4a0112['type']===_0x729f32[_0x3e921a(0x105)]&&this[_0x3e921a(0x102)](this[_0x3e921a(0xff)][_0x3e921a(0x105)],_0x4a0112[_0x3e921a(0xfc)]);})));}[_0x4beae6(0xf4)](_0x41309e,_0x18bcae){const _0x2f3199=_0x4beae6;return this[_0x2f3199(0xfd)][_0x2f3199(0x10a)](_0x194991)[_0x2f3199(0x111)](_0x41309e,_0x18bcae);}[_0x4beae6(0x10d)](){const _0x3df9c0=_0x4beae6;return this[_0x3df9c0(0xfd)][_0x3df9c0(0x10a)](_0x194991)[_0x3df9c0(0xf3)]();}[_0x4beae6(0xf9)](_0x3dc727,_0x4d360c){const _0xb39eeb=_0x4beae6;return this['_injector'][_0xb39eeb(0x10a)](_0x194991)['executeTool'](_0x3dc727,_0x4d360c);}[_0x4beae6(0x116)](){const _0x3f538f=_0x4beae6;return this['_injector'][_0x3f538f(0x10a)](_0x2d7f14)[_0x3f538f(0x108)]();}[_0x4beae6(0xf7)](){const _0x57ad30=_0x4beae6;this['_injector'][_0x57ad30(0x10a)](_0x2d7f14)[_0x57ad30(0xfe)]();}[_0x4beae6(0x10f)](){const _0x29ae59=_0x4beae6;this[_0x29ae59(0xfd)]['get'](_0x2d7f14)[_0x29ae59(0x109)]();}}_0x4e7a01[_0x4beae6(0x10e)](M);
1
+ const _0x1ae9d8=_0x2e53;(function(_0x119562,_0x1f6964){const _0x57b1cd=_0x2e53,_0x2b9e4e=_0x119562();while(!![]){try{const _0x2aab13=-parseInt(_0x57b1cd(0x185))/0x1+parseInt(_0x57b1cd(0x17a))/0x2+-parseInt(_0x57b1cd(0x19a))/0x3*(parseInt(_0x57b1cd(0x17b))/0x4)+parseInt(_0x57b1cd(0x199))/0x5*(-parseInt(_0x57b1cd(0x183))/0x6)+-parseInt(_0x57b1cd(0x17f))/0x7*(-parseInt(_0x57b1cd(0x181))/0x8)+parseInt(_0x57b1cd(0x184))/0x9*(-parseInt(_0x57b1cd(0x198))/0xa)+-parseInt(_0x57b1cd(0x17c))/0xb*(-parseInt(_0x57b1cd(0x189))/0xc);if(_0x2aab13===_0x1f6964)break;else _0x2b9e4e['push'](_0x2b9e4e['shift']());}catch(_0xf311ff){_0x2b9e4e['push'](_0x2b9e4e['shift']());}}}(_0x201f,0x7ac21));import{MCPEventId as _0x44ca94,MCPEventService as _0x25bd13,IMCPToolRegistry as _0x5db10e,MCPConnectionController as _0x28d8ab}from'@univerjs-pro/mcp';import{FEventName as _0x354157,FUniver as _0x2e26b5}from'@univerjs/core/facade';import{toDisposable as _0x48dbc3}from'@univerjs/core';function _0x201f(){const _0x5c47b9=['_injector','177338hmHHDA','callMCPTool','288CfMXtT','subscribe','339696mNCjZs','8442333CJlQbR','580287hREfKb','McpConnectionStatusChanged','fireEvent','registerEventHandler','393324kjiBuH','Event','getAllTools','get','executeTool','data','validateToolCall','extend','McpToolCallFailed','connectMCP','event$','disconnectMCP','McpToolCallExecuted','McpToolCallReceived','type','10iAjdci','20gLvMCN','549FcPvIn','getAllMCPTools','disconnect','_registerMCPFacadeEvents','485612gIRiOh','18384aGjTrc','649DbXeZo','getConnectionStatus'];_0x201f=function(){return _0x5c47b9;};return _0x201f();}class d{get[_0x1ae9d8(0x186)](){const _0x23d216=_0x1ae9d8;return _0x44ca94[_0x23d216(0x186)];}get['McpToolCallReceived'](){const _0x26f782=_0x1ae9d8;return _0x44ca94[_0x26f782(0x196)];}get[_0x1ae9d8(0x195)](){const _0x4092ee=_0x1ae9d8;return _0x44ca94[_0x4092ee(0x195)];}get[_0x1ae9d8(0x191)](){const _0x1c047d=_0x1ae9d8;return _0x44ca94[_0x1c047d(0x191)];}}_0x354157[_0x1ae9d8(0x190)](d);function _0x2e53(_0xa488c8,_0x2f2945){_0xa488c8=_0xa488c8-0x17a;const _0x201f50=_0x201f();let _0x2e5378=_0x201f50[_0xa488c8];return _0x2e5378;}class M extends _0x2e26b5{['_initialize'](_0x33e653){this['_registerMCPFacadeEvents'](_0x33e653);}[_0x1ae9d8(0x19d)](_0x544275){const _0x69cadf=_0x1ae9d8,_0x187fa1=_0x544275[_0x69cadf(0x18c)](_0x25bd13);this[_0x69cadf(0x188)](this['Event'][_0x69cadf(0x186)],()=>_0x48dbc3(_0x187fa1['event$']['subscribe'](_0x380874=>{const _0x4c2738=_0x69cadf;_0x380874[_0x4c2738(0x197)]===_0x44ca94[_0x4c2738(0x186)]&&this['fireEvent'](this[_0x4c2738(0x18a)][_0x4c2738(0x186)],_0x380874[_0x4c2738(0x18e)]);}))),this[_0x69cadf(0x188)](this[_0x69cadf(0x18a)][_0x69cadf(0x196)],()=>_0x48dbc3(_0x187fa1[_0x69cadf(0x193)][_0x69cadf(0x182)](_0xd75861=>{const _0x3a4f2b=_0x69cadf;_0xd75861['type']===_0x44ca94['McpToolCallReceived']&&this[_0x3a4f2b(0x187)](this['Event'][_0x3a4f2b(0x196)],_0xd75861[_0x3a4f2b(0x18e)]);}))),this[_0x69cadf(0x188)](this[_0x69cadf(0x18a)][_0x69cadf(0x195)],()=>_0x48dbc3(_0x187fa1[_0x69cadf(0x193)]['subscribe'](_0x15559e=>{const _0x313e71=_0x69cadf;_0x15559e['type']===_0x44ca94[_0x313e71(0x195)]&&this[_0x313e71(0x187)](this[_0x313e71(0x18a)][_0x313e71(0x195)],_0x15559e[_0x313e71(0x18e)]);}))),this[_0x69cadf(0x188)](this['Event'][_0x69cadf(0x191)],()=>_0x48dbc3(_0x187fa1['event$']['subscribe'](_0x534528=>{const _0x16c663=_0x69cadf;_0x534528[_0x16c663(0x197)]===_0x44ca94['McpToolCallFailed']&&this['fireEvent'](this['Event'][_0x16c663(0x191)],_0x534528[_0x16c663(0x18e)]);})));}['validateMCPToolCall'](_0x3e3462,_0x284121){const _0x5119d9=_0x1ae9d8;return this[_0x5119d9(0x17e)][_0x5119d9(0x18c)](_0x5db10e)[_0x5119d9(0x18f)](_0x3e3462,_0x284121);}[_0x1ae9d8(0x19b)](){const _0x5cf355=_0x1ae9d8;return this[_0x5cf355(0x17e)]['get'](_0x5db10e)[_0x5cf355(0x18b)]();}[_0x1ae9d8(0x180)](_0x55ea17,_0x57229b){const _0xf11153=_0x1ae9d8;return this[_0xf11153(0x17e)]['get'](_0x5db10e)[_0xf11153(0x18d)](_0x55ea17,_0x57229b);}['getMCPConnectionStatus'](){const _0x30df96=_0x1ae9d8;return this[_0x30df96(0x17e)][_0x30df96(0x18c)](_0x28d8ab)[_0x30df96(0x17d)]();}[_0x1ae9d8(0x192)](){this['_injector']['get'](_0x28d8ab)['connect']();}[_0x1ae9d8(0x194)](){const _0x4d6a9e=_0x1ae9d8;this[_0x4d6a9e(0x17e)]['get'](_0x28d8ab)[_0x4d6a9e(0x19c)]();}}_0x2e26b5[_0x1ae9d8(0x190)](M);