@univerjs-pro/mcp 0.10.8 → 0.10.9-experimental.20250925-61b61a0
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/controllers/config.schema.d.ts +1 -1
- package/lib/types/controllers/mcp-connection.controller.d.ts +5 -5
- package/lib/types/controllers/mcp-tool-registry.controller.d.ts +3 -3
- package/lib/types/facade/f-event.d.ts +150 -0
- package/lib/types/facade/f-univer.d.ts +18 -0
- package/lib/types/facade/index.d.ts +2 -0
- package/lib/types/index.d.ts +2 -1
- package/lib/types/services/mcp-event.service.d.ts +86 -0
- package/lib/umd/facade.js +1 -1
- package/lib/umd/index.js +1 -1
- package/package.json +4 -4
- package/lib/types/services/mcp-ui-event.service.d.ts +0 -84
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@univerjs-pro/mcp",
|
|
3
|
-
"version": "0.10.
|
|
3
|
+
"version": "0.10.9-experimental.20250925-61b61a0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "",
|
|
6
6
|
"author": "DreamNum <developer@univer.ai>",
|
|
@@ -57,14 +57,14 @@
|
|
|
57
57
|
"dependencies": {
|
|
58
58
|
"rxjs": "7.8.2",
|
|
59
59
|
"zod": "^4.1.5",
|
|
60
|
-
"@univerjs/core": "0.10.
|
|
61
|
-
"@univerjs/network": "0.10.
|
|
60
|
+
"@univerjs/core": "0.10.9-experimental.20250925-61b61a0",
|
|
61
|
+
"@univerjs/network": "0.10.9-experimental.20250925-61b61a0"
|
|
62
62
|
},
|
|
63
63
|
"devDependencies": {
|
|
64
64
|
"typescript": "^5.9.2",
|
|
65
65
|
"vite": "^7.1.3",
|
|
66
66
|
"vitest": "^3.2.4",
|
|
67
|
-
"@univerjs-infra/shared": "0.10.
|
|
67
|
+
"@univerjs-infra/shared": "0.10.9"
|
|
68
68
|
},
|
|
69
69
|
"scripts": {
|
|
70
70
|
"test": "vitest run",
|
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
import { MCPConnectionError, MCPConnectionStatus } from '../controllers/config.schema';
|
|
2
|
-
/**
|
|
3
|
-
* MCP UI event interface
|
|
4
|
-
*/
|
|
5
|
-
export interface IMCPUIEvent {
|
|
6
|
-
id: MCPUIEventId;
|
|
7
|
-
data?: unknown;
|
|
8
|
-
}
|
|
9
|
-
/**
|
|
10
|
-
* MCP UI event IDs for communication between MCP and MCP UI
|
|
11
|
-
*/
|
|
12
|
-
export declare enum MCPUIEventId {
|
|
13
|
-
CONNECTION_STATUS_CHANGED = "CONNECTION_STATUS_CHANGED",
|
|
14
|
-
CONNECTION_ERROR = "CONNECTION_ERROR",
|
|
15
|
-
AUTHENTICATION_FAILED = "AUTHENTICATION_FAILED",
|
|
16
|
-
SESSION_TICKET_EXPIRED = "SESSION_TICKET_EXPIRED",
|
|
17
|
-
TOOL_CALL_RECEIVED = "TOOL_CALL_RECEIVED",
|
|
18
|
-
TOOL_CALL_EXECUTED = "TOOL_CALL_EXECUTED",
|
|
19
|
-
TOOL_CALL_FAILED = "TOOL_CALL_FAILED",
|
|
20
|
-
CONFIG_UPDATED = "CONFIG_UPDATED",
|
|
21
|
-
API_KEY_UPDATED = "API_KEY_UPDATED"
|
|
22
|
-
}
|
|
23
|
-
/**
|
|
24
|
-
* Connection status change event data
|
|
25
|
-
*/
|
|
26
|
-
export interface IConnectionStatusEvent {
|
|
27
|
-
status: MCPConnectionStatus;
|
|
28
|
-
error?: MCPConnectionError;
|
|
29
|
-
message?: string;
|
|
30
|
-
}
|
|
31
|
-
/**
|
|
32
|
-
* Tool call event data
|
|
33
|
-
*/
|
|
34
|
-
export interface IToolCallEvent {
|
|
35
|
-
toolName: string;
|
|
36
|
-
parameters: unknown;
|
|
37
|
-
callId?: string;
|
|
38
|
-
}
|
|
39
|
-
/**
|
|
40
|
-
* Tool execution result event data
|
|
41
|
-
*/
|
|
42
|
-
export interface IToolExecutionEvent {
|
|
43
|
-
toolName: string;
|
|
44
|
-
callId?: string;
|
|
45
|
-
result?: unknown;
|
|
46
|
-
error?: string;
|
|
47
|
-
}
|
|
48
|
-
/**
|
|
49
|
-
* Configuration update event data
|
|
50
|
-
*/
|
|
51
|
-
export interface IConfigUpdateEvent {
|
|
52
|
-
key: string;
|
|
53
|
-
value: unknown;
|
|
54
|
-
}
|
|
55
|
-
/**
|
|
56
|
-
* MCP UI Event Service
|
|
57
|
-
*
|
|
58
|
-
* This service provides event communication between MCP core plugin
|
|
59
|
-
* and MCP UI plugin, similar to CollaborationUIEventService.
|
|
60
|
-
*/
|
|
61
|
-
export declare class MCPUIEventService {
|
|
62
|
-
private readonly _event$;
|
|
63
|
-
readonly event$: import('rxjs').Observable<IMCPUIEvent>;
|
|
64
|
-
/**
|
|
65
|
-
* Emit an MCP UI event
|
|
66
|
-
*/
|
|
67
|
-
emitEvent(event: IMCPUIEvent): void;
|
|
68
|
-
/**
|
|
69
|
-
* Emit connection status change event
|
|
70
|
-
*/
|
|
71
|
-
emitConnectionStatus(status: MCPConnectionStatus, error?: MCPConnectionError, message?: string): void;
|
|
72
|
-
/**
|
|
73
|
-
* Emit tool call received event
|
|
74
|
-
*/
|
|
75
|
-
emitToolCallReceived(toolName: string, parameters: unknown, callId?: string): void;
|
|
76
|
-
/**
|
|
77
|
-
* Emit tool execution result event
|
|
78
|
-
*/
|
|
79
|
-
emitToolExecuted(toolName: string, callId?: string, result?: unknown, error?: string): void;
|
|
80
|
-
/**
|
|
81
|
-
* Emit configuration update event
|
|
82
|
-
*/
|
|
83
|
-
emitConfigUpdate(key: string, value: unknown): void;
|
|
84
|
-
}
|