@seastudio/sdk 3.0.0

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.
Files changed (77) hide show
  1. package/README.md +108 -0
  2. package/bin/seastudio.js +3 -0
  3. package/dist/chunk-4ITOR5QE.js +901 -0
  4. package/dist/chunk-5QAINQWV.js +94 -0
  5. package/dist/chunk-6USQFZRH.js +291 -0
  6. package/dist/chunk-AGBZJGTY.cjs +1311 -0
  7. package/dist/chunk-ANWOL7SM.js +566 -0
  8. package/dist/chunk-BWG45ZWF.cjs +305 -0
  9. package/dist/chunk-CVF4QHS6.cjs +436 -0
  10. package/dist/chunk-DDVRUPMZ.js +1293 -0
  11. package/dist/chunk-DSOSHJH2.js +643 -0
  12. package/dist/chunk-FLATZQA2.js +174 -0
  13. package/dist/chunk-HJJTBVKQ.cjs +909 -0
  14. package/dist/chunk-ISI2OLPI.cjs +179 -0
  15. package/dist/chunk-MYURVLGP.cjs +165 -0
  16. package/dist/chunk-N33Y5NY7.cjs +105 -0
  17. package/dist/chunk-QD4KISXM.js +160 -0
  18. package/dist/chunk-SNGU4SHO.cjs +654 -0
  19. package/dist/chunk-TFOJLA2F.cjs +588 -0
  20. package/dist/chunk-Z7LV7DCO.js +429 -0
  21. package/dist/develop-tool/cli/index.cjs +1138 -0
  22. package/dist/develop-tool/cli/index.d.cts +1 -0
  23. package/dist/develop-tool/cli/index.d.ts +1 -0
  24. package/dist/develop-tool/cli/index.js +1127 -0
  25. package/dist/index.cjs +370 -0
  26. package/dist/index.d.cts +11 -0
  27. package/dist/index.d.ts +11 -0
  28. package/dist/index.js +9 -0
  29. package/dist/mcp/core/index.cjs +90 -0
  30. package/dist/mcp/core/index.d.cts +124 -0
  31. package/dist/mcp/core/index.d.ts +124 -0
  32. package/dist/mcp/core/index.js +1 -0
  33. package/dist/mcp/index.cjs +317 -0
  34. package/dist/mcp/index.d.cts +123 -0
  35. package/dist/mcp/index.d.ts +123 -0
  36. package/dist/mcp/index.js +8 -0
  37. package/dist/mcp/plugin-editor/index.cjs +47 -0
  38. package/dist/mcp/plugin-editor/index.d.cts +98 -0
  39. package/dist/mcp/plugin-editor/index.d.ts +98 -0
  40. package/dist/mcp/plugin-editor/index.js +2 -0
  41. package/dist/mcp/plugin-excel/index.cjs +31 -0
  42. package/dist/mcp/plugin-excel/index.d.cts +86 -0
  43. package/dist/mcp/plugin-excel/index.d.ts +86 -0
  44. package/dist/mcp/plugin-excel/index.js +2 -0
  45. package/dist/mcp/plugin-preview/index.cjs +23 -0
  46. package/dist/mcp/plugin-preview/index.d.cts +109 -0
  47. package/dist/mcp/plugin-preview/index.d.ts +109 -0
  48. package/dist/mcp/plugin-preview/index.js +2 -0
  49. package/dist/mcp/plugin-seaflow/index.cjs +35 -0
  50. package/dist/mcp/plugin-seaflow/index.d.cts +318 -0
  51. package/dist/mcp/plugin-seaflow/index.d.ts +318 -0
  52. package/dist/mcp/plugin-seaflow/index.js +2 -0
  53. package/dist/mcp/seastudio/index.cjs +75 -0
  54. package/dist/mcp/seastudio/index.d.cts +341 -0
  55. package/dist/mcp/seastudio/index.d.ts +341 -0
  56. package/dist/mcp/seastudio/index.js +2 -0
  57. package/dist/tools-LMW67LIY.js +2 -0
  58. package/dist/tools-TU7PBMDO.cjs +23 -0
  59. package/dist/types-Clgf5gBf.d.cts +107 -0
  60. package/dist/types-Clgf5gBf.d.ts +107 -0
  61. package/dist/ui/index.cjs +58 -0
  62. package/dist/ui/index.d.cts +142 -0
  63. package/dist/ui/index.d.ts +142 -0
  64. package/dist/ui/index.js +1 -0
  65. package/package.json +115 -0
  66. package/src/develop-tool/templates/plugin/README.md.tmpl +36 -0
  67. package/src/develop-tool/templates/plugin/frontend/index.html.tmpl +12 -0
  68. package/src/develop-tool/templates/plugin/frontend/package.json.tmpl +30 -0
  69. package/src/develop-tool/templates/plugin/frontend/postcss.config.js +6 -0
  70. package/src/develop-tool/templates/plugin/frontend/src/App.css +43 -0
  71. package/src/develop-tool/templates/plugin/frontend/src/App.tsx.tmpl +43 -0
  72. package/src/develop-tool/templates/plugin/frontend/src/main.tsx +10 -0
  73. package/src/develop-tool/templates/plugin/frontend/src/vite-env.d.ts +1 -0
  74. package/src/develop-tool/templates/plugin/frontend/tsconfig.json +20 -0
  75. package/src/develop-tool/templates/plugin/frontend/vite.config.ts +12 -0
  76. package/src/develop-tool/templates/plugin/seastudio.config.json.tmpl +14 -0
  77. package/src/ui/cosmos.css +407 -0
@@ -0,0 +1,124 @@
1
+ import { j as MCPToolInputSchema, g as MCPTool, b as JSONRPCMessage, k as MCPToolResult, N as NotificationHandler, d as JSONRPCRequest, e as JSONRPCResponse } from '../../types-Clgf5gBf.js';
2
+ export { F as FileItem, a as FileNode, J as JSONRPCError, c as JSONRPCNotification, M as MCPMessageEnvelope, f as MCPMethod, h as MCPToolAnnotations, i as MCPToolCallRequest, P as PublishParams, S as SubscribeParams, l as createNotification, m as createRequest, n as createResponse, o as isMCPMessage, p as isNotification } from '../../types-Clgf5gBf.js';
3
+
4
+ interface NormalizeMCPToolInputSchemaOptions {
5
+ defaultType?: MCPToolInputSchema['type'];
6
+ }
7
+ declare function normalizeMCPToolInputSchema(schema?: MCPToolInputSchema, options?: NormalizeMCPToolInputSchemaOptions): MCPToolInputSchema;
8
+ declare function normalizeMCPToolObjectSchema(schema?: MCPToolInputSchema): MCPToolInputSchema;
9
+ declare function normalizeMCPTool(tool: MCPTool): MCPTool;
10
+
11
+ /**
12
+ * MCP Transport Layer
13
+ *
14
+ * 基于 postMessage 的 JSON-RPC 2.0 传输层
15
+ */
16
+
17
+ interface MCPTransport {
18
+ send(message: JSONRPCMessage): void;
19
+ onMessage(handler: (message: JSONRPCMessage) => void): () => void;
20
+ destroy(): void;
21
+ }
22
+ interface PostMessageTransportOptions {
23
+ target?: Window;
24
+ origin?: string;
25
+ }
26
+ declare class PostMessageTransport implements MCPTransport {
27
+ private target;
28
+ private origin;
29
+ private handlers;
30
+ private messageListener;
31
+ constructor(options?: PostMessageTransportOptions);
32
+ private setupListener;
33
+ send(message: JSONRPCMessage): void;
34
+ onMessage(handler: (message: JSONRPCMessage) => void): () => void;
35
+ destroy(): void;
36
+ }
37
+ declare function getDefaultTransport(): MCPTransport;
38
+ declare function setDefaultTransport(transport: MCPTransport): void;
39
+
40
+ /**
41
+ * MCP Client
42
+ *
43
+ * 插件侧使用的 MCP 客户端
44
+ */
45
+
46
+ interface MCPClientOptions {
47
+ transport?: MCPTransport;
48
+ timeout?: number;
49
+ }
50
+ interface MCPRequestOptions {
51
+ timeout?: number;
52
+ }
53
+ declare class MCPClient {
54
+ private transport;
55
+ private timeout;
56
+ private pendingRequests;
57
+ private notificationHandlers;
58
+ private unsubscribe;
59
+ constructor(options?: MCPClientOptions);
60
+ private setupResponseHandler;
61
+ private handleNotification;
62
+ request<T = unknown>(method: string, params?: Record<string, unknown>, options?: MCPRequestOptions): Promise<T>;
63
+ private resolveToolCallTimeout;
64
+ callTool(name: string, args?: Record<string, unknown>, options?: MCPRequestOptions): Promise<MCPToolResult>;
65
+ callToolText(name: string, args?: Record<string, unknown>, options?: MCPRequestOptions): Promise<string>;
66
+ ping(): Promise<boolean>;
67
+ subscribe(topics: string[]): Promise<void>;
68
+ unsubscribeTopics(topics: string[]): Promise<void>;
69
+ publish(topic: string, data?: Record<string, unknown>): Promise<void>;
70
+ onNotification(topic: string, handler: NotificationHandler): () => void;
71
+ offNotification(topic: string, handler?: NotificationHandler): void;
72
+ destroy(): void;
73
+ }
74
+ declare function createMCPClient(options?: MCPClientOptions): MCPClient;
75
+ declare function getDefaultClient(): MCPClient;
76
+ declare function setDefaultClient(client: MCPClient): void;
77
+ /**
78
+ * 调用 Host 提供的 MCP 工具(便捷函数)
79
+ *
80
+ * 使用默认客户端调用工具,适合在插件中直接使用。
81
+ *
82
+ * @example
83
+ * ```ts
84
+ * import { callHostTool } from '@seastudio/sdk';
85
+ *
86
+ * const result = await callHostTool('seastudio-project_get_path', {});
87
+ * const data = JSON.parse(result.content[0].text);
88
+ * ```
89
+ */
90
+ declare function callHostTool(toolName: string, args?: Record<string, unknown>): Promise<MCPToolResult>;
91
+ /**
92
+ * 调用 Host 提供的 MCP 工具并返回文本结果(便捷函数)
93
+ *
94
+ * 如果调用出错会抛出异常。
95
+ */
96
+ declare function callHostToolText(toolName: string, args?: Record<string, unknown>): Promise<string>;
97
+
98
+ /**
99
+ * MCP Server (Plugin Side)
100
+ *
101
+ * 插件端的 MCP Server,用于处理来自 Host 的 tools/call 请求
102
+ */
103
+
104
+ type MCPToolHandler = (args: Record<string, unknown>) => Promise<MCPToolResult> | MCPToolResult;
105
+ declare class MCPServer {
106
+ private tools;
107
+ private notificationHandlers;
108
+ private unsubscribe;
109
+ registerTool(definition: MCPTool, handler: MCPToolHandler): void;
110
+ registerTools(definitions: MCPTool[], handlers: Record<string, MCPToolHandler>): void;
111
+ getTools(): MCPTool[];
112
+ handleMessage(request: JSONRPCRequest): Promise<JSONRPCResponse | null>;
113
+ sendNotification(method: string, params?: Record<string, unknown>): void;
114
+ onNotification(topic: string, handler: NotificationHandler): () => void;
115
+ offNotification(topic: string, handler?: NotificationHandler): void;
116
+ private handleNotification;
117
+ start(): void;
118
+ stop(): void;
119
+ }
120
+ declare function createMCPServer(): MCPServer;
121
+ declare function getDefaultServer(): MCPServer;
122
+ declare function startDefaultServer(): void;
123
+
124
+ export { JSONRPCMessage, JSONRPCRequest, JSONRPCResponse, MCPClient, type MCPClientOptions, type MCPRequestOptions, MCPServer, MCPTool, type MCPToolHandler, MCPToolInputSchema, MCPToolResult, type MCPTransport, type NormalizeMCPToolInputSchemaOptions, NotificationHandler, PostMessageTransport, type PostMessageTransportOptions, callHostTool, callHostToolText, createMCPClient, createMCPServer, getDefaultClient, getDefaultServer, getDefaultTransport, normalizeMCPTool, normalizeMCPToolInputSchema, normalizeMCPToolObjectSchema, setDefaultClient, setDefaultTransport, startDefaultServer };
@@ -0,0 +1 @@
1
+ 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';
@@ -0,0 +1,317 @@
1
+ 'use strict';
2
+
3
+ var chunkN33Y5NY7_cjs = require('../chunk-N33Y5NY7.cjs');
4
+ var chunkCVF4QHS6_cjs = require('../chunk-CVF4QHS6.cjs');
5
+ var chunkAGBZJGTY_cjs = require('../chunk-AGBZJGTY.cjs');
6
+ var chunkISI2OLPI_cjs = require('../chunk-ISI2OLPI.cjs');
7
+ var chunkSNGU4SHO_cjs = require('../chunk-SNGU4SHO.cjs');
8
+ var chunkMYURVLGP_cjs = require('../chunk-MYURVLGP.cjs');
9
+ var chunkHJJTBVKQ_cjs = require('../chunk-HJJTBVKQ.cjs');
10
+ var chunkTFOJLA2F_cjs = require('../chunk-TFOJLA2F.cjs');
11
+
12
+
13
+
14
+ Object.defineProperty(exports, "MCP_PACKAGES", {
15
+ enumerable: true,
16
+ get: function () { return chunkN33Y5NY7_cjs.MCP_PACKAGES; }
17
+ });
18
+ Object.defineProperty(exports, "getMCPPackageIdForTool", {
19
+ enumerable: true,
20
+ get: function () { return chunkN33Y5NY7_cjs.getMCPPackageIdForTool; }
21
+ });
22
+ Object.defineProperty(exports, "getMCPPackages", {
23
+ enumerable: true,
24
+ get: function () { return chunkN33Y5NY7_cjs.getMCPPackages; }
25
+ });
26
+ Object.defineProperty(exports, "getMCPToolPackageIndex", {
27
+ enumerable: true,
28
+ get: function () { return chunkN33Y5NY7_cjs.getMCPToolPackageIndex; }
29
+ });
30
+ Object.defineProperty(exports, "getToolsForLLM", {
31
+ enumerable: true,
32
+ get: function () { return chunkN33Y5NY7_cjs.getToolsForLLM; }
33
+ });
34
+ Object.defineProperty(exports, "listAllTools", {
35
+ enumerable: true,
36
+ get: function () { return chunkN33Y5NY7_cjs.listAllTools; }
37
+ });
38
+ Object.defineProperty(exports, "listAvailableTools", {
39
+ enumerable: true,
40
+ get: function () { return chunkN33Y5NY7_cjs.listAvailableTools; }
41
+ });
42
+ Object.defineProperty(exports, "listAvailableToolsForLLM", {
43
+ enumerable: true,
44
+ get: function () { return chunkN33Y5NY7_cjs.listAvailableToolsForLLM; }
45
+ });
46
+ Object.defineProperty(exports, "loadPlugin", {
47
+ enumerable: true,
48
+ get: function () { return chunkN33Y5NY7_cjs.loadPlugin; }
49
+ });
50
+ Object.defineProperty(exports, "mcpToolToOpenAI", {
51
+ enumerable: true,
52
+ get: function () { return chunkN33Y5NY7_cjs.mcpToolToOpenAI; }
53
+ });
54
+ Object.defineProperty(exports, "excel", {
55
+ enumerable: true,
56
+ get: function () { return chunkCVF4QHS6_cjs.excel; }
57
+ });
58
+ Object.defineProperty(exports, "excelAllTools", {
59
+ enumerable: true,
60
+ get: function () { return chunkCVF4QHS6_cjs.allTools; }
61
+ });
62
+ Object.defineProperty(exports, "excelLifecycleTools", {
63
+ enumerable: true,
64
+ get: function () { return chunkCVF4QHS6_cjs.lifecycleTools; }
65
+ });
66
+ Object.defineProperty(exports, "excelMutateTools", {
67
+ enumerable: true,
68
+ get: function () { return chunkCVF4QHS6_cjs.mutateTools; }
69
+ });
70
+ Object.defineProperty(exports, "excelReadTools", {
71
+ enumerable: true,
72
+ get: function () { return chunkCVF4QHS6_cjs.readTools; }
73
+ });
74
+ Object.defineProperty(exports, "excelTools", {
75
+ enumerable: true,
76
+ get: function () { return chunkCVF4QHS6_cjs.tools; }
77
+ });
78
+ Object.defineProperty(exports, "SeastudioNotifications", {
79
+ enumerable: true,
80
+ get: function () { return chunkAGBZJGTY_cjs.SeastudioNotifications; }
81
+ });
82
+ Object.defineProperty(exports, "SeastudioRequests", {
83
+ enumerable: true,
84
+ get: function () { return chunkAGBZJGTY_cjs.SeastudioRequests; }
85
+ });
86
+ Object.defineProperty(exports, "agentManagementTools", {
87
+ enumerable: true,
88
+ get: function () { return chunkAGBZJGTY_cjs.agentManagementTools; }
89
+ });
90
+ Object.defineProperty(exports, "agentTabTools", {
91
+ enumerable: true,
92
+ get: function () { return chunkAGBZJGTY_cjs.agentTabTools; }
93
+ });
94
+ Object.defineProperty(exports, "batchFileTools", {
95
+ enumerable: true,
96
+ get: function () { return chunkAGBZJGTY_cjs.batchFileTools; }
97
+ });
98
+ Object.defineProperty(exports, "clipboardTools", {
99
+ enumerable: true,
100
+ get: function () { return chunkAGBZJGTY_cjs.clipboardTools; }
101
+ });
102
+ Object.defineProperty(exports, "codeQualityTools", {
103
+ enumerable: true,
104
+ get: function () { return chunkAGBZJGTY_cjs.codeQualityTools; }
105
+ });
106
+ Object.defineProperty(exports, "fileTools", {
107
+ enumerable: true,
108
+ get: function () { return chunkAGBZJGTY_cjs.fileTools; }
109
+ });
110
+ Object.defineProperty(exports, "gitTools", {
111
+ enumerable: true,
112
+ get: function () { return chunkAGBZJGTY_cjs.gitTools; }
113
+ });
114
+ Object.defineProperty(exports, "pluginManagementTools", {
115
+ enumerable: true,
116
+ get: function () { return chunkAGBZJGTY_cjs.pluginManagementTools; }
117
+ });
118
+ Object.defineProperty(exports, "pluginTabTools", {
119
+ enumerable: true,
120
+ get: function () { return chunkAGBZJGTY_cjs.pluginTabTools; }
121
+ });
122
+ Object.defineProperty(exports, "seastudio", {
123
+ enumerable: true,
124
+ get: function () { return chunkAGBZJGTY_cjs.seastudio; }
125
+ });
126
+ Object.defineProperty(exports, "seastudioAllTools", {
127
+ enumerable: true,
128
+ get: function () { return chunkAGBZJGTY_cjs.allTools; }
129
+ });
130
+ Object.defineProperty(exports, "seastudioTools", {
131
+ enumerable: true,
132
+ get: function () { return chunkAGBZJGTY_cjs.tools; }
133
+ });
134
+ Object.defineProperty(exports, "shellTools", {
135
+ enumerable: true,
136
+ get: function () { return chunkAGBZJGTY_cjs.shellTools; }
137
+ });
138
+ Object.defineProperty(exports, "shellPlugin", {
139
+ enumerable: true,
140
+ get: function () { return chunkISI2OLPI_cjs.shellPlugin; }
141
+ });
142
+ Object.defineProperty(exports, "shellPluginCommandTools", {
143
+ enumerable: true,
144
+ get: function () { return chunkISI2OLPI_cjs.commandTools; }
145
+ });
146
+ Object.defineProperty(exports, "shellPluginSessionTools", {
147
+ enumerable: true,
148
+ get: function () { return chunkISI2OLPI_cjs.sessionTools; }
149
+ });
150
+ Object.defineProperty(exports, "shellPluginTools", {
151
+ enumerable: true,
152
+ get: function () { return chunkISI2OLPI_cjs.tools; }
153
+ });
154
+ Object.defineProperty(exports, "editor", {
155
+ enumerable: true,
156
+ get: function () { return chunkSNGU4SHO_cjs.editor; }
157
+ });
158
+ Object.defineProperty(exports, "editorAllTools", {
159
+ enumerable: true,
160
+ get: function () { return chunkSNGU4SHO_cjs.allTools; }
161
+ });
162
+ Object.defineProperty(exports, "editorExtensionTools", {
163
+ enumerable: true,
164
+ get: function () { return chunkSNGU4SHO_cjs.extensionTools; }
165
+ });
166
+ Object.defineProperty(exports, "editorFileMutationTools", {
167
+ enumerable: true,
168
+ get: function () { return chunkSNGU4SHO_cjs.fileMutationTools; }
169
+ });
170
+ Object.defineProperty(exports, "editorPreviewTools", {
171
+ enumerable: true,
172
+ get: function () { return chunkSNGU4SHO_cjs.previewTools; }
173
+ });
174
+ Object.defineProperty(exports, "editorProposalTools", {
175
+ enumerable: true,
176
+ get: function () { return chunkSNGU4SHO_cjs.proposalTools; }
177
+ });
178
+ Object.defineProperty(exports, "editorReferenceTools", {
179
+ enumerable: true,
180
+ get: function () { return chunkSNGU4SHO_cjs.referenceTools; }
181
+ });
182
+ Object.defineProperty(exports, "editorSessionTools", {
183
+ enumerable: true,
184
+ get: function () { return chunkSNGU4SHO_cjs.sessionTools; }
185
+ });
186
+ Object.defineProperty(exports, "editorTools", {
187
+ enumerable: true,
188
+ get: function () { return chunkSNGU4SHO_cjs.tools; }
189
+ });
190
+ Object.defineProperty(exports, "fileOperationTools", {
191
+ enumerable: true,
192
+ get: function () { return chunkSNGU4SHO_cjs.fileOperationTools; }
193
+ });
194
+ Object.defineProperty(exports, "preview", {
195
+ enumerable: true,
196
+ get: function () { return chunkMYURVLGP_cjs.preview; }
197
+ });
198
+ Object.defineProperty(exports, "previewCoreTools", {
199
+ enumerable: true,
200
+ get: function () { return chunkMYURVLGP_cjs.coreTools; }
201
+ });
202
+ Object.defineProperty(exports, "previewEnhancedTools", {
203
+ enumerable: true,
204
+ get: function () { return chunkMYURVLGP_cjs.enhancedTools; }
205
+ });
206
+ Object.defineProperty(exports, "previewTools", {
207
+ enumerable: true,
208
+ get: function () { return chunkMYURVLGP_cjs.tools; }
209
+ });
210
+ Object.defineProperty(exports, "seaflow", {
211
+ enumerable: true,
212
+ get: function () { return chunkHJJTBVKQ_cjs.seaflow; }
213
+ });
214
+ Object.defineProperty(exports, "seaflowAllTools", {
215
+ enumerable: true,
216
+ get: function () { return chunkHJJTBVKQ_cjs.allTools; }
217
+ });
218
+ Object.defineProperty(exports, "seaflowCanvasAuthTools", {
219
+ enumerable: true,
220
+ get: function () { return chunkHJJTBVKQ_cjs.canvasAuthTools; }
221
+ });
222
+ Object.defineProperty(exports, "seaflowCanvasContextTools", {
223
+ enumerable: true,
224
+ get: function () { return chunkHJJTBVKQ_cjs.canvasContextTools; }
225
+ });
226
+ Object.defineProperty(exports, "seaflowCanvasExecutionTools", {
227
+ enumerable: true,
228
+ get: function () { return chunkHJJTBVKQ_cjs.canvasExecutionTools; }
229
+ });
230
+ Object.defineProperty(exports, "seaflowTools", {
231
+ enumerable: true,
232
+ get: function () { return chunkHJJTBVKQ_cjs.tools; }
233
+ });
234
+ Object.defineProperty(exports, "MCPClient", {
235
+ enumerable: true,
236
+ get: function () { return chunkTFOJLA2F_cjs.MCPClient; }
237
+ });
238
+ Object.defineProperty(exports, "MCPServer", {
239
+ enumerable: true,
240
+ get: function () { return chunkTFOJLA2F_cjs.MCPServer; }
241
+ });
242
+ Object.defineProperty(exports, "PostMessageTransport", {
243
+ enumerable: true,
244
+ get: function () { return chunkTFOJLA2F_cjs.PostMessageTransport; }
245
+ });
246
+ Object.defineProperty(exports, "callHostTool", {
247
+ enumerable: true,
248
+ get: function () { return chunkTFOJLA2F_cjs.callHostTool; }
249
+ });
250
+ Object.defineProperty(exports, "callHostToolText", {
251
+ enumerable: true,
252
+ get: function () { return chunkTFOJLA2F_cjs.callHostToolText; }
253
+ });
254
+ Object.defineProperty(exports, "createMCPClient", {
255
+ enumerable: true,
256
+ get: function () { return chunkTFOJLA2F_cjs.createMCPClient; }
257
+ });
258
+ Object.defineProperty(exports, "createMCPServer", {
259
+ enumerable: true,
260
+ get: function () { return chunkTFOJLA2F_cjs.createMCPServer; }
261
+ });
262
+ Object.defineProperty(exports, "createNotification", {
263
+ enumerable: true,
264
+ get: function () { return chunkTFOJLA2F_cjs.createNotification; }
265
+ });
266
+ Object.defineProperty(exports, "createRequest", {
267
+ enumerable: true,
268
+ get: function () { return chunkTFOJLA2F_cjs.createRequest; }
269
+ });
270
+ Object.defineProperty(exports, "createResponse", {
271
+ enumerable: true,
272
+ get: function () { return chunkTFOJLA2F_cjs.createResponse; }
273
+ });
274
+ Object.defineProperty(exports, "getDefaultClient", {
275
+ enumerable: true,
276
+ get: function () { return chunkTFOJLA2F_cjs.getDefaultClient; }
277
+ });
278
+ Object.defineProperty(exports, "getDefaultServer", {
279
+ enumerable: true,
280
+ get: function () { return chunkTFOJLA2F_cjs.getDefaultServer; }
281
+ });
282
+ Object.defineProperty(exports, "getDefaultTransport", {
283
+ enumerable: true,
284
+ get: function () { return chunkTFOJLA2F_cjs.getDefaultTransport; }
285
+ });
286
+ Object.defineProperty(exports, "isMCPMessage", {
287
+ enumerable: true,
288
+ get: function () { return chunkTFOJLA2F_cjs.isMCPMessage; }
289
+ });
290
+ Object.defineProperty(exports, "isNotification", {
291
+ enumerable: true,
292
+ get: function () { return chunkTFOJLA2F_cjs.isNotification; }
293
+ });
294
+ Object.defineProperty(exports, "normalizeMCPTool", {
295
+ enumerable: true,
296
+ get: function () { return chunkTFOJLA2F_cjs.normalizeMCPTool; }
297
+ });
298
+ Object.defineProperty(exports, "normalizeMCPToolInputSchema", {
299
+ enumerable: true,
300
+ get: function () { return chunkTFOJLA2F_cjs.normalizeMCPToolInputSchema; }
301
+ });
302
+ Object.defineProperty(exports, "normalizeMCPToolObjectSchema", {
303
+ enumerable: true,
304
+ get: function () { return chunkTFOJLA2F_cjs.normalizeMCPToolObjectSchema; }
305
+ });
306
+ Object.defineProperty(exports, "setDefaultClient", {
307
+ enumerable: true,
308
+ get: function () { return chunkTFOJLA2F_cjs.setDefaultClient; }
309
+ });
310
+ Object.defineProperty(exports, "setDefaultTransport", {
311
+ enumerable: true,
312
+ get: function () { return chunkTFOJLA2F_cjs.setDefaultTransport; }
313
+ });
314
+ Object.defineProperty(exports, "startDefaultServer", {
315
+ enumerable: true,
316
+ get: function () { return chunkTFOJLA2F_cjs.startDefaultServer; }
317
+ });
@@ -0,0 +1,123 @@
1
+ import { k as MCPToolResult, g as MCPTool, h as MCPToolAnnotations, j as MCPToolInputSchema } from '../types-Clgf5gBf.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, N as NotificationHandler, P as PublishParams, S as SubscribeParams, l as createNotification, m as createRequest, n as createResponse, o as isMCPMessage, p as isNotification } from '../types-Clgf5gBf.cjs';
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
+ 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
+
28
+ /**
29
+ * MCP Module Entry
30
+ *
31
+ * MCP 信息交换中心入口
32
+ */
33
+
34
+ declare function loadPlugin(pluginName: string): Promise<unknown>;
35
+
36
+ /**
37
+ * MCP 包定义
38
+ */
39
+ declare const MCP_PACKAGES: readonly [{
40
+ readonly id: "seastudio";
41
+ readonly name: "SeaStudio";
42
+ readonly description: "文件/Shell/Git 基础能力";
43
+ 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
+ }];
70
+ type MCPPackageId = (typeof MCP_PACKAGES)[number]['id'];
71
+ interface MCPPackageInfo {
72
+ id: MCPPackageId;
73
+ name: string;
74
+ description: string;
75
+ toolCount: number;
76
+ }
77
+ /**
78
+ * OpenAI function 格式的工具定义
79
+ */
80
+ type MCPToolCapabilityRisk = 'low' | 'medium' | 'high';
81
+ interface MCPToolCapabilityMetadata {
82
+ id: string;
83
+ risk: MCPToolCapabilityRisk;
84
+ preconditions?: string[];
85
+ successSignals?: Array<Record<string, unknown>>;
86
+ failureCodes?: string[];
87
+ }
88
+ interface OpenAITool {
89
+ type: 'function';
90
+ annotations?: MCPToolAnnotations;
91
+ outputSchema?: MCPToolInputSchema;
92
+ function: {
93
+ name: string;
94
+ description: string;
95
+ parameters: MCPToolInputSchema;
96
+ outputSchema?: MCPToolInputSchema;
97
+ };
98
+ }
99
+ /**
100
+ * 将 MCP Tool 转换为 OpenAI function 格式
101
+ */
102
+ declare function mcpToolToOpenAI(tool: MCPTool): OpenAITool;
103
+ /**
104
+ * 获取所有 MCP Tools
105
+ */
106
+ declare function listAllTools(): MCPTool[];
107
+ /**
108
+ * @deprecated 使用 listAllTools() 替代
109
+ */
110
+ declare const listAvailableTools: typeof listAllTools;
111
+ declare function getMCPToolPackageIndex(): Map<string, MCPPackageId>;
112
+ declare function getMCPPackageIdForTool(toolName: string): MCPPackageId | null;
113
+ declare function listAvailableToolsForLLM(): OpenAITool[];
114
+ /**
115
+ * 获取包列表(含工具数量,静态获取)
116
+ */
117
+ declare function getMCPPackages(): MCPPackageInfo[];
118
+ /**
119
+ * 根据启用的包获取工具列表(OpenAI 格式)
120
+ */
121
+ declare function getToolsForLLM(disabledPackages: Set<MCPPackageId>): OpenAITool[];
122
+
123
+ export { type MCPPackageId, type MCPPackageInfo, MCPTool, MCPToolAnnotations, type MCPToolCapabilityMetadata, type MCPToolCapabilityRisk, MCPToolInputSchema, MCPToolResult, MCP_PACKAGES, type OpenAITool, getMCPPackageIdForTool, getMCPPackages, getMCPToolPackageIndex, getToolsForLLM, listAllTools, listAvailableTools, listAvailableToolsForLLM, loadPlugin, mcpToolToOpenAI, shellPlugin, commandTools as shellPluginCommandTools, sessionTools as shellPluginSessionTools, tools as shellPluginTools };