@univerjs-pro/mcp 0.12.4-experimental.20251210-b08bdee → 0.12.4-experimental.20251210-d708bff

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 _0x2399e6=_0x5233;(function(_0x133f0a,_0xab1e7){const _0x43f2f2=_0x5233,_0x1f2fdc=_0x133f0a();while(!![]){try{const _0x31978b=parseInt(_0x43f2f2(0x95))/0x1*(parseInt(_0x43f2f2(0x8c))/0x2)+parseInt(_0x43f2f2(0x87))/0x3*(-parseInt(_0x43f2f2(0xa2))/0x4)+parseInt(_0x43f2f2(0x89))/0x5+parseInt(_0x43f2f2(0x96))/0x6*(-parseInt(_0x43f2f2(0x8f))/0x7)+-parseInt(_0x43f2f2(0xa5))/0x8*(-parseInt(_0x43f2f2(0x82))/0x9)+parseInt(_0x43f2f2(0x9e))/0xa+-parseInt(_0x43f2f2(0x88))/0xb;if(_0x31978b===_0xab1e7)break;else _0x1f2fdc['push'](_0x1f2fdc['shift']());}catch(_0x3b647b){_0x1f2fdc['push'](_0x1f2fdc['shift']());}}}(_0x5b7f,0x1e334));function _0x5b7f(){const _0x3b38f6=['80UHpbeo','data','type','133290LthEKj','_injector','subscribe','extend','_initialize','18087pMMPiv','733546yqiTZG','600055paSXTk','connectMCP','McpToolCallExecuted','45454rLsTZz','event$','McpConnectionStatusChanged','4858WiRHUL','disconnect','registerEventHandler','executeTool','get','connect','9SegPkm','2130egzLSF','validateToolCall','Event','getMCPConnectionStatus','fireEvent','callMCPTool','getConnectionStatus','validateMCPToolCall','1449720ScHCNS','disconnectMCP','getAllTools','McpToolCallReceived','120OVEYwc','McpToolCallFailed','_registerMCPFacadeEvents'];_0x5b7f=function(){return _0x3b38f6;};return _0x5b7f();}import{MCPEventId as _0x160dc3,MCPEventService as _0x4805cc,IMCPToolRegistry as _0x2b4604,MCPConnectionController as _0x426d82}from'@univerjs-pro/mcp';function _0x5233(_0xbb70da,_0x3882cd){_0xbb70da=_0xbb70da-0x82;const _0x5b7f0a=_0x5b7f();let _0x52332c=_0x5b7f0a[_0xbb70da];return _0x52332c;}import{FEventName as _0x271231,FUniver as _0x2c8edf}from'@univerjs/core/facade';import{toDisposable as _0x34a43d}from'@univerjs/core';class d{get[_0x2399e6(0x8e)](){const _0x2524e8=_0x2399e6;return _0x160dc3[_0x2524e8(0x8e)];}get['McpToolCallReceived'](){const _0xbcc211=_0x2399e6;return _0x160dc3[_0xbcc211(0xa1)];}get[_0x2399e6(0x8b)](){const _0x370890=_0x2399e6;return _0x160dc3[_0x370890(0x8b)];}get[_0x2399e6(0xa3)](){const _0x3f8858=_0x2399e6;return _0x160dc3[_0x3f8858(0xa3)];}}_0x271231[_0x2399e6(0x85)](d);class M extends _0x2c8edf{[_0x2399e6(0x86)](_0x37ae96){const _0x1bd652=_0x2399e6;this[_0x1bd652(0xa4)](_0x37ae96);}[_0x2399e6(0xa4)](_0x277c84){const _0x5adfa0=_0x2399e6,_0x3ef4b4=_0x277c84['get'](_0x4805cc);this['registerEventHandler'](this[_0x5adfa0(0x98)]['McpConnectionStatusChanged'],()=>_0x34a43d(_0x3ef4b4['event$']['subscribe'](_0x34f372=>{const _0x4f3c58=_0x5adfa0;_0x34f372[_0x4f3c58(0xa7)]===_0x160dc3[_0x4f3c58(0x8e)]&&this[_0x4f3c58(0x9a)](this[_0x4f3c58(0x98)]['McpConnectionStatusChanged'],_0x34f372[_0x4f3c58(0xa6)]);}))),this[_0x5adfa0(0x91)](this[_0x5adfa0(0x98)]['McpToolCallReceived'],()=>_0x34a43d(_0x3ef4b4[_0x5adfa0(0x8d)]['subscribe'](_0x5d64cb=>{const _0x3752bf=_0x5adfa0;_0x5d64cb[_0x3752bf(0xa7)]===_0x160dc3[_0x3752bf(0xa1)]&&this[_0x3752bf(0x9a)](this[_0x3752bf(0x98)]['McpToolCallReceived'],_0x5d64cb[_0x3752bf(0xa6)]);}))),this[_0x5adfa0(0x91)](this[_0x5adfa0(0x98)][_0x5adfa0(0x8b)],()=>_0x34a43d(_0x3ef4b4[_0x5adfa0(0x8d)][_0x5adfa0(0x84)](_0x51da43=>{const _0x2817e5=_0x5adfa0;_0x51da43[_0x2817e5(0xa7)]===_0x160dc3[_0x2817e5(0x8b)]&&this['fireEvent'](this[_0x2817e5(0x98)][_0x2817e5(0x8b)],_0x51da43['data']);}))),this[_0x5adfa0(0x91)](this['Event'][_0x5adfa0(0xa3)],()=>_0x34a43d(_0x3ef4b4[_0x5adfa0(0x8d)][_0x5adfa0(0x84)](_0x44c8bf=>{const _0x55fa5c=_0x5adfa0;_0x44c8bf[_0x55fa5c(0xa7)]===_0x160dc3[_0x55fa5c(0xa3)]&&this['fireEvent'](this[_0x55fa5c(0x98)]['McpToolCallFailed'],_0x44c8bf[_0x55fa5c(0xa6)]);})));}[_0x2399e6(0x9d)](_0xd86454,_0x36f7c9){const _0x28eab2=_0x2399e6;return this['_injector']['get'](_0x2b4604)[_0x28eab2(0x97)](_0xd86454,_0x36f7c9);}['getAllMCPTools'](){const _0x113d5e=_0x2399e6;return this['_injector'][_0x113d5e(0x93)](_0x2b4604)[_0x113d5e(0xa0)]();}[_0x2399e6(0x9b)](_0x121987,_0x506fea){const _0x3954ae=_0x2399e6;return this[_0x3954ae(0x83)][_0x3954ae(0x93)](_0x2b4604)[_0x3954ae(0x92)](_0x121987,_0x506fea);}[_0x2399e6(0x99)](){const _0x5b8ae9=_0x2399e6;return this['_injector']['get'](_0x426d82)[_0x5b8ae9(0x9c)]();}[_0x2399e6(0x8a)](){const _0x4f2c93=_0x2399e6;this['_injector']['get'](_0x426d82)[_0x4f2c93(0x94)]();}[_0x2399e6(0x9f)](){const _0x2f0fb7=_0x2399e6;this[_0x2f0fb7(0x83)][_0x2f0fb7(0x93)](_0x426d82)[_0x2f0fb7(0x90)]();}}_0x2c8edf[_0x2399e6(0x85)](M);
1
+ const _0x142dc7=_0x2552;(function(_0x2b0b7d,_0x4007ab){const _0x126fcd=_0x2552,_0x169b41=_0x2b0b7d();while(!![]){try{const _0x350af3=parseInt(_0x126fcd(0x191))/0x1*(-parseInt(_0x126fcd(0x18d))/0x2)+-parseInt(_0x126fcd(0x182))/0x3+-parseInt(_0x126fcd(0x183))/0x4+parseInt(_0x126fcd(0x18e))/0x5*(-parseInt(_0x126fcd(0x194))/0x6)+parseInt(_0x126fcd(0x190))/0x7+-parseInt(_0x126fcd(0x18a))/0x8+parseInt(_0x126fcd(0x19a))/0x9*(parseInt(_0x126fcd(0x186))/0xa);if(_0x350af3===_0x4007ab)break;else _0x169b41['push'](_0x169b41['shift']());}catch(_0x142464){_0x169b41['push'](_0x169b41['shift']());}}}(_0x274d,0xafa7d));import{MCPEventId as _0x210e41,MCPEventService as _0x3bc315,IMCPToolRegistry as _0x216bb0,MCPConnectionController as _0x3005b5}from'@univerjs-pro/mcp';import{FEventName as _0x42cc42,FUniver as _0x36db11}from'@univerjs/core/facade';import{toDisposable as _0x362157}from'@univerjs/core';function _0x2552(_0x411ae6,_0x28b008){_0x411ae6=_0x411ae6-0x17f;const _0x274d30=_0x274d();let _0x25522f=_0x274d30[_0x411ae6];return _0x25522f;}function _0x274d(){const _0x47347d=['registerEventHandler','getMCPConnectionStatus','_injector','McpToolCallReceived','event$','connectMCP','3140430MwFTsG','4490232EItwHw','_registerMCPFacadeEvents','connect','960tiAWMr','disconnectMCP','McpConnectionStatusChanged','_initialize','2127640uQzmtV','getConnectionStatus','data','2fCuVvj','5NlfPAF','validateToolCall','3250646YifDrC','849069CJwOwM','disconnect','McpToolCallFailed','3592638TTEwHQ','extend','validateMCPToolCall','McpToolCallExecuted','subscribe','callMCPTool','387963FwACvB','type','fireEvent','getAllTools','getAllMCPTools','get','Event','executeTool'];_0x274d=function(){return _0x47347d;};return _0x274d();}class d{get[_0x142dc7(0x188)](){return _0x210e41['McpConnectionStatusChanged'];}get['McpToolCallReceived'](){return _0x210e41['McpToolCallReceived'];}get[_0x142dc7(0x197)](){const _0x4e344=_0x142dc7;return _0x210e41[_0x4e344(0x197)];}get[_0x142dc7(0x193)](){const _0x4af0bc=_0x142dc7;return _0x210e41[_0x4af0bc(0x193)];}}_0x42cc42[_0x142dc7(0x195)](d);class M extends _0x36db11{[_0x142dc7(0x189)](_0x1e5a45){const _0x4de554=_0x142dc7;this[_0x4de554(0x184)](_0x1e5a45);}[_0x142dc7(0x184)](_0x56816b){const _0x5b85da=_0x142dc7,_0x79f32c=_0x56816b[_0x5b85da(0x19f)](_0x3bc315);this[_0x5b85da(0x1a2)](this[_0x5b85da(0x1a0)][_0x5b85da(0x188)],()=>_0x362157(_0x79f32c[_0x5b85da(0x180)][_0x5b85da(0x198)](_0x31b8c7=>{const _0x31d404=_0x5b85da;_0x31b8c7['type']===_0x210e41['McpConnectionStatusChanged']&&this[_0x31d404(0x19c)](this['Event'][_0x31d404(0x188)],_0x31b8c7[_0x31d404(0x18c)]);}))),this[_0x5b85da(0x1a2)](this[_0x5b85da(0x1a0)][_0x5b85da(0x17f)],()=>_0x362157(_0x79f32c['event$'][_0x5b85da(0x198)](_0x2c0a61=>{const _0x2e4358=_0x5b85da;_0x2c0a61[_0x2e4358(0x19b)]===_0x210e41['McpToolCallReceived']&&this[_0x2e4358(0x19c)](this[_0x2e4358(0x1a0)][_0x2e4358(0x17f)],_0x2c0a61['data']);}))),this[_0x5b85da(0x1a2)](this[_0x5b85da(0x1a0)][_0x5b85da(0x197)],()=>_0x362157(_0x79f32c[_0x5b85da(0x180)][_0x5b85da(0x198)](_0x4abf80=>{const _0x4337a4=_0x5b85da;_0x4abf80[_0x4337a4(0x19b)]===_0x210e41['McpToolCallExecuted']&&this[_0x4337a4(0x19c)](this['Event'][_0x4337a4(0x197)],_0x4abf80['data']);}))),this['registerEventHandler'](this[_0x5b85da(0x1a0)]['McpToolCallFailed'],()=>_0x362157(_0x79f32c['event$'][_0x5b85da(0x198)](_0x217639=>{const _0x1ad1e8=_0x5b85da;_0x217639['type']===_0x210e41[_0x1ad1e8(0x193)]&&this[_0x1ad1e8(0x19c)](this[_0x1ad1e8(0x1a0)][_0x1ad1e8(0x193)],_0x217639[_0x1ad1e8(0x18c)]);})));}[_0x142dc7(0x196)](_0x2ab130,_0x2d5325){const _0x4e8eb6=_0x142dc7;return this[_0x4e8eb6(0x1a4)][_0x4e8eb6(0x19f)](_0x216bb0)[_0x4e8eb6(0x18f)](_0x2ab130,_0x2d5325);}[_0x142dc7(0x19e)](){const _0x385e69=_0x142dc7;return this[_0x385e69(0x1a4)][_0x385e69(0x19f)](_0x216bb0)[_0x385e69(0x19d)]();}[_0x142dc7(0x199)](_0x2d9e80,_0x25c44f){const _0x3457a6=_0x142dc7;return this[_0x3457a6(0x1a4)][_0x3457a6(0x19f)](_0x216bb0)[_0x3457a6(0x1a1)](_0x2d9e80,_0x25c44f);}[_0x142dc7(0x1a3)](){const _0x2337a3=_0x142dc7;return this['_injector'][_0x2337a3(0x19f)](_0x3005b5)[_0x2337a3(0x18b)]();}[_0x142dc7(0x181)](){const _0x5beb27=_0x142dc7;this[_0x5beb27(0x1a4)][_0x5beb27(0x19f)](_0x3005b5)[_0x5beb27(0x185)]();}[_0x142dc7(0x187)](){const _0x76f2cb=_0x142dc7;this[_0x76f2cb(0x1a4)][_0x76f2cb(0x19f)](_0x3005b5)[_0x76f2cb(0x192)]();}}_0x36db11[_0x142dc7(0x195)](M);