@univerjs-pro/mcp 0.12.4-experimental.20251208-c4b8a44 → 0.12.4-experimental.20251210-8d33c6e

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/umd/facade.js CHANGED
@@ -1 +1 @@
1
- (function(_0x2cdc1f,_0x3f2259){const _0x192ef8=_0x3943,_0x1069b2=_0x2cdc1f();while(!![]){try{const _0x396e57=-parseInt(_0x192ef8(0x204))/0x1+parseInt(_0x192ef8(0x215))/0x2+parseInt(_0x192ef8(0x20d))/0x3+parseInt(_0x192ef8(0x206))/0x4+parseInt(_0x192ef8(0x1f1))/0x5*(-parseInt(_0x192ef8(0x1fd))/0x6)+-parseInt(_0x192ef8(0x1f9))/0x7+-parseInt(_0x192ef8(0x216))/0x8*(-parseInt(_0x192ef8(0x1f4))/0x9);if(_0x396e57===_0x3f2259)break;else _0x1069b2['push'](_0x1069b2['shift']());}catch(_0x4e8ad8){_0x1069b2['push'](_0x1069b2['shift']());}}}(_0x24f6,0x749c8),function(_0x532025,_0xa93f56){const _0xbd466d=_0x3943;typeof exports=='object'&&typeof module<'u'?_0xa93f56(require('@univerjs-pro/mcp'),require('@univerjs/core/facade'),require('@univerjs/core')):typeof define==_0xbd466d(0x219)&&define[_0xbd466d(0x1fa)]?define([_0xbd466d(0x1ec),'@univerjs/core/facade',_0xbd466d(0x207)],_0xa93f56):(_0x532025=typeof globalThis<'u'?globalThis:_0x532025||self,_0xa93f56(_0x532025[_0xbd466d(0x210)],_0x532025[_0xbd466d(0x214)],_0x532025[_0xbd466d(0x20f)]));}(this,function(_0x522753,_0x2da985,_0x124ec2){'use strict';const _0x4b53f9=_0x3943;class _0x227e7d{get[_0x4b53f9(0x200)](){const _0x47a2e5=_0x4b53f9;return _0x522753['MCPEventId'][_0x47a2e5(0x200)];}get['McpToolCallReceived'](){const _0x1e7205=_0x4b53f9;return _0x522753[_0x1e7205(0x20c)]['McpToolCallReceived'];}get[_0x4b53f9(0x208)](){const _0x50fcf0=_0x4b53f9;return _0x522753[_0x50fcf0(0x20c)][_0x50fcf0(0x208)];}get[_0x4b53f9(0x211)](){const _0x5bab56=_0x4b53f9;return _0x522753[_0x5bab56(0x20c)][_0x5bab56(0x211)];}}_0x2da985[_0x4b53f9(0x1ef)][_0x4b53f9(0x205)](_0x227e7d);class _0x4fa088 extends _0x2da985['FUniver']{[_0x4b53f9(0x202)](_0x555e5a){const _0x1e6184=_0x4b53f9;this[_0x1e6184(0x1ff)](_0x555e5a);}[_0x4b53f9(0x1ff)](_0x18ba2c){const _0x4c6236=_0x4b53f9,_0x5b520a=_0x18ba2c[_0x4c6236(0x212)](_0x522753['MCPEventService']);this[_0x4c6236(0x1ee)](this[_0x4c6236(0x1f7)][_0x4c6236(0x200)],()=>_0x124ec2[_0x4c6236(0x1f2)](_0x5b520a['event$'][_0x4c6236(0x213)](_0x5f0236=>{const _0x589123=_0x4c6236;_0x5f0236[_0x589123(0x1f6)]===_0x522753[_0x589123(0x20c)][_0x589123(0x200)]&&this[_0x589123(0x217)](this[_0x589123(0x1f7)][_0x589123(0x200)],_0x5f0236[_0x589123(0x201)]);}))),this[_0x4c6236(0x1ee)](this['Event']['McpToolCallReceived'],()=>_0x124ec2[_0x4c6236(0x1f2)](_0x5b520a[_0x4c6236(0x218)][_0x4c6236(0x213)](_0x2cb3be=>{const _0x2c7b86=_0x4c6236;_0x2cb3be['type']===_0x522753[_0x2c7b86(0x20c)][_0x2c7b86(0x21a)]&&this[_0x2c7b86(0x217)](this['Event'][_0x2c7b86(0x21a)],_0x2cb3be[_0x2c7b86(0x201)]);}))),this[_0x4c6236(0x1ee)](this[_0x4c6236(0x1f7)][_0x4c6236(0x208)],()=>_0x124ec2[_0x4c6236(0x1f2)](_0x5b520a[_0x4c6236(0x218)]['subscribe'](_0x4139dd=>{const _0x15c138=_0x4c6236;_0x4139dd[_0x15c138(0x1f6)]===_0x522753['MCPEventId'][_0x15c138(0x208)]&&this['fireEvent'](this[_0x15c138(0x1f7)]['McpToolCallExecuted'],_0x4139dd['data']);}))),this[_0x4c6236(0x1ee)](this[_0x4c6236(0x1f7)][_0x4c6236(0x211)],()=>_0x124ec2[_0x4c6236(0x1f2)](_0x5b520a['event$'][_0x4c6236(0x213)](_0x4d41ea=>{const _0x1912c4=_0x4c6236;_0x4d41ea[_0x1912c4(0x1f6)]===_0x522753[_0x1912c4(0x20c)][_0x1912c4(0x211)]&&this[_0x1912c4(0x217)](this[_0x1912c4(0x1f7)][_0x1912c4(0x211)],_0x4d41ea[_0x1912c4(0x201)]);})));}[_0x4b53f9(0x1fb)](_0x488539,_0x33ab8c){const _0x362650=_0x4b53f9;return this['_injector'][_0x362650(0x212)](_0x522753['IMCPToolRegistry'])[_0x362650(0x203)](_0x488539,_0x33ab8c);}['getAllMCPTools'](){const _0x1e97e8=_0x4b53f9;return this[_0x1e97e8(0x1f8)][_0x1e97e8(0x212)](_0x522753[_0x1e97e8(0x1f5)])[_0x1e97e8(0x209)]();}[_0x4b53f9(0x20a)](_0x15a4f8,_0x524a20){const _0x439a7e=_0x4b53f9;return this['_injector']['get'](_0x522753[_0x439a7e(0x1f5)])['executeTool'](_0x15a4f8,_0x524a20);}[_0x4b53f9(0x1ed)](){const _0x50889e=_0x4b53f9;return this[_0x50889e(0x1f8)]['get'](_0x522753[_0x50889e(0x21b)])[_0x50889e(0x20e)]();}[_0x4b53f9(0x1fe)](){const _0x245c4c=_0x4b53f9;this[_0x245c4c(0x1f8)][_0x245c4c(0x212)](_0x522753[_0x245c4c(0x21b)])[_0x245c4c(0x1fc)]();}[_0x4b53f9(0x1f3)](){const _0x15b591=_0x4b53f9;this['_injector'][_0x15b591(0x212)](_0x522753[_0x15b591(0x21b)])[_0x15b591(0x20b)]();}}_0x2da985[_0x4b53f9(0x1f0)][_0x4b53f9(0x205)](_0x4fa088);}));function _0x3943(_0x503c2f,_0x105c10){_0x503c2f=_0x503c2f-0x1ec;const _0x24f607=_0x24f6();let _0x394316=_0x24f607[_0x503c2f];return _0x394316;}function _0x24f6(){const _0x2751fb=['disconnectMCP','225kmNjKF','IMCPToolRegistry','type','Event','_injector','4645368fBVEHO','amd','validateMCPToolCall','connect','30nmzPiV','connectMCP','_registerMCPFacadeEvents','McpConnectionStatusChanged','data','_initialize','validateToolCall','576074qzhIix','extend','1725176mMTlrI','@univerjs/core','McpToolCallExecuted','getAllTools','callMCPTool','disconnect','MCPEventId','934422NbnzHz','getConnectionStatus','UniverCore','UniverProMcp','McpToolCallFailed','get','subscribe','UniverCoreFacade','833070BaSsQF','407072neiJOm','fireEvent','event$','function','McpToolCallReceived','MCPConnectionController','@univerjs-pro/mcp','getMCPConnectionStatus','registerEventHandler','FEventName','FUniver','714065iieMry','toDisposable'];_0x24f6=function(){return _0x2751fb;};return _0x24f6();}
1
+ function _0x2a0d(){const _0x4ba7bd=['MCPEventService','event$','amd','connectMCP','McpToolCallReceived','1041798pfPgJy','getConnectionStatus','toDisposable','22846QoqIGK','fireEvent','IMCPToolRegistry','object','data','registerEventHandler','UniverCore','Event','59964JhlSCP','UniverCoreFacade','McpToolCallExecuted','type','MCPEventId','executeTool','UniverProMcp','_registerMCPFacadeEvents','McpConnectionStatusChanged','getMCPConnectionStatus','McpToolCallFailed','subscribe','FUniver','4821936IhzNir','32IuNbIE','MCPConnectionController','disconnectMCP','function','callMCPTool','_injector','extend','4531672sbawzQ','@univerjs/core/facade','3867327kEwHIu','connect','validateToolCall','62hXiDSx','188100RSewCp','get'];_0x2a0d=function(){return _0x4ba7bd;};return _0x2a0d();}function _0x4196(_0x57be66,_0x582f0d){_0x57be66=_0x57be66-0x1cf;const _0x2a0dc1=_0x2a0d();let _0x419694=_0x2a0dc1[_0x57be66];return _0x419694;}(function(_0x247af1,_0xb4677a){const _0x3c7f58=_0x4196,_0x33f39b=_0x247af1();while(!![]){try{const _0x1114bc=parseInt(_0x3c7f58(0x1ee))/0x1+-parseInt(_0x3c7f58(0x1e3))/0x2*(parseInt(_0x3c7f58(0x1f6))/0x3)+parseInt(_0x3c7f58(0x1d7))/0x4*(parseInt(_0x3c7f58(0x1e4))/0x5)+-parseInt(_0x3c7f58(0x1eb))/0x6+parseInt(_0x3c7f58(0x1d6))/0x7+parseInt(_0x3c7f58(0x1de))/0x8+-parseInt(_0x3c7f58(0x1e0))/0x9;if(_0x1114bc===_0xb4677a)break;else _0x33f39b['push'](_0x33f39b['shift']());}catch(_0x29df32){_0x33f39b['push'](_0x33f39b['shift']());}}}(_0x2a0d,0x56f35),function(_0x521a61,_0x1ca208){const _0x311098=_0x4196;typeof exports==_0x311098(0x1f1)&&typeof module<'u'?_0x1ca208(require('@univerjs-pro/mcp'),require('@univerjs/core/facade'),require('@univerjs/core')):typeof define==_0x311098(0x1da)&&define[_0x311098(0x1e8)]?define(['@univerjs-pro/mcp',_0x311098(0x1df),'@univerjs/core'],_0x1ca208):(_0x521a61=typeof globalThis<'u'?globalThis:_0x521a61||self,_0x1ca208(_0x521a61[_0x311098(0x1cf)],_0x521a61[_0x311098(0x1f7)],_0x521a61[_0x311098(0x1f4)]));}(this,function(_0x3feccb,_0x121ded,_0x26e3d6){'use strict';const _0x348481=_0x4196;class _0x330eee{get[_0x348481(0x1d1)](){const _0x28b5c6=_0x348481;return _0x3feccb['MCPEventId'][_0x28b5c6(0x1d1)];}get[_0x348481(0x1ea)](){const _0x4ab283=_0x348481;return _0x3feccb['MCPEventId'][_0x4ab283(0x1ea)];}get[_0x348481(0x1f8)](){const _0x3ecd85=_0x348481;return _0x3feccb[_0x3ecd85(0x1fa)][_0x3ecd85(0x1f8)];}get[_0x348481(0x1d3)](){return _0x3feccb['MCPEventId']['McpToolCallFailed'];}}_0x121ded['FEventName'][_0x348481(0x1dd)](_0x330eee);class _0x33f72c extends _0x121ded[_0x348481(0x1d5)]{['_initialize'](_0x3acdee){const _0x291fce=_0x348481;this[_0x291fce(0x1d0)](_0x3acdee);}['_registerMCPFacadeEvents'](_0x3d4083){const _0xadbcb5=_0x348481,_0xa82253=_0x3d4083[_0xadbcb5(0x1e5)](_0x3feccb[_0xadbcb5(0x1e6)]);this['registerEventHandler'](this['Event'][_0xadbcb5(0x1d1)],()=>_0x26e3d6[_0xadbcb5(0x1ed)](_0xa82253[_0xadbcb5(0x1e7)][_0xadbcb5(0x1d4)](_0x4dcbfb=>{const _0x4db97b=_0xadbcb5;_0x4dcbfb[_0x4db97b(0x1f9)]===_0x3feccb[_0x4db97b(0x1fa)][_0x4db97b(0x1d1)]&&this['fireEvent'](this[_0x4db97b(0x1f5)][_0x4db97b(0x1d1)],_0x4dcbfb[_0x4db97b(0x1f2)]);}))),this[_0xadbcb5(0x1f3)](this['Event'][_0xadbcb5(0x1ea)],()=>_0x26e3d6[_0xadbcb5(0x1ed)](_0xa82253[_0xadbcb5(0x1e7)][_0xadbcb5(0x1d4)](_0x20839a=>{const _0x485082=_0xadbcb5;_0x20839a[_0x485082(0x1f9)]===_0x3feccb[_0x485082(0x1fa)][_0x485082(0x1ea)]&&this[_0x485082(0x1ef)](this[_0x485082(0x1f5)]['McpToolCallReceived'],_0x20839a[_0x485082(0x1f2)]);}))),this['registerEventHandler'](this['Event']['McpToolCallExecuted'],()=>_0x26e3d6[_0xadbcb5(0x1ed)](_0xa82253['event$'][_0xadbcb5(0x1d4)](_0xa77bc1=>{const _0x5ebbb7=_0xadbcb5;_0xa77bc1[_0x5ebbb7(0x1f9)]===_0x3feccb['MCPEventId']['McpToolCallExecuted']&&this['fireEvent'](this[_0x5ebbb7(0x1f5)]['McpToolCallExecuted'],_0xa77bc1[_0x5ebbb7(0x1f2)]);}))),this[_0xadbcb5(0x1f3)](this['Event'][_0xadbcb5(0x1d3)],()=>_0x26e3d6[_0xadbcb5(0x1ed)](_0xa82253[_0xadbcb5(0x1e7)]['subscribe'](_0x527012=>{const _0x40a81a=_0xadbcb5;_0x527012[_0x40a81a(0x1f9)]===_0x3feccb['MCPEventId'][_0x40a81a(0x1d3)]&&this[_0x40a81a(0x1ef)](this['Event'][_0x40a81a(0x1d3)],_0x527012[_0x40a81a(0x1f2)]);})));}['validateMCPToolCall'](_0x2d3a77,_0x43b547){const _0x14b052=_0x348481;return this[_0x14b052(0x1dc)][_0x14b052(0x1e5)](_0x3feccb[_0x14b052(0x1f0)])[_0x14b052(0x1e2)](_0x2d3a77,_0x43b547);}['getAllMCPTools'](){const _0x1744c4=_0x348481;return this['_injector'][_0x1744c4(0x1e5)](_0x3feccb[_0x1744c4(0x1f0)])['getAllTools']();}[_0x348481(0x1db)](_0x4c3a68,_0x5480c6){const _0x25d038=_0x348481;return this[_0x25d038(0x1dc)][_0x25d038(0x1e5)](_0x3feccb['IMCPToolRegistry'])[_0x25d038(0x1fb)](_0x4c3a68,_0x5480c6);}[_0x348481(0x1d2)](){const _0x3a61f2=_0x348481;return this[_0x3a61f2(0x1dc)]['get'](_0x3feccb[_0x3a61f2(0x1d8)])[_0x3a61f2(0x1ec)]();}[_0x348481(0x1e9)](){const _0xc978c3=_0x348481;this[_0xc978c3(0x1dc)][_0xc978c3(0x1e5)](_0x3feccb['MCPConnectionController'])[_0xc978c3(0x1e1)]();}[_0x348481(0x1d9)](){const _0x180bb0=_0x348481;this[_0x180bb0(0x1dc)]['get'](_0x3feccb['MCPConnectionController'])['disconnect']();}}_0x121ded[_0x348481(0x1d5)][_0x348481(0x1dd)](_0x33f72c);}));