@univerjs-pro/mcp 0.10.10-experimental.20251016-33b0941 → 0.10.10-nightly.202510170942

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.
@@ -1,4 +1,4 @@
1
- import { Disposable, IConfigService, ILogService, Injector } from '@univerjs/core';
1
+ import { Disposable, ILogService } from '@univerjs/core';
2
2
  import { z } from 'zod';
3
3
  import { MCPEventService } from '../services/mcp-event.service';
4
4
  /**
@@ -38,10 +38,8 @@ export declare const IMCPToolRegistry: import('@wendellhu/redi').IdentifierDecor
38
38
  export declare class MCPToolRegistryController extends Disposable implements IMCPToolRegistry {
39
39
  private readonly _logService;
40
40
  private readonly _mcpEventService;
41
- readonly _injector: Injector;
42
- private readonly _configService;
43
41
  private readonly _tools;
44
- constructor(_logService: ILogService, _mcpEventService: MCPEventService, _injector: Injector, _configService: IConfigService);
42
+ constructor(_logService: ILogService, _mcpEventService: MCPEventService);
45
43
  /**
46
44
  * Register a tool for MCP calls
47
45
  */
package/lib/umd/facade.js CHANGED
@@ -1 +1 @@
1
- function _0xf5b5(_0x201d75,_0x12d19d){const _0x16bee5=_0x16be();return _0xf5b5=function(_0xf5b5d,_0x514184){_0xf5b5d=_0xf5b5d-0x1f2;let _0x4095d3=_0x16bee5[_0xf5b5d];return _0x4095d3;},_0xf5b5(_0x201d75,_0x12d19d);}function _0x16be(){const _0x291642=['1597770VcCWjr','fireEvent','21TXrGfp','connectMCP','1534182cbZoTl','getAllTools','getAllMCPTools','UniverCoreFacade','2620315QJrftN','MCPConnectionController','23533ltBSji','MCPEventService','connect','_registerMCPFacadeEvents','10AotwRM','1257684HDfCNP','get','_injector','function','UniverProMcp','object','callMCPTool','3076513pkpJMI','FEventName','20TzWNzn','4SOVWka','@univerjs/core','FUniver','type','2181032fLheyE','subscribe','McpToolCallReceived','event$','disconnectMCP','McpConnectionStatusChanged','Event','validateToolCall','validateMCPToolCall','disconnect','amd','data','extend','registerEventHandler','toDisposable','IMCPToolRegistry','McpToolCallExecuted','MCPEventId','McpToolCallFailed','executeTool'];_0x16be=function(){return _0x291642;};return _0x16be();}(function(_0x59fe34,_0x5d0284){const _0x5853b5=_0xf5b5,_0x206c53=_0x59fe34();while(!![]){try{const _0x41dbd1=parseInt(_0x5853b5(0x207))/0x1*(-parseInt(_0x5853b5(0x215))/0x2)+parseInt(_0x5853b5(0x201))/0x3+-parseInt(_0x5853b5(0x216))/0x4*(-parseInt(_0x5853b5(0x205))/0x5)+parseInt(_0x5853b5(0x20c))/0x6*(-parseInt(_0x5853b5(0x1ff))/0x7)+parseInt(_0x5853b5(0x21a))/0x8+parseInt(_0x5853b5(0x1fd))/0x9+-parseInt(_0x5853b5(0x20b))/0xa*(parseInt(_0x5853b5(0x213))/0xb);if(_0x41dbd1===_0x5d0284)break;else _0x206c53['push'](_0x206c53['shift']());}catch(_0x1f02e2){_0x206c53['push'](_0x206c53['shift']());}}}(_0x16be,0x53701),function(_0x204d51,_0x43847e){const _0x4a5d1e=_0xf5b5;typeof exports==_0x4a5d1e(0x211)&&typeof module<'u'?_0x43847e(require('@univerjs-pro/mcp'),require('@univerjs/core/facade'),require('@univerjs/core')):typeof define==_0x4a5d1e(0x20f)&&define[_0x4a5d1e(0x1f3)]?define(['@univerjs-pro/mcp','@univerjs/core/facade',_0x4a5d1e(0x217)],_0x43847e):(_0x204d51=typeof globalThis<'u'?globalThis:_0x204d51||self,_0x43847e(_0x204d51[_0x4a5d1e(0x210)],_0x204d51[_0x4a5d1e(0x204)],_0x204d51['UniverCore']));}(this,function(_0x172aae,_0x28e7da,_0x3e67bf){'use strict';const _0x260133=_0xf5b5;class _0x135d10{get['McpConnectionStatusChanged'](){const _0x18892c=_0xf5b5;return _0x172aae['MCPEventId'][_0x18892c(0x21f)];}get['McpToolCallReceived'](){const _0x276f68=_0xf5b5;return _0x172aae[_0x276f68(0x1fa)][_0x276f68(0x21c)];}get[_0x260133(0x1f9)](){const _0x7c2e70=_0x260133;return _0x172aae[_0x7c2e70(0x1fa)]['McpToolCallExecuted'];}get[_0x260133(0x1fb)](){const _0x1a3b57=_0x260133;return _0x172aae[_0x1a3b57(0x1fa)]['McpToolCallFailed'];}}_0x28e7da[_0x260133(0x214)][_0x260133(0x1f5)](_0x135d10);class _0x2ca230 extends _0x28e7da[_0x260133(0x218)]{['_initialize'](_0x24bee6){const _0x4e13c1=_0x260133;this[_0x4e13c1(0x20a)](_0x24bee6);}[_0x260133(0x20a)](_0x27329e){const _0x2f65ef=_0x260133,_0x427430=_0x27329e[_0x2f65ef(0x20d)](_0x172aae[_0x2f65ef(0x208)]);this[_0x2f65ef(0x1f6)](this['Event'][_0x2f65ef(0x21f)],()=>_0x3e67bf[_0x2f65ef(0x1f7)](_0x427430[_0x2f65ef(0x21d)][_0x2f65ef(0x21b)](_0x518355=>{const _0x5798c5=_0x2f65ef;_0x518355['type']===_0x172aae['MCPEventId'][_0x5798c5(0x21f)]&&this[_0x5798c5(0x1fe)](this[_0x5798c5(0x220)]['McpConnectionStatusChanged'],_0x518355[_0x5798c5(0x1f4)]);}))),this['registerEventHandler'](this['Event']['McpToolCallReceived'],()=>_0x3e67bf[_0x2f65ef(0x1f7)](_0x427430['event$'][_0x2f65ef(0x21b)](_0x52ece9=>{const _0x33c7f0=_0x2f65ef;_0x52ece9[_0x33c7f0(0x219)]===_0x172aae[_0x33c7f0(0x1fa)][_0x33c7f0(0x21c)]&&this['fireEvent'](this[_0x33c7f0(0x220)][_0x33c7f0(0x21c)],_0x52ece9[_0x33c7f0(0x1f4)]);}))),this[_0x2f65ef(0x1f6)](this[_0x2f65ef(0x220)][_0x2f65ef(0x1f9)],()=>_0x3e67bf[_0x2f65ef(0x1f7)](_0x427430[_0x2f65ef(0x21d)][_0x2f65ef(0x21b)](_0x8b5824=>{const _0x3604d2=_0x2f65ef;_0x8b5824['type']===_0x172aae[_0x3604d2(0x1fa)][_0x3604d2(0x1f9)]&&this[_0x3604d2(0x1fe)](this['Event'][_0x3604d2(0x1f9)],_0x8b5824[_0x3604d2(0x1f4)]);}))),this[_0x2f65ef(0x1f6)](this[_0x2f65ef(0x220)]['McpToolCallFailed'],()=>_0x3e67bf[_0x2f65ef(0x1f7)](_0x427430['event$']['subscribe'](_0x450c37=>{const _0x3ed1e5=_0x2f65ef;_0x450c37['type']===_0x172aae[_0x3ed1e5(0x1fa)][_0x3ed1e5(0x1fb)]&&this[_0x3ed1e5(0x1fe)](this[_0x3ed1e5(0x220)][_0x3ed1e5(0x1fb)],_0x450c37[_0x3ed1e5(0x1f4)]);})));}[_0x260133(0x222)](_0x4a0bb4,_0x48d0fa){const _0xab1547=_0x260133;return this[_0xab1547(0x20e)][_0xab1547(0x20d)](_0x172aae[_0xab1547(0x1f8)])[_0xab1547(0x221)](_0x4a0bb4,_0x48d0fa);}[_0x260133(0x203)](){const _0x238eda=_0x260133;return this[_0x238eda(0x20e)][_0x238eda(0x20d)](_0x172aae['IMCPToolRegistry'])[_0x238eda(0x202)]();}[_0x260133(0x212)](_0x570a25,_0x44bb4b){const _0x56bc71=_0x260133;return this[_0x56bc71(0x20e)][_0x56bc71(0x20d)](_0x172aae[_0x56bc71(0x1f8)])[_0x56bc71(0x1fc)](_0x570a25,_0x44bb4b);}['getMCPConnectionStatus'](){const _0x17d77a=_0x260133;return this[_0x17d77a(0x20e)][_0x17d77a(0x20d)](_0x172aae[_0x17d77a(0x206)])['getConnectionStatus']();}[_0x260133(0x200)](){const _0x579ec8=_0x260133;this['_injector'][_0x579ec8(0x20d)](_0x172aae[_0x579ec8(0x206)])[_0x579ec8(0x209)]();}[_0x260133(0x21e)](){const _0x222b3a=_0x260133;this[_0x222b3a(0x20e)][_0x222b3a(0x20d)](_0x172aae[_0x222b3a(0x206)])[_0x222b3a(0x1f2)]();}}_0x28e7da[_0x260133(0x218)]['extend'](_0x2ca230);}));
1
+ function _0xd687(_0x370747,_0x3b56bf){const _0x1ac302=_0x1ac3();return _0xd687=function(_0xd68700,_0x4394cc){_0xd68700=_0xd68700-0x1c5;let _0x5260a4=_0x1ac302[_0xd68700];return _0x5260a4;},_0xd687(_0x370747,_0x3b56bf);}(function(_0x11f6a8,_0x4f2fab){const _0x535d00=_0xd687,_0x4a5a16=_0x11f6a8();while(!![]){try{const _0x31a541=parseInt(_0x535d00(0x1d6))/0x1*(parseInt(_0x535d00(0x1de))/0x2)+-parseInt(_0x535d00(0x1e3))/0x3*(-parseInt(_0x535d00(0x1d4))/0x4)+-parseInt(_0x535d00(0x1db))/0x5*(parseInt(_0x535d00(0x1cc))/0x6)+-parseInt(_0x535d00(0x1c6))/0x7+-parseInt(_0x535d00(0x1ef))/0x8+parseInt(_0x535d00(0x1e9))/0x9+-parseInt(_0x535d00(0x1d3))/0xa*(-parseInt(_0x535d00(0x1ed))/0xb);if(_0x31a541===_0x4f2fab)break;else _0x4a5a16['push'](_0x4a5a16['shift']());}catch(_0x35670a){_0x4a5a16['push'](_0x4a5a16['shift']());}}}(_0x1ac3,0xcfc78),function(_0x1d9ce5,_0x284616){const _0x21d353=_0xd687;typeof exports==_0x21d353(0x1dc)&&typeof module<'u'?_0x284616(require('@univerjs-pro/mcp'),require('@univerjs/core/facade'),require('@univerjs/core')):typeof define==_0x21d353(0x1e8)&&define[_0x21d353(0x1e0)]?define([_0x21d353(0x1e1),_0x21d353(0x1f2),'@univerjs/core'],_0x284616):(_0x1d9ce5=typeof globalThis<'u'?globalThis:_0x1d9ce5||self,_0x284616(_0x1d9ce5[_0x21d353(0x1d0)],_0x1d9ce5[_0x21d353(0x1ec)],_0x1d9ce5[_0x21d353(0x1eb)]));}(this,function(_0x48aa6e,_0x370805,_0x33ac61){'use strict';const _0x155979=_0xd687;class _0x5455ff{get[_0x155979(0x1dd)](){const _0x5bec8c=_0x155979;return _0x48aa6e[_0x5bec8c(0x1d1)]['McpConnectionStatusChanged'];}get[_0x155979(0x1cb)](){const _0x4681b5=_0x155979;return _0x48aa6e[_0x4681b5(0x1d1)][_0x4681b5(0x1cb)];}get[_0x155979(0x1cf)](){const _0x1fdac9=_0x155979;return _0x48aa6e[_0x1fdac9(0x1d1)]['McpToolCallExecuted'];}get['McpToolCallFailed'](){const _0x102968=_0x155979;return _0x48aa6e[_0x102968(0x1d1)]['McpToolCallFailed'];}}_0x370805[_0x155979(0x1c5)]['extend'](_0x5455ff);class _0x3ba020 extends _0x370805[_0x155979(0x1ea)]{['_initialize'](_0x53f99c){const _0x29345e=_0x155979;this[_0x29345e(0x1ce)](_0x53f99c);}['_registerMCPFacadeEvents'](_0x3af41e){const _0xba1764=_0x155979,_0x35a944=_0x3af41e['get'](_0x48aa6e['MCPEventService']);this[_0xba1764(0x1f3)](this[_0xba1764(0x1c9)]['McpConnectionStatusChanged'],()=>_0x33ac61[_0xba1764(0x1e7)](_0x35a944['event$'][_0xba1764(0x1c8)](_0x3a4231=>{const _0x472ebf=_0xba1764;_0x3a4231['type']===_0x48aa6e['MCPEventId'][_0x472ebf(0x1dd)]&&this[_0x472ebf(0x1d5)](this[_0x472ebf(0x1c9)]['McpConnectionStatusChanged'],_0x3a4231[_0x472ebf(0x1f0)]);}))),this[_0xba1764(0x1f3)](this[_0xba1764(0x1c9)]['McpToolCallReceived'],()=>_0x33ac61[_0xba1764(0x1e7)](_0x35a944[_0xba1764(0x1df)][_0xba1764(0x1c8)](_0x2145ea=>{const _0x51b6e5=_0xba1764;_0x2145ea[_0x51b6e5(0x1d2)]===_0x48aa6e[_0x51b6e5(0x1d1)]['McpToolCallReceived']&&this['fireEvent'](this[_0x51b6e5(0x1c9)]['McpToolCallReceived'],_0x2145ea[_0x51b6e5(0x1f0)]);}))),this[_0xba1764(0x1f3)](this[_0xba1764(0x1c9)][_0xba1764(0x1cf)],()=>_0x33ac61['toDisposable'](_0x35a944['event$']['subscribe'](_0x1c6b3a=>{const _0x54a7cd=_0xba1764;_0x1c6b3a[_0x54a7cd(0x1d2)]===_0x48aa6e[_0x54a7cd(0x1d1)]['McpToolCallExecuted']&&this['fireEvent'](this[_0x54a7cd(0x1c9)]['McpToolCallExecuted'],_0x1c6b3a[_0x54a7cd(0x1f0)]);}))),this['registerEventHandler'](this[_0xba1764(0x1c9)][_0xba1764(0x1e5)],()=>_0x33ac61[_0xba1764(0x1e7)](_0x35a944[_0xba1764(0x1df)][_0xba1764(0x1c8)](_0x4b9ab7=>{const _0x38361e=_0xba1764;_0x4b9ab7[_0x38361e(0x1d2)]===_0x48aa6e[_0x38361e(0x1d1)][_0x38361e(0x1e5)]&&this[_0x38361e(0x1d5)](this['Event'][_0x38361e(0x1e5)],_0x4b9ab7['data']);})));}[_0x155979(0x1ee)](_0x818043,_0x57fcb8){const _0x44ccc0=_0x155979;return this[_0x44ccc0(0x1d9)][_0x44ccc0(0x1e2)](_0x48aa6e[_0x44ccc0(0x1e6)])[_0x44ccc0(0x1e4)](_0x818043,_0x57fcb8);}['getAllMCPTools'](){const _0x33b7fa=_0x155979;return this[_0x33b7fa(0x1d9)][_0x33b7fa(0x1e2)](_0x48aa6e[_0x33b7fa(0x1e6)])[_0x33b7fa(0x1d8)]();}['callMCPTool'](_0x3d2e40,_0x108039){const _0x26d40b=_0x155979;return this[_0x26d40b(0x1d9)]['get'](_0x48aa6e['IMCPToolRegistry'])[_0x26d40b(0x1f1)](_0x3d2e40,_0x108039);}[_0x155979(0x1c7)](){const _0x396d0b=_0x155979;return this['_injector'][_0x396d0b(0x1e2)](_0x48aa6e[_0x396d0b(0x1ca)])[_0x396d0b(0x1cd)]();}['connectMCP'](){const _0x25657f=_0x155979;this['_injector'][_0x25657f(0x1e2)](_0x48aa6e['MCPConnectionController'])[_0x25657f(0x1f4)]();}[_0x155979(0x1d7)](){const _0x318205=_0x155979;this['_injector'][_0x318205(0x1e2)](_0x48aa6e['MCPConnectionController'])['disconnect']();}}_0x370805[_0x155979(0x1ea)][_0x155979(0x1da)](_0x3ba020);}));function _0x1ac3(){const _0x4ae275=['957vcMRAJ','validateMCPToolCall','12781112PBfeyH','data','executeTool','@univerjs/core/facade','registerEventHandler','connect','FEventName','6852622YstRPK','getMCPConnectionStatus','subscribe','Event','MCPConnectionController','McpToolCallReceived','6Wlsaag','getConnectionStatus','_registerMCPFacadeEvents','McpToolCallExecuted','UniverProMcp','MCPEventId','type','174710BMlxlk','16yFtbSe','fireEvent','62939OXTHkq','disconnectMCP','getAllTools','_injector','extend','8231305zQucdj','object','McpConnectionStatusChanged','50znVAvi','event$','amd','@univerjs-pro/mcp','get','890958mJoYHP','validateToolCall','McpToolCallFailed','IMCPToolRegistry','toDisposable','function','7132626FQWlBp','FUniver','UniverCore','UniverCoreFacade'];_0x1ac3=function(){return _0x4ae275;};return _0x1ac3();}