@univerjs-pro/mcp 0.12.4 → 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/facade.js CHANGED
@@ -1 +1 @@
1
- const _0x508938=_0x2e92;(function(_0x4c6cf6,_0x1c4e78){const _0x14c57f=_0x2e92,_0x15bcaf=_0x4c6cf6();while(!![]){try{const _0x597ede=-parseInt(_0x14c57f(0x6e))/0x1*(-parseInt(_0x14c57f(0x68))/0x2)+parseInt(_0x14c57f(0x74))/0x3*(parseInt(_0x14c57f(0x79))/0x4)+parseInt(_0x14c57f(0x84))/0x5+parseInt(_0x14c57f(0x7c))/0x6+parseInt(_0x14c57f(0x75))/0x7*(parseInt(_0x14c57f(0x81))/0x8)+parseInt(_0x14c57f(0x7d))/0x9+-parseInt(_0x14c57f(0x85))/0xa*(parseInt(_0x14c57f(0x72))/0xb);if(_0x597ede===_0x1c4e78)break;else _0x15bcaf['push'](_0x15bcaf['shift']());}catch(_0x28ffd2){_0x15bcaf['push'](_0x15bcaf['shift']());}}}(_0x1849,0x92ea5));import{MCPEventId as _0x9687ae,MCPEventService as _0xc59db9,IMCPToolRegistry as _0x2c6b95,MCPConnectionController as _0x1ffd1e}from'@univerjs-pro/mcp';import{FEventName as _0x138801,FUniver as _0x5d1bde}from'@univerjs/core/facade';import{toDisposable as _0x478f93}from'@univerjs/core';function _0x1849(){const _0x3e61b0=['disconnectMCP','1909510uKvHyk','10KrlMbP','getMCPConnectionStatus','getAllTools','223738uMluRn','Event','McpToolCallExecuted','connectMCP','_injector','McpToolCallFailed','1zrZsJK','McpToolCallReceived','fireEvent','subscribe','22950026svjdhn','type','51qRoPiz','101521YJqJTm','McpConnectionStatusChanged','extend','callMCPTool','222520RUlBmp','event$','_registerMCPFacadeEvents','4108050ezvYcz','115749jcVMOx','registerEventHandler','data','_initialize','304UlfoEL','get'];_0x1849=function(){return _0x3e61b0;};return _0x1849();}class d{get[_0x508938(0x76)](){return _0x9687ae['McpConnectionStatusChanged'];}get[_0x508938(0x6f)](){const _0x28eed1=_0x508938;return _0x9687ae[_0x28eed1(0x6f)];}get[_0x508938(0x6a)](){const _0x791233=_0x508938;return _0x9687ae[_0x791233(0x6a)];}get[_0x508938(0x6d)](){return _0x9687ae['McpToolCallFailed'];}}_0x138801['extend'](d);function _0x2e92(_0x24b7ae,_0x19879e){_0x24b7ae=_0x24b7ae-0x67;const _0x1849e8=_0x1849();let _0x2e9272=_0x1849e8[_0x24b7ae];return _0x2e9272;}class M extends _0x5d1bde{[_0x508938(0x80)](_0x574f4b){const _0x10600b=_0x508938;this[_0x10600b(0x7b)](_0x574f4b);}[_0x508938(0x7b)](_0x5c58bd){const _0x3c4fb1=_0x508938,_0x1a5041=_0x5c58bd[_0x3c4fb1(0x82)](_0xc59db9);this['registerEventHandler'](this[_0x3c4fb1(0x69)]['McpConnectionStatusChanged'],()=>_0x478f93(_0x1a5041[_0x3c4fb1(0x7a)][_0x3c4fb1(0x71)](_0x53843a=>{const _0x39b6ec=_0x3c4fb1;_0x53843a[_0x39b6ec(0x73)]===_0x9687ae[_0x39b6ec(0x76)]&&this['fireEvent'](this['Event'][_0x39b6ec(0x76)],_0x53843a[_0x39b6ec(0x7f)]);}))),this[_0x3c4fb1(0x7e)](this['Event'][_0x3c4fb1(0x6f)],()=>_0x478f93(_0x1a5041[_0x3c4fb1(0x7a)][_0x3c4fb1(0x71)](_0x3b5bbf=>{const _0x2e2e6e=_0x3c4fb1;_0x3b5bbf[_0x2e2e6e(0x73)]===_0x9687ae[_0x2e2e6e(0x6f)]&&this[_0x2e2e6e(0x70)](this['Event'][_0x2e2e6e(0x6f)],_0x3b5bbf['data']);}))),this[_0x3c4fb1(0x7e)](this['Event'][_0x3c4fb1(0x6a)],()=>_0x478f93(_0x1a5041[_0x3c4fb1(0x7a)][_0x3c4fb1(0x71)](_0x39d3ff=>{const _0x5cca22=_0x3c4fb1;_0x39d3ff['type']===_0x9687ae['McpToolCallExecuted']&&this['fireEvent'](this['Event']['McpToolCallExecuted'],_0x39d3ff[_0x5cca22(0x7f)]);}))),this[_0x3c4fb1(0x7e)](this[_0x3c4fb1(0x69)][_0x3c4fb1(0x6d)],()=>_0x478f93(_0x1a5041[_0x3c4fb1(0x7a)][_0x3c4fb1(0x71)](_0xcb13c4=>{const _0x12d2cf=_0x3c4fb1;_0xcb13c4[_0x12d2cf(0x73)]===_0x9687ae['McpToolCallFailed']&&this['fireEvent'](this[_0x12d2cf(0x69)][_0x12d2cf(0x6d)],_0xcb13c4[_0x12d2cf(0x7f)]);})));}['validateMCPToolCall'](_0xa7aab0,_0x36425c){const _0x49ad4f=_0x508938;return this[_0x49ad4f(0x6c)]['get'](_0x2c6b95)['validateToolCall'](_0xa7aab0,_0x36425c);}['getAllMCPTools'](){const _0x35c25e=_0x508938;return this[_0x35c25e(0x6c)]['get'](_0x2c6b95)[_0x35c25e(0x67)]();}[_0x508938(0x78)](_0x50597f,_0x5279ab){const _0x4ec04e=_0x508938;return this[_0x4ec04e(0x6c)][_0x4ec04e(0x82)](_0x2c6b95)['executeTool'](_0x50597f,_0x5279ab);}[_0x508938(0x86)](){const _0x38afd4=_0x508938;return this[_0x38afd4(0x6c)][_0x38afd4(0x82)](_0x1ffd1e)['getConnectionStatus']();}[_0x508938(0x6b)](){const _0x237d04=_0x508938;this[_0x237d04(0x6c)][_0x237d04(0x82)](_0x1ffd1e)['connect']();}[_0x508938(0x83)](){const _0x37ffbf=_0x508938;this[_0x37ffbf(0x6c)][_0x37ffbf(0x82)](_0x1ffd1e)['disconnect']();}}_0x5d1bde[_0x508938(0x77)](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);