@seastudio/sdk 3.0.3 → 3.0.5

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,27 +1,41 @@
1
- import { g as MCPTool, k as MCPToolResult, h as MCPToolAnnotations, j as MCPToolInputSchema } from '../../types-B32sUvc0.js';
1
+ import { g as MCPTool, h as MCPToolAnnotations, j as MCPToolInputSchema, k as MCPToolResult } from '../../types-CUFTi2bZ.js';
2
2
 
3
3
  /**
4
- * Plugin MCP Tools
4
+ * File MCP Tools
5
5
  *
6
- * 插件管理 + 插件标签操作
6
+ * 文件能力 + 剪贴板文件能力 + 批量文件能力
7
7
  */
8
8
 
9
- declare const pluginManagementTools: MCPTool[];
10
- declare const pluginTabTools: MCPTool[];
9
+ declare function annotateTool(tool: MCPTool, annotations: MCPToolAnnotations, outputSchema?: MCPToolInputSchema): MCPTool;
10
+ declare const rootedPathEvidenceOutputSchema: MCPToolInputSchema;
11
+ declare const rootedWriteEvidenceOutputSchema: MCPToolInputSchema;
12
+ declare const dualPathEvidenceOutputSchema: MCPToolInputSchema;
13
+ declare const batchFlattenCopyEvidenceOutputSchema: MCPToolInputSchema;
14
+ declare const fileDownloadEvidenceOutputSchema: MCPToolInputSchema;
15
+ declare const shellCommandEvidenceOutputSchema: MCPToolInputSchema;
16
+ declare const shellSessionSnapshotEvidenceOutputSchema: MCPToolInputSchema;
17
+ declare const fileTools: MCPTool[];
11
18
 
12
19
  /**
13
- * Agent MCP Tools
20
+ * Shell MCP Tools
14
21
  *
15
- * Agent 管理 + Agent 标签操作
22
+ * Shell 能力
16
23
  */
17
24
 
18
- declare const agentManagementTools: MCPTool[];
19
- declare const agentTabTools: MCPTool[];
25
+ declare const shellTools: MCPTool[];
26
+
27
+ /**
28
+ * AIGC MCP Tools
29
+ *
30
+ * SeaCloud 多模态生成能力
31
+ */
32
+
33
+ declare const seaCloudTools: MCPTool[];
20
34
 
21
35
  /**
22
- * SeaStudio MCP Tools
36
+ * SeaStudio MCP Client Helpers
23
37
  *
24
- * 主程序基础能力:file, shell, git
38
+ * TS/JS 代码直接调用 MCP 的便利 API
25
39
  */
26
40
 
27
41
  type SeastudioFilesystemRootId = 'workspace';
@@ -115,17 +129,9 @@ interface SeastudioShellCommandResult {
115
129
  durationMs: number;
116
130
  usedFallback: boolean;
117
131
  }
118
- declare function annotateTool(tool: MCPTool, annotations: MCPToolAnnotations, outputSchema?: MCPToolInputSchema): MCPTool;
119
- declare const fileTools: MCPTool[];
120
- declare const shellTools: MCPTool[];
121
- declare const gitTools: MCPTool[];
122
- declare const clipboardTools: MCPTool[];
123
- declare const codeQualityTools: MCPTool[];
124
- declare const batchFileTools: MCPTool[];
125
- declare const seaCloudTools: MCPTool[];
126
-
127
- declare const allTools: MCPTool[];
128
- declare const tools: MCPTool[];
132
+ declare function callTool(name: string, args?: Record<string, unknown>): Promise<MCPToolResult>;
133
+ declare function request<T = unknown>(method: string, params?: Record<string, unknown>): Promise<T>;
134
+ declare function callToolText(name: string, args?: Record<string, unknown>): Promise<string>;
129
135
  declare const seastudio: {
130
136
  roots: {
131
137
  list: () => Promise<{
@@ -143,6 +149,7 @@ declare const seastudio: {
143
149
  stat: (path: string, options?: SeastudioFileInfoOptions) => Promise<MCPToolResult>;
144
150
  info: (path: string, options?: SeastudioFileInfoOptions) => Promise<MCPToolResult>;
145
151
  search: (query: string, options?: SeastudioFileSearchOptions) => Promise<MCPToolResult>;
152
+ codeSearch: (pattern: string, path?: string, glob?: string, headLimit?: number) => Promise<MCPToolResult>;
146
153
  rename: (path: string, newName: string, options?: SeastudioSinglePathOptions) => Promise<MCPToolResult>;
147
154
  move: (sourcePath: string, destDir: string, options?: SeastudioFileTransferOptions) => Promise<MCPToolResult>;
148
155
  copyTo: (sourcePath: string, destDir: string, options?: SeastudioFileTransferOptions) => Promise<MCPToolResult>;
@@ -169,18 +176,26 @@ declare const seastudio: {
169
176
  reset: () => Promise<MCPToolResult>;
170
177
  };
171
178
  };
172
- git: {
173
- status: () => Promise<MCPToolResult>;
174
- diff: (staged?: boolean, path?: string) => Promise<MCPToolResult>;
175
- };
176
- codeQuality: {
177
- runTest: (command?: string, timeout?: number) => Promise<MCPToolResult>;
178
- runTypecheck: (command?: string, timeout?: number) => Promise<MCPToolResult>;
179
- runLint: (command?: string, timeout?: number) => Promise<MCPToolResult>;
180
- codeSearch: (pattern: string, path?: string, glob?: string, headLimit?: number) => Promise<MCPToolResult>;
181
- };
182
179
  };
183
180
 
181
+ /**
182
+ * Plugin MCP Tools
183
+ *
184
+ * 插件管理 + 插件标签操作
185
+ */
186
+
187
+ declare const pluginManagementTools: MCPTool[];
188
+ declare const pluginTabTools: MCPTool[];
189
+
190
+ /**
191
+ * Agent MCP Tools
192
+ *
193
+ * Agent 管理 + Agent 标签操作
194
+ */
195
+
196
+ declare const agentManagementTools: MCPTool[];
197
+ declare const agentTabTools: MCPTool[];
198
+
184
199
  /**
185
200
  * SeaStudio MCP Notifications
186
201
  *
@@ -241,6 +256,10 @@ declare const SeastudioRequests: {
241
256
  declare const SeastudioNotifications: {
242
257
  /** 文件系统变化通知(fs.watch 触发) */
243
258
  readonly FILES_CHANGED: "files:changed";
259
+ /** 文件或目录被重命名/移动 */
260
+ readonly FILE_RENAMED: "file:renamed";
261
+ /** 文件或目录被删除/移入回收站 */
262
+ readonly FILE_DELETED: "file:deleted";
244
263
  /** 根目录变化通知 */
245
264
  readonly ROOTS_CHANGED: "roots:changed";
246
265
  /** 文件打开请求,可广播也可定向 */
@@ -265,6 +284,32 @@ interface FilesChangedParams {
265
284
  /** 发生变化的目录路径 */
266
285
  path: string;
267
286
  }
287
+ interface FileRenamedParams {
288
+ /** 根目录 ID */
289
+ rootId: 'workspace';
290
+ /** 原路径 */
291
+ oldPath: string;
292
+ /** 新路径 */
293
+ newPath: string;
294
+ /** 目标类型 */
295
+ kind: 'file' | 'directory';
296
+ /** 事件来源:工具调用或系统 watcher 推断 */
297
+ origin?: 'tool' | 'watcher';
298
+ /** 触发来源插件 ID */
299
+ source?: string;
300
+ }
301
+ interface FileDeletedParams {
302
+ /** 根目录 ID */
303
+ rootId: 'workspace';
304
+ /** 被删除路径 */
305
+ path: string;
306
+ /** 目标类型 */
307
+ kind: 'file' | 'directory';
308
+ /** 事件来源:工具调用或系统 watcher 推断 */
309
+ origin?: 'tool' | 'watcher';
310
+ /** 触发来源插件 ID */
311
+ source?: string;
312
+ }
268
313
  interface RootsChangedParams {
269
314
  roots: Array<{
270
315
  id: 'workspace';
@@ -370,4 +415,13 @@ interface FileSavedParams {
370
415
  source?: string;
371
416
  }
372
417
 
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 };
418
+ /**
419
+ * SeaStudio MCP Module
420
+ *
421
+ * 主程序基础能力
422
+ */
423
+
424
+ declare const allTools: MCPTool[];
425
+ declare const tools: MCPTool[];
426
+
427
+ export { type FileDeletedParams, type FileModifiedParams, type FileOpenRequestedParams, type FileRenamedParams, 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, batchFlattenCopyEvidenceOutputSchema, callTool, callToolText, dualPathEvidenceOutputSchema, fileDownloadEvidenceOutputSchema, fileTools, pluginManagementTools, pluginTabTools, request, rootedPathEvidenceOutputSchema, rootedWriteEvidenceOutputSchema, seaCloudTools, seastudio, shellCommandEvidenceOutputSchema, shellSessionSnapshotEvidenceOutputSchema, 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-XU5GEWWL.js';
2
- import '../../chunk-ANWOL7SM.js';
1
+ export { SeastudioNotifications, SeastudioRequests, agentManagementTools, agentTabTools, allTools, annotateTool, batchFlattenCopyEvidenceOutputSchema, callTool, callToolText, dualPathEvidenceOutputSchema, fileDownloadEvidenceOutputSchema, fileTools, pluginManagementTools, pluginTabTools, request, rootedPathEvidenceOutputSchema, rootedWriteEvidenceOutputSchema, seaCloudTools, seastudio, shellCommandEvidenceOutputSchema, shellSessionSnapshotEvidenceOutputSchema, shellTools, tools } from '../../chunk-4QK6VMIM.js';
2
+ import '../../chunk-TJ3CGHWJ.js';
@@ -78,6 +78,7 @@ interface MCPToolResult {
78
78
  interface MCPToolCallRequest {
79
79
  name: string;
80
80
  arguments: Record<string, unknown>;
81
+ pluginInstanceId?: string;
81
82
  }
82
83
  type MCPMethod = 'tools/list' | 'tools/call' | 'roots/list' | 'initialize' | 'ping' | 'notifications/subscribe' | 'notifications/unsubscribe' | 'notifications/publish';
83
84
  type NotificationHandler = (params: Record<string, unknown>) => void;
@@ -78,6 +78,7 @@ interface MCPToolResult {
78
78
  interface MCPToolCallRequest {
79
79
  name: string;
80
80
  arguments: Record<string, unknown>;
81
+ pluginInstanceId?: string;
81
82
  }
82
83
  type MCPMethod = 'tools/list' | 'tools/call' | 'roots/list' | 'initialize' | 'ping' | 'notifications/subscribe' | 'notifications/unsubscribe' | 'notifications/publish';
83
84
  type NotificationHandler = (params: Record<string, unknown>) => void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@seastudio/sdk",
3
- "version": "3.0.3",
3
+ "version": "3.0.5",
4
4
  "description": "SeaStudio SDK - UI 组件 + MCP 信息交换中心 + CLI 工具",
5
5
  "main": "dist/index.cjs",
6
6
  "module": "dist/index.js",
@@ -13,7 +13,7 @@
13
13
  "react": "^19.0.0",
14
14
  "react-dom": "^19.0.0",
15
15
  "lucide-react": "^0.400.0",
16
- "@seastudio/sdk": "^3.0.0"
16
+ "@seastudio/sdk": "^3.0.3"
17
17
  },
18
18
  "devDependencies": {
19
19
  "@tailwindcss/postcss": "^4.0.0",