@univerjs-pro/mcp 0.10.11 → 0.10.12-nightly.202510221114

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 _0x1ebed6=_0x115e;function _0x115e(_0xfd2802,_0xaf76a9){const _0x13ba2a=_0x13ba();return _0x115e=function(_0x115e24,_0x26e841){_0x115e24=_0x115e24-0xc6;let _0x398848=_0x13ba2a[_0x115e24];return _0x398848;},_0x115e(_0xfd2802,_0xaf76a9);}function _0x13ba(){const _0x1aaf34=['getAllMCPTools','disconnect','type','5316462oAePKj','event$','getAllTools','325017Pyryys','McpToolCallExecuted','MCPEventId','707550FwyOSL','119sVLLrc','134106csjmxm','3JcsmSD','validateToolCall','357915bIlWqM','488086vKjydj','executeTool','callMCPTool','McpToolCallReceived','Event','_injector','McpToolCallFailed','McpConnectionStatusChanged','MCPEventService','subscribe','_registerMCPFacadeEvents','get','extend','fireEvent','toDisposable','validateMCPToolCall','registerEventHandler','FUniver','getMCPConnectionStatus','data','getConnectionStatus','12paiZPp','IMCPToolRegistry','6031192oLuGyk','disconnectMCP','MCPConnectionController'];_0x13ba=function(){return _0x1aaf34;};return _0x13ba();}(function(_0x5086d0,_0x3080c2){const _0x485f86=_0x115e,_0x856a94=_0x5086d0();while(!![]){try{const _0x584ada=-parseInt(_0x485f86(0xd9))/0x1*(-parseInt(_0x485f86(0xdc))/0x2)+parseInt(_0x485f86(0xd3))/0x3+parseInt(_0x485f86(0xc8))/0x4*(parseInt(_0x485f86(0xdb))/0x5)+parseInt(_0x485f86(0xd8))/0x6*(-parseInt(_0x485f86(0xd7))/0x7)+-parseInt(_0x485f86(0xca))/0x8+parseInt(_0x485f86(0xd0))/0x9+-parseInt(_0x485f86(0xd6))/0xa;if(_0x584ada===_0x3080c2)break;else _0x856a94['push'](_0x856a94['shift']());}catch(_0x5112fb){_0x856a94['push'](_0x856a94['shift']());}}}(_0x13ba,0x6bbe2));const e=require('@univerjs-pro/mcp'),i=require('@univerjs/core/facade'),l=require('@univerjs/core');class r{get[_0x1ebed6(0xe3)](){const _0x5f5328=_0x1ebed6;return e[_0x5f5328(0xd5)]['McpConnectionStatusChanged'];}get[_0x1ebed6(0xdf)](){const _0x5dff77=_0x1ebed6;return e[_0x5dff77(0xd5)][_0x5dff77(0xdf)];}get['McpToolCallExecuted'](){const _0x572f05=_0x1ebed6;return e['MCPEventId'][_0x572f05(0xd4)];}get[_0x1ebed6(0xe2)](){const _0x460476=_0x1ebed6;return e[_0x460476(0xd5)]['McpToolCallFailed'];}}i['FEventName'][_0x1ebed6(0xe8)](r);class s extends i[_0x1ebed6(0xed)]{['_initialize'](_0x199dde){const _0x564180=_0x1ebed6;this[_0x564180(0xe6)](_0x199dde);}[_0x1ebed6(0xe6)](_0x11fd60){const _0x4916a9=_0x1ebed6,_0x5f2ee5=_0x11fd60[_0x4916a9(0xe7)](e[_0x4916a9(0xe4)]);this[_0x4916a9(0xec)](this[_0x4916a9(0xe0)][_0x4916a9(0xe3)],()=>l[_0x4916a9(0xea)](_0x5f2ee5[_0x4916a9(0xd1)]['subscribe'](_0xe4aba8=>{const _0x5ad030=_0x4916a9;_0xe4aba8['type']===e[_0x5ad030(0xd5)][_0x5ad030(0xe3)]&&this[_0x5ad030(0xe9)](this[_0x5ad030(0xe0)]['McpConnectionStatusChanged'],_0xe4aba8[_0x5ad030(0xc6)]);}))),this[_0x4916a9(0xec)](this[_0x4916a9(0xe0)]['McpToolCallReceived'],()=>l[_0x4916a9(0xea)](_0x5f2ee5[_0x4916a9(0xd1)][_0x4916a9(0xe5)](_0x4b91f3=>{const _0x206a3b=_0x4916a9;_0x4b91f3[_0x206a3b(0xcf)]===e[_0x206a3b(0xd5)][_0x206a3b(0xdf)]&&this[_0x206a3b(0xe9)](this[_0x206a3b(0xe0)][_0x206a3b(0xdf)],_0x4b91f3['data']);}))),this['registerEventHandler'](this['Event'][_0x4916a9(0xd4)],()=>l[_0x4916a9(0xea)](_0x5f2ee5[_0x4916a9(0xd1)][_0x4916a9(0xe5)](_0x76bdf5=>{const _0x16e0bd=_0x4916a9;_0x76bdf5[_0x16e0bd(0xcf)]===e[_0x16e0bd(0xd5)][_0x16e0bd(0xd4)]&&this['fireEvent'](this[_0x16e0bd(0xe0)][_0x16e0bd(0xd4)],_0x76bdf5[_0x16e0bd(0xc6)]);}))),this[_0x4916a9(0xec)](this[_0x4916a9(0xe0)][_0x4916a9(0xe2)],()=>l[_0x4916a9(0xea)](_0x5f2ee5['event$'][_0x4916a9(0xe5)](_0x330655=>{const _0x495f02=_0x4916a9;_0x330655[_0x495f02(0xcf)]===e['MCPEventId'][_0x495f02(0xe2)]&&this[_0x495f02(0xe9)](this[_0x495f02(0xe0)]['McpToolCallFailed'],_0x330655[_0x495f02(0xc6)]);})));}[_0x1ebed6(0xeb)](_0x81ba48,_0x5d0039){const _0x11836f=_0x1ebed6;return this['_injector'][_0x11836f(0xe7)](e[_0x11836f(0xc9)])[_0x11836f(0xda)](_0x81ba48,_0x5d0039);}[_0x1ebed6(0xcd)](){const _0xb51973=_0x1ebed6;return this[_0xb51973(0xe1)][_0xb51973(0xe7)](e[_0xb51973(0xc9)])[_0xb51973(0xd2)]();}[_0x1ebed6(0xde)](_0x2822c9,_0x738a02){const _0x38557b=_0x1ebed6;return this[_0x38557b(0xe1)][_0x38557b(0xe7)](e['IMCPToolRegistry'])[_0x38557b(0xdd)](_0x2822c9,_0x738a02);}[_0x1ebed6(0xee)](){const _0x5c4ad5=_0x1ebed6;return this[_0x5c4ad5(0xe1)][_0x5c4ad5(0xe7)](e[_0x5c4ad5(0xcc)])[_0x5c4ad5(0xc7)]();}['connectMCP'](){const _0x22036e=_0x1ebed6;this[_0x22036e(0xe1)][_0x22036e(0xe7)](e[_0x22036e(0xcc)])['connect']();}[_0x1ebed6(0xcb)](){const _0x3c307d=_0x1ebed6;this[_0x3c307d(0xe1)]['get'](e[_0x3c307d(0xcc)])[_0x3c307d(0xce)]();}}i[_0x1ebed6(0xed)][_0x1ebed6(0xe8)](s);
1
+ 'use strict';function _0x2ef0(_0x5ad081,_0x58d7a2){const _0x4d0c2e=_0x4d0c();return _0x2ef0=function(_0x2ef067,_0xe6c636){_0x2ef067=_0x2ef067-0x96;let _0x186fe7=_0x4d0c2e[_0x2ef067];return _0x186fe7;},_0x2ef0(_0x5ad081,_0x58d7a2);}const _0x50923f=_0x2ef0;function _0x4d0c(){const _0x5ed237=['MCPEventService','connect','toDisposable','extend','_registerMCPFacadeEvents','MCPEventId','3764rVzQVl','_injector','993AAsfNN','get','FEventName','IMCPToolRegistry','getAllMCPTools','10020PAEPVy','McpToolCallReceived','146810vuKPvH','FUniver','validateMCPToolCall','20884788Zqupau','239528kWlcAP','registerEventHandler','75156cktPbR','subscribe','McpToolCallFailed','Event','getMCPConnectionStatus','type','McpConnectionStatusChanged','80cDoYSF','fireEvent','getAllTools','connectMCP','363DVDViF','disconnectMCP','data','361RZPaqW','validateToolCall','612063bTzNEU','McpToolCallExecuted','MCPConnectionController','133SIsbdo','event$'];_0x4d0c=function(){return _0x5ed237;};return _0x4d0c();}(function(_0x558f83,_0x1056cc){const _0x2f5e53=_0x2ef0,_0xf813ed=_0x558f83();while(!![]){try{const _0x4a5f4a=parseInt(_0x2f5e53(0xbd))/0x1*(-parseInt(_0x2f5e53(0xa0))/0x2)+parseInt(_0x2f5e53(0xa2))/0x3*(-parseInt(_0x2f5e53(0xa7))/0x4)+parseInt(_0x2f5e53(0xb6))/0x5*(parseInt(_0x2f5e53(0xaf))/0x6)+parseInt(_0x2f5e53(0x98))/0x7*(-parseInt(_0x2f5e53(0xad))/0x8)+parseInt(_0x2f5e53(0xbf))/0x9+parseInt(_0x2f5e53(0xa9))/0xa*(parseInt(_0x2f5e53(0xba))/0xb)+parseInt(_0x2f5e53(0xac))/0xc;if(_0x4a5f4a===_0x1056cc)break;else _0xf813ed['push'](_0xf813ed['shift']());}catch(_0x40de12){_0xf813ed['push'](_0xf813ed['shift']());}}}(_0x4d0c,0x65873));const e=require('@univerjs-pro/mcp'),i=require('@univerjs/core/facade'),l=require('@univerjs/core');class r{get[_0x50923f(0xb5)](){const _0x294531=_0x50923f;return e[_0x294531(0x9f)][_0x294531(0xb5)];}get[_0x50923f(0xa8)](){const _0x43145f=_0x50923f;return e[_0x43145f(0x9f)][_0x43145f(0xa8)];}get[_0x50923f(0x96)](){const _0xf01df2=_0x50923f;return e[_0xf01df2(0x9f)]['McpToolCallExecuted'];}get[_0x50923f(0xb1)](){const _0x126b2d=_0x50923f;return e[_0x126b2d(0x9f)][_0x126b2d(0xb1)];}}i[_0x50923f(0xa4)][_0x50923f(0x9d)](r);class s extends i['FUniver']{['_initialize'](_0x165265){const _0x1b5220=_0x50923f;this[_0x1b5220(0x9e)](_0x165265);}[_0x50923f(0x9e)](_0x49f814){const _0x276e91=_0x50923f,_0x1e49fd=_0x49f814['get'](e[_0x276e91(0x9a)]);this['registerEventHandler'](this[_0x276e91(0xb2)][_0x276e91(0xb5)],()=>l['toDisposable'](_0x1e49fd['event$'][_0x276e91(0xb0)](_0x2df3bf=>{const _0x25634a=_0x276e91;_0x2df3bf['type']===e['MCPEventId'][_0x25634a(0xb5)]&&this[_0x25634a(0xb7)](this[_0x25634a(0xb2)][_0x25634a(0xb5)],_0x2df3bf[_0x25634a(0xbc)]);}))),this[_0x276e91(0xae)](this[_0x276e91(0xb2)][_0x276e91(0xa8)],()=>l[_0x276e91(0x9c)](_0x1e49fd[_0x276e91(0x99)][_0x276e91(0xb0)](_0x3d3834=>{const _0x3f6c6b=_0x276e91;_0x3d3834[_0x3f6c6b(0xb4)]===e[_0x3f6c6b(0x9f)][_0x3f6c6b(0xa8)]&&this[_0x3f6c6b(0xb7)](this[_0x3f6c6b(0xb2)][_0x3f6c6b(0xa8)],_0x3d3834[_0x3f6c6b(0xbc)]);}))),this[_0x276e91(0xae)](this[_0x276e91(0xb2)][_0x276e91(0x96)],()=>l[_0x276e91(0x9c)](_0x1e49fd['event$'][_0x276e91(0xb0)](_0x2068b4=>{const _0x566099=_0x276e91;_0x2068b4[_0x566099(0xb4)]===e[_0x566099(0x9f)][_0x566099(0x96)]&&this[_0x566099(0xb7)](this[_0x566099(0xb2)]['McpToolCallExecuted'],_0x2068b4[_0x566099(0xbc)]);}))),this['registerEventHandler'](this[_0x276e91(0xb2)]['McpToolCallFailed'],()=>l[_0x276e91(0x9c)](_0x1e49fd[_0x276e91(0x99)][_0x276e91(0xb0)](_0x4b0d77=>{const _0x524beb=_0x276e91;_0x4b0d77[_0x524beb(0xb4)]===e['MCPEventId'][_0x524beb(0xb1)]&&this['fireEvent'](this['Event'][_0x524beb(0xb1)],_0x4b0d77[_0x524beb(0xbc)]);})));}[_0x50923f(0xab)](_0x7f2301,_0x1a6f34){const _0x38aa28=_0x50923f;return this[_0x38aa28(0xa1)]['get'](e['IMCPToolRegistry'])[_0x38aa28(0xbe)](_0x7f2301,_0x1a6f34);}[_0x50923f(0xa6)](){const _0x1f7703=_0x50923f;return this[_0x1f7703(0xa1)]['get'](e[_0x1f7703(0xa5)])[_0x1f7703(0xb8)]();}['callMCPTool'](_0x31ff2d,_0x85f36c){const _0x4c5aff=_0x50923f;return this[_0x4c5aff(0xa1)][_0x4c5aff(0xa3)](e[_0x4c5aff(0xa5)])['executeTool'](_0x31ff2d,_0x85f36c);}[_0x50923f(0xb3)](){const _0x220099=_0x50923f;return this[_0x220099(0xa1)]['get'](e[_0x220099(0x97)])['getConnectionStatus']();}[_0x50923f(0xb9)](){const _0x1c4176=_0x50923f;this['_injector'][_0x1c4176(0xa3)](e['MCPConnectionController'])[_0x1c4176(0x9b)]();}[_0x50923f(0xbb)](){const _0x433597=_0x50923f;this['_injector']['get'](e[_0x433597(0x97)])['disconnect']();}}i[_0x50923f(0xaa)]['extend'](s);