@univerjs-pro/mcp 0.10.14-nightly.202511080715 → 0.11.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/cjs/facade.js CHANGED
@@ -1 +1 @@
1
- 'use strict';const _0x25d5c9=_0x1968;(function(_0x3fbe34,_0x3befad){const _0x1da5fc=_0x1968,_0x989ed6=_0x3fbe34();while(!![]){try{const _0x2ad2b5=parseInt(_0x1da5fc(0xda))/0x1*(-parseInt(_0x1da5fc(0xdf))/0x2)+parseInt(_0x1da5fc(0xdc))/0x3+parseInt(_0x1da5fc(0xcb))/0x4*(parseInt(_0x1da5fc(0xd5))/0x5)+-parseInt(_0x1da5fc(0xd6))/0x6+-parseInt(_0x1da5fc(0xd8))/0x7*(parseInt(_0x1da5fc(0xea))/0x8)+parseInt(_0x1da5fc(0xeb))/0x9*(-parseInt(_0x1da5fc(0xe5))/0xa)+parseInt(_0x1da5fc(0xc9))/0xb;if(_0x2ad2b5===_0x3befad)break;else _0x989ed6['push'](_0x989ed6['shift']());}catch(_0x15550f){_0x989ed6['push'](_0x989ed6['shift']());}}}(_0x1259,0x99fa9));function _0x1968(_0x3c86a7,_0x3a0c60){const _0x12596b=_0x1259();return _0x1968=function(_0x1968f1,_0x205928){_0x1968f1=_0x1968f1-0xc8;let _0x2152b3=_0x12596b[_0x1968f1];return _0x2152b3;},_0x1968(_0x3c86a7,_0x3a0c60);}const e=require('@univerjs-pro/mcp'),i=require('@univerjs/core/facade'),l=require('@univerjs/core');class r{get[_0x25d5c9(0xe1)](){return e['MCPEventId']['McpConnectionStatusChanged'];}get['McpToolCallReceived'](){const _0x44f29f=_0x25d5c9;return e[_0x44f29f(0xe3)][_0x44f29f(0xe7)];}get[_0x25d5c9(0xd4)](){const _0x11fbc3=_0x25d5c9;return e[_0x11fbc3(0xe3)][_0x11fbc3(0xd4)];}get[_0x25d5c9(0xcc)](){const _0x1009ae=_0x25d5c9;return e['MCPEventId'][_0x1009ae(0xcc)];}}i['FEventName'][_0x25d5c9(0xe8)](r);class s extends i[_0x25d5c9(0xd9)]{[_0x25d5c9(0xd7)](_0x49c3f3){const _0x59f066=_0x25d5c9;this[_0x59f066(0xd2)](_0x49c3f3);}[_0x25d5c9(0xd2)](_0x190f52){const _0x3bcf7f=_0x25d5c9,_0x5dddb4=_0x190f52[_0x3bcf7f(0xd3)](e[_0x3bcf7f(0xe6)]);this[_0x3bcf7f(0xe0)](this['Event'][_0x3bcf7f(0xe1)],()=>l[_0x3bcf7f(0xe9)](_0x5dddb4[_0x3bcf7f(0xde)][_0x3bcf7f(0xd0)](_0x2856ae=>{const _0x387f5b=_0x3bcf7f;_0x2856ae[_0x387f5b(0xca)]===e[_0x387f5b(0xe3)][_0x387f5b(0xe1)]&&this[_0x387f5b(0xd1)](this['Event']['McpConnectionStatusChanged'],_0x2856ae[_0x387f5b(0xed)]);}))),this[_0x3bcf7f(0xe0)](this[_0x3bcf7f(0xcd)][_0x3bcf7f(0xe7)],()=>l[_0x3bcf7f(0xe9)](_0x5dddb4[_0x3bcf7f(0xde)][_0x3bcf7f(0xd0)](_0x17f02b=>{const _0x112842=_0x3bcf7f;_0x17f02b[_0x112842(0xca)]===e[_0x112842(0xe3)][_0x112842(0xe7)]&&this[_0x112842(0xd1)](this['Event'][_0x112842(0xe7)],_0x17f02b[_0x112842(0xed)]);}))),this[_0x3bcf7f(0xe0)](this[_0x3bcf7f(0xcd)][_0x3bcf7f(0xd4)],()=>l['toDisposable'](_0x5dddb4['event$'][_0x3bcf7f(0xd0)](_0x3a3e77=>{const _0x566233=_0x3bcf7f;_0x3a3e77[_0x566233(0xca)]===e[_0x566233(0xe3)][_0x566233(0xd4)]&&this[_0x566233(0xd1)](this['Event'][_0x566233(0xd4)],_0x3a3e77[_0x566233(0xed)]);}))),this['registerEventHandler'](this['Event'][_0x3bcf7f(0xcc)],()=>l[_0x3bcf7f(0xe9)](_0x5dddb4['event$'][_0x3bcf7f(0xd0)](_0x4cd48a=>{const _0x4b61cd=_0x3bcf7f;_0x4cd48a[_0x4b61cd(0xca)]===e['MCPEventId']['McpToolCallFailed']&&this[_0x4b61cd(0xd1)](this[_0x4b61cd(0xcd)]['McpToolCallFailed'],_0x4cd48a[_0x4b61cd(0xed)]);})));}['validateMCPToolCall'](_0x47c2eb,_0x52a0df){const _0x802f89=_0x25d5c9;return this[_0x802f89(0xdb)][_0x802f89(0xd3)](e[_0x802f89(0xc8)])['validateToolCall'](_0x47c2eb,_0x52a0df);}[_0x25d5c9(0xe2)](){const _0x1ef6d0=_0x25d5c9;return this[_0x1ef6d0(0xdb)][_0x1ef6d0(0xd3)](e[_0x1ef6d0(0xc8)])['getAllTools']();}['callMCPTool'](_0xd142be,_0x43cbcc){const _0x323d6c=_0x25d5c9;return this['_injector']['get'](e[_0x323d6c(0xc8)])['executeTool'](_0xd142be,_0x43cbcc);}['getMCPConnectionStatus'](){const _0x456a18=_0x25d5c9;return this[_0x456a18(0xdb)][_0x456a18(0xd3)](e[_0x456a18(0xdd)])[_0x456a18(0xce)]();}[_0x25d5c9(0xec)](){const _0x196771=_0x25d5c9;this[_0x196771(0xdb)][_0x196771(0xd3)](e[_0x196771(0xdd)])['connect']();}[_0x25d5c9(0xe4)](){const _0x3d3730=_0x25d5c9;this[_0x3d3730(0xdb)][_0x3d3730(0xd3)](e[_0x3d3730(0xdd)])[_0x3d3730(0xcf)]();}}i[_0x25d5c9(0xd9)][_0x25d5c9(0xe8)](s);function _0x1259(){const _0x5d969e=['8eAsXhN','3348CpYGTA','connectMCP','data','IMCPToolRegistry','23705363luqmLz','type','4dXEHBe','McpToolCallFailed','Event','getConnectionStatus','disconnect','subscribe','fireEvent','_registerMCPFacadeEvents','get','McpToolCallExecuted','216765vAeNLH','1667934rXFFGG','_initialize','3849181YujtDw','FUniver','4BpAuNR','_injector','1589109WuhbZV','MCPConnectionController','event$','71366gaJkNk','registerEventHandler','McpConnectionStatusChanged','getAllMCPTools','MCPEventId','disconnectMCP','30290LZuNlW','MCPEventService','McpToolCallReceived','extend','toDisposable'];_0x1259=function(){return _0x5d969e;};return _0x1259();}
1
+ 'use strict';const _0x5227b0=_0x5a92;function _0x1a33(){const _0x57cfeb=['toDisposable','connectMCP','MCPEventService','fireEvent','1704BqstGO','FEventName','get','getAllMCPTools','getConnectionStatus','McpToolCallExecuted','McpConnectionStatusChanged','149115sowtLk','144471MPtPrp','type','_injector','FUniver','MCPEventId','6923358GblFpM','subscribe','getMCPConnectionStatus','McpToolCallReceived','registerEventHandler','validateToolCall','executeTool','9fqttQZ','15441310nSDwzK','Event','McpToolCallFailed','_registerMCPFacadeEvents','MCPConnectionController','1895312uPlfCV','770LHIzZy','52FBEyAx','connect','callMCPTool','data','_initialize','703894ZiVFwH','event$','getAllTools','disconnect','IMCPToolRegistry','validateMCPToolCall'];_0x1a33=function(){return _0x57cfeb;};return _0x1a33();}function _0x5a92(_0x37025d,_0x35e96b){const _0x1a3310=_0x1a33();return _0x5a92=function(_0x5a9278,_0x479d08){_0x5a9278=_0x5a9278-0xe3;let _0x4799c3=_0x1a3310[_0x5a9278];return _0x4799c3;},_0x5a92(_0x37025d,_0x35e96b);}(function(_0x12ec55,_0x1dc33){const _0x572656=_0x5a92,_0x47a804=_0x12ec55();while(!![]){try{const _0x3deed9=parseInt(_0x572656(0xe5))/0x1+parseInt(_0x572656(0x109))/0x2+-parseInt(_0x572656(0xf7))/0x3*(parseInt(_0x572656(0x10b))/0x4)+-parseInt(_0x572656(0xf6))/0x5+parseInt(_0x572656(0xfc))/0x6+-parseInt(_0x572656(0x10a))/0x7*(parseInt(_0x572656(0xef))/0x8)+parseInt(_0x572656(0x103))/0x9*(-parseInt(_0x572656(0x104))/0xa);if(_0x3deed9===_0x1dc33)break;else _0x47a804['push'](_0x47a804['shift']());}catch(_0x2f87bd){_0x47a804['push'](_0x47a804['shift']());}}}(_0x1a33,0x8e182));const e=require('@univerjs-pro/mcp'),i=require('@univerjs/core/facade'),l=require('@univerjs/core');class r{get[_0x5227b0(0xf5)](){const _0x2d55f9=_0x5227b0;return e['MCPEventId'][_0x2d55f9(0xf5)];}get['McpToolCallReceived'](){const _0x4aa125=_0x5227b0;return e[_0x4aa125(0xfb)][_0x4aa125(0xff)];}get[_0x5227b0(0xf4)](){const _0x5609de=_0x5227b0;return e['MCPEventId'][_0x5609de(0xf4)];}get['McpToolCallFailed'](){const _0x4964e4=_0x5227b0;return e[_0x4964e4(0xfb)][_0x4964e4(0x106)];}}i[_0x5227b0(0xf0)]['extend'](r);class s extends i['FUniver']{[_0x5227b0(0xe4)](_0x2e37b5){const _0x1ea92c=_0x5227b0;this[_0x1ea92c(0x107)](_0x2e37b5);}['_registerMCPFacadeEvents'](_0x388551){const _0x58bf24=_0x5227b0,_0x3a11ca=_0x388551[_0x58bf24(0xf1)](e[_0x58bf24(0xed)]);this[_0x58bf24(0x100)](this['Event']['McpConnectionStatusChanged'],()=>l[_0x58bf24(0xeb)](_0x3a11ca[_0x58bf24(0xe6)][_0x58bf24(0xfd)](_0x40ea3d=>{const _0x28ba90=_0x58bf24;_0x40ea3d['type']===e[_0x28ba90(0xfb)][_0x28ba90(0xf5)]&&this['fireEvent'](this[_0x28ba90(0x105)]['McpConnectionStatusChanged'],_0x40ea3d[_0x28ba90(0xe3)]);}))),this['registerEventHandler'](this[_0x58bf24(0x105)]['McpToolCallReceived'],()=>l[_0x58bf24(0xeb)](_0x3a11ca['event$']['subscribe'](_0x1aa05a=>{const _0x139269=_0x58bf24;_0x1aa05a[_0x139269(0xf8)]===e['MCPEventId'][_0x139269(0xff)]&&this['fireEvent'](this[_0x139269(0x105)]['McpToolCallReceived'],_0x1aa05a[_0x139269(0xe3)]);}))),this[_0x58bf24(0x100)](this[_0x58bf24(0x105)]['McpToolCallExecuted'],()=>l[_0x58bf24(0xeb)](_0x3a11ca[_0x58bf24(0xe6)]['subscribe'](_0x2b84ea=>{const _0x2db9f9=_0x58bf24;_0x2b84ea[_0x2db9f9(0xf8)]===e[_0x2db9f9(0xfb)]['McpToolCallExecuted']&&this[_0x2db9f9(0xee)](this[_0x2db9f9(0x105)][_0x2db9f9(0xf4)],_0x2b84ea[_0x2db9f9(0xe3)]);}))),this[_0x58bf24(0x100)](this[_0x58bf24(0x105)][_0x58bf24(0x106)],()=>l[_0x58bf24(0xeb)](_0x3a11ca[_0x58bf24(0xe6)]['subscribe'](_0x3bee27=>{const _0x4f3764=_0x58bf24;_0x3bee27['type']===e[_0x4f3764(0xfb)][_0x4f3764(0x106)]&&this[_0x4f3764(0xee)](this['Event'][_0x4f3764(0x106)],_0x3bee27[_0x4f3764(0xe3)]);})));}[_0x5227b0(0xea)](_0x2b7836,_0x22cc75){const _0x3a7cfe=_0x5227b0;return this[_0x3a7cfe(0xf9)][_0x3a7cfe(0xf1)](e[_0x3a7cfe(0xe9)])[_0x3a7cfe(0x101)](_0x2b7836,_0x22cc75);}[_0x5227b0(0xf2)](){const _0x20fc18=_0x5227b0;return this['_injector'][_0x20fc18(0xf1)](e[_0x20fc18(0xe9)])[_0x20fc18(0xe7)]();}[_0x5227b0(0x10d)](_0x32da98,_0x43c95f){const _0x5e9fa3=_0x5227b0;return this[_0x5e9fa3(0xf9)][_0x5e9fa3(0xf1)](e[_0x5e9fa3(0xe9)])[_0x5e9fa3(0x102)](_0x32da98,_0x43c95f);}[_0x5227b0(0xfe)](){const _0x3fb581=_0x5227b0;return this[_0x3fb581(0xf9)][_0x3fb581(0xf1)](e['MCPConnectionController'])[_0x3fb581(0xf3)]();}[_0x5227b0(0xec)](){const _0x12ab07=_0x5227b0;this[_0x12ab07(0xf9)]['get'](e[_0x12ab07(0x108)])[_0x12ab07(0x10c)]();}['disconnectMCP'](){const _0x5c7893=_0x5227b0;this[_0x5c7893(0xf9)]['get'](e[_0x5c7893(0x108)])[_0x5c7893(0xe8)]();}}i[_0x5227b0(0xfa)]['extend'](s);