@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.
- package/lib/cjs/facade.js +1 -1
- package/lib/cjs/index.js +1 -1
- package/lib/es/facade.js +1 -1
- package/lib/es/index.js +1 -1
- package/lib/facade.js +1 -1
- package/lib/index.js +1 -1
- package/lib/types/plugin.d.ts +0 -18
- package/lib/umd/facade.js +1 -1
- package/lib/umd/index.js +1 -1
- package/package.json +3 -3
package/lib/types/plugin.d.ts
CHANGED
|
@@ -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
|
|
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);}));
|