@univerjs-pro/mcp 0.13.0-insiders.20251216-1519cb7 → 0.13.0-insiders.20251218-2062647

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 _0x16ed9f=_0x5233;(function(_0x4f2689,_0x1b7315){const _0x1d9c2b=_0x5233,_0x2c5169=_0x4f2689();while(!![]){try{const _0x1897bc=-parseInt(_0x1d9c2b(0xa7))/0x1+parseInt(_0x1d9c2b(0xbb))/0x2+-parseInt(_0x1d9c2b(0xbf))/0x3*(-parseInt(_0x1d9c2b(0xbc))/0x4)+-parseInt(_0x1d9c2b(0xa5))/0x5*(-parseInt(_0x1d9c2b(0xb8))/0x6)+parseInt(_0x1d9c2b(0xb0))/0x7+-parseInt(_0x1d9c2b(0xa9))/0x8+-parseInt(_0x1d9c2b(0xa2))/0x9;if(_0x1897bc===_0x1b7315)break;else _0x2c5169['push'](_0x2c5169['shift']());}catch(_0x224715){_0x2c5169['push'](_0x2c5169['shift']());}}}(_0x2973,0x5c4b9));function _0x5233(_0x18b287,_0x50d66c){_0x18b287=_0x18b287-0xa0;const _0x2973a6=_0x2973();let _0x523371=_0x2973a6[_0x18b287];return _0x523371;}import{MCPEventId as _0x1b373c,MCPEventService as _0x3ae5bc,IMCPToolRegistry as _0x388d86,MCPConnectionController as _0x5d1f06}from'@univerjs-pro/mcp';import{FEventName as _0x5afba6,FUniver as _0x50da96}from'@univerjs/core/facade';import{toDisposable as _0xf98d8d}from'@univerjs/core';class d{get[_0x16ed9f(0xc0)](){const _0x142121=_0x16ed9f;return _0x1b373c[_0x142121(0xc0)];}get[_0x16ed9f(0xa6)](){return _0x1b373c['McpToolCallReceived'];}get['McpToolCallExecuted'](){const _0x425d48=_0x16ed9f;return _0x1b373c[_0x425d48(0xbe)];}get['McpToolCallFailed'](){return _0x1b373c['McpToolCallFailed'];}}_0x5afba6[_0x16ed9f(0xaa)](d);class M extends _0x50da96{['_initialize'](_0x21d08a){const _0x4a1b82=_0x16ed9f;this[_0x4a1b82(0xab)](_0x21d08a);}[_0x16ed9f(0xab)](_0x497c9d){const _0x96d425=_0x16ed9f,_0x54a294=_0x497c9d[_0x96d425(0xa8)](_0x3ae5bc);this[_0x96d425(0xc1)](this[_0x96d425(0xb2)][_0x96d425(0xc0)],()=>_0xf98d8d(_0x54a294['event$'][_0x96d425(0xb6)](_0xe2c37c=>{const _0x1cb424=_0x96d425;_0xe2c37c['type']===_0x1b373c[_0x1cb424(0xc0)]&&this[_0x1cb424(0xae)](this[_0x1cb424(0xb2)]['McpConnectionStatusChanged'],_0xe2c37c[_0x1cb424(0xb9)]);}))),this[_0x96d425(0xc1)](this[_0x96d425(0xb2)]['McpToolCallReceived'],()=>_0xf98d8d(_0x54a294[_0x96d425(0xa0)][_0x96d425(0xb6)](_0x3890c5=>{const _0x3cffb8=_0x96d425;_0x3890c5[_0x3cffb8(0xb7)]===_0x1b373c[_0x3cffb8(0xa6)]&&this[_0x3cffb8(0xae)](this[_0x3cffb8(0xb2)][_0x3cffb8(0xa6)],_0x3890c5[_0x3cffb8(0xb9)]);}))),this['registerEventHandler'](this['Event']['McpToolCallExecuted'],()=>_0xf98d8d(_0x54a294[_0x96d425(0xa0)][_0x96d425(0xb6)](_0x265b2b=>{const _0x491f8f=_0x96d425;_0x265b2b[_0x491f8f(0xb7)]===_0x1b373c[_0x491f8f(0xbe)]&&this[_0x491f8f(0xae)](this[_0x491f8f(0xb2)][_0x491f8f(0xbe)],_0x265b2b[_0x491f8f(0xb9)]);}))),this[_0x96d425(0xc1)](this['Event'][_0x96d425(0xad)],()=>_0xf98d8d(_0x54a294[_0x96d425(0xa0)][_0x96d425(0xb6)](_0x4f1831=>{const _0xc94f43=_0x96d425;_0x4f1831['type']===_0x1b373c['McpToolCallFailed']&&this[_0xc94f43(0xae)](this[_0xc94f43(0xb2)][_0xc94f43(0xad)],_0x4f1831[_0xc94f43(0xb9)]);})));}[_0x16ed9f(0xaf)](_0x23a287,_0x4c4773){return this['_injector']['get'](_0x388d86)['validateToolCall'](_0x23a287,_0x4c4773);}[_0x16ed9f(0xb5)](){const _0x39a75f=_0x16ed9f;return this[_0x39a75f(0xac)][_0x39a75f(0xa8)](_0x388d86)[_0x39a75f(0xa3)]();}[_0x16ed9f(0xb4)](_0x1ba2fb,_0x2fab25){const _0xaf2896=_0x16ed9f;return this[_0xaf2896(0xac)][_0xaf2896(0xa8)](_0x388d86)[_0xaf2896(0xb3)](_0x1ba2fb,_0x2fab25);}[_0x16ed9f(0xbd)](){const _0x2a470e=_0x16ed9f;return this[_0x2a470e(0xac)][_0x2a470e(0xa8)](_0x5d1f06)[_0x2a470e(0xc2)]();}[_0x16ed9f(0xa1)](){const _0x5848a6=_0x16ed9f;this[_0x5848a6(0xac)][_0x5848a6(0xa8)](_0x5d1f06)[_0x5848a6(0xba)]();}[_0x16ed9f(0xa4)](){const _0x13d443=_0x16ed9f;this[_0x13d443(0xac)][_0x13d443(0xa8)](_0x5d1f06)[_0x13d443(0xb1)]();}}_0x50da96[_0x16ed9f(0xaa)](M);function _0x2973(){const _0xded548=['_registerMCPFacadeEvents','_injector','McpToolCallFailed','fireEvent','validateMCPToolCall','1233932izHMlz','disconnect','Event','executeTool','callMCPTool','getAllMCPTools','subscribe','type','3251322jtmFNR','data','connect','888694ORyvyb','16NGjHnn','getMCPConnectionStatus','McpToolCallExecuted','171102AerTxD','McpConnectionStatusChanged','registerEventHandler','getConnectionStatus','event$','connectMCP','412389hxabeP','getAllTools','disconnectMCP','5yLKmol','McpToolCallReceived','748889ptgJzg','get','1743160cLrXWR','extend'];_0x2973=function(){return _0xded548;};return _0x2973();}
1
+ const _0x178e1c=_0x339b;(function(_0x4bd28c,_0x5a506a){const _0xb73142=_0x339b,_0x262530=_0x4bd28c();while(!![]){try{const _0x57b77a=parseInt(_0xb73142(0x1d1))/0x1+-parseInt(_0xb73142(0x1d5))/0x2*(-parseInt(_0xb73142(0x1e3))/0x3)+-parseInt(_0xb73142(0x1d6))/0x4+-parseInt(_0xb73142(0x1cf))/0x5*(-parseInt(_0xb73142(0x1c5))/0x6)+-parseInt(_0xb73142(0x1da))/0x7+-parseInt(_0xb73142(0x1ce))/0x8*(parseInt(_0xb73142(0x1e1))/0x9)+parseInt(_0xb73142(0x1c9))/0xa;if(_0x57b77a===_0x5a506a)break;else _0x262530['push'](_0x262530['shift']());}catch(_0x557db8){_0x262530['push'](_0x262530['shift']());}}}(_0x11d3,0x621b5));import{MCPEventId as _0x18a927,MCPEventService as _0x17f338,IMCPToolRegistry as _0x4cd79b,MCPConnectionController as _0x28ef94}from'@univerjs-pro/mcp';import{FEventName as _0x3384b0,FUniver as _0x25dbdc}from'@univerjs/core/facade';import{toDisposable as _0x4c6fd8}from'@univerjs/core';class d{get[_0x178e1c(0x1d2)](){const _0x425ed5=_0x178e1c;return _0x18a927[_0x425ed5(0x1d2)];}get[_0x178e1c(0x1cc)](){return _0x18a927['McpToolCallReceived'];}get[_0x178e1c(0x1c6)](){const _0x215af5=_0x178e1c;return _0x18a927[_0x215af5(0x1c6)];}get['McpToolCallFailed'](){const _0x11eeaf=_0x178e1c;return _0x18a927[_0x11eeaf(0x1dc)];}}_0x3384b0[_0x178e1c(0x1e0)](d);class M extends _0x25dbdc{['_initialize'](_0x1e17bb){const _0x18c6c9=_0x178e1c;this[_0x18c6c9(0x1dd)](_0x1e17bb);}[_0x178e1c(0x1dd)](_0x1d76de){const _0x4ac830=_0x178e1c,_0x28a22f=_0x1d76de[_0x4ac830(0x1df)](_0x17f338);this[_0x4ac830(0x1cb)](this['Event'][_0x4ac830(0x1d2)],()=>_0x4c6fd8(_0x28a22f[_0x4ac830(0x1d0)]['subscribe'](_0x569ac4=>{const _0x2c1da3=_0x4ac830;_0x569ac4['type']===_0x18a927['McpConnectionStatusChanged']&&this[_0x2c1da3(0x1e2)](this[_0x2c1da3(0x1de)][_0x2c1da3(0x1d2)],_0x569ac4[_0x2c1da3(0x1d9)]);}))),this[_0x4ac830(0x1cb)](this['Event'][_0x4ac830(0x1cc)],()=>_0x4c6fd8(_0x28a22f[_0x4ac830(0x1d0)]['subscribe'](_0x45c3f9=>{const _0xd57b0c=_0x4ac830;_0x45c3f9[_0xd57b0c(0x1d8)]===_0x18a927[_0xd57b0c(0x1cc)]&&this['fireEvent'](this['Event']['McpToolCallReceived'],_0x45c3f9[_0xd57b0c(0x1d9)]);}))),this[_0x4ac830(0x1cb)](this[_0x4ac830(0x1de)]['McpToolCallExecuted'],()=>_0x4c6fd8(_0x28a22f[_0x4ac830(0x1d0)]['subscribe'](_0x437c3d=>{const _0x45cde8=_0x4ac830;_0x437c3d[_0x45cde8(0x1d8)]===_0x18a927[_0x45cde8(0x1c6)]&&this['fireEvent'](this[_0x45cde8(0x1de)][_0x45cde8(0x1c6)],_0x437c3d[_0x45cde8(0x1d9)]);}))),this[_0x4ac830(0x1cb)](this[_0x4ac830(0x1de)]['McpToolCallFailed'],()=>_0x4c6fd8(_0x28a22f[_0x4ac830(0x1d0)][_0x4ac830(0x1c8)](_0x5cc763=>{const _0x4239d8=_0x4ac830;_0x5cc763[_0x4239d8(0x1d8)]===_0x18a927[_0x4239d8(0x1dc)]&&this[_0x4239d8(0x1e2)](this[_0x4239d8(0x1de)]['McpToolCallFailed'],_0x5cc763[_0x4239d8(0x1d9)]);})));}[_0x178e1c(0x1d3)](_0x115255,_0x63b0e0){const _0x5a38ec=_0x178e1c;return this['_injector'][_0x5a38ec(0x1df)](_0x4cd79b)[_0x5a38ec(0x1c7)](_0x115255,_0x63b0e0);}['getAllMCPTools'](){const _0x225477=_0x178e1c;return this[_0x225477(0x1e4)][_0x225477(0x1df)](_0x4cd79b)['getAllTools']();}[_0x178e1c(0x1c4)](_0x2af941,_0x8e3bf6){const _0x184084=_0x178e1c;return this['_injector'][_0x184084(0x1df)](_0x4cd79b)[_0x184084(0x1d4)](_0x2af941,_0x8e3bf6);}[_0x178e1c(0x1d7)](){const _0x268dec=_0x178e1c;return this['_injector'][_0x268dec(0x1df)](_0x28ef94)[_0x268dec(0x1cd)]();}[_0x178e1c(0x1db)](){const _0xdb2948=_0x178e1c;this[_0xdb2948(0x1e4)][_0xdb2948(0x1df)](_0x28ef94)[_0xdb2948(0x1ca)]();}['disconnectMCP'](){const _0x4a9fa9=_0x178e1c;this[_0x4a9fa9(0x1e4)][_0x4a9fa9(0x1df)](_0x28ef94)['disconnect']();}}function _0x11d3(){const _0x2d4081=['event$','149578kBtwYd','McpConnectionStatusChanged','validateMCPToolCall','executeTool','4xIfkyR','2552352jPDiCN','getMCPConnectionStatus','type','data','1373113HFgIRT','connectMCP','McpToolCallFailed','_registerMCPFacadeEvents','Event','get','extend','994176AfSObq','fireEvent','1196427axfASJ','_injector','callMCPTool','12rbxSLZ','McpToolCallExecuted','validateToolCall','subscribe','4891760aYlpWw','connect','registerEventHandler','McpToolCallReceived','getConnectionStatus','32lxPLZP','603940LoSoJl'];_0x11d3=function(){return _0x2d4081;};return _0x11d3();}function _0x339b(_0xf97dd8,_0x5d822c){_0xf97dd8=_0xf97dd8-0x1c4;const _0x11d34d=_0x11d3();let _0x339b42=_0x11d34d[_0xf97dd8];return _0x339b42;}_0x25dbdc[_0x178e1c(0x1e0)](M);