@univerjs-pro/mcp 0.10.6-experimental.20250904-44da50e → 0.10.6-experimental.20250904-9591d16

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,23 +1,5 @@
1
1
  import { IUniverMCPConfig } from './controllers/config.schema';
2
2
  import { IConfigService, Injector, Plugin } from '@univerjs/core';
3
- /**
4
- *
5
- * Agent (MCP Client / MCP Host) <-> Univer MCP Server Cloud <-> Univer MCP Plugin <-> Univer Instance
6
- *
7
- * Univer MCP Plugin is a bridge between Univer Instance and Univer MCP Server Cloud.
8
- *
9
- * What does this plugin do?
10
- * 本插件为无UI部分,可以在node、browser等环节允许
11
- * 业务逻辑在controllers实现
12
- *
13
- * 1. 开启安全校验时, 根据 api-key(从local-storage配置读取) /universer-api/user/session-ticket+(Authorization Bearer + api-key) 获取session-ticket
14
- * 2. 根据session-ticket与Univer MCP Server Cloud /mcp-server-api/ws 建立连接
15
- * 3. 意外断线时触发自动重连,最大重连次数3(成功清零),重复上述步骤
16
- * 4. 提供管理(注册,注销) tool 的API, 本插件自身注册有一个 eval_js 的调试tool,使用Zod (已安装),参数是字符串,返回值描述Any。
17
- * 其它插件如果需要注册自己的 tool,可以通过调用 API 来注册
18
- * 4. 接收来自Univer MCP Server Cloud的 tool-call 消息并执行,校验tool-call消息是否合法,并将执行结果通过 websocket 返回
19
- * 合法包括是否存在该名称的key,参数定义是否匹配。
20
- */
21
3
  export declare class UniverMCPPlugin extends Plugin {
22
4
  private readonly _config;
23
5
  protected readonly _injector: Injector;
package/lib/umd/facade.js CHANGED
@@ -1 +1 @@
1
- function _0x479a(_0x3989b9,_0x221fce){var _0x2273bf=_0x2273();return _0x479a=function(_0x479aa7,_0x4c5d82){_0x479aa7=_0x479aa7-0x187;var _0x1fc34d=_0x2273bf[_0x479aa7];return _0x1fc34d;},_0x479a(_0x3989b9,_0x221fce);}function _0x2273(){var _0x5c479e=['29264ffFKne','651EFcqzo','UniverCoreFacade','87831BWfGIy','getAllTools','301913NEsHDL','validateToolCall','executeTool','IMCPToolRegistry','4160732WUNkJW','59075196pCMjPu','UniverProMcp','@univerjs/core/facade','callMCPTool','_injector','3TQRuIF','12142174OvvsRO','extend','7497295ZEngwO','6eooRbl','function','10gyHxKs','object','FUniver','13vdlrfd','get','validateMCPToolCall','890uVsOAB'];_0x2273=function(){return _0x5c479e;};return _0x2273();}(function(_0x1c8db1,_0x163068){var _0x35afe6=_0x479a,_0x1977bb=_0x1c8db1();while(!![]){try{var _0x459683=-parseInt(_0x35afe6(0x199))/0x1*(parseInt(_0x35afe6(0x18d))/0x2)+-parseInt(_0x35afe6(0x187))/0x3*(parseInt(_0x35afe6(0x19d))/0x4)+parseInt(_0x35afe6(0x18a))/0x5*(-parseInt(_0x35afe6(0x18b))/0x6)+parseInt(_0x35afe6(0x195))/0x7*(-parseInt(_0x35afe6(0x194))/0x8)+parseInt(_0x35afe6(0x197))/0x9*(-parseInt(_0x35afe6(0x193))/0xa)+parseInt(_0x35afe6(0x188))/0xb+-parseInt(_0x35afe6(0x19e))/0xc*(-parseInt(_0x35afe6(0x190))/0xd);if(_0x459683===_0x163068)break;else _0x1977bb['push'](_0x1977bb['shift']());}catch(_0x471a6e){_0x1977bb['push'](_0x1977bb['shift']());}}}(_0x2273,0xbbb2f),function(_0x19607d,_0x577561){var _0x347f77=_0x479a;typeof exports==_0x347f77(0x18e)&&typeof module<'u'?_0x577561(require('@univerjs-pro/mcp'),require('@univerjs/core/facade')):typeof define==_0x347f77(0x18c)&&define['amd']?define(['@univerjs-pro/mcp',_0x347f77(0x1a0)],_0x577561):(_0x19607d=typeof globalThis<'u'?globalThis:_0x19607d||self,_0x577561(_0x19607d[_0x347f77(0x19f)],_0x19607d[_0x347f77(0x196)]));}(this,function(_0x39785b,_0x2ee111){'use strict';var _0x4c1b5b=_0x479a;class _0x1f1cda extends _0x2ee111[_0x4c1b5b(0x18f)]{[_0x4c1b5b(0x192)](_0x3fbed1,_0x75d419){var _0x232be7=_0x4c1b5b;return this[_0x232be7(0x1a2)][_0x232be7(0x191)](_0x39785b['IMCPToolRegistry'])[_0x232be7(0x19a)](_0x3fbed1,_0x75d419);}['getAllMCPTools'](){var _0x435467=_0x4c1b5b;return this['_injector'][_0x435467(0x191)](_0x39785b[_0x435467(0x19c)])[_0x435467(0x198)]();}[_0x4c1b5b(0x1a1)](_0x42ff63,_0x4c80fa){var _0xe7865e=_0x4c1b5b;return this[_0xe7865e(0x1a2)][_0xe7865e(0x191)](_0x39785b['IMCPToolRegistry'])[_0xe7865e(0x19b)](_0x42ff63,_0x4c80fa);}}_0x2ee111['FUniver'][_0x4c1b5b(0x189)](_0x1f1cda);}));
1
+ function _0x45f9(_0x2b70ea,_0x57d49e){var _0x7c9fc=_0x7c9f();return _0x45f9=function(_0x45f925,_0x865413){_0x45f925=_0x45f925-0xe1;var _0x2680a0=_0x7c9fc[_0x45f925];return _0x2680a0;},_0x45f9(_0x2b70ea,_0x57d49e);}function _0x7c9f(){var _0x1adcaa=['IMCPToolRegistry','validateToolCall','6pLFjuA','10749FwDvgX','object','881432xfDOXo','1983352yJjout','extend','7277840hRvATi','195732aflQLF','_injector','12099SoIkit','10WLzrWc','callMCPTool','FUniver','get','getAllTools','UniverProMcp','284pzuhjV','8965cEFhJT','validateMCPToolCall'];_0x7c9f=function(){return _0x1adcaa;};return _0x7c9f();}(function(_0x252fc1,_0x58c567){var _0x319a23=_0x45f9,_0x5d28a0=_0x252fc1();while(!![]){try{var _0x3f4c92=parseInt(_0x319a23(0xe1))/0x1*(-parseInt(_0x319a23(0xe2))/0x2)+-parseInt(_0x319a23(0xee))/0x3*(parseInt(_0x319a23(0xe8))/0x4)+-parseInt(_0x319a23(0xe9))/0x5*(parseInt(_0x319a23(0xed))/0x6)+-parseInt(_0x319a23(0xf1))/0x7+parseInt(_0x319a23(0xf0))/0x8+-parseInt(_0x319a23(0xf4))/0x9+parseInt(_0x319a23(0xf3))/0xa;if(_0x3f4c92===_0x58c567)break;else _0x5d28a0['push'](_0x5d28a0['shift']());}catch(_0xf7cfac){_0x5d28a0['push'](_0x5d28a0['shift']());}}}(_0x7c9f,0x34c86),function(_0xb9b213,_0xec919){var _0x5d4ef9=_0x45f9;typeof exports==_0x5d4ef9(0xef)&&typeof module<'u'?_0xec919(require('@univerjs-pro/mcp'),require('@univerjs/core/facade')):typeof define=='function'&&define['amd']?define(['@univerjs-pro/mcp','@univerjs/core/facade'],_0xec919):(_0xb9b213=typeof globalThis<'u'?globalThis:_0xb9b213||self,_0xec919(_0xb9b213[_0x5d4ef9(0xe7)],_0xb9b213['UniverCoreFacade']));}(this,function(_0x2a83f9,_0x35355c){'use strict';var _0x14fa1c=_0x45f9;class _0x188346 extends _0x35355c[_0x14fa1c(0xe4)]{[_0x14fa1c(0xea)](_0x2a1642,_0x38d6e8){var _0x1499e4=_0x14fa1c;return this[_0x1499e4(0xf5)][_0x1499e4(0xe5)](_0x2a83f9['IMCPToolRegistry'])[_0x1499e4(0xec)](_0x2a1642,_0x38d6e8);}['getAllMCPTools'](){var _0x2caa2b=_0x14fa1c;return this[_0x2caa2b(0xf5)][_0x2caa2b(0xe5)](_0x2a83f9['IMCPToolRegistry'])[_0x2caa2b(0xe6)]();}[_0x14fa1c(0xe3)](_0x199571,_0x5ddf0e){var _0x4615ab=_0x14fa1c;return this[_0x4615ab(0xf5)][_0x4615ab(0xe5)](_0x2a83f9[_0x4615ab(0xeb)])['executeTool'](_0x199571,_0x5ddf0e);}}_0x35355c['FUniver'][_0x14fa1c(0xf2)](_0x188346);}));