@seastudio/sdk 3.7.3 → 4.0.1

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.
@@ -3,7 +3,7 @@ import { g as MCPTool, h as MCPToolAnnotations, j as MCPToolInputSchema, k as MC
3
3
  /**
4
4
  * File MCP Tools
5
5
  *
6
- * 文件能力 + 剪贴板文件能力 + 批量文件能力
6
+ * 文件系统读写、传输与剪贴板能力。
7
7
  */
8
8
 
9
9
  declare function annotateTool(tool: MCPTool, annotations: MCPToolAnnotations, outputSchema?: MCPToolInputSchema): MCPTool;
@@ -24,8 +24,6 @@ declare const fileTools: MCPTool[];
24
24
  * Shell MCP Tools
25
25
  *
26
26
  * 基于 PTY 的多 session 长会话工具。
27
- * 全部 session 命令式 API:
28
- * open / list / get / run / wait / get_entries / signal / clear_entries / close
29
27
  */
30
28
 
31
29
  declare const shellTools: MCPTool[];
@@ -33,7 +31,7 @@ declare const shellTools: MCPTool[];
33
31
  /**
34
32
  * AIGC MCP Tools
35
33
  *
36
- * SeaCloud 多模态生成能力
34
+ * SeaCloud 多模态生成能力。
37
35
  */
38
36
 
39
37
  declare const seaCloudTools: MCPTool[];
@@ -275,6 +273,9 @@ declare const seastudio: {
275
273
  move: (sourcePath: string, destDir: string, options?: SeastudioFileTransferOptions) => Promise<MCPToolResult>;
276
274
  copyTo: (sourcePath: string, destDir: string, options?: SeastudioFileTransferOptions) => Promise<MCPToolResult>;
277
275
  copy: (path: string, options?: SeastudioSinglePathOptions) => Promise<MCPToolResult>;
276
+ copyMany: (paths: string[], options?: SeastudioSinglePathOptions) => Promise<MCPToolResult>;
277
+ cut: (path: string, options?: SeastudioSinglePathOptions) => Promise<MCPToolResult>;
278
+ cutMany: (paths: string[], options?: SeastudioSinglePathOptions) => Promise<MCPToolResult>;
278
279
  paste: (path?: string, options?: SeastudioSinglePathOptions) => Promise<MCPToolResult>;
279
280
  clipboardCheck: () => Promise<MCPToolResult>;
280
281
  copyPath: (path: string, options?: SeastudioSinglePathOptions) => Promise<MCPToolResult>;
@@ -366,7 +367,7 @@ declare function runOneShotShellCommand(command: string, options?: SeastudioShel
366
367
  /**
367
368
  * Plugin MCP Tools
368
369
  *
369
- * 插件管理 + 插件标签操作
370
+ * 插件管理 + 插件标签操作。
370
371
  */
371
372
 
372
373
  declare const pluginManagementTools: MCPTool[];
@@ -375,7 +376,7 @@ declare const pluginTabTools: MCPTool[];
375
376
  /**
376
377
  * Agent MCP Tools
377
378
  *
378
- * Agent 管理 + Agent 标签操作
379
+ * Agent 管理 + Agent 标签操作。
379
380
  */
380
381
 
381
382
  declare const agentManagementTools: MCPTool[];
@@ -384,7 +385,7 @@ declare const agentTabTools: MCPTool[];
384
385
  /**
385
386
  * Project MCP Tools
386
387
  *
387
- * 项目枚举与寻址:让 agent 能列出所有项目并按需跨项目操作。
388
+ * 项目枚举与寻址。
388
389
  */
389
390
 
390
391
  declare const projectTools: MCPTool[];
@@ -393,26 +394,12 @@ declare const projectTools: MCPTool[];
393
394
  * Skill MCP Tools
394
395
  *
395
396
  * 把桌面端 skillManager 扫描到的 Agent Skill 暴露给 agent 插件(只读)。
396
- *
397
- * 说明:
398
- * - 写操作(安装 / 卸载 / 编辑 scope)不通过 MCP,只在桌面端 IPC engine:skill:* 给设置页 UI 用。
399
- * - "能 list 出来即生效":scope 即语义,不需要 enabled 字段。
400
397
  */
401
398
 
402
399
  declare const skillTools: MCPTool[];
403
400
 
404
401
  declare const browserRuntimeTools: MCPTool[];
405
402
 
406
- /**
407
- * SeaStudio MCP Notifications
408
- *
409
- * 主程序发布的 MCP 通知定义
410
- *
411
- * 架构说明:
412
- * - 插件通过 SeastudioRequests 发送请求到主程序
413
- * - 主程序处理请求后,通过 SeastudioNotifications 发布标准通知
414
- * - 所有插件订阅 SeastudioNotifications 中的标准通知
415
- */
416
403
  /**
417
404
  * 插件发送给主程序的请求主题
418
405
  *
@@ -424,7 +411,6 @@ declare const browserRuntimeTools: MCPTool[];
424
411
  * import { SeastudioRequests } from '@seastudio/sdk/mcp/seastudio';
425
412
  *
426
413
  * const client = getDefaultClient();
427
- * // 请求打开文件(主程序会发布 FILE_OPEN_REQUESTED 通知)
428
414
  * client.publish(SeastudioRequests.FILE_OPEN, { path: '/path/to/file.ts' });
429
415
  * ```
430
416
  */
@@ -445,18 +431,15 @@ declare const SeastudioRequests: {
445
431
  *
446
432
  * @example
447
433
  * ```typescript
448
- * import { getDefaultServer, getDefaultClient } from '@seastudio/sdk/mcp/core';
434
+ * import { getDefaultClient, getDefaultServer } from '@seastudio/sdk/mcp/core';
449
435
  * import { SeastudioNotifications } from '@seastudio/sdk/mcp/seastudio';
450
436
  *
451
- * // 订阅通知
452
437
  * const client = getDefaultClient();
453
438
  * client.subscribe([SeastudioNotifications.FILES_CHANGED]);
454
439
  *
455
- * // 处理通知
456
440
  * const server = getDefaultServer();
457
441
  * server.onNotification(SeastudioNotifications.FILES_CHANGED, (params) => {
458
442
  * const { type, path } = params as FilesChangedParams;
459
- * // 刷新文件树
460
443
  * });
461
444
  * ```
462
445
  */
@@ -528,6 +511,10 @@ declare const SeastudioNotifications: {
528
511
  */
529
512
  readonly SESSION_DELETE_REQUESTED: "session:delete_requested";
530
513
  };
514
+
515
+ /** 项目根在 MCP 文件工具中的寻址 id */
516
+ type SeastudioRootId = 'workspace' | `proj-${string}`;
517
+ type SeastudioDragRootId = SeastudioRootId;
531
518
  /**
532
519
  * files:changed 通知参数
533
520
  */
@@ -545,7 +532,6 @@ interface FilesChangedParams {
545
532
  /** 变化类型:内容变化、结构变化或未知兜底 */
546
533
  changeKind?: 'content' | 'structure' | 'unknown';
547
534
  }
548
- type SeastudioRootId = 'workspace' | `proj-${string}`;
549
535
  interface FileRenamedParams {
550
536
  /** 根目录 ID */
551
537
  rootId: SeastudioRootId;
@@ -579,7 +565,6 @@ interface RootsChangedParams {
579
565
  description: string;
580
566
  }>;
581
567
  }
582
- type SeastudioDragRootId = SeastudioRootId;
583
568
  interface SeastudioDragFileData {
584
569
  sourcePath: string;
585
570
  sourceRootId?: SeastudioDragRootId;
@@ -719,7 +704,7 @@ interface SessionNotificationBase {
719
704
  projectId?: string;
720
705
  }
721
706
  /** Agent 对话 session 的宿主展示状态 */
722
- type SessionStatus = 'idle' | 'processing' | 'completed' | 'failed';
707
+ type SessionStatus = 'idle' | 'awaiting_user' | 'processing' | 'completed' | 'failed';
723
708
  interface SessionCreatedParams extends SessionNotificationBase {
724
709
  /** 展示用标题 */
725
710
  title?: string;
@@ -1,2 +1,2 @@
1
- export { SeastudioNotifications, SeastudioRequests, agentManagementTools, agentTabTools, allTools, annotateTool, batchFlattenCopyEvidenceOutputSchema, browserRuntimeTools, callTool, callToolText, dualPathEvidenceOutputSchema, fileDownloadEvidenceOutputSchema, fileTools, fileUrlEvidenceOutputSchema, pluginManagementTools, pluginTabTools, projectTools, request, rootedPathEvidenceOutputSchema, rootedWriteEvidenceOutputSchema, runOneShotShellCommand, seaCloudTools, seastudio, shellSessionCloseEvidenceOutputSchema, shellSessionOpenEvidenceOutputSchema, shellSessionRunEvidenceOutputSchema, shellSessionSignalEvidenceOutputSchema, shellSessionSnapshotEvidenceOutputSchema, shellTools, skillTools, tools } from '../../chunk-PV6XSOI5.js';
1
+ export { SeastudioNotifications, SeastudioRequests, agentManagementTools, agentTabTools, allTools, annotateTool, batchFlattenCopyEvidenceOutputSchema, browserRuntimeTools, callTool, callToolText, dualPathEvidenceOutputSchema, fileDownloadEvidenceOutputSchema, fileTools, fileUrlEvidenceOutputSchema, pluginManagementTools, pluginTabTools, projectTools, request, rootedPathEvidenceOutputSchema, rootedWriteEvidenceOutputSchema, runOneShotShellCommand, seaCloudTools, seastudio, shellSessionCloseEvidenceOutputSchema, shellSessionOpenEvidenceOutputSchema, shellSessionRunEvidenceOutputSchema, shellSessionSignalEvidenceOutputSchema, shellSessionSnapshotEvidenceOutputSchema, shellTools, skillTools, tools } from '../../chunk-CRW5HIAT.js';
2
2
  import '../../chunk-TJ3CGHWJ.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@seastudio/sdk",
3
- "version": "3.7.3",
3
+ "version": "4.0.1",
4
4
  "description": "SeaStudio SDK - UI 组件 + MCP 信息交换中心",
5
5
  "main": "dist/index.cjs",
6
6
  "module": "dist/index.js",