@seastudio/sdk 3.0.1 → 3.0.3
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/bin/seastudio.js +0 -0
- package/dist/chunk-D7ONFXVY.js +98 -0
- package/dist/chunk-EIOFZMTC.cjs +109 -0
- package/dist/{chunk-AGBZJGTY.cjs → chunk-SUF5BPSK.cjs} +3 -1
- package/dist/{chunk-DDVRUPMZ.js → chunk-XU5GEWWL.js} +3 -1
- package/dist/develop-tool/cli/index.cjs +79 -7
- package/dist/develop-tool/cli/index.js +79 -7
- package/dist/index.cjs +42 -167
- package/dist/index.d.cts +2 -6
- package/dist/index.d.ts +2 -6
- package/dist/index.js +2 -7
- package/dist/mcp/core/index.d.cts +2 -2
- package/dist/mcp/core/index.d.ts +2 -2
- package/dist/mcp/index.cjs +27 -152
- package/dist/mcp/index.d.cts +12 -77
- package/dist/mcp/index.d.ts +12 -77
- package/dist/mcp/index.js +2 -7
- package/dist/mcp/seastudio/index.cjs +18 -18
- package/dist/mcp/seastudio/index.d.cts +34 -2
- package/dist/mcp/seastudio/index.d.ts +34 -2
- package/dist/mcp/seastudio/index.js +1 -1
- package/dist/{types-Clgf5gBf.d.cts → types-B32sUvc0.d.cts} +10 -2
- package/dist/{types-Clgf5gBf.d.ts → types-B32sUvc0.d.ts} +10 -2
- package/package.json +2 -22
- package/src/develop-tool/templates/plugin/frontend/package.json.tmpl +1 -1
- package/src/develop-tool/templates/plugin/frontend/src/main.tsx +3 -0
- package/src/develop-tool/templates/plugin/frontend/src/mcp-entry.ts.tmpl +12 -0
- package/dist/chunk-4ITOR5QE.js +0 -901
- package/dist/chunk-CSXDT47Y.cjs +0 -105
- package/dist/chunk-CVF4QHS6.cjs +0 -436
- package/dist/chunk-DSOSHJH2.js +0 -643
- package/dist/chunk-FLATZQA2.js +0 -174
- package/dist/chunk-HJJTBVKQ.cjs +0 -909
- package/dist/chunk-ISI2OLPI.cjs +0 -179
- package/dist/chunk-MYURVLGP.cjs +0 -165
- package/dist/chunk-QD4KISXM.js +0 -160
- package/dist/chunk-SNGU4SHO.cjs +0 -654
- package/dist/chunk-V7MNKGS7.js +0 -94
- package/dist/chunk-Z7LV7DCO.js +0 -429
- package/dist/mcp/plugin-editor/index.cjs +0 -47
- package/dist/mcp/plugin-editor/index.d.cts +0 -98
- package/dist/mcp/plugin-editor/index.d.ts +0 -98
- package/dist/mcp/plugin-editor/index.js +0 -2
- package/dist/mcp/plugin-excel/index.cjs +0 -31
- package/dist/mcp/plugin-excel/index.d.cts +0 -86
- package/dist/mcp/plugin-excel/index.d.ts +0 -86
- package/dist/mcp/plugin-excel/index.js +0 -2
- package/dist/mcp/plugin-preview/index.cjs +0 -23
- package/dist/mcp/plugin-preview/index.d.cts +0 -109
- package/dist/mcp/plugin-preview/index.d.ts +0 -109
- package/dist/mcp/plugin-preview/index.js +0 -2
- package/dist/mcp/plugin-seaflow/index.cjs +0 -35
- package/dist/mcp/plugin-seaflow/index.d.cts +0 -318
- package/dist/mcp/plugin-seaflow/index.d.ts +0 -318
- package/dist/mcp/plugin-seaflow/index.js +0 -2
- package/dist/tools-LMW67LIY.js +0 -2
- package/dist/tools-TU7PBMDO.cjs +0 -23
package/dist/mcp/index.d.cts
CHANGED
|
@@ -1,29 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export { F as FileItem, a as FileNode, J as JSONRPCError, b as JSONRPCMessage, c as JSONRPCNotification, d as JSONRPCRequest, e as JSONRPCResponse, M as MCPMessageEnvelope, f as MCPMethod, i as MCPToolCallRequest, N as NotificationHandler, P as PublishParams, S as SubscribeParams,
|
|
1
|
+
import { g as MCPTool, h as MCPToolAnnotations, j as MCPToolInputSchema } from '../types-B32sUvc0.cjs';
|
|
2
|
+
export { F as FileItem, a as FileNode, J as JSONRPCError, b as JSONRPCMessage, c as JSONRPCNotification, d as JSONRPCRequest, e as JSONRPCResponse, M as MCPMessageEnvelope, f as MCPMethod, i as MCPToolCallRequest, k as MCPToolResult, N as NotificationHandler, P as PluginMCPManifest, l as PluginMCPModuleExports, m as PublishParams, S as SubscribeParams, n as createNotification, o as createRequest, p as createResponse, q as isMCPMessage, r as isNotification } from '../types-B32sUvc0.cjs';
|
|
3
3
|
export { MCPClient, MCPClientOptions, MCPRequestOptions, MCPServer, MCPToolHandler, MCPTransport, NormalizeMCPToolInputSchemaOptions, PostMessageTransport, PostMessageTransportOptions, callHostTool, callHostToolText, createMCPClient, createMCPServer, getDefaultClient, getDefaultServer, getDefaultTransport, normalizeMCPTool, normalizeMCPToolInputSchema, normalizeMCPToolObjectSchema, setDefaultClient, setDefaultTransport, startDefaultServer } from './core/index.cjs';
|
|
4
4
|
export { FileModifiedParams, FileOpenRequestedParams, FileSavedParams, FileSendRequestedParams, FilesChangedParams, RootsChangedParams, SeastudioDragDropParams, SeastudioDragEnterParams, SeastudioDragFileData, SeastudioDragRootId, SeastudioDragStartParams, SeastudioFileDownloadOptions, SeastudioFileTreeOptions, SeastudioNotifications, SeastudioRequests, TextSendRequestedParams, agentManagementTools, agentTabTools, batchFileTools, clipboardTools, codeQualityTools, fileTools, gitTools, pluginManagementTools, pluginTabTools, seastudio, allTools as seastudioAllTools, tools as seastudioTools, shellTools } from './seastudio/index.cjs';
|
|
5
|
-
export { CodeSearchMatch, CodeSearchResult, EditorFileInfo, LintResult, TestResult, TypecheckResult, editor, allTools as editorAllTools, extensionTools as editorExtensionTools, fileMutationTools as editorFileMutationTools, previewTools as editorPreviewTools, proposalTools as editorProposalTools, referenceTools as editorReferenceTools, sessionTools as editorSessionTools, tools as editorTools, fileOperationTools } from './plugin-editor/index.cjs';
|
|
6
|
-
export { PreviewBatchEntry, PreviewBatchGetResponse, PreviewBatchItem, PreviewBatchResult, PreviewCapability, PreviewCompareVersionsResult, PreviewGetResponse, PreviewMetadata, PreviewMode, PreviewThumbnail, RenderKind, preview, coreTools as previewCoreTools, enhancedTools as previewEnhancedTools, tools as previewTools } from './plugin-preview/index.cjs';
|
|
7
|
-
export { CanvasBatchApplyResult, CanvasEdgeListItem, CanvasEdgeListResult, CanvasExecutionAuthSnapshot, CanvasExecutionAuthState, CanvasExecutionPersistMode, CanvasExecutionTaskState, CanvasNodeDetailResult, CanvasNodeOutputsResult, CanvasNodeValidationResult, CanvasTaskListItem, CanvasTaskListResult, CanvasTaskStatus, CanvasTaskWaitResult, seaflow, allTools as seaflowAllTools, canvasAuthTools as seaflowCanvasAuthTools, canvasContextTools as seaflowCanvasContextTools, canvasExecutionTools as seaflowCanvasExecutionTools, tools as seaflowTools } from './plugin-seaflow/index.cjs';
|
|
8
|
-
export { ExcelContext, ExcelFindMatch, ExcelSelectionInfo, ExcelSheetInfo, ExcelStats, excel, allTools as excelAllTools, lifecycleTools as excelLifecycleTools, mutateTools as excelMutateTools, readTools as excelReadTools, tools as excelTools } from './plugin-excel/index.cjs';
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
* Shell Plugin MCP Tools
|
|
12
|
-
*
|
|
13
|
-
* Shell 插件提供的 MCP Tools
|
|
14
|
-
*/
|
|
15
|
-
|
|
16
|
-
declare const sessionTools: MCPTool[];
|
|
17
|
-
declare const commandTools: MCPTool[];
|
|
18
|
-
declare const tools: MCPTool[];
|
|
19
|
-
declare const shellPlugin: {
|
|
20
|
-
getSession: () => Promise<MCPToolResult>;
|
|
21
|
-
getEntries: (limit?: number) => Promise<MCPToolResult>;
|
|
22
|
-
runCommand: (command: string, cwd?: string, timeout?: number) => Promise<MCPToolResult>;
|
|
23
|
-
setCwd: (cwd: string) => Promise<MCPToolResult>;
|
|
24
|
-
clearOutput: () => Promise<MCPToolResult>;
|
|
25
|
-
resetSession: () => Promise<MCPToolResult>;
|
|
26
|
-
};
|
|
27
5
|
|
|
28
6
|
/**
|
|
29
7
|
* MCP Module Entry
|
|
@@ -33,50 +11,19 @@ declare const shellPlugin: {
|
|
|
33
11
|
|
|
34
12
|
declare function loadPlugin(pluginName: string): Promise<unknown>;
|
|
35
13
|
|
|
36
|
-
/**
|
|
37
|
-
* MCP 包定义
|
|
38
|
-
*/
|
|
39
14
|
declare const MCP_PACKAGES: readonly [{
|
|
40
15
|
readonly id: "seastudio";
|
|
41
16
|
readonly name: "SeaStudio";
|
|
42
17
|
readonly description: "文件/Shell/Git 基础能力";
|
|
43
18
|
readonly tools: MCPTool[];
|
|
44
|
-
}, {
|
|
45
|
-
readonly id: "codeEditor";
|
|
46
|
-
readonly name: "Code Editor";
|
|
47
|
-
readonly description: "代码编辑器能力";
|
|
48
|
-
readonly tools: MCPTool[];
|
|
49
|
-
}, {
|
|
50
|
-
readonly id: "preview";
|
|
51
|
-
readonly name: "Preview";
|
|
52
|
-
readonly description: "预览器能力";
|
|
53
|
-
readonly tools: MCPTool[];
|
|
54
|
-
}, {
|
|
55
|
-
readonly id: "seaflow";
|
|
56
|
-
readonly name: "SeaFlow";
|
|
57
|
-
readonly description: "流程画布执行与编排能力";
|
|
58
|
-
readonly tools: MCPTool[];
|
|
59
|
-
}, {
|
|
60
|
-
readonly id: "shell";
|
|
61
|
-
readonly name: "Shell";
|
|
62
|
-
readonly description: "Shell 会话与命令执行能力";
|
|
63
|
-
readonly tools: MCPTool[];
|
|
64
|
-
}, {
|
|
65
|
-
readonly id: "excel";
|
|
66
|
-
readonly name: "Excel";
|
|
67
|
-
readonly description: "Excel 电子表格操作能力";
|
|
68
|
-
readonly tools: MCPTool[];
|
|
69
19
|
}];
|
|
70
|
-
type MCPPackageId =
|
|
20
|
+
type MCPPackageId = string;
|
|
71
21
|
interface MCPPackageInfo {
|
|
72
22
|
id: MCPPackageId;
|
|
73
23
|
name: string;
|
|
74
24
|
description: string;
|
|
75
25
|
toolCount: number;
|
|
76
26
|
}
|
|
77
|
-
/**
|
|
78
|
-
* OpenAI function 格式的工具定义
|
|
79
|
-
*/
|
|
80
27
|
type MCPToolCapabilityRisk = 'low' | 'medium' | 'high';
|
|
81
28
|
interface MCPToolCapabilityMetadata {
|
|
82
29
|
id: string;
|
|
@@ -96,28 +43,16 @@ interface OpenAITool {
|
|
|
96
43
|
outputSchema?: MCPToolInputSchema;
|
|
97
44
|
};
|
|
98
45
|
}
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
46
|
+
interface MCPAvailableTool extends MCPTool {
|
|
47
|
+
source: string;
|
|
48
|
+
}
|
|
102
49
|
declare function mcpToolToOpenAI(tool: MCPTool): OpenAITool;
|
|
103
|
-
/**
|
|
104
|
-
* 获取所有 MCP Tools
|
|
105
|
-
*/
|
|
106
50
|
declare function listAllTools(): MCPTool[];
|
|
107
|
-
/**
|
|
108
|
-
* @deprecated 使用 listAllTools() 替代
|
|
109
|
-
*/
|
|
110
|
-
declare const listAvailableTools: typeof listAllTools;
|
|
111
51
|
declare function getMCPToolPackageIndex(): Map<string, MCPPackageId>;
|
|
112
|
-
declare function
|
|
113
|
-
declare function
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
declare function getMCPPackages(): MCPPackageInfo[];
|
|
118
|
-
/**
|
|
119
|
-
* 根据启用的包获取工具列表(OpenAI 格式)
|
|
120
|
-
*/
|
|
121
|
-
declare function getToolsForLLM(disabledPackages: Set<MCPPackageId>): OpenAITool[];
|
|
52
|
+
declare function listAvailableTools(): Promise<MCPAvailableTool[]>;
|
|
53
|
+
declare function getMCPPackageIdForTool(toolName: string): Promise<MCPPackageId | null>;
|
|
54
|
+
declare function listAvailableToolsForLLM(): Promise<OpenAITool[]>;
|
|
55
|
+
declare function getMCPPackages(): Promise<MCPPackageInfo[]>;
|
|
56
|
+
declare function getToolsForLLM(disabledPackages: Set<MCPPackageId>): Promise<OpenAITool[]>;
|
|
122
57
|
|
|
123
|
-
export { type MCPPackageId, type MCPPackageInfo, MCPTool, MCPToolAnnotations, type MCPToolCapabilityMetadata, type MCPToolCapabilityRisk, MCPToolInputSchema,
|
|
58
|
+
export { type MCPAvailableTool, type MCPPackageId, type MCPPackageInfo, MCPTool, MCPToolAnnotations, type MCPToolCapabilityMetadata, type MCPToolCapabilityRisk, MCPToolInputSchema, MCP_PACKAGES, type OpenAITool, getMCPPackageIdForTool, getMCPPackages, getMCPToolPackageIndex, getToolsForLLM, listAllTools, listAvailableTools, listAvailableToolsForLLM, loadPlugin, mcpToolToOpenAI };
|
package/dist/mcp/index.d.ts
CHANGED
|
@@ -1,29 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export { F as FileItem, a as FileNode, J as JSONRPCError, b as JSONRPCMessage, c as JSONRPCNotification, d as JSONRPCRequest, e as JSONRPCResponse, M as MCPMessageEnvelope, f as MCPMethod, i as MCPToolCallRequest, N as NotificationHandler, P as PublishParams, S as SubscribeParams,
|
|
1
|
+
import { g as MCPTool, h as MCPToolAnnotations, j as MCPToolInputSchema } from '../types-B32sUvc0.js';
|
|
2
|
+
export { F as FileItem, a as FileNode, J as JSONRPCError, b as JSONRPCMessage, c as JSONRPCNotification, d as JSONRPCRequest, e as JSONRPCResponse, M as MCPMessageEnvelope, f as MCPMethod, i as MCPToolCallRequest, k as MCPToolResult, N as NotificationHandler, P as PluginMCPManifest, l as PluginMCPModuleExports, m as PublishParams, S as SubscribeParams, n as createNotification, o as createRequest, p as createResponse, q as isMCPMessage, r as isNotification } from '../types-B32sUvc0.js';
|
|
3
3
|
export { MCPClient, MCPClientOptions, MCPRequestOptions, MCPServer, MCPToolHandler, MCPTransport, NormalizeMCPToolInputSchemaOptions, PostMessageTransport, PostMessageTransportOptions, callHostTool, callHostToolText, createMCPClient, createMCPServer, getDefaultClient, getDefaultServer, getDefaultTransport, normalizeMCPTool, normalizeMCPToolInputSchema, normalizeMCPToolObjectSchema, setDefaultClient, setDefaultTransport, startDefaultServer } from './core/index.js';
|
|
4
4
|
export { FileModifiedParams, FileOpenRequestedParams, FileSavedParams, FileSendRequestedParams, FilesChangedParams, RootsChangedParams, SeastudioDragDropParams, SeastudioDragEnterParams, SeastudioDragFileData, SeastudioDragRootId, SeastudioDragStartParams, SeastudioFileDownloadOptions, SeastudioFileTreeOptions, SeastudioNotifications, SeastudioRequests, TextSendRequestedParams, agentManagementTools, agentTabTools, batchFileTools, clipboardTools, codeQualityTools, fileTools, gitTools, pluginManagementTools, pluginTabTools, seastudio, allTools as seastudioAllTools, tools as seastudioTools, shellTools } from './seastudio/index.js';
|
|
5
|
-
export { CodeSearchMatch, CodeSearchResult, EditorFileInfo, LintResult, TestResult, TypecheckResult, editor, allTools as editorAllTools, extensionTools as editorExtensionTools, fileMutationTools as editorFileMutationTools, previewTools as editorPreviewTools, proposalTools as editorProposalTools, referenceTools as editorReferenceTools, sessionTools as editorSessionTools, tools as editorTools, fileOperationTools } from './plugin-editor/index.js';
|
|
6
|
-
export { PreviewBatchEntry, PreviewBatchGetResponse, PreviewBatchItem, PreviewBatchResult, PreviewCapability, PreviewCompareVersionsResult, PreviewGetResponse, PreviewMetadata, PreviewMode, PreviewThumbnail, RenderKind, preview, coreTools as previewCoreTools, enhancedTools as previewEnhancedTools, tools as previewTools } from './plugin-preview/index.js';
|
|
7
|
-
export { CanvasBatchApplyResult, CanvasEdgeListItem, CanvasEdgeListResult, CanvasExecutionAuthSnapshot, CanvasExecutionAuthState, CanvasExecutionPersistMode, CanvasExecutionTaskState, CanvasNodeDetailResult, CanvasNodeOutputsResult, CanvasNodeValidationResult, CanvasTaskListItem, CanvasTaskListResult, CanvasTaskStatus, CanvasTaskWaitResult, seaflow, allTools as seaflowAllTools, canvasAuthTools as seaflowCanvasAuthTools, canvasContextTools as seaflowCanvasContextTools, canvasExecutionTools as seaflowCanvasExecutionTools, tools as seaflowTools } from './plugin-seaflow/index.js';
|
|
8
|
-
export { ExcelContext, ExcelFindMatch, ExcelSelectionInfo, ExcelSheetInfo, ExcelStats, excel, allTools as excelAllTools, lifecycleTools as excelLifecycleTools, mutateTools as excelMutateTools, readTools as excelReadTools, tools as excelTools } from './plugin-excel/index.js';
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
* Shell Plugin MCP Tools
|
|
12
|
-
*
|
|
13
|
-
* Shell 插件提供的 MCP Tools
|
|
14
|
-
*/
|
|
15
|
-
|
|
16
|
-
declare const sessionTools: MCPTool[];
|
|
17
|
-
declare const commandTools: MCPTool[];
|
|
18
|
-
declare const tools: MCPTool[];
|
|
19
|
-
declare const shellPlugin: {
|
|
20
|
-
getSession: () => Promise<MCPToolResult>;
|
|
21
|
-
getEntries: (limit?: number) => Promise<MCPToolResult>;
|
|
22
|
-
runCommand: (command: string, cwd?: string, timeout?: number) => Promise<MCPToolResult>;
|
|
23
|
-
setCwd: (cwd: string) => Promise<MCPToolResult>;
|
|
24
|
-
clearOutput: () => Promise<MCPToolResult>;
|
|
25
|
-
resetSession: () => Promise<MCPToolResult>;
|
|
26
|
-
};
|
|
27
5
|
|
|
28
6
|
/**
|
|
29
7
|
* MCP Module Entry
|
|
@@ -33,50 +11,19 @@ declare const shellPlugin: {
|
|
|
33
11
|
|
|
34
12
|
declare function loadPlugin(pluginName: string): Promise<unknown>;
|
|
35
13
|
|
|
36
|
-
/**
|
|
37
|
-
* MCP 包定义
|
|
38
|
-
*/
|
|
39
14
|
declare const MCP_PACKAGES: readonly [{
|
|
40
15
|
readonly id: "seastudio";
|
|
41
16
|
readonly name: "SeaStudio";
|
|
42
17
|
readonly description: "文件/Shell/Git 基础能力";
|
|
43
18
|
readonly tools: MCPTool[];
|
|
44
|
-
}, {
|
|
45
|
-
readonly id: "codeEditor";
|
|
46
|
-
readonly name: "Code Editor";
|
|
47
|
-
readonly description: "代码编辑器能力";
|
|
48
|
-
readonly tools: MCPTool[];
|
|
49
|
-
}, {
|
|
50
|
-
readonly id: "preview";
|
|
51
|
-
readonly name: "Preview";
|
|
52
|
-
readonly description: "预览器能力";
|
|
53
|
-
readonly tools: MCPTool[];
|
|
54
|
-
}, {
|
|
55
|
-
readonly id: "seaflow";
|
|
56
|
-
readonly name: "SeaFlow";
|
|
57
|
-
readonly description: "流程画布执行与编排能力";
|
|
58
|
-
readonly tools: MCPTool[];
|
|
59
|
-
}, {
|
|
60
|
-
readonly id: "shell";
|
|
61
|
-
readonly name: "Shell";
|
|
62
|
-
readonly description: "Shell 会话与命令执行能力";
|
|
63
|
-
readonly tools: MCPTool[];
|
|
64
|
-
}, {
|
|
65
|
-
readonly id: "excel";
|
|
66
|
-
readonly name: "Excel";
|
|
67
|
-
readonly description: "Excel 电子表格操作能力";
|
|
68
|
-
readonly tools: MCPTool[];
|
|
69
19
|
}];
|
|
70
|
-
type MCPPackageId =
|
|
20
|
+
type MCPPackageId = string;
|
|
71
21
|
interface MCPPackageInfo {
|
|
72
22
|
id: MCPPackageId;
|
|
73
23
|
name: string;
|
|
74
24
|
description: string;
|
|
75
25
|
toolCount: number;
|
|
76
26
|
}
|
|
77
|
-
/**
|
|
78
|
-
* OpenAI function 格式的工具定义
|
|
79
|
-
*/
|
|
80
27
|
type MCPToolCapabilityRisk = 'low' | 'medium' | 'high';
|
|
81
28
|
interface MCPToolCapabilityMetadata {
|
|
82
29
|
id: string;
|
|
@@ -96,28 +43,16 @@ interface OpenAITool {
|
|
|
96
43
|
outputSchema?: MCPToolInputSchema;
|
|
97
44
|
};
|
|
98
45
|
}
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
46
|
+
interface MCPAvailableTool extends MCPTool {
|
|
47
|
+
source: string;
|
|
48
|
+
}
|
|
102
49
|
declare function mcpToolToOpenAI(tool: MCPTool): OpenAITool;
|
|
103
|
-
/**
|
|
104
|
-
* 获取所有 MCP Tools
|
|
105
|
-
*/
|
|
106
50
|
declare function listAllTools(): MCPTool[];
|
|
107
|
-
/**
|
|
108
|
-
* @deprecated 使用 listAllTools() 替代
|
|
109
|
-
*/
|
|
110
|
-
declare const listAvailableTools: typeof listAllTools;
|
|
111
51
|
declare function getMCPToolPackageIndex(): Map<string, MCPPackageId>;
|
|
112
|
-
declare function
|
|
113
|
-
declare function
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
declare function getMCPPackages(): MCPPackageInfo[];
|
|
118
|
-
/**
|
|
119
|
-
* 根据启用的包获取工具列表(OpenAI 格式)
|
|
120
|
-
*/
|
|
121
|
-
declare function getToolsForLLM(disabledPackages: Set<MCPPackageId>): OpenAITool[];
|
|
52
|
+
declare function listAvailableTools(): Promise<MCPAvailableTool[]>;
|
|
53
|
+
declare function getMCPPackageIdForTool(toolName: string): Promise<MCPPackageId | null>;
|
|
54
|
+
declare function listAvailableToolsForLLM(): Promise<OpenAITool[]>;
|
|
55
|
+
declare function getMCPPackages(): Promise<MCPPackageInfo[]>;
|
|
56
|
+
declare function getToolsForLLM(disabledPackages: Set<MCPPackageId>): Promise<OpenAITool[]>;
|
|
122
57
|
|
|
123
|
-
export { type MCPPackageId, type MCPPackageInfo, MCPTool, MCPToolAnnotations, type MCPToolCapabilityMetadata, type MCPToolCapabilityRisk, MCPToolInputSchema,
|
|
58
|
+
export { type MCPAvailableTool, type MCPPackageId, type MCPPackageInfo, MCPTool, MCPToolAnnotations, type MCPToolCapabilityMetadata, type MCPToolCapabilityRisk, MCPToolInputSchema, MCP_PACKAGES, type OpenAITool, getMCPPackageIdForTool, getMCPPackages, getMCPToolPackageIndex, getToolsForLLM, listAllTools, listAvailableTools, listAvailableToolsForLLM, loadPlugin, mcpToolToOpenAI };
|
package/dist/mcp/index.js
CHANGED
|
@@ -1,8 +1,3 @@
|
|
|
1
|
-
export { MCP_PACKAGES, getMCPPackageIdForTool, getMCPPackages, getMCPToolPackageIndex, getToolsForLLM, listAllTools, listAvailableTools, listAvailableToolsForLLM, loadPlugin, mcpToolToOpenAI } from '../chunk-
|
|
2
|
-
export {
|
|
3
|
-
export { SeastudioNotifications, SeastudioRequests, agentManagementTools, agentTabTools, batchFileTools, clipboardTools, codeQualityTools, fileTools, gitTools, pluginManagementTools, pluginTabTools, seastudio, allTools as seastudioAllTools, tools as seastudioTools, shellTools } from '../chunk-DDVRUPMZ.js';
|
|
4
|
-
export { shellPlugin, commandTools as shellPluginCommandTools, sessionTools as shellPluginSessionTools, tools as shellPluginTools } from '../chunk-FLATZQA2.js';
|
|
5
|
-
export { editor, allTools as editorAllTools, extensionTools as editorExtensionTools, fileMutationTools as editorFileMutationTools, previewTools as editorPreviewTools, proposalTools as editorProposalTools, referenceTools as editorReferenceTools, sessionTools as editorSessionTools, tools as editorTools, fileOperationTools } from '../chunk-DSOSHJH2.js';
|
|
6
|
-
export { excel, allTools as excelAllTools, lifecycleTools as excelLifecycleTools, mutateTools as excelMutateTools, readTools as excelReadTools, tools as excelTools } from '../chunk-Z7LV7DCO.js';
|
|
7
|
-
export { preview, coreTools as previewCoreTools, enhancedTools as previewEnhancedTools, tools as previewTools } from '../chunk-QD4KISXM.js';
|
|
1
|
+
export { MCP_PACKAGES, getMCPPackageIdForTool, getMCPPackages, getMCPToolPackageIndex, getToolsForLLM, listAllTools, listAvailableTools, listAvailableToolsForLLM, loadPlugin, mcpToolToOpenAI } from '../chunk-D7ONFXVY.js';
|
|
2
|
+
export { SeastudioNotifications, SeastudioRequests, agentManagementTools, agentTabTools, batchFileTools, clipboardTools, codeQualityTools, fileTools, gitTools, pluginManagementTools, pluginTabTools, seastudio, allTools as seastudioAllTools, tools as seastudioTools, shellTools } from '../chunk-XU5GEWWL.js';
|
|
8
3
|
export { MCPClient, MCPServer, PostMessageTransport, callHostTool, callHostToolText, createMCPClient, createMCPServer, createNotification, createRequest, createResponse, getDefaultClient, getDefaultServer, getDefaultTransport, isMCPMessage, isNotification, normalizeMCPTool, normalizeMCPToolInputSchema, normalizeMCPToolObjectSchema, setDefaultClient, setDefaultTransport, startDefaultServer } from '../chunk-ANWOL7SM.js';
|
|
@@ -1,75 +1,75 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkSUF5BPSK_cjs = require('../../chunk-SUF5BPSK.cjs');
|
|
4
4
|
require('../../chunk-TFOJLA2F.cjs');
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
Object.defineProperty(exports, "SeastudioNotifications", {
|
|
9
9
|
enumerable: true,
|
|
10
|
-
get: function () { return
|
|
10
|
+
get: function () { return chunkSUF5BPSK_cjs.SeastudioNotifications; }
|
|
11
11
|
});
|
|
12
12
|
Object.defineProperty(exports, "SeastudioRequests", {
|
|
13
13
|
enumerable: true,
|
|
14
|
-
get: function () { return
|
|
14
|
+
get: function () { return chunkSUF5BPSK_cjs.SeastudioRequests; }
|
|
15
15
|
});
|
|
16
16
|
Object.defineProperty(exports, "agentManagementTools", {
|
|
17
17
|
enumerable: true,
|
|
18
|
-
get: function () { return
|
|
18
|
+
get: function () { return chunkSUF5BPSK_cjs.agentManagementTools; }
|
|
19
19
|
});
|
|
20
20
|
Object.defineProperty(exports, "agentTabTools", {
|
|
21
21
|
enumerable: true,
|
|
22
|
-
get: function () { return
|
|
22
|
+
get: function () { return chunkSUF5BPSK_cjs.agentTabTools; }
|
|
23
23
|
});
|
|
24
24
|
Object.defineProperty(exports, "allTools", {
|
|
25
25
|
enumerable: true,
|
|
26
|
-
get: function () { return
|
|
26
|
+
get: function () { return chunkSUF5BPSK_cjs.allTools; }
|
|
27
27
|
});
|
|
28
28
|
Object.defineProperty(exports, "annotateTool", {
|
|
29
29
|
enumerable: true,
|
|
30
|
-
get: function () { return
|
|
30
|
+
get: function () { return chunkSUF5BPSK_cjs.annotateTool; }
|
|
31
31
|
});
|
|
32
32
|
Object.defineProperty(exports, "batchFileTools", {
|
|
33
33
|
enumerable: true,
|
|
34
|
-
get: function () { return
|
|
34
|
+
get: function () { return chunkSUF5BPSK_cjs.batchFileTools; }
|
|
35
35
|
});
|
|
36
36
|
Object.defineProperty(exports, "clipboardTools", {
|
|
37
37
|
enumerable: true,
|
|
38
|
-
get: function () { return
|
|
38
|
+
get: function () { return chunkSUF5BPSK_cjs.clipboardTools; }
|
|
39
39
|
});
|
|
40
40
|
Object.defineProperty(exports, "codeQualityTools", {
|
|
41
41
|
enumerable: true,
|
|
42
|
-
get: function () { return
|
|
42
|
+
get: function () { return chunkSUF5BPSK_cjs.codeQualityTools; }
|
|
43
43
|
});
|
|
44
44
|
Object.defineProperty(exports, "fileTools", {
|
|
45
45
|
enumerable: true,
|
|
46
|
-
get: function () { return
|
|
46
|
+
get: function () { return chunkSUF5BPSK_cjs.fileTools; }
|
|
47
47
|
});
|
|
48
48
|
Object.defineProperty(exports, "gitTools", {
|
|
49
49
|
enumerable: true,
|
|
50
|
-
get: function () { return
|
|
50
|
+
get: function () { return chunkSUF5BPSK_cjs.gitTools; }
|
|
51
51
|
});
|
|
52
52
|
Object.defineProperty(exports, "pluginManagementTools", {
|
|
53
53
|
enumerable: true,
|
|
54
|
-
get: function () { return
|
|
54
|
+
get: function () { return chunkSUF5BPSK_cjs.pluginManagementTools; }
|
|
55
55
|
});
|
|
56
56
|
Object.defineProperty(exports, "pluginTabTools", {
|
|
57
57
|
enumerable: true,
|
|
58
|
-
get: function () { return
|
|
58
|
+
get: function () { return chunkSUF5BPSK_cjs.pluginTabTools; }
|
|
59
59
|
});
|
|
60
60
|
Object.defineProperty(exports, "seaCloudTools", {
|
|
61
61
|
enumerable: true,
|
|
62
|
-
get: function () { return
|
|
62
|
+
get: function () { return chunkSUF5BPSK_cjs.seaCloudTools; }
|
|
63
63
|
});
|
|
64
64
|
Object.defineProperty(exports, "seastudio", {
|
|
65
65
|
enumerable: true,
|
|
66
|
-
get: function () { return
|
|
66
|
+
get: function () { return chunkSUF5BPSK_cjs.seastudio; }
|
|
67
67
|
});
|
|
68
68
|
Object.defineProperty(exports, "shellTools", {
|
|
69
69
|
enumerable: true,
|
|
70
|
-
get: function () { return
|
|
70
|
+
get: function () { return chunkSUF5BPSK_cjs.shellTools; }
|
|
71
71
|
});
|
|
72
72
|
Object.defineProperty(exports, "tools", {
|
|
73
73
|
enumerable: true,
|
|
74
|
-
get: function () { return
|
|
74
|
+
get: function () { return chunkSUF5BPSK_cjs.tools; }
|
|
75
75
|
});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { g as MCPTool, k as MCPToolResult, h as MCPToolAnnotations, j as MCPToolInputSchema } from '../../types-
|
|
1
|
+
import { g as MCPTool, k as MCPToolResult, h as MCPToolAnnotations, j as MCPToolInputSchema } from '../../types-B32sUvc0.cjs';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Plugin MCP Tools
|
|
@@ -253,6 +253,8 @@ declare const SeastudioNotifications: {
|
|
|
253
253
|
readonly FILE_SEND_REQUESTED: "seastudio:file-send_requested";
|
|
254
254
|
/** 文本发送请求 */
|
|
255
255
|
readonly TEXT_SEND_REQUESTED: "seastudio:text-send_requested";
|
|
256
|
+
/** 代码提案审核反馈 */
|
|
257
|
+
readonly PROPOSAL_FEEDBACK: "seastudio:proposal-feedback";
|
|
256
258
|
};
|
|
257
259
|
/**
|
|
258
260
|
* files:changed 通知参数
|
|
@@ -317,6 +319,36 @@ interface TextSendRequestedParams {
|
|
|
317
319
|
source: TextSendRequestedSource;
|
|
318
320
|
text: string;
|
|
319
321
|
}
|
|
322
|
+
interface ProposalFeedbackOrigin {
|
|
323
|
+
source?: string;
|
|
324
|
+
threadId?: string;
|
|
325
|
+
projectId?: string;
|
|
326
|
+
agentInstanceId?: string;
|
|
327
|
+
}
|
|
328
|
+
interface ProposalFeedbackHunk {
|
|
329
|
+
id: string;
|
|
330
|
+
filePath: string;
|
|
331
|
+
rootId: 'workspace' | 'assets';
|
|
332
|
+
startLine: number;
|
|
333
|
+
endLine: number;
|
|
334
|
+
originalContent: string;
|
|
335
|
+
proposedContent: string;
|
|
336
|
+
}
|
|
337
|
+
interface ProposalFeedbackFileSummary {
|
|
338
|
+
path: string;
|
|
339
|
+
rootId: 'workspace' | 'assets';
|
|
340
|
+
acceptedHunkIds: string[];
|
|
341
|
+
rejectedHunkIds: string[];
|
|
342
|
+
}
|
|
343
|
+
interface ProposalFeedbackParams {
|
|
344
|
+
proposalId: string;
|
|
345
|
+
title: string;
|
|
346
|
+
decision: 'rejected' | 'partial';
|
|
347
|
+
origin?: ProposalFeedbackOrigin;
|
|
348
|
+
acceptedFilePaths: string[];
|
|
349
|
+
rejectedHunks: ProposalFeedbackHunk[];
|
|
350
|
+
files: ProposalFeedbackFileSummary[];
|
|
351
|
+
}
|
|
320
352
|
/**
|
|
321
353
|
* file:modified 通知参数
|
|
322
354
|
*/
|
|
@@ -338,4 +370,4 @@ interface FileSavedParams {
|
|
|
338
370
|
source?: string;
|
|
339
371
|
}
|
|
340
372
|
|
|
341
|
-
export { type FileModifiedParams, type FileOpenRequestedParams, type FileSavedParams, type FileSendRequestedParams, type FileTransferRequestedParams, type FilesChangedParams, type RootsChangedParams, type SeastudioBatchFlattenCopyOptions, type SeastudioBatchFlattenPreviewOptions, type SeastudioDragDropParams, type SeastudioDragEnterParams, type SeastudioDragFileData, type SeastudioDragRootId, type SeastudioDragStartParams, type SeastudioFileDownloadOptions, type SeastudioFileInfo, type SeastudioFileInfoOptions, type SeastudioFileListOptions, type SeastudioFileReadOptions, type SeastudioFileSearchMatch, type SeastudioFileSearchOptions, type SeastudioFileTransferOptions, type SeastudioFileTreeOptions, type SeastudioFilesystemRoot, type SeastudioFilesystemRootId, SeastudioNotifications, SeastudioRequests, type SeastudioShellCommandResult, type SeastudioShellSessionEntry, type SeastudioShellSessionEntryLevel, type SeastudioShellSessionSnapshot, type SeastudioSinglePathOptions, type SeastudioWorkspacePathMode, type TextSendRequestedParams, type TextSendRequestedSelectionRange, type TextSendRequestedSource, agentManagementTools, agentTabTools, allTools, annotateTool, batchFileTools, clipboardTools, codeQualityTools, fileTools, gitTools, pluginManagementTools, pluginTabTools, seaCloudTools, seastudio, shellTools, tools };
|
|
373
|
+
export { type FileModifiedParams, type FileOpenRequestedParams, type FileSavedParams, type FileSendRequestedParams, type FileTransferRequestedParams, type FilesChangedParams, type ProposalFeedbackFileSummary, type ProposalFeedbackHunk, type ProposalFeedbackOrigin, type ProposalFeedbackParams, type RootsChangedParams, type SeastudioBatchFlattenCopyOptions, type SeastudioBatchFlattenPreviewOptions, type SeastudioDragDropParams, type SeastudioDragEnterParams, type SeastudioDragFileData, type SeastudioDragRootId, type SeastudioDragStartParams, type SeastudioFileDownloadOptions, type SeastudioFileInfo, type SeastudioFileInfoOptions, type SeastudioFileListOptions, type SeastudioFileReadOptions, type SeastudioFileSearchMatch, type SeastudioFileSearchOptions, type SeastudioFileTransferOptions, type SeastudioFileTreeOptions, type SeastudioFilesystemRoot, type SeastudioFilesystemRootId, SeastudioNotifications, SeastudioRequests, type SeastudioShellCommandResult, type SeastudioShellSessionEntry, type SeastudioShellSessionEntryLevel, type SeastudioShellSessionSnapshot, type SeastudioSinglePathOptions, type SeastudioWorkspacePathMode, type TextSendRequestedParams, type TextSendRequestedSelectionRange, type TextSendRequestedSource, agentManagementTools, agentTabTools, allTools, annotateTool, batchFileTools, clipboardTools, codeQualityTools, fileTools, gitTools, pluginManagementTools, pluginTabTools, seaCloudTools, seastudio, shellTools, tools };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { g as MCPTool, k as MCPToolResult, h as MCPToolAnnotations, j as MCPToolInputSchema } from '../../types-
|
|
1
|
+
import { g as MCPTool, k as MCPToolResult, h as MCPToolAnnotations, j as MCPToolInputSchema } from '../../types-B32sUvc0.js';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Plugin MCP Tools
|
|
@@ -253,6 +253,8 @@ declare const SeastudioNotifications: {
|
|
|
253
253
|
readonly FILE_SEND_REQUESTED: "seastudio:file-send_requested";
|
|
254
254
|
/** 文本发送请求 */
|
|
255
255
|
readonly TEXT_SEND_REQUESTED: "seastudio:text-send_requested";
|
|
256
|
+
/** 代码提案审核反馈 */
|
|
257
|
+
readonly PROPOSAL_FEEDBACK: "seastudio:proposal-feedback";
|
|
256
258
|
};
|
|
257
259
|
/**
|
|
258
260
|
* files:changed 通知参数
|
|
@@ -317,6 +319,36 @@ interface TextSendRequestedParams {
|
|
|
317
319
|
source: TextSendRequestedSource;
|
|
318
320
|
text: string;
|
|
319
321
|
}
|
|
322
|
+
interface ProposalFeedbackOrigin {
|
|
323
|
+
source?: string;
|
|
324
|
+
threadId?: string;
|
|
325
|
+
projectId?: string;
|
|
326
|
+
agentInstanceId?: string;
|
|
327
|
+
}
|
|
328
|
+
interface ProposalFeedbackHunk {
|
|
329
|
+
id: string;
|
|
330
|
+
filePath: string;
|
|
331
|
+
rootId: 'workspace' | 'assets';
|
|
332
|
+
startLine: number;
|
|
333
|
+
endLine: number;
|
|
334
|
+
originalContent: string;
|
|
335
|
+
proposedContent: string;
|
|
336
|
+
}
|
|
337
|
+
interface ProposalFeedbackFileSummary {
|
|
338
|
+
path: string;
|
|
339
|
+
rootId: 'workspace' | 'assets';
|
|
340
|
+
acceptedHunkIds: string[];
|
|
341
|
+
rejectedHunkIds: string[];
|
|
342
|
+
}
|
|
343
|
+
interface ProposalFeedbackParams {
|
|
344
|
+
proposalId: string;
|
|
345
|
+
title: string;
|
|
346
|
+
decision: 'rejected' | 'partial';
|
|
347
|
+
origin?: ProposalFeedbackOrigin;
|
|
348
|
+
acceptedFilePaths: string[];
|
|
349
|
+
rejectedHunks: ProposalFeedbackHunk[];
|
|
350
|
+
files: ProposalFeedbackFileSummary[];
|
|
351
|
+
}
|
|
320
352
|
/**
|
|
321
353
|
* file:modified 通知参数
|
|
322
354
|
*/
|
|
@@ -338,4 +370,4 @@ interface FileSavedParams {
|
|
|
338
370
|
source?: string;
|
|
339
371
|
}
|
|
340
372
|
|
|
341
|
-
export { type FileModifiedParams, type FileOpenRequestedParams, type FileSavedParams, type FileSendRequestedParams, type FileTransferRequestedParams, type FilesChangedParams, type RootsChangedParams, type SeastudioBatchFlattenCopyOptions, type SeastudioBatchFlattenPreviewOptions, type SeastudioDragDropParams, type SeastudioDragEnterParams, type SeastudioDragFileData, type SeastudioDragRootId, type SeastudioDragStartParams, type SeastudioFileDownloadOptions, type SeastudioFileInfo, type SeastudioFileInfoOptions, type SeastudioFileListOptions, type SeastudioFileReadOptions, type SeastudioFileSearchMatch, type SeastudioFileSearchOptions, type SeastudioFileTransferOptions, type SeastudioFileTreeOptions, type SeastudioFilesystemRoot, type SeastudioFilesystemRootId, SeastudioNotifications, SeastudioRequests, type SeastudioShellCommandResult, type SeastudioShellSessionEntry, type SeastudioShellSessionEntryLevel, type SeastudioShellSessionSnapshot, type SeastudioSinglePathOptions, type SeastudioWorkspacePathMode, type TextSendRequestedParams, type TextSendRequestedSelectionRange, type TextSendRequestedSource, agentManagementTools, agentTabTools, allTools, annotateTool, batchFileTools, clipboardTools, codeQualityTools, fileTools, gitTools, pluginManagementTools, pluginTabTools, seaCloudTools, seastudio, shellTools, tools };
|
|
373
|
+
export { type FileModifiedParams, type FileOpenRequestedParams, type FileSavedParams, type FileSendRequestedParams, type FileTransferRequestedParams, type FilesChangedParams, type ProposalFeedbackFileSummary, type ProposalFeedbackHunk, type ProposalFeedbackOrigin, type ProposalFeedbackParams, type RootsChangedParams, type SeastudioBatchFlattenCopyOptions, type SeastudioBatchFlattenPreviewOptions, type SeastudioDragDropParams, type SeastudioDragEnterParams, type SeastudioDragFileData, type SeastudioDragRootId, type SeastudioDragStartParams, type SeastudioFileDownloadOptions, type SeastudioFileInfo, type SeastudioFileInfoOptions, type SeastudioFileListOptions, type SeastudioFileReadOptions, type SeastudioFileSearchMatch, type SeastudioFileSearchOptions, type SeastudioFileTransferOptions, type SeastudioFileTreeOptions, type SeastudioFilesystemRoot, type SeastudioFilesystemRootId, SeastudioNotifications, SeastudioRequests, type SeastudioShellCommandResult, type SeastudioShellSessionEntry, type SeastudioShellSessionEntryLevel, type SeastudioShellSessionSnapshot, type SeastudioSinglePathOptions, type SeastudioWorkspacePathMode, type TextSendRequestedParams, type TextSendRequestedSelectionRange, type TextSendRequestedSource, agentManagementTools, agentTabTools, allTools, annotateTool, batchFileTools, clipboardTools, codeQualityTools, fileTools, gitTools, pluginManagementTools, pluginTabTools, seaCloudTools, seastudio, shellTools, tools };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { SeastudioNotifications, SeastudioRequests, agentManagementTools, agentTabTools, allTools, annotateTool, batchFileTools, clipboardTools, codeQualityTools, fileTools, gitTools, pluginManagementTools, pluginTabTools, seaCloudTools, seastudio, shellTools, tools } from '../../chunk-
|
|
1
|
+
export { SeastudioNotifications, SeastudioRequests, agentManagementTools, agentTabTools, allTools, annotateTool, batchFileTools, clipboardTools, codeQualityTools, fileTools, gitTools, pluginManagementTools, pluginTabTools, seaCloudTools, seastudio, shellTools, tools } from '../../chunk-XU5GEWWL.js';
|
|
2
2
|
import '../../chunk-ANWOL7SM.js';
|
|
@@ -43,7 +43,7 @@ interface MCPToolInputSchema {
|
|
|
43
43
|
interface MCPToolAnnotations {
|
|
44
44
|
operationKind?: 'read' | 'mutate' | 'system' | 'workflow';
|
|
45
45
|
requiresExecutionEvidence?: boolean;
|
|
46
|
-
rawDomain?: 'workspace' | 'filesystem' | 'editor' | 'seaflow' | 'asset' | 'git' | 'preview' | 'shell' | 'excel';
|
|
46
|
+
rawDomain?: 'workspace' | 'filesystem' | 'editor' | 'seaflow' | 'asset' | 'git' | 'preview' | 'shell' | 'excel' | 'word';
|
|
47
47
|
hostForwarding?: {
|
|
48
48
|
timeoutMs?: number;
|
|
49
49
|
};
|
|
@@ -56,6 +56,14 @@ interface MCPTool {
|
|
|
56
56
|
outputSchema?: MCPToolInputSchema;
|
|
57
57
|
annotations?: MCPToolAnnotations;
|
|
58
58
|
}
|
|
59
|
+
interface PluginMCPManifest {
|
|
60
|
+
schemaVersion: 1;
|
|
61
|
+
tools: MCPTool[];
|
|
62
|
+
}
|
|
63
|
+
interface PluginMCPModuleExports {
|
|
64
|
+
pluginMcpManifest?: PluginMCPManifest;
|
|
65
|
+
mcpTools?: MCPTool[];
|
|
66
|
+
}
|
|
59
67
|
interface MCPToolResult {
|
|
60
68
|
content: Array<{
|
|
61
69
|
type: 'text' | 'image' | 'resource';
|
|
@@ -104,4 +112,4 @@ declare function createRequest(method: string, params?: Record<string, unknown>)
|
|
|
104
112
|
declare function createResponse(id: string | number, result?: unknown, error?: JSONRPCError): JSONRPCResponse;
|
|
105
113
|
declare function createNotification(method: string, params?: Record<string, unknown>): JSONRPCNotification;
|
|
106
114
|
|
|
107
|
-
export { type FileItem as F, type JSONRPCError as J, type MCPMessageEnvelope as M, type NotificationHandler as N, type
|
|
115
|
+
export { type FileItem as F, type JSONRPCError as J, type MCPMessageEnvelope as M, type NotificationHandler as N, type PluginMCPManifest as P, type SubscribeParams as S, type FileNode as a, type JSONRPCMessage as b, type JSONRPCNotification as c, type JSONRPCRequest as d, type JSONRPCResponse as e, type MCPMethod as f, type MCPTool as g, type MCPToolAnnotations as h, type MCPToolCallRequest as i, type MCPToolInputSchema as j, type MCPToolResult as k, type PluginMCPModuleExports as l, type PublishParams as m, createNotification as n, createRequest as o, createResponse as p, isMCPMessage as q, isNotification as r };
|
|
@@ -43,7 +43,7 @@ interface MCPToolInputSchema {
|
|
|
43
43
|
interface MCPToolAnnotations {
|
|
44
44
|
operationKind?: 'read' | 'mutate' | 'system' | 'workflow';
|
|
45
45
|
requiresExecutionEvidence?: boolean;
|
|
46
|
-
rawDomain?: 'workspace' | 'filesystem' | 'editor' | 'seaflow' | 'asset' | 'git' | 'preview' | 'shell' | 'excel';
|
|
46
|
+
rawDomain?: 'workspace' | 'filesystem' | 'editor' | 'seaflow' | 'asset' | 'git' | 'preview' | 'shell' | 'excel' | 'word';
|
|
47
47
|
hostForwarding?: {
|
|
48
48
|
timeoutMs?: number;
|
|
49
49
|
};
|
|
@@ -56,6 +56,14 @@ interface MCPTool {
|
|
|
56
56
|
outputSchema?: MCPToolInputSchema;
|
|
57
57
|
annotations?: MCPToolAnnotations;
|
|
58
58
|
}
|
|
59
|
+
interface PluginMCPManifest {
|
|
60
|
+
schemaVersion: 1;
|
|
61
|
+
tools: MCPTool[];
|
|
62
|
+
}
|
|
63
|
+
interface PluginMCPModuleExports {
|
|
64
|
+
pluginMcpManifest?: PluginMCPManifest;
|
|
65
|
+
mcpTools?: MCPTool[];
|
|
66
|
+
}
|
|
59
67
|
interface MCPToolResult {
|
|
60
68
|
content: Array<{
|
|
61
69
|
type: 'text' | 'image' | 'resource';
|
|
@@ -104,4 +112,4 @@ declare function createRequest(method: string, params?: Record<string, unknown>)
|
|
|
104
112
|
declare function createResponse(id: string | number, result?: unknown, error?: JSONRPCError): JSONRPCResponse;
|
|
105
113
|
declare function createNotification(method: string, params?: Record<string, unknown>): JSONRPCNotification;
|
|
106
114
|
|
|
107
|
-
export { type FileItem as F, type JSONRPCError as J, type MCPMessageEnvelope as M, type NotificationHandler as N, type
|
|
115
|
+
export { type FileItem as F, type JSONRPCError as J, type MCPMessageEnvelope as M, type NotificationHandler as N, type PluginMCPManifest as P, type SubscribeParams as S, type FileNode as a, type JSONRPCMessage as b, type JSONRPCNotification as c, type JSONRPCRequest as d, type JSONRPCResponse as e, type MCPMethod as f, type MCPTool as g, type MCPToolAnnotations as h, type MCPToolCallRequest as i, type MCPToolInputSchema as j, type MCPToolResult as k, type PluginMCPModuleExports as l, type PublishParams as m, createNotification as n, createRequest as o, createResponse as p, isMCPMessage as q, isNotification as r };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@seastudio/sdk",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.3",
|
|
4
4
|
"description": "SeaStudio SDK - UI 组件 + MCP 信息交换中心 + CLI 工具",
|
|
5
5
|
"main": "dist/index.cjs",
|
|
6
6
|
"module": "dist/index.js",
|
|
@@ -35,28 +35,8 @@
|
|
|
35
35
|
"import": "./dist/mcp/seastudio/index.js",
|
|
36
36
|
"require": "./dist/mcp/seastudio/index.cjs"
|
|
37
37
|
},
|
|
38
|
-
"./mcp/plugin-editor": {
|
|
39
|
-
"types": "./dist/mcp/plugin-editor/index.d.ts",
|
|
40
|
-
"import": "./dist/mcp/plugin-editor/index.js",
|
|
41
|
-
"require": "./dist/mcp/plugin-editor/index.cjs"
|
|
42
|
-
},
|
|
43
|
-
"./mcp/plugin-preview": {
|
|
44
|
-
"types": "./dist/mcp/plugin-preview/index.d.ts",
|
|
45
|
-
"import": "./dist/mcp/plugin-preview/index.js",
|
|
46
|
-
"require": "./dist/mcp/plugin-preview/index.cjs"
|
|
47
|
-
},
|
|
48
|
-
"./mcp/plugin-seaflow": {
|
|
49
|
-
"types": "./dist/mcp/plugin-seaflow/index.d.ts",
|
|
50
|
-
"import": "./dist/mcp/plugin-seaflow/index.js",
|
|
51
|
-
"require": "./dist/mcp/plugin-seaflow/index.cjs"
|
|
52
|
-
},
|
|
53
38
|
"./ui/cosmos.css": "./src/ui/cosmos.css",
|
|
54
|
-
"./styles/cosmos.css": "./src/ui/cosmos.css"
|
|
55
|
-
"./mcp/plugin-excel": {
|
|
56
|
-
"types": "./dist/mcp/plugin-excel/index.d.ts",
|
|
57
|
-
"import": "./dist/mcp/plugin-excel/index.js",
|
|
58
|
-
"require": "./dist/mcp/plugin-excel/index.cjs"
|
|
59
|
-
}
|
|
39
|
+
"./styles/cosmos.css": "./src/ui/cosmos.css"
|
|
60
40
|
},
|
|
61
41
|
"files": [
|
|
62
42
|
"bin",
|
|
@@ -2,6 +2,9 @@ import { StrictMode } from 'react';
|
|
|
2
2
|
import { createRoot } from 'react-dom/client';
|
|
3
3
|
import App from './App';
|
|
4
4
|
import './App.css';
|
|
5
|
+
import { initPluginMCPServer } from './mcp-entry';
|
|
6
|
+
|
|
7
|
+
initPluginMCPServer();
|
|
5
8
|
|
|
6
9
|
createRoot(document.getElementById('root')!).render(
|
|
7
10
|
<StrictMode>
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { MCPServer, MCPTool, PluginMCPManifest } from '@seastudio/sdk/mcp/core'
|
|
2
|
+
|
|
3
|
+
export const mcpTools: MCPTool[] = []
|
|
4
|
+
|
|
5
|
+
export const pluginMcpManifest: PluginMCPManifest = {
|
|
6
|
+
schemaVersion: 1,
|
|
7
|
+
tools: mcpTools,
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export function initPluginMCPServer(_server?: MCPServer): void {
|
|
11
|
+
// 在这里初始化并注册插件自己的 MCP tools handlers。
|
|
12
|
+
}
|