@univerjs-pro/mcp 0.12.2 → 0.12.3-experimental.20251205-e439e48

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/cjs/facade.js CHANGED
@@ -1 +1 @@
1
- 'use strict';const _0x4526cb=_0x273e;(function(_0x12c151,_0x35e8b1){const _0x4dcf3d=_0x273e,_0x18dabe=_0x12c151();while(!![]){try{const _0x17e589=-parseInt(_0x4dcf3d(0x19c))/0x1*(-parseInt(_0x4dcf3d(0x1a5))/0x2)+-parseInt(_0x4dcf3d(0x1aa))/0x3*(-parseInt(_0x4dcf3d(0x198))/0x4)+-parseInt(_0x4dcf3d(0x1a4))/0x5+-parseInt(_0x4dcf3d(0x188))/0x6*(-parseInt(_0x4dcf3d(0x19f))/0x7)+-parseInt(_0x4dcf3d(0x1a6))/0x8*(parseInt(_0x4dcf3d(0x194))/0x9)+-parseInt(_0x4dcf3d(0x1af))/0xa*(parseInt(_0x4dcf3d(0x191))/0xb)+-parseInt(_0x4dcf3d(0x19d))/0xc*(parseInt(_0x4dcf3d(0x1ac))/0xd);if(_0x17e589===_0x35e8b1)break;else _0x18dabe['push'](_0x18dabe['shift']());}catch(_0x186709){_0x18dabe['push'](_0x18dabe['shift']());}}}(_0x212a,0x22344));const e=require('@univerjs-pro/mcp'),i=require('@univerjs/core/facade'),l=require('@univerjs/core');class r{get[_0x4526cb(0x199)](){const _0x1053dd=_0x4526cb;return e[_0x1053dd(0x18c)]['McpConnectionStatusChanged'];}get[_0x4526cb(0x19a)](){const _0x32e70f=_0x4526cb;return e[_0x32e70f(0x18c)]['McpToolCallReceived'];}get[_0x4526cb(0x1a3)](){const _0x3cda47=_0x4526cb;return e[_0x3cda47(0x18c)][_0x3cda47(0x1a3)];}get[_0x4526cb(0x18b)](){return e['MCPEventId']['McpToolCallFailed'];}}i[_0x4526cb(0x19b)]['extend'](r);class s extends i[_0x4526cb(0x18f)]{[_0x4526cb(0x190)](_0x433e82){this['_registerMCPFacadeEvents'](_0x433e82);}['_registerMCPFacadeEvents'](_0x512224){const _0xb922ce=_0x4526cb,_0x59ca35=_0x512224[_0xb922ce(0x18a)](e[_0xb922ce(0x1a7)]);this[_0xb922ce(0x195)](this[_0xb922ce(0x1a2)]['McpConnectionStatusChanged'],()=>l['toDisposable'](_0x59ca35[_0xb922ce(0x189)][_0xb922ce(0x1ab)](_0x2bdd7c=>{const _0x40b358=_0xb922ce;_0x2bdd7c[_0x40b358(0x1a0)]===e[_0x40b358(0x18c)]['McpConnectionStatusChanged']&&this[_0x40b358(0x18d)](this[_0x40b358(0x1a2)][_0x40b358(0x199)],_0x2bdd7c[_0x40b358(0x196)]);}))),this[_0xb922ce(0x195)](this['Event']['McpToolCallReceived'],()=>l['toDisposable'](_0x59ca35['event$'][_0xb922ce(0x1ab)](_0x1b14fb=>{const _0x286df6=_0xb922ce;_0x1b14fb[_0x286df6(0x1a0)]===e['MCPEventId'][_0x286df6(0x19a)]&&this[_0x286df6(0x18d)](this['Event'][_0x286df6(0x19a)],_0x1b14fb[_0x286df6(0x196)]);}))),this[_0xb922ce(0x195)](this[_0xb922ce(0x1a2)][_0xb922ce(0x1a3)],()=>l[_0xb922ce(0x1b2)](_0x59ca35[_0xb922ce(0x189)][_0xb922ce(0x1ab)](_0x58cefe=>{const _0xb85f86=_0xb922ce;_0x58cefe[_0xb85f86(0x1a0)]===e[_0xb85f86(0x18c)][_0xb85f86(0x1a3)]&&this['fireEvent'](this['Event'][_0xb85f86(0x1a3)],_0x58cefe[_0xb85f86(0x196)]);}))),this['registerEventHandler'](this['Event'][_0xb922ce(0x18b)],()=>l['toDisposable'](_0x59ca35[_0xb922ce(0x189)]['subscribe'](_0x11eaaa=>{const _0x566d36=_0xb922ce;_0x11eaaa['type']===e['MCPEventId'][_0x566d36(0x18b)]&&this[_0x566d36(0x18d)](this[_0x566d36(0x1a2)][_0x566d36(0x18b)],_0x11eaaa[_0x566d36(0x196)]);})));}[_0x4526cb(0x1b0)](_0x59d1da,_0x3d5927){const _0x156595=_0x4526cb;return this[_0x156595(0x1ae)]['get'](e[_0x156595(0x1a8)])['validateToolCall'](_0x59d1da,_0x3d5927);}[_0x4526cb(0x192)](){const _0x5867fd=_0x4526cb;return this[_0x5867fd(0x1ae)][_0x5867fd(0x18a)](e[_0x5867fd(0x1a8)])[_0x5867fd(0x19e)]();}[_0x4526cb(0x193)](_0x12fc80,_0x5a5539){const _0x40d68a=_0x4526cb;return this[_0x40d68a(0x1ae)][_0x40d68a(0x18a)](e['IMCPToolRegistry'])[_0x40d68a(0x1ad)](_0x12fc80,_0x5a5539);}[_0x4526cb(0x1a1)](){const _0x1680cc=_0x4526cb;return this[_0x1680cc(0x1ae)]['get'](e[_0x1680cc(0x1a9)])[_0x1680cc(0x18e)]();}[_0x4526cb(0x197)](){const _0x471cfb=_0x4526cb;this[_0x471cfb(0x1ae)][_0x471cfb(0x18a)](e[_0x471cfb(0x1a9)])['connect']();}['disconnectMCP'](){const _0x156c63=_0x4526cb;this[_0x156c63(0x1ae)][_0x156c63(0x18a)](e[_0x156c63(0x1a9)])['disconnect']();}}function _0x273e(_0x26c4a5,_0x4f9739){const _0x212a2c=_0x212a();return _0x273e=function(_0x273ec1,_0x16c196){_0x273ec1=_0x273ec1-0x188;let _0x5ab771=_0x212a2c[_0x273ec1];return _0x5ab771;},_0x273e(_0x26c4a5,_0x4f9739);}i[_0x4526cb(0x18f)][_0x4526cb(0x1b1)](s);function _0x212a(){const _0x54fd00=['McpConnectionStatusChanged','McpToolCallReceived','FEventName','7hCMEbc','24ZTsEHs','getAllTools','35NLWuaL','type','getMCPConnectionStatus','Event','McpToolCallExecuted','246355NwrYAJ','7406qbFzIw','1000pPlxkl','MCPEventService','IMCPToolRegistry','MCPConnectionController','1047wRckpK','subscribe','123123kVbsrC','executeTool','_injector','545680GocArf','validateMCPToolCall','extend','toDisposable','267846MKYdSA','event$','get','McpToolCallFailed','MCPEventId','fireEvent','getConnectionStatus','FUniver','_initialize','44FHLdmq','getAllMCPTools','callMCPTool','189eiIyhX','registerEventHandler','data','connectMCP','2064SokYhM'];_0x212a=function(){return _0x54fd00;};return _0x212a();}
1
+ 'use strict';const _0x250539=_0x1912;(function(_0x2b10af,_0x4bdb7b){const _0x4bac17=_0x1912,_0x4a04ed=_0x2b10af();while(!![]){try{const _0x4f2a87=parseInt(_0x4bac17(0x13f))/0x1*(-parseInt(_0x4bac17(0x136))/0x2)+-parseInt(_0x4bac17(0x137))/0x3+parseInt(_0x4bac17(0x11e))/0x4+-parseInt(_0x4bac17(0x11c))/0x5*(parseInt(_0x4bac17(0x12d))/0x6)+-parseInt(_0x4bac17(0x122))/0x7*(parseInt(_0x4bac17(0x140))/0x8)+parseInt(_0x4bac17(0x125))/0x9*(-parseInt(_0x4bac17(0x119))/0xa)+parseInt(_0x4bac17(0x135))/0xb*(parseInt(_0x4bac17(0x117))/0xc);if(_0x4f2a87===_0x4bdb7b)break;else _0x4a04ed['push'](_0x4a04ed['shift']());}catch(_0x2f66fb){_0x4a04ed['push'](_0x4a04ed['shift']());}}}(_0x2617,0xa7306));const e=require('@univerjs-pro/mcp'),i=require('@univerjs/core/facade'),l=require('@univerjs/core');class r{get[_0x250539(0x138)](){const _0x17bd9a=_0x250539;return e[_0x17bd9a(0x131)][_0x17bd9a(0x138)];}get['McpToolCallReceived'](){const _0x7100d3=_0x250539;return e['MCPEventId'][_0x7100d3(0x13b)];}get[_0x250539(0x120)](){const _0x1c0c76=_0x250539;return e['MCPEventId'][_0x1c0c76(0x120)];}get[_0x250539(0x133)](){const _0x40e46d=_0x250539;return e[_0x40e46d(0x131)][_0x40e46d(0x133)];}}i[_0x250539(0x128)][_0x250539(0x11d)](r);function _0x1912(_0x343ea2,_0x1ad3a2){_0x343ea2=_0x343ea2-0x116;const _0x2617c8=_0x2617();let _0x19123f=_0x2617c8[_0x343ea2];return _0x19123f;}class s extends i[_0x250539(0x11a)]{[_0x250539(0x124)](_0xb62f3d){const _0x45699b=_0x250539;this[_0x45699b(0x13c)](_0xb62f3d);}['_registerMCPFacadeEvents'](_0x11c50b){const _0x2e30b2=_0x250539,_0x37d34e=_0x11c50b[_0x2e30b2(0x126)](e[_0x2e30b2(0x13d)]);this[_0x2e30b2(0x139)](this['Event'][_0x2e30b2(0x138)],()=>l[_0x2e30b2(0x134)](_0x37d34e['event$'][_0x2e30b2(0x12b)](_0x35a7ba=>{const _0x39dfea=_0x2e30b2;_0x35a7ba[_0x39dfea(0x13a)]===e[_0x39dfea(0x131)]['McpConnectionStatusChanged']&&this[_0x39dfea(0x12f)](this[_0x39dfea(0x129)]['McpConnectionStatusChanged'],_0x35a7ba[_0x39dfea(0x12e)]);}))),this['registerEventHandler'](this[_0x2e30b2(0x129)][_0x2e30b2(0x13b)],()=>l['toDisposable'](_0x37d34e['event$'][_0x2e30b2(0x12b)](_0x574bce=>{const _0x4c76e7=_0x2e30b2;_0x574bce[_0x4c76e7(0x13a)]===e['MCPEventId'][_0x4c76e7(0x13b)]&&this['fireEvent'](this[_0x4c76e7(0x129)][_0x4c76e7(0x13b)],_0x574bce[_0x4c76e7(0x12e)]);}))),this[_0x2e30b2(0x139)](this['Event'][_0x2e30b2(0x120)],()=>l['toDisposable'](_0x37d34e[_0x2e30b2(0x127)]['subscribe'](_0xc2aa7e=>{const _0x279886=_0x2e30b2;_0xc2aa7e[_0x279886(0x13a)]===e[_0x279886(0x131)][_0x279886(0x120)]&&this[_0x279886(0x12f)](this[_0x279886(0x129)][_0x279886(0x120)],_0xc2aa7e[_0x279886(0x12e)]);}))),this[_0x2e30b2(0x139)](this[_0x2e30b2(0x129)][_0x2e30b2(0x133)],()=>l[_0x2e30b2(0x134)](_0x37d34e[_0x2e30b2(0x127)]['subscribe'](_0x3d058b=>{const _0x4b782a=_0x2e30b2;_0x3d058b['type']===e[_0x4b782a(0x131)][_0x4b782a(0x133)]&&this[_0x4b782a(0x12f)](this[_0x4b782a(0x129)][_0x4b782a(0x133)],_0x3d058b[_0x4b782a(0x12e)]);})));}[_0x250539(0x12a)](_0x39bfcc,_0x5d16a4){const _0xf4ab25=_0x250539;return this[_0xf4ab25(0x130)][_0xf4ab25(0x126)](e[_0xf4ab25(0x121)])[_0xf4ab25(0x123)](_0x39bfcc,_0x5d16a4);}['getAllMCPTools'](){const _0x1907d0=_0x250539;return this[_0x1907d0(0x130)][_0x1907d0(0x126)](e[_0x1907d0(0x121)])[_0x1907d0(0x11f)]();}['callMCPTool'](_0x3e189e,_0x37eb25){const _0x1ae0aa=_0x250539;return this['_injector'][_0x1ae0aa(0x126)](e['IMCPToolRegistry'])['executeTool'](_0x3e189e,_0x37eb25);}[_0x250539(0x11b)](){const _0x54b43d=_0x250539;return this[_0x54b43d(0x130)][_0x54b43d(0x126)](e[_0x54b43d(0x13e)])[_0x54b43d(0x141)]();}[_0x250539(0x132)](){const _0x39a406=_0x250539;this[_0x39a406(0x130)][_0x39a406(0x126)](e['MCPConnectionController'])[_0x39a406(0x118)]();}[_0x250539(0x116)](){const _0x1bf747=_0x250539;this[_0x1bf747(0x130)][_0x1bf747(0x126)](e[_0x1bf747(0x13e)])[_0x1bf747(0x12c)]();}}i[_0x250539(0x11a)][_0x250539(0x11d)](s);function _0x2617(){const _0x2d7c5d=['connectMCP','McpToolCallFailed','toDisposable','9031rEBflV','94mYdBlK','112845ochQhD','McpConnectionStatusChanged','registerEventHandler','type','McpToolCallReceived','_registerMCPFacadeEvents','MCPEventService','MCPConnectionController','1039HFgPdU','413720dlkzoU','getConnectionStatus','disconnectMCP','25764Ojwdwb','connect','184390tSadLv','FUniver','getMCPConnectionStatus','393685uBxeEn','extend','2849096Jupqgl','getAllTools','McpToolCallExecuted','IMCPToolRegistry','7OKGuAI','validateToolCall','_initialize','153prSNvj','get','event$','FEventName','Event','validateMCPToolCall','subscribe','disconnect','102sBWBxN','data','fireEvent','_injector','MCPEventId'];_0x2617=function(){return _0x2d7c5d;};return _0x2617();}