@univerjs-pro/mcp 0.12.1-nightly.202511221011 → 0.12.2

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 _0x558678=_0x1769;(function(_0x3af92a,_0x31e9d6){const _0x5d84ab=_0x1769,_0x196dd9=_0x3af92a();while(!![]){try{const _0x257b03=parseInt(_0x5d84ab(0x70))/0x1+parseInt(_0x5d84ab(0x6a))/0x2+-parseInt(_0x5d84ab(0x72))/0x3+-parseInt(_0x5d84ab(0x68))/0x4+-parseInt(_0x5d84ab(0x75))/0x5*(parseInt(_0x5d84ab(0x81))/0x6)+-parseInt(_0x5d84ab(0x7e))/0x7*(parseInt(_0x5d84ab(0x8a))/0x8)+-parseInt(_0x5d84ab(0x6b))/0x9*(-parseInt(_0x5d84ab(0x71))/0xa);if(_0x257b03===_0x31e9d6)break;else _0x196dd9['push'](_0x196dd9['shift']());}catch(_0x306b95){_0x196dd9['push'](_0x196dd9['shift']());}}}(_0x3d9a,0x33c00));import{MCPEventId as _0x51b352,MCPEventService as _0x394a9b,IMCPToolRegistry as _0x2988af,MCPConnectionController as _0x2cc124}from'@univerjs-pro/mcp';import{FEventName as _0x24ad74,FUniver as _0x34f002}from'@univerjs/core/facade';import{toDisposable as _0x229816}from'@univerjs/core';class d{get[_0x558678(0x88)](){const _0x3a002f=_0x558678;return _0x51b352[_0x3a002f(0x88)];}get[_0x558678(0x86)](){return _0x51b352['McpToolCallReceived'];}get[_0x558678(0x78)](){const _0x577095=_0x558678;return _0x51b352[_0x577095(0x78)];}get[_0x558678(0x82)](){const _0x34cbb3=_0x558678;return _0x51b352[_0x34cbb3(0x82)];}}function _0x3d9a(){const _0xa852df=['_initialize','subscribe','extend','validateMCPToolCall','getAllTools','57169bkmjkP','Event','disconnect','66GgWIUs','McpToolCallFailed','callMCPTool','fireEvent','data','McpToolCallReceived','_injector','McpConnectionStatusChanged','executeTool','64GINVFt','getMCPConnectionStatus','919560tOXetD','type','243880zCdkgd','2367RamnvV','disconnectMCP','get','registerEventHandler','event$','364472waokNb','11630wlixqE','219945AqLTrR','_registerMCPFacadeEvents','connect','96260tRffnd','getAllMCPTools','connectMCP','McpToolCallExecuted'];_0x3d9a=function(){return _0xa852df;};return _0x3d9a();}function _0x1769(_0x58b4fb,_0x4a62c7){const _0x3d9ac1=_0x3d9a();return _0x1769=function(_0x176956,_0x3aec2f){_0x176956=_0x176956-0x68;let _0x23b564=_0x3d9ac1[_0x176956];return _0x23b564;},_0x1769(_0x58b4fb,_0x4a62c7);}_0x24ad74[_0x558678(0x7b)](d);class M extends _0x34f002{[_0x558678(0x79)](_0x2b94c4){const _0x2178db=_0x558678;this[_0x2178db(0x73)](_0x2b94c4);}[_0x558678(0x73)](_0x2f5523){const _0x250c66=_0x558678,_0x49178e=_0x2f5523[_0x250c66(0x6d)](_0x394a9b);this[_0x250c66(0x6e)](this[_0x250c66(0x7f)][_0x250c66(0x88)],()=>_0x229816(_0x49178e['event$'][_0x250c66(0x7a)](_0x82996e=>{const _0x59c2bb=_0x250c66;_0x82996e[_0x59c2bb(0x69)]===_0x51b352['McpConnectionStatusChanged']&&this[_0x59c2bb(0x84)](this[_0x59c2bb(0x7f)][_0x59c2bb(0x88)],_0x82996e['data']);}))),this[_0x250c66(0x6e)](this[_0x250c66(0x7f)][_0x250c66(0x86)],()=>_0x229816(_0x49178e['event$'][_0x250c66(0x7a)](_0x54d6ce=>{const _0x4b3dbc=_0x250c66;_0x54d6ce['type']===_0x51b352[_0x4b3dbc(0x86)]&&this[_0x4b3dbc(0x84)](this[_0x4b3dbc(0x7f)]['McpToolCallReceived'],_0x54d6ce['data']);}))),this['registerEventHandler'](this[_0x250c66(0x7f)][_0x250c66(0x78)],()=>_0x229816(_0x49178e[_0x250c66(0x6f)][_0x250c66(0x7a)](_0x390bf3=>{const _0x43a120=_0x250c66;_0x390bf3[_0x43a120(0x69)]===_0x51b352[_0x43a120(0x78)]&&this[_0x43a120(0x84)](this['Event'][_0x43a120(0x78)],_0x390bf3[_0x43a120(0x85)]);}))),this[_0x250c66(0x6e)](this[_0x250c66(0x7f)][_0x250c66(0x82)],()=>_0x229816(_0x49178e[_0x250c66(0x6f)][_0x250c66(0x7a)](_0x29762e=>{const _0x3945a2=_0x250c66;_0x29762e['type']===_0x51b352[_0x3945a2(0x82)]&&this[_0x3945a2(0x84)](this[_0x3945a2(0x7f)][_0x3945a2(0x82)],_0x29762e[_0x3945a2(0x85)]);})));}[_0x558678(0x7c)](_0x5d4167,_0x50a919){const _0x4c8966=_0x558678;return this[_0x4c8966(0x87)][_0x4c8966(0x6d)](_0x2988af)['validateToolCall'](_0x5d4167,_0x50a919);}[_0x558678(0x76)](){const _0x311b5d=_0x558678;return this[_0x311b5d(0x87)][_0x311b5d(0x6d)](_0x2988af)[_0x311b5d(0x7d)]();}[_0x558678(0x83)](_0x5527c7,_0x363cc5){const _0x515d7f=_0x558678;return this[_0x515d7f(0x87)][_0x515d7f(0x6d)](_0x2988af)[_0x515d7f(0x89)](_0x5527c7,_0x363cc5);}[_0x558678(0x8b)](){const _0x21fc7e=_0x558678;return this['_injector'][_0x21fc7e(0x6d)](_0x2cc124)['getConnectionStatus']();}[_0x558678(0x77)](){const _0x2faa92=_0x558678;this[_0x2faa92(0x87)]['get'](_0x2cc124)[_0x2faa92(0x74)]();}[_0x558678(0x6c)](){const _0x53fecd=_0x558678;this[_0x53fecd(0x87)][_0x53fecd(0x6d)](_0x2cc124)[_0x53fecd(0x80)]();}}_0x34f002[_0x558678(0x7b)](M);
1
+ const _0x112294=_0x24ff;function _0x5e84(){const _0x3fc57b=['data','1930750NTWvEF','event$','registerEventHandler','61015XNIVxW','16dIXzHa','McpConnectionStatusChanged','type','subscribe','getConnectionStatus','_registerMCPFacadeEvents','fireEvent','McpToolCallFailed','99smdWRq','8HlIVbi','McpToolCallExecuted','30462YZCeQq','McpToolCallReceived','extend','getMCPConnectionStatus','2257155etsBAM','callMCPTool','executeTool','_initialize','431304WxTDWq','get','Event','connect','getAllMCPTools','_injector','2283996GwkHFj','2253153UYyKXv','disconnectMCP'];_0x5e84=function(){return _0x3fc57b;};return _0x5e84();}(function(_0x33a9b3,_0x373a20){const _0x1a73e9=_0x24ff,_0x2f02f2=_0x33a9b3();while(!![]){try{const _0x20941c=-parseInt(_0x1a73e9(0xd6))/0x1+-parseInt(_0x1a73e9(0xc1))/0x2+-parseInt(_0x1a73e9(0xc9))/0x3*(parseInt(_0x1a73e9(0xd7))/0x4)+-parseInt(_0x1a73e9(0xc5))/0x5+-parseInt(_0x1a73e9(0xcf))/0x6+parseInt(_0x1a73e9(0xd0))/0x7*(-parseInt(_0x1a73e9(0xe0))/0x8)+parseInt(_0x1a73e9(0xdf))/0x9*(parseInt(_0x1a73e9(0xd3))/0xa);if(_0x20941c===_0x373a20)break;else _0x2f02f2['push'](_0x2f02f2['shift']());}catch(_0x55613e){_0x2f02f2['push'](_0x2f02f2['shift']());}}}(_0x5e84,0x4dc43));import{MCPEventId as _0x4df28c,MCPEventService as _0x2a9fae,IMCPToolRegistry as _0x135a0b,MCPConnectionController as _0x4a2ca9}from'@univerjs-pro/mcp';import{FEventName as _0x17dc42,FUniver as _0x41b191}from'@univerjs/core/facade';import{toDisposable as _0x34e319}from'@univerjs/core';function _0x24ff(_0x531c9f,_0x4603e6){const _0x5e84e7=_0x5e84();return _0x24ff=function(_0x24ff69,_0x2aea50){_0x24ff69=_0x24ff69-0xc0;let _0x3883da=_0x5e84e7[_0x24ff69];return _0x3883da;},_0x24ff(_0x531c9f,_0x4603e6);}class d{get['McpConnectionStatusChanged'](){const _0x42d9f5=_0x24ff;return _0x4df28c[_0x42d9f5(0xd8)];}get[_0x112294(0xc2)](){const _0x28d728=_0x112294;return _0x4df28c[_0x28d728(0xc2)];}get['McpToolCallExecuted'](){return _0x4df28c['McpToolCallExecuted'];}get['McpToolCallFailed'](){const _0x1aea0c=_0x112294;return _0x4df28c[_0x1aea0c(0xde)];}}_0x17dc42['extend'](d);class M extends _0x41b191{[_0x112294(0xc8)](_0x38ef07){const _0x12b712=_0x112294;this[_0x12b712(0xdc)](_0x38ef07);}['_registerMCPFacadeEvents'](_0xad1998){const _0x546cc3=_0x112294,_0x1d82db=_0xad1998[_0x546cc3(0xca)](_0x2a9fae);this[_0x546cc3(0xd5)](this[_0x546cc3(0xcb)][_0x546cc3(0xd8)],()=>_0x34e319(_0x1d82db[_0x546cc3(0xd4)][_0x546cc3(0xda)](_0x4bee60=>{const _0x4a9c69=_0x546cc3;_0x4bee60[_0x4a9c69(0xd9)]===_0x4df28c['McpConnectionStatusChanged']&&this[_0x4a9c69(0xdd)](this[_0x4a9c69(0xcb)][_0x4a9c69(0xd8)],_0x4bee60['data']);}))),this[_0x546cc3(0xd5)](this['Event'][_0x546cc3(0xc2)],()=>_0x34e319(_0x1d82db[_0x546cc3(0xd4)][_0x546cc3(0xda)](_0xac7aa9=>{const _0x46e6fd=_0x546cc3;_0xac7aa9[_0x46e6fd(0xd9)]===_0x4df28c[_0x46e6fd(0xc2)]&&this[_0x46e6fd(0xdd)](this[_0x46e6fd(0xcb)][_0x46e6fd(0xc2)],_0xac7aa9['data']);}))),this[_0x546cc3(0xd5)](this['Event'][_0x546cc3(0xc0)],()=>_0x34e319(_0x1d82db['event$']['subscribe'](_0x4b2a9e=>{const _0x1dfe80=_0x546cc3;_0x4b2a9e[_0x1dfe80(0xd9)]===_0x4df28c[_0x1dfe80(0xc0)]&&this[_0x1dfe80(0xdd)](this['Event'][_0x1dfe80(0xc0)],_0x4b2a9e[_0x1dfe80(0xd2)]);}))),this[_0x546cc3(0xd5)](this[_0x546cc3(0xcb)][_0x546cc3(0xde)],()=>_0x34e319(_0x1d82db['event$'][_0x546cc3(0xda)](_0x32e886=>{const _0x1c4465=_0x546cc3;_0x32e886[_0x1c4465(0xd9)]===_0x4df28c[_0x1c4465(0xde)]&&this['fireEvent'](this[_0x1c4465(0xcb)][_0x1c4465(0xde)],_0x32e886['data']);})));}['validateMCPToolCall'](_0x219e02,_0x30475a){const _0xee3f50=_0x112294;return this[_0xee3f50(0xce)][_0xee3f50(0xca)](_0x135a0b)['validateToolCall'](_0x219e02,_0x30475a);}[_0x112294(0xcd)](){const _0x3d8d68=_0x112294;return this[_0x3d8d68(0xce)][_0x3d8d68(0xca)](_0x135a0b)['getAllTools']();}[_0x112294(0xc6)](_0x43f6e6,_0x59bd68){const _0x250f30=_0x112294;return this[_0x250f30(0xce)][_0x250f30(0xca)](_0x135a0b)[_0x250f30(0xc7)](_0x43f6e6,_0x59bd68);}[_0x112294(0xc4)](){const _0x199c20=_0x112294;return this['_injector'][_0x199c20(0xca)](_0x4a2ca9)[_0x199c20(0xdb)]();}['connectMCP'](){const _0x3be4c2=_0x112294;this[_0x3be4c2(0xce)][_0x3be4c2(0xca)](_0x4a2ca9)[_0x3be4c2(0xcc)]();}[_0x112294(0xd1)](){const _0x4a8ad6=_0x112294;this[_0x4a8ad6(0xce)]['get'](_0x4a2ca9)['disconnect']();}}_0x41b191[_0x112294(0xc3)](M);