@univerjs-pro/mcp 0.15.0-insiders.20260106-79b11f9 → 0.15.0-insiders.20260107-3441c7a

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 _0x4fdb95=_0x5c10;(function(_0x1dfcd1,_0x2250fc){const _0x3f3a6f=_0x5c10,_0x288135=_0x1dfcd1();while(!![]){try{const _0xea03a1=parseInt(_0x3f3a6f(0x10b))/0x1*(-parseInt(_0x3f3a6f(0xf0))/0x2)+parseInt(_0x3f3a6f(0x107))/0x3+-parseInt(_0x3f3a6f(0x104))/0x4+parseInt(_0x3f3a6f(0xef))/0x5*(-parseInt(_0x3f3a6f(0xf1))/0x6)+-parseInt(_0x3f3a6f(0xfc))/0x7*(-parseInt(_0x3f3a6f(0xfd))/0x8)+-parseInt(_0x3f3a6f(0xfe))/0x9*(-parseInt(_0x3f3a6f(0x105))/0xa)+parseInt(_0x3f3a6f(0x10a))/0xb;if(_0xea03a1===_0x2250fc)break;else _0x288135['push'](_0x288135['shift']());}catch(_0xff8936){_0x288135['push'](_0x288135['shift']());}}}(_0x5b20,0x48bc3));import{MCPEventId as _0x560e5b,MCPEventService as _0x221519,IMCPToolRegistry as _0x35c3a7,MCPConnectionController as _0x3925ec}from'@univerjs-pro/mcp';import{FEventName as _0x3419d9,FUniver as _0x449221}from'@univerjs/core/facade';import{toDisposable as _0x60c165}from'@univerjs/core';class d{get['McpConnectionStatusChanged'](){return _0x560e5b['McpConnectionStatusChanged'];}get[_0x4fdb95(0xf9)](){const _0x2f5f7f=_0x4fdb95;return _0x560e5b[_0x2f5f7f(0xf9)];}get[_0x4fdb95(0xf5)](){const _0x510f68=_0x4fdb95;return _0x560e5b[_0x510f68(0xf5)];}get[_0x4fdb95(0x109)](){return _0x560e5b['McpToolCallFailed'];}}_0x3419d9[_0x4fdb95(0x100)](d);class M extends _0x449221{[_0x4fdb95(0xf7)](_0x51ce29){this['_registerMCPFacadeEvents'](_0x51ce29);}['_registerMCPFacadeEvents'](_0x32818c){const _0x14dd5f=_0x4fdb95,_0x3ff3b3=_0x32818c[_0x14dd5f(0xfa)](_0x221519);this[_0x14dd5f(0xf2)](this[_0x14dd5f(0x101)][_0x14dd5f(0xed)],()=>_0x60c165(_0x3ff3b3[_0x14dd5f(0xfb)][_0x14dd5f(0xf6)](_0x43d30f=>{const _0x28cb73=_0x14dd5f;_0x43d30f[_0x28cb73(0xf8)]===_0x560e5b[_0x28cb73(0xed)]&&this[_0x28cb73(0x103)](this[_0x28cb73(0x101)][_0x28cb73(0xed)],_0x43d30f['data']);}))),this[_0x14dd5f(0xf2)](this[_0x14dd5f(0x101)][_0x14dd5f(0xf9)],()=>_0x60c165(_0x3ff3b3[_0x14dd5f(0xfb)][_0x14dd5f(0xf6)](_0x4183d2=>{const _0x5cd972=_0x14dd5f;_0x4183d2[_0x5cd972(0xf8)]===_0x560e5b[_0x5cd972(0xf9)]&&this[_0x5cd972(0x103)](this[_0x5cd972(0x101)][_0x5cd972(0xf9)],_0x4183d2[_0x5cd972(0xf3)]);}))),this[_0x14dd5f(0xf2)](this[_0x14dd5f(0x101)]['McpToolCallExecuted'],()=>_0x60c165(_0x3ff3b3[_0x14dd5f(0xfb)][_0x14dd5f(0xf6)](_0x4fe346=>{const _0x1d5cfe=_0x14dd5f;_0x4fe346[_0x1d5cfe(0xf8)]===_0x560e5b[_0x1d5cfe(0xf5)]&&this[_0x1d5cfe(0x103)](this[_0x1d5cfe(0x101)][_0x1d5cfe(0xf5)],_0x4fe346[_0x1d5cfe(0xf3)]);}))),this[_0x14dd5f(0xf2)](this[_0x14dd5f(0x101)][_0x14dd5f(0x109)],()=>_0x60c165(_0x3ff3b3[_0x14dd5f(0xfb)][_0x14dd5f(0xf6)](_0x5d739a=>{const _0x32e25e=_0x14dd5f;_0x5d739a['type']===_0x560e5b[_0x32e25e(0x109)]&&this[_0x32e25e(0x103)](this[_0x32e25e(0x101)]['McpToolCallFailed'],_0x5d739a[_0x32e25e(0xf3)]);})));}['validateMCPToolCall'](_0x47554d,_0x5b6cde){const _0x1f751c=_0x4fdb95;return this[_0x1f751c(0xf4)]['get'](_0x35c3a7)[_0x1f751c(0x106)](_0x47554d,_0x5b6cde);}[_0x4fdb95(0xec)](){const _0x10c890=_0x4fdb95;return this[_0x10c890(0xf4)]['get'](_0x35c3a7)['getAllTools']();}['callMCPTool'](_0x2d4bd4,_0x3ab9c8){const _0x3b44e0=_0x4fdb95;return this[_0x3b44e0(0xf4)][_0x3b44e0(0xfa)](_0x35c3a7)['executeTool'](_0x2d4bd4,_0x3ab9c8);}[_0x4fdb95(0xee)](){const _0x14fb3d=_0x4fdb95;return this[_0x14fb3d(0xf4)]['get'](_0x3925ec)['getConnectionStatus']();}[_0x4fdb95(0xff)](){const _0x656376=_0x4fdb95;this[_0x656376(0xf4)]['get'](_0x3925ec)['connect']();}[_0x4fdb95(0x102)](){const _0x1793fa=_0x4fdb95;this[_0x1793fa(0xf4)]['get'](_0x3925ec)[_0x1793fa(0x108)]();}}_0x449221[_0x4fdb95(0x100)](M);function _0x5c10(_0x274293,_0x244ca6){_0x274293=_0x274293-0xec;const _0x5b20a4=_0x5b20();let _0x5c10d9=_0x5b20a4[_0x274293];return _0x5c10d9;}function _0x5b20(){const _0x347767=['connectMCP','extend','Event','disconnectMCP','fireEvent','862008ajsIoE','18230mQervm','validateToolCall','16518QDUkVz','disconnect','McpToolCallFailed','6342138VFHZRR','3KmgXxd','getAllMCPTools','McpConnectionStatusChanged','getMCPConnectionStatus','95VrvuRl','174096uypVpz','158034Jdivry','registerEventHandler','data','_injector','McpToolCallExecuted','subscribe','_initialize','type','McpToolCallReceived','get','event$','1001xKUpRJ','11128lBWBbQ','2439EYGCYh'];_0x5b20=function(){return _0x347767;};return _0x5b20();}
1
+ const _0x199941=_0x4e20;(function(_0xbb6487,_0x5043a7){const _0x271d26=_0x4e20,_0x511fc8=_0xbb6487();while(!![]){try{const _0x1ba4c7=-parseInt(_0x271d26(0xe3))/0x1*(parseInt(_0x271d26(0xed))/0x2)+parseInt(_0x271d26(0xf9))/0x3*(-parseInt(_0x271d26(0xe7))/0x4)+parseInt(_0x271d26(0xf3))/0x5*(-parseInt(_0x271d26(0xf5))/0x6)+parseInt(_0x271d26(0xf8))/0x7*(-parseInt(_0x271d26(0xd6))/0x8)+-parseInt(_0x271d26(0xd4))/0x9*(parseInt(_0x271d26(0xf4))/0xa)+parseInt(_0x271d26(0xdb))/0xb+parseInt(_0x271d26(0xe0))/0xc*(parseInt(_0x271d26(0xf1))/0xd);if(_0x1ba4c7===_0x5043a7)break;else _0x511fc8['push'](_0x511fc8['shift']());}catch(_0x1782c8){_0x511fc8['push'](_0x511fc8['shift']());}}}(_0x2dee,0x42f73));import{MCPEventId as _0x34b74e,MCPEventService as _0x9ef800,IMCPToolRegistry as _0xa86b73,MCPConnectionController as _0x255e54}from'@univerjs-pro/mcp';import{FEventName as _0x37f0f5,FUniver as _0x55c864}from'@univerjs/core/facade';import{toDisposable as _0x551f70}from'@univerjs/core';class d{get['McpConnectionStatusChanged'](){const _0xf198ec=_0x4e20;return _0x34b74e[_0xf198ec(0xf2)];}get['McpToolCallReceived'](){return _0x34b74e['McpToolCallReceived'];}get[_0x199941(0xe2)](){const _0x235dc3=_0x199941;return _0x34b74e[_0x235dc3(0xe2)];}get[_0x199941(0xea)](){return _0x34b74e['McpToolCallFailed'];}}_0x37f0f5[_0x199941(0xd5)](d);function _0x4e20(_0x26a130,_0x21b1f7){_0x26a130=_0x26a130-0xd4;const _0x2dee60=_0x2dee();let _0x4e2037=_0x2dee60[_0x26a130];return _0x4e2037;}class M extends _0x55c864{[_0x199941(0xf0)](_0x504f76){const _0xcf9339=_0x199941;this[_0xcf9339(0xd9)](_0x504f76);}[_0x199941(0xd9)](_0x2c6ee7){const _0x17417e=_0x199941,_0x2ee7d2=_0x2c6ee7[_0x17417e(0xe5)](_0x9ef800);this['registerEventHandler'](this[_0x17417e(0xeb)]['McpConnectionStatusChanged'],()=>_0x551f70(_0x2ee7d2[_0x17417e(0xe6)][_0x17417e(0xec)](_0x464f01=>{const _0x2e4fd9=_0x17417e;_0x464f01[_0x2e4fd9(0xef)]===_0x34b74e[_0x2e4fd9(0xf2)]&&this['fireEvent'](this[_0x2e4fd9(0xeb)][_0x2e4fd9(0xf2)],_0x464f01[_0x2e4fd9(0xf7)]);}))),this[_0x17417e(0xd8)](this[_0x17417e(0xeb)][_0x17417e(0xdc)],()=>_0x551f70(_0x2ee7d2[_0x17417e(0xe6)]['subscribe'](_0x401d0b=>{const _0x286afd=_0x17417e;_0x401d0b['type']===_0x34b74e[_0x286afd(0xdc)]&&this[_0x286afd(0xe8)](this[_0x286afd(0xeb)][_0x286afd(0xdc)],_0x401d0b[_0x286afd(0xf7)]);}))),this[_0x17417e(0xd8)](this['Event'][_0x17417e(0xe2)],()=>_0x551f70(_0x2ee7d2['event$'][_0x17417e(0xec)](_0x521ba9=>{const _0x3974a4=_0x17417e;_0x521ba9['type']===_0x34b74e[_0x3974a4(0xe2)]&&this[_0x3974a4(0xe8)](this[_0x3974a4(0xeb)]['McpToolCallExecuted'],_0x521ba9['data']);}))),this[_0x17417e(0xd8)](this[_0x17417e(0xeb)][_0x17417e(0xea)],()=>_0x551f70(_0x2ee7d2['event$'][_0x17417e(0xec)](_0x1e2cbf=>{const _0x30739d=_0x17417e;_0x1e2cbf[_0x30739d(0xef)]===_0x34b74e['McpToolCallFailed']&&this[_0x30739d(0xe8)](this[_0x30739d(0xeb)][_0x30739d(0xea)],_0x1e2cbf[_0x30739d(0xf7)]);})));}[_0x199941(0xe1)](_0x52ebcd,_0x242326){const _0x3e9292=_0x199941;return this[_0x3e9292(0xf6)][_0x3e9292(0xe5)](_0xa86b73)[_0x3e9292(0xd7)](_0x52ebcd,_0x242326);}[_0x199941(0xdd)](){const _0x1858e1=_0x199941;return this[_0x1858e1(0xf6)][_0x1858e1(0xe5)](_0xa86b73)[_0x1858e1(0xdf)]();}[_0x199941(0xe9)](_0x37971c,_0x442b7b){const _0x40e252=_0x199941;return this[_0x40e252(0xf6)][_0x40e252(0xe5)](_0xa86b73)['executeTool'](_0x37971c,_0x442b7b);}[_0x199941(0xee)](){const _0x1375a9=_0x199941;return this[_0x1375a9(0xf6)]['get'](_0x255e54)['getConnectionStatus']();}[_0x199941(0xde)](){const _0x2d46f6=_0x199941;this['_injector'][_0x2d46f6(0xe5)](_0x255e54)[_0x2d46f6(0xda)]();}[_0x199941(0xe4)](){const _0x29d01c=_0x199941;this['_injector'][_0x29d01c(0xe5)](_0x255e54)[_0x29d01c(0xfa)]();}}_0x55c864[_0x199941(0xd5)](M);function _0x2dee(){const _0x280943=['disconnectMCP','get','event$','24QYeeZR','fireEvent','callMCPTool','McpToolCallFailed','Event','subscribe','9664ALhLup','getMCPConnectionStatus','type','_initialize','2217540XWbuUM','McpConnectionStatusChanged','30RdOZgu','1780670geGrhz','327408EkEdoa','_injector','data','77cTAlhI','85191YApzoj','disconnect','18JiuaUA','extend','281096BtEyOy','validateToolCall','registerEventHandler','_registerMCPFacadeEvents','connect','4856082WrAvEc','McpToolCallReceived','getAllMCPTools','connectMCP','getAllTools','84KqrJlW','validateMCPToolCall','McpToolCallExecuted','25aXSnFy'];_0x2dee=function(){return _0x280943;};return _0x2dee();}