@seastudio/sdk 4.0.9 → 4.0.11

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.
@@ -65,6 +65,17 @@ var fileDownloadEvidenceOutputSchema = {
65
65
  },
66
66
  required: ["location", "path", "savedPath", "size"]
67
67
  };
68
+ var fileSaveAsEvidenceOutputSchema = {
69
+ type: "object",
70
+ properties: {
71
+ rootId: { type: "string" },
72
+ path: { type: "string" },
73
+ savedPath: { type: "string" },
74
+ canceled: { type: "boolean" },
75
+ copied: { type: "boolean" }
76
+ },
77
+ required: ["rootId", "path", "canceled", "copied"]
78
+ };
68
79
  var fileUrlEvidenceOutputSchema = {
69
80
  type: "object",
70
81
  properties: {
@@ -227,13 +238,13 @@ var fileTools = [
227
238
  }),
228
239
  annotateTool({
229
240
  name: "seastudio-filesystem_transfer",
230
- description: "\u5904\u7406\u6587\u4EF6 URL\u3001\u8FDC\u7A0B\u4E0B\u8F7D\u3001\u590D\u5236\u7C98\u8D34\u548C\u526A\u8D34\u677F\u7B49\u7CFB\u7EDF\u6216\u5916\u90E8\u4EA4\u4E92\u3002\u4F7F\u7528 action \u9009\u62E9 getUrl\u3001download\u3001copy\u3001paste\u3001clipboardCheck \u6216 copyPath\u3002copy \u652F\u6301\u901A\u8FC7 path \u590D\u5236\u5355\u4E2A\u9879\u76EE\uFF0C\u6216\u901A\u8FC7 paths \u4E00\u6B21\u590D\u5236/\u526A\u5207\u591A\u4E2A\u9879\u76EE\u3002",
241
+ description: "\u5904\u7406\u6587\u4EF6 URL\u3001\u8FDC\u7A0B\u4E0B\u8F7D\u3001\u539F\u751F\u53E6\u5B58\u4E3A\u3001\u590D\u5236\u7C98\u8D34\u548C\u526A\u8D34\u677F\u7B49\u7CFB\u7EDF\u6216\u5916\u90E8\u4EA4\u4E92\u3002\u4F7F\u7528 action \u9009\u62E9 getUrl\u3001download\u3001saveAs\u3001copy\u3001paste\u3001clipboardCheck \u6216 copyPath\u3002copy \u652F\u6301\u901A\u8FC7 path \u590D\u5236\u5355\u4E2A\u9879\u76EE\uFF0C\u6216\u901A\u8FC7 paths \u4E00\u6B21\u590D\u5236/\u526A\u5207\u591A\u4E2A\u9879\u76EE\u3002",
231
242
  inputSchema: {
232
243
  type: "object",
233
244
  properties: {
234
245
  action: {
235
246
  type: "string",
236
- enum: ["getUrl", "download", "copy", "paste", "clipboardCheck", "copyPath"],
247
+ enum: ["getUrl", "download", "saveAs", "copy", "paste", "clipboardCheck", "copyPath"],
237
248
  description: "\u6587\u4EF6\u4F20\u8F93\u6216\u526A\u8D34\u677F\u52A8\u4F5C\u3002"
238
249
  },
239
250
  rootId: rootIdParam,
@@ -250,7 +261,9 @@ var fileTools = [
250
261
  },
251
262
  url: { type: "string", description: "download \u7684\u8FDC\u7A0B\u6587\u4EF6 URL\u3002" },
252
263
  absoluteDir: { type: "string", description: "download \u7684\u672C\u5730\u7EDD\u5BF9\u4FDD\u5B58\u76EE\u5F55\uFF08\u53EF\u9009\uFF09\u3002" },
253
- filenameHint: { type: "string", description: "download \u7684\u6587\u4EF6\u540D\u63D0\u793A\uFF08\u53EF\u9009\uFF09\u3002" }
264
+ filenameHint: { type: "string", description: "download \u7684\u6587\u4EF6\u540D\u63D0\u793A\uFF08\u53EF\u9009\uFF09\u3002" },
265
+ defaultPath: { type: "string", description: "saveAs \u7684\u9ED8\u8BA4\u4FDD\u5B58\u6587\u4EF6\u540D\u6216\u8DEF\u5F84\uFF08\u53EF\u9009\uFF09\u3002" },
266
+ title: { type: "string", description: "saveAs \u539F\u751F\u4FDD\u5B58\u5BF9\u8BDD\u6846\u6807\u9898\uFF08\u53EF\u9009\uFF09\u3002" }
254
267
  },
255
268
  required: ["action"]
256
269
  }
@@ -816,6 +829,12 @@ var seastudio = {
816
829
  }
817
830
  return callFilesystemTransfer("download", { rootId: options?.rootId ?? "workspace", path, url, filenameHint });
818
831
  },
832
+ saveAs: (path, options) => callFilesystemTransfer("saveAs", {
833
+ rootId: options?.rootId ?? "workspace",
834
+ path,
835
+ ...typeof options?.defaultPath === "string" ? { defaultPath: options.defaultPath } : {},
836
+ ...typeof options?.title === "string" ? { title: options.title } : {}
837
+ }),
819
838
  writeBinary: (path, base64, options) => callFilesystemMutate("writeBinary", { rootId: options?.rootId ?? "workspace", path, base64 }),
820
839
  readBinary: (path, options) => callFilesystemRead("readBinary", { rootId: options?.rootId ?? "workspace", path })
821
840
  },
@@ -1213,7 +1232,12 @@ var SeastudioNotifications = {
1213
1232
  * 宿主请求 Agent 删除/关闭某条对话会话(例如侧栏会话行「×」)。
1214
1233
  * 通过 notifications/publish + publishTo 定向到对应 Agent 实例。
1215
1234
  */
1216
- SESSION_DELETE_REQUESTED: "session:delete_requested"
1235
+ SESSION_DELETE_REQUESTED: "session:delete_requested",
1236
+ /**
1237
+ * SeaStudio 主窗口前后台变化(blur/focus)。
1238
+ * Agent 订阅后同步后端 host visibility,用于 session 完成 unread 策略。
1239
+ */
1240
+ HOST_APP_VISIBILITY: "host:app_visibility"
1217
1241
  };
1218
1242
 
1219
1243
  // src/mcp/seastudio/index.ts
@@ -1247,6 +1271,7 @@ exports.callToolText = callToolText;
1247
1271
  exports.dualPathEvidenceOutputSchema = dualPathEvidenceOutputSchema;
1248
1272
  exports.editorTools = editorTools;
1249
1273
  exports.fileDownloadEvidenceOutputSchema = fileDownloadEvidenceOutputSchema;
1274
+ exports.fileSaveAsEvidenceOutputSchema = fileSaveAsEvidenceOutputSchema;
1250
1275
  exports.fileTools = fileTools;
1251
1276
  exports.fileUrlEvidenceOutputSchema = fileUrlEvidenceOutputSchema;
1252
1277
  exports.gitTools = gitTools;
@@ -63,6 +63,17 @@ var fileDownloadEvidenceOutputSchema = {
63
63
  },
64
64
  required: ["location", "path", "savedPath", "size"]
65
65
  };
66
+ var fileSaveAsEvidenceOutputSchema = {
67
+ type: "object",
68
+ properties: {
69
+ rootId: { type: "string" },
70
+ path: { type: "string" },
71
+ savedPath: { type: "string" },
72
+ canceled: { type: "boolean" },
73
+ copied: { type: "boolean" }
74
+ },
75
+ required: ["rootId", "path", "canceled", "copied"]
76
+ };
66
77
  var fileUrlEvidenceOutputSchema = {
67
78
  type: "object",
68
79
  properties: {
@@ -225,13 +236,13 @@ var fileTools = [
225
236
  }),
226
237
  annotateTool({
227
238
  name: "seastudio-filesystem_transfer",
228
- description: "\u5904\u7406\u6587\u4EF6 URL\u3001\u8FDC\u7A0B\u4E0B\u8F7D\u3001\u590D\u5236\u7C98\u8D34\u548C\u526A\u8D34\u677F\u7B49\u7CFB\u7EDF\u6216\u5916\u90E8\u4EA4\u4E92\u3002\u4F7F\u7528 action \u9009\u62E9 getUrl\u3001download\u3001copy\u3001paste\u3001clipboardCheck \u6216 copyPath\u3002copy \u652F\u6301\u901A\u8FC7 path \u590D\u5236\u5355\u4E2A\u9879\u76EE\uFF0C\u6216\u901A\u8FC7 paths \u4E00\u6B21\u590D\u5236/\u526A\u5207\u591A\u4E2A\u9879\u76EE\u3002",
239
+ description: "\u5904\u7406\u6587\u4EF6 URL\u3001\u8FDC\u7A0B\u4E0B\u8F7D\u3001\u539F\u751F\u53E6\u5B58\u4E3A\u3001\u590D\u5236\u7C98\u8D34\u548C\u526A\u8D34\u677F\u7B49\u7CFB\u7EDF\u6216\u5916\u90E8\u4EA4\u4E92\u3002\u4F7F\u7528 action \u9009\u62E9 getUrl\u3001download\u3001saveAs\u3001copy\u3001paste\u3001clipboardCheck \u6216 copyPath\u3002copy \u652F\u6301\u901A\u8FC7 path \u590D\u5236\u5355\u4E2A\u9879\u76EE\uFF0C\u6216\u901A\u8FC7 paths \u4E00\u6B21\u590D\u5236/\u526A\u5207\u591A\u4E2A\u9879\u76EE\u3002",
229
240
  inputSchema: {
230
241
  type: "object",
231
242
  properties: {
232
243
  action: {
233
244
  type: "string",
234
- enum: ["getUrl", "download", "copy", "paste", "clipboardCheck", "copyPath"],
245
+ enum: ["getUrl", "download", "saveAs", "copy", "paste", "clipboardCheck", "copyPath"],
235
246
  description: "\u6587\u4EF6\u4F20\u8F93\u6216\u526A\u8D34\u677F\u52A8\u4F5C\u3002"
236
247
  },
237
248
  rootId: rootIdParam,
@@ -248,7 +259,9 @@ var fileTools = [
248
259
  },
249
260
  url: { type: "string", description: "download \u7684\u8FDC\u7A0B\u6587\u4EF6 URL\u3002" },
250
261
  absoluteDir: { type: "string", description: "download \u7684\u672C\u5730\u7EDD\u5BF9\u4FDD\u5B58\u76EE\u5F55\uFF08\u53EF\u9009\uFF09\u3002" },
251
- filenameHint: { type: "string", description: "download \u7684\u6587\u4EF6\u540D\u63D0\u793A\uFF08\u53EF\u9009\uFF09\u3002" }
262
+ filenameHint: { type: "string", description: "download \u7684\u6587\u4EF6\u540D\u63D0\u793A\uFF08\u53EF\u9009\uFF09\u3002" },
263
+ defaultPath: { type: "string", description: "saveAs \u7684\u9ED8\u8BA4\u4FDD\u5B58\u6587\u4EF6\u540D\u6216\u8DEF\u5F84\uFF08\u53EF\u9009\uFF09\u3002" },
264
+ title: { type: "string", description: "saveAs \u539F\u751F\u4FDD\u5B58\u5BF9\u8BDD\u6846\u6807\u9898\uFF08\u53EF\u9009\uFF09\u3002" }
252
265
  },
253
266
  required: ["action"]
254
267
  }
@@ -814,6 +827,12 @@ var seastudio = {
814
827
  }
815
828
  return callFilesystemTransfer("download", { rootId: options?.rootId ?? "workspace", path, url, filenameHint });
816
829
  },
830
+ saveAs: (path, options) => callFilesystemTransfer("saveAs", {
831
+ rootId: options?.rootId ?? "workspace",
832
+ path,
833
+ ...typeof options?.defaultPath === "string" ? { defaultPath: options.defaultPath } : {},
834
+ ...typeof options?.title === "string" ? { title: options.title } : {}
835
+ }),
817
836
  writeBinary: (path, base64, options) => callFilesystemMutate("writeBinary", { rootId: options?.rootId ?? "workspace", path, base64 }),
818
837
  readBinary: (path, options) => callFilesystemRead("readBinary", { rootId: options?.rootId ?? "workspace", path })
819
838
  },
@@ -1211,7 +1230,12 @@ var SeastudioNotifications = {
1211
1230
  * 宿主请求 Agent 删除/关闭某条对话会话(例如侧栏会话行「×」)。
1212
1231
  * 通过 notifications/publish + publishTo 定向到对应 Agent 实例。
1213
1232
  */
1214
- SESSION_DELETE_REQUESTED: "session:delete_requested"
1233
+ SESSION_DELETE_REQUESTED: "session:delete_requested",
1234
+ /**
1235
+ * SeaStudio 主窗口前后台变化(blur/focus)。
1236
+ * Agent 订阅后同步后端 host visibility,用于 session 完成 unread 策略。
1237
+ */
1238
+ HOST_APP_VISIBILITY: "host:app_visibility"
1215
1239
  };
1216
1240
 
1217
1241
  // src/mcp/seastudio/index.ts
@@ -1231,4 +1255,4 @@ var allTools = [
1231
1255
  ];
1232
1256
  var tools = allTools;
1233
1257
 
1234
- export { SINGLETON_BROWSER_SESSION_ID, SeastudioNotifications, SeastudioRequests, agentManagementTools, agentTabTools, allTools, annotateTool, batchFlattenCopyEvidenceOutputSchema, browserRuntimeTools, callTool, callToolText, dualPathEvidenceOutputSchema, editorTools, fileDownloadEvidenceOutputSchema, fileTools, fileUrlEvidenceOutputSchema, gitTools, pluginManagementTools, pluginTabTools, projectTools, request, rootedPathEvidenceOutputSchema, rootedWriteEvidenceOutputSchema, runOneShotShellCommand, seaCloudTools, seastudio, shellSessionCloseEvidenceOutputSchema, shellSessionOpenEvidenceOutputSchema, shellSessionRunEvidenceOutputSchema, shellSessionSignalEvidenceOutputSchema, shellSessionSnapshotEvidenceOutputSchema, shellTools, skillTools, tools };
1258
+ export { SINGLETON_BROWSER_SESSION_ID, SeastudioNotifications, SeastudioRequests, agentManagementTools, agentTabTools, allTools, annotateTool, batchFlattenCopyEvidenceOutputSchema, browserRuntimeTools, callTool, callToolText, dualPathEvidenceOutputSchema, editorTools, fileDownloadEvidenceOutputSchema, fileSaveAsEvidenceOutputSchema, fileTools, fileUrlEvidenceOutputSchema, gitTools, pluginManagementTools, pluginTabTools, projectTools, request, rootedPathEvidenceOutputSchema, rootedWriteEvidenceOutputSchema, runOneShotShellCommand, seaCloudTools, seastudio, shellSessionCloseEvidenceOutputSchema, shellSessionOpenEvidenceOutputSchema, shellSessionRunEvidenceOutputSchema, shellSessionSignalEvidenceOutputSchema, shellSessionSnapshotEvidenceOutputSchema, shellTools, skillTools, tools };
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var chunkKK6HF3XF_cjs = require('./chunk-KK6HF3XF.cjs');
3
+ var chunk5OEF32AG_cjs = require('./chunk-5OEF32AG.cjs');
4
4
  var chunk3I7UM66P_cjs = require('./chunk-3I7UM66P.cjs');
5
5
 
6
6
  // src/mcp/index.ts
@@ -11,7 +11,7 @@ async function loadPlugin(pluginName) {
11
11
  throw new Error(`Unknown plugin: ${pluginName}. \u63D2\u4EF6 MCP \u4E0D\u518D\u901A\u8FC7 SDK \u9759\u6001\u5BFC\u5165\u3002`);
12
12
  }
13
13
  var MCP_PACKAGES = [
14
- { id: "seastudio", name: "SeaStudio", description: "\u6587\u4EF6/Shell/AIGC \u57FA\u7840\u80FD\u529B", tools: chunkKK6HF3XF_cjs.allTools }
14
+ { id: "seastudio", name: "SeaStudio", description: "\u6587\u4EF6/Shell/AIGC \u57FA\u7840\u80FD\u529B", tools: chunk5OEF32AG_cjs.allTools }
15
15
  ];
16
16
  function mcpToolToOpenAI(tool) {
17
17
  const normalizedTool = chunk3I7UM66P_cjs.normalizeMCPTool(tool);
@@ -29,7 +29,7 @@ function mcpToolToOpenAI(tool) {
29
29
  };
30
30
  }
31
31
  function listAllTools() {
32
- return [...chunkKK6HF3XF_cjs.allTools];
32
+ return [...chunk5OEF32AG_cjs.allTools];
33
33
  }
34
34
  function toPackageName(source) {
35
35
  if (source === "seastudio") {
@@ -62,7 +62,7 @@ function normalizeAvailableTool(raw) {
62
62
  };
63
63
  }
64
64
  var MCP_TOOL_PACKAGE_INDEX = new Map(
65
- chunkKK6HF3XF_cjs.allTools.map((tool) => [tool.name, "seastudio"])
65
+ chunk5OEF32AG_cjs.allTools.map((tool) => [tool.name, "seastudio"])
66
66
  );
67
67
  function getMCPToolPackageIndex() {
68
68
  return new Map(MCP_TOOL_PACKAGE_INDEX);
@@ -1,4 +1,4 @@
1
- import { allTools } from './chunk-ZDUIJOH2.js';
1
+ import { allTools } from './chunk-BRYHXO22.js';
2
2
  import { normalizeMCPTool, normalizeMCPToolObjectSchema, getDefaultClient } from './chunk-TJ3CGHWJ.js';
3
3
 
4
4
  // src/mcp/index.ts
package/dist/index.cjs CHANGED
@@ -1,51 +1,51 @@
1
1
  'use strict';
2
2
 
3
- var chunk7FYD7672_cjs = require('./chunk-7FYD7672.cjs');
3
+ var chunkF7ATDLVY_cjs = require('./chunk-F7ATDLVY.cjs');
4
4
  var chunk2L26XL3M_cjs = require('./chunk-2L26XL3M.cjs');
5
- var chunkKK6HF3XF_cjs = require('./chunk-KK6HF3XF.cjs');
5
+ var chunk5OEF32AG_cjs = require('./chunk-5OEF32AG.cjs');
6
6
  var chunk3I7UM66P_cjs = require('./chunk-3I7UM66P.cjs');
7
7
 
8
8
 
9
9
 
10
10
  Object.defineProperty(exports, "MCP_PACKAGES", {
11
11
  enumerable: true,
12
- get: function () { return chunk7FYD7672_cjs.MCP_PACKAGES; }
12
+ get: function () { return chunkF7ATDLVY_cjs.MCP_PACKAGES; }
13
13
  });
14
14
  Object.defineProperty(exports, "getMCPPackageIdForTool", {
15
15
  enumerable: true,
16
- get: function () { return chunk7FYD7672_cjs.getMCPPackageIdForTool; }
16
+ get: function () { return chunkF7ATDLVY_cjs.getMCPPackageIdForTool; }
17
17
  });
18
18
  Object.defineProperty(exports, "getMCPPackages", {
19
19
  enumerable: true,
20
- get: function () { return chunk7FYD7672_cjs.getMCPPackages; }
20
+ get: function () { return chunkF7ATDLVY_cjs.getMCPPackages; }
21
21
  });
22
22
  Object.defineProperty(exports, "getMCPToolPackageIndex", {
23
23
  enumerable: true,
24
- get: function () { return chunk7FYD7672_cjs.getMCPToolPackageIndex; }
24
+ get: function () { return chunkF7ATDLVY_cjs.getMCPToolPackageIndex; }
25
25
  });
26
26
  Object.defineProperty(exports, "getToolsForLLM", {
27
27
  enumerable: true,
28
- get: function () { return chunk7FYD7672_cjs.getToolsForLLM; }
28
+ get: function () { return chunkF7ATDLVY_cjs.getToolsForLLM; }
29
29
  });
30
30
  Object.defineProperty(exports, "listAllTools", {
31
31
  enumerable: true,
32
- get: function () { return chunk7FYD7672_cjs.listAllTools; }
32
+ get: function () { return chunkF7ATDLVY_cjs.listAllTools; }
33
33
  });
34
34
  Object.defineProperty(exports, "listAvailableTools", {
35
35
  enumerable: true,
36
- get: function () { return chunk7FYD7672_cjs.listAvailableTools; }
36
+ get: function () { return chunkF7ATDLVY_cjs.listAvailableTools; }
37
37
  });
38
38
  Object.defineProperty(exports, "listAvailableToolsForLLM", {
39
39
  enumerable: true,
40
- get: function () { return chunk7FYD7672_cjs.listAvailableToolsForLLM; }
40
+ get: function () { return chunkF7ATDLVY_cjs.listAvailableToolsForLLM; }
41
41
  });
42
42
  Object.defineProperty(exports, "loadPlugin", {
43
43
  enumerable: true,
44
- get: function () { return chunk7FYD7672_cjs.loadPlugin; }
44
+ get: function () { return chunkF7ATDLVY_cjs.loadPlugin; }
45
45
  });
46
46
  Object.defineProperty(exports, "mcpToolToOpenAI", {
47
47
  enumerable: true,
48
- get: function () { return chunk7FYD7672_cjs.mcpToolToOpenAI; }
48
+ get: function () { return chunkF7ATDLVY_cjs.mcpToolToOpenAI; }
49
49
  });
50
50
  Object.defineProperty(exports, "DialogBody", {
51
51
  enumerable: true,
@@ -101,51 +101,51 @@ Object.defineProperty(exports, "showHostContextMenu", {
101
101
  });
102
102
  Object.defineProperty(exports, "SeastudioNotifications", {
103
103
  enumerable: true,
104
- get: function () { return chunkKK6HF3XF_cjs.SeastudioNotifications; }
104
+ get: function () { return chunk5OEF32AG_cjs.SeastudioNotifications; }
105
105
  });
106
106
  Object.defineProperty(exports, "SeastudioRequests", {
107
107
  enumerable: true,
108
- get: function () { return chunkKK6HF3XF_cjs.SeastudioRequests; }
108
+ get: function () { return chunk5OEF32AG_cjs.SeastudioRequests; }
109
109
  });
110
110
  Object.defineProperty(exports, "agentManagementTools", {
111
111
  enumerable: true,
112
- get: function () { return chunkKK6HF3XF_cjs.agentManagementTools; }
112
+ get: function () { return chunk5OEF32AG_cjs.agentManagementTools; }
113
113
  });
114
114
  Object.defineProperty(exports, "agentTabTools", {
115
115
  enumerable: true,
116
- get: function () { return chunkKK6HF3XF_cjs.agentTabTools; }
116
+ get: function () { return chunk5OEF32AG_cjs.agentTabTools; }
117
117
  });
118
118
  Object.defineProperty(exports, "fileTools", {
119
119
  enumerable: true,
120
- get: function () { return chunkKK6HF3XF_cjs.fileTools; }
120
+ get: function () { return chunk5OEF32AG_cjs.fileTools; }
121
121
  });
122
122
  Object.defineProperty(exports, "pluginManagementTools", {
123
123
  enumerable: true,
124
- get: function () { return chunkKK6HF3XF_cjs.pluginManagementTools; }
124
+ get: function () { return chunk5OEF32AG_cjs.pluginManagementTools; }
125
125
  });
126
126
  Object.defineProperty(exports, "pluginTabTools", {
127
127
  enumerable: true,
128
- get: function () { return chunkKK6HF3XF_cjs.pluginTabTools; }
128
+ get: function () { return chunk5OEF32AG_cjs.pluginTabTools; }
129
129
  });
130
130
  Object.defineProperty(exports, "seaCloudTools", {
131
131
  enumerable: true,
132
- get: function () { return chunkKK6HF3XF_cjs.seaCloudTools; }
132
+ get: function () { return chunk5OEF32AG_cjs.seaCloudTools; }
133
133
  });
134
134
  Object.defineProperty(exports, "seastudio", {
135
135
  enumerable: true,
136
- get: function () { return chunkKK6HF3XF_cjs.seastudio; }
136
+ get: function () { return chunk5OEF32AG_cjs.seastudio; }
137
137
  });
138
138
  Object.defineProperty(exports, "seastudioAllTools", {
139
139
  enumerable: true,
140
- get: function () { return chunkKK6HF3XF_cjs.allTools; }
140
+ get: function () { return chunk5OEF32AG_cjs.allTools; }
141
141
  });
142
142
  Object.defineProperty(exports, "seastudioTools", {
143
143
  enumerable: true,
144
- get: function () { return chunkKK6HF3XF_cjs.tools; }
144
+ get: function () { return chunk5OEF32AG_cjs.tools; }
145
145
  });
146
146
  Object.defineProperty(exports, "shellTools", {
147
147
  enumerable: true,
148
- get: function () { return chunkKK6HF3XF_cjs.shellTools; }
148
+ get: function () { return chunk5OEF32AG_cjs.shellTools; }
149
149
  });
150
150
  Object.defineProperty(exports, "MCPClient", {
151
151
  enumerable: true,
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- export { MCP_PACKAGES, getMCPPackageIdForTool, getMCPPackages, getMCPToolPackageIndex, getToolsForLLM, listAllTools, listAvailableTools, listAvailableToolsForLLM, loadPlugin, mcpToolToOpenAI } from './chunk-EHA26OJY.js';
1
+ export { MCP_PACKAGES, getMCPPackageIdForTool, getMCPPackages, getMCPToolPackageIndex, getToolsForLLM, listAllTools, listAvailableTools, listAvailableToolsForLLM, loadPlugin, mcpToolToOpenAI } from './chunk-QZTDCMJU.js';
2
2
  export { DialogBody, DialogButton, DialogContainer, DialogFooter, DialogHeader, DialogOverlay, MenuContainer, MenuEmpty, MenuItem, MenuSeparator, Tab, cn, showHostContextMenu } from './chunk-BIOX6KGR.js';
3
- export { SeastudioNotifications, SeastudioRequests, agentManagementTools, agentTabTools, fileTools, pluginManagementTools, pluginTabTools, seaCloudTools, seastudio, allTools as seastudioAllTools, tools as seastudioTools, shellTools } from './chunk-ZDUIJOH2.js';
3
+ export { SeastudioNotifications, SeastudioRequests, agentManagementTools, agentTabTools, fileTools, pluginManagementTools, pluginTabTools, seaCloudTools, seastudio, allTools as seastudioAllTools, tools as seastudioTools, shellTools } from './chunk-BRYHXO22.js';
4
4
  export { MCPClient, MCPServer, PostMessageTransport, callHostTool, callHostToolText, createMCPClient, createMCPServer, createNotification, createRequest, createResponse, getDefaultClient, getDefaultServer, getDefaultTransport, isMCPMessage, isNotification, normalizeMCPTool, normalizeMCPToolInputSchema, normalizeMCPToolObjectSchema, setDefaultClient, setDefaultTransport, startDefaultServer } from './chunk-TJ3CGHWJ.js';
@@ -1,98 +1,98 @@
1
1
  'use strict';
2
2
 
3
- var chunk7FYD7672_cjs = require('../chunk-7FYD7672.cjs');
4
- var chunkKK6HF3XF_cjs = require('../chunk-KK6HF3XF.cjs');
3
+ var chunkF7ATDLVY_cjs = require('../chunk-F7ATDLVY.cjs');
4
+ var chunk5OEF32AG_cjs = require('../chunk-5OEF32AG.cjs');
5
5
  var chunk3I7UM66P_cjs = require('../chunk-3I7UM66P.cjs');
6
6
 
7
7
 
8
8
 
9
9
  Object.defineProperty(exports, "MCP_PACKAGES", {
10
10
  enumerable: true,
11
- get: function () { return chunk7FYD7672_cjs.MCP_PACKAGES; }
11
+ get: function () { return chunkF7ATDLVY_cjs.MCP_PACKAGES; }
12
12
  });
13
13
  Object.defineProperty(exports, "getMCPPackageIdForTool", {
14
14
  enumerable: true,
15
- get: function () { return chunk7FYD7672_cjs.getMCPPackageIdForTool; }
15
+ get: function () { return chunkF7ATDLVY_cjs.getMCPPackageIdForTool; }
16
16
  });
17
17
  Object.defineProperty(exports, "getMCPPackages", {
18
18
  enumerable: true,
19
- get: function () { return chunk7FYD7672_cjs.getMCPPackages; }
19
+ get: function () { return chunkF7ATDLVY_cjs.getMCPPackages; }
20
20
  });
21
21
  Object.defineProperty(exports, "getMCPToolPackageIndex", {
22
22
  enumerable: true,
23
- get: function () { return chunk7FYD7672_cjs.getMCPToolPackageIndex; }
23
+ get: function () { return chunkF7ATDLVY_cjs.getMCPToolPackageIndex; }
24
24
  });
25
25
  Object.defineProperty(exports, "getToolsForLLM", {
26
26
  enumerable: true,
27
- get: function () { return chunk7FYD7672_cjs.getToolsForLLM; }
27
+ get: function () { return chunkF7ATDLVY_cjs.getToolsForLLM; }
28
28
  });
29
29
  Object.defineProperty(exports, "listAllTools", {
30
30
  enumerable: true,
31
- get: function () { return chunk7FYD7672_cjs.listAllTools; }
31
+ get: function () { return chunkF7ATDLVY_cjs.listAllTools; }
32
32
  });
33
33
  Object.defineProperty(exports, "listAvailableTools", {
34
34
  enumerable: true,
35
- get: function () { return chunk7FYD7672_cjs.listAvailableTools; }
35
+ get: function () { return chunkF7ATDLVY_cjs.listAvailableTools; }
36
36
  });
37
37
  Object.defineProperty(exports, "listAvailableToolsForLLM", {
38
38
  enumerable: true,
39
- get: function () { return chunk7FYD7672_cjs.listAvailableToolsForLLM; }
39
+ get: function () { return chunkF7ATDLVY_cjs.listAvailableToolsForLLM; }
40
40
  });
41
41
  Object.defineProperty(exports, "loadPlugin", {
42
42
  enumerable: true,
43
- get: function () { return chunk7FYD7672_cjs.loadPlugin; }
43
+ get: function () { return chunkF7ATDLVY_cjs.loadPlugin; }
44
44
  });
45
45
  Object.defineProperty(exports, "mcpToolToOpenAI", {
46
46
  enumerable: true,
47
- get: function () { return chunk7FYD7672_cjs.mcpToolToOpenAI; }
47
+ get: function () { return chunkF7ATDLVY_cjs.mcpToolToOpenAI; }
48
48
  });
49
49
  Object.defineProperty(exports, "SeastudioNotifications", {
50
50
  enumerable: true,
51
- get: function () { return chunkKK6HF3XF_cjs.SeastudioNotifications; }
51
+ get: function () { return chunk5OEF32AG_cjs.SeastudioNotifications; }
52
52
  });
53
53
  Object.defineProperty(exports, "SeastudioRequests", {
54
54
  enumerable: true,
55
- get: function () { return chunkKK6HF3XF_cjs.SeastudioRequests; }
55
+ get: function () { return chunk5OEF32AG_cjs.SeastudioRequests; }
56
56
  });
57
57
  Object.defineProperty(exports, "agentManagementTools", {
58
58
  enumerable: true,
59
- get: function () { return chunkKK6HF3XF_cjs.agentManagementTools; }
59
+ get: function () { return chunk5OEF32AG_cjs.agentManagementTools; }
60
60
  });
61
61
  Object.defineProperty(exports, "agentTabTools", {
62
62
  enumerable: true,
63
- get: function () { return chunkKK6HF3XF_cjs.agentTabTools; }
63
+ get: function () { return chunk5OEF32AG_cjs.agentTabTools; }
64
64
  });
65
65
  Object.defineProperty(exports, "fileTools", {
66
66
  enumerable: true,
67
- get: function () { return chunkKK6HF3XF_cjs.fileTools; }
67
+ get: function () { return chunk5OEF32AG_cjs.fileTools; }
68
68
  });
69
69
  Object.defineProperty(exports, "pluginManagementTools", {
70
70
  enumerable: true,
71
- get: function () { return chunkKK6HF3XF_cjs.pluginManagementTools; }
71
+ get: function () { return chunk5OEF32AG_cjs.pluginManagementTools; }
72
72
  });
73
73
  Object.defineProperty(exports, "pluginTabTools", {
74
74
  enumerable: true,
75
- get: function () { return chunkKK6HF3XF_cjs.pluginTabTools; }
75
+ get: function () { return chunk5OEF32AG_cjs.pluginTabTools; }
76
76
  });
77
77
  Object.defineProperty(exports, "seaCloudTools", {
78
78
  enumerable: true,
79
- get: function () { return chunkKK6HF3XF_cjs.seaCloudTools; }
79
+ get: function () { return chunk5OEF32AG_cjs.seaCloudTools; }
80
80
  });
81
81
  Object.defineProperty(exports, "seastudio", {
82
82
  enumerable: true,
83
- get: function () { return chunkKK6HF3XF_cjs.seastudio; }
83
+ get: function () { return chunk5OEF32AG_cjs.seastudio; }
84
84
  });
85
85
  Object.defineProperty(exports, "seastudioAllTools", {
86
86
  enumerable: true,
87
- get: function () { return chunkKK6HF3XF_cjs.allTools; }
87
+ get: function () { return chunk5OEF32AG_cjs.allTools; }
88
88
  });
89
89
  Object.defineProperty(exports, "seastudioTools", {
90
90
  enumerable: true,
91
- get: function () { return chunkKK6HF3XF_cjs.tools; }
91
+ get: function () { return chunk5OEF32AG_cjs.tools; }
92
92
  });
93
93
  Object.defineProperty(exports, "shellTools", {
94
94
  enumerable: true,
95
- get: function () { return chunkKK6HF3XF_cjs.shellTools; }
95
+ get: function () { return chunk5OEF32AG_cjs.shellTools; }
96
96
  });
97
97
  Object.defineProperty(exports, "MCPClient", {
98
98
  enumerable: true,
package/dist/mcp/index.js CHANGED
@@ -1,3 +1,3 @@
1
- export { MCP_PACKAGES, getMCPPackageIdForTool, getMCPPackages, getMCPToolPackageIndex, getToolsForLLM, listAllTools, listAvailableTools, listAvailableToolsForLLM, loadPlugin, mcpToolToOpenAI } from '../chunk-EHA26OJY.js';
2
- export { SeastudioNotifications, SeastudioRequests, agentManagementTools, agentTabTools, fileTools, pluginManagementTools, pluginTabTools, seaCloudTools, seastudio, allTools as seastudioAllTools, tools as seastudioTools, shellTools } from '../chunk-ZDUIJOH2.js';
1
+ export { MCP_PACKAGES, getMCPPackageIdForTool, getMCPPackages, getMCPToolPackageIndex, getToolsForLLM, listAllTools, listAvailableTools, listAvailableToolsForLLM, loadPlugin, mcpToolToOpenAI } from '../chunk-QZTDCMJU.js';
2
+ export { SeastudioNotifications, SeastudioRequests, agentManagementTools, agentTabTools, fileTools, pluginManagementTools, pluginTabTools, seaCloudTools, seastudio, allTools as seastudioAllTools, tools as seastudioTools, shellTools } from '../chunk-BRYHXO22.js';
3
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-TJ3CGHWJ.js';
@@ -1,143 +1,147 @@
1
1
  'use strict';
2
2
 
3
- var chunkKK6HF3XF_cjs = require('../../chunk-KK6HF3XF.cjs');
3
+ var chunk5OEF32AG_cjs = require('../../chunk-5OEF32AG.cjs');
4
4
  require('../../chunk-3I7UM66P.cjs');
5
5
 
6
6
 
7
7
 
8
8
  Object.defineProperty(exports, "SINGLETON_BROWSER_SESSION_ID", {
9
9
  enumerable: true,
10
- get: function () { return chunkKK6HF3XF_cjs.SINGLETON_BROWSER_SESSION_ID; }
10
+ get: function () { return chunk5OEF32AG_cjs.SINGLETON_BROWSER_SESSION_ID; }
11
11
  });
12
12
  Object.defineProperty(exports, "SeastudioNotifications", {
13
13
  enumerable: true,
14
- get: function () { return chunkKK6HF3XF_cjs.SeastudioNotifications; }
14
+ get: function () { return chunk5OEF32AG_cjs.SeastudioNotifications; }
15
15
  });
16
16
  Object.defineProperty(exports, "SeastudioRequests", {
17
17
  enumerable: true,
18
- get: function () { return chunkKK6HF3XF_cjs.SeastudioRequests; }
18
+ get: function () { return chunk5OEF32AG_cjs.SeastudioRequests; }
19
19
  });
20
20
  Object.defineProperty(exports, "agentManagementTools", {
21
21
  enumerable: true,
22
- get: function () { return chunkKK6HF3XF_cjs.agentManagementTools; }
22
+ get: function () { return chunk5OEF32AG_cjs.agentManagementTools; }
23
23
  });
24
24
  Object.defineProperty(exports, "agentTabTools", {
25
25
  enumerable: true,
26
- get: function () { return chunkKK6HF3XF_cjs.agentTabTools; }
26
+ get: function () { return chunk5OEF32AG_cjs.agentTabTools; }
27
27
  });
28
28
  Object.defineProperty(exports, "allTools", {
29
29
  enumerable: true,
30
- get: function () { return chunkKK6HF3XF_cjs.allTools; }
30
+ get: function () { return chunk5OEF32AG_cjs.allTools; }
31
31
  });
32
32
  Object.defineProperty(exports, "annotateTool", {
33
33
  enumerable: true,
34
- get: function () { return chunkKK6HF3XF_cjs.annotateTool; }
34
+ get: function () { return chunk5OEF32AG_cjs.annotateTool; }
35
35
  });
36
36
  Object.defineProperty(exports, "batchFlattenCopyEvidenceOutputSchema", {
37
37
  enumerable: true,
38
- get: function () { return chunkKK6HF3XF_cjs.batchFlattenCopyEvidenceOutputSchema; }
38
+ get: function () { return chunk5OEF32AG_cjs.batchFlattenCopyEvidenceOutputSchema; }
39
39
  });
40
40
  Object.defineProperty(exports, "browserRuntimeTools", {
41
41
  enumerable: true,
42
- get: function () { return chunkKK6HF3XF_cjs.browserRuntimeTools; }
42
+ get: function () { return chunk5OEF32AG_cjs.browserRuntimeTools; }
43
43
  });
44
44
  Object.defineProperty(exports, "callTool", {
45
45
  enumerable: true,
46
- get: function () { return chunkKK6HF3XF_cjs.callTool; }
46
+ get: function () { return chunk5OEF32AG_cjs.callTool; }
47
47
  });
48
48
  Object.defineProperty(exports, "callToolText", {
49
49
  enumerable: true,
50
- get: function () { return chunkKK6HF3XF_cjs.callToolText; }
50
+ get: function () { return chunk5OEF32AG_cjs.callToolText; }
51
51
  });
52
52
  Object.defineProperty(exports, "dualPathEvidenceOutputSchema", {
53
53
  enumerable: true,
54
- get: function () { return chunkKK6HF3XF_cjs.dualPathEvidenceOutputSchema; }
54
+ get: function () { return chunk5OEF32AG_cjs.dualPathEvidenceOutputSchema; }
55
55
  });
56
56
  Object.defineProperty(exports, "editorTools", {
57
57
  enumerable: true,
58
- get: function () { return chunkKK6HF3XF_cjs.editorTools; }
58
+ get: function () { return chunk5OEF32AG_cjs.editorTools; }
59
59
  });
60
60
  Object.defineProperty(exports, "fileDownloadEvidenceOutputSchema", {
61
61
  enumerable: true,
62
- get: function () { return chunkKK6HF3XF_cjs.fileDownloadEvidenceOutputSchema; }
62
+ get: function () { return chunk5OEF32AG_cjs.fileDownloadEvidenceOutputSchema; }
63
+ });
64
+ Object.defineProperty(exports, "fileSaveAsEvidenceOutputSchema", {
65
+ enumerable: true,
66
+ get: function () { return chunk5OEF32AG_cjs.fileSaveAsEvidenceOutputSchema; }
63
67
  });
64
68
  Object.defineProperty(exports, "fileTools", {
65
69
  enumerable: true,
66
- get: function () { return chunkKK6HF3XF_cjs.fileTools; }
70
+ get: function () { return chunk5OEF32AG_cjs.fileTools; }
67
71
  });
68
72
  Object.defineProperty(exports, "fileUrlEvidenceOutputSchema", {
69
73
  enumerable: true,
70
- get: function () { return chunkKK6HF3XF_cjs.fileUrlEvidenceOutputSchema; }
74
+ get: function () { return chunk5OEF32AG_cjs.fileUrlEvidenceOutputSchema; }
71
75
  });
72
76
  Object.defineProperty(exports, "gitTools", {
73
77
  enumerable: true,
74
- get: function () { return chunkKK6HF3XF_cjs.gitTools; }
78
+ get: function () { return chunk5OEF32AG_cjs.gitTools; }
75
79
  });
76
80
  Object.defineProperty(exports, "pluginManagementTools", {
77
81
  enumerable: true,
78
- get: function () { return chunkKK6HF3XF_cjs.pluginManagementTools; }
82
+ get: function () { return chunk5OEF32AG_cjs.pluginManagementTools; }
79
83
  });
80
84
  Object.defineProperty(exports, "pluginTabTools", {
81
85
  enumerable: true,
82
- get: function () { return chunkKK6HF3XF_cjs.pluginTabTools; }
86
+ get: function () { return chunk5OEF32AG_cjs.pluginTabTools; }
83
87
  });
84
88
  Object.defineProperty(exports, "projectTools", {
85
89
  enumerable: true,
86
- get: function () { return chunkKK6HF3XF_cjs.projectTools; }
90
+ get: function () { return chunk5OEF32AG_cjs.projectTools; }
87
91
  });
88
92
  Object.defineProperty(exports, "request", {
89
93
  enumerable: true,
90
- get: function () { return chunkKK6HF3XF_cjs.request; }
94
+ get: function () { return chunk5OEF32AG_cjs.request; }
91
95
  });
92
96
  Object.defineProperty(exports, "rootedPathEvidenceOutputSchema", {
93
97
  enumerable: true,
94
- get: function () { return chunkKK6HF3XF_cjs.rootedPathEvidenceOutputSchema; }
98
+ get: function () { return chunk5OEF32AG_cjs.rootedPathEvidenceOutputSchema; }
95
99
  });
96
100
  Object.defineProperty(exports, "rootedWriteEvidenceOutputSchema", {
97
101
  enumerable: true,
98
- get: function () { return chunkKK6HF3XF_cjs.rootedWriteEvidenceOutputSchema; }
102
+ get: function () { return chunk5OEF32AG_cjs.rootedWriteEvidenceOutputSchema; }
99
103
  });
100
104
  Object.defineProperty(exports, "runOneShotShellCommand", {
101
105
  enumerable: true,
102
- get: function () { return chunkKK6HF3XF_cjs.runOneShotShellCommand; }
106
+ get: function () { return chunk5OEF32AG_cjs.runOneShotShellCommand; }
103
107
  });
104
108
  Object.defineProperty(exports, "seaCloudTools", {
105
109
  enumerable: true,
106
- get: function () { return chunkKK6HF3XF_cjs.seaCloudTools; }
110
+ get: function () { return chunk5OEF32AG_cjs.seaCloudTools; }
107
111
  });
108
112
  Object.defineProperty(exports, "seastudio", {
109
113
  enumerable: true,
110
- get: function () { return chunkKK6HF3XF_cjs.seastudio; }
114
+ get: function () { return chunk5OEF32AG_cjs.seastudio; }
111
115
  });
112
116
  Object.defineProperty(exports, "shellSessionCloseEvidenceOutputSchema", {
113
117
  enumerable: true,
114
- get: function () { return chunkKK6HF3XF_cjs.shellSessionCloseEvidenceOutputSchema; }
118
+ get: function () { return chunk5OEF32AG_cjs.shellSessionCloseEvidenceOutputSchema; }
115
119
  });
116
120
  Object.defineProperty(exports, "shellSessionOpenEvidenceOutputSchema", {
117
121
  enumerable: true,
118
- get: function () { return chunkKK6HF3XF_cjs.shellSessionOpenEvidenceOutputSchema; }
122
+ get: function () { return chunk5OEF32AG_cjs.shellSessionOpenEvidenceOutputSchema; }
119
123
  });
120
124
  Object.defineProperty(exports, "shellSessionRunEvidenceOutputSchema", {
121
125
  enumerable: true,
122
- get: function () { return chunkKK6HF3XF_cjs.shellSessionRunEvidenceOutputSchema; }
126
+ get: function () { return chunk5OEF32AG_cjs.shellSessionRunEvidenceOutputSchema; }
123
127
  });
124
128
  Object.defineProperty(exports, "shellSessionSignalEvidenceOutputSchema", {
125
129
  enumerable: true,
126
- get: function () { return chunkKK6HF3XF_cjs.shellSessionSignalEvidenceOutputSchema; }
130
+ get: function () { return chunk5OEF32AG_cjs.shellSessionSignalEvidenceOutputSchema; }
127
131
  });
128
132
  Object.defineProperty(exports, "shellSessionSnapshotEvidenceOutputSchema", {
129
133
  enumerable: true,
130
- get: function () { return chunkKK6HF3XF_cjs.shellSessionSnapshotEvidenceOutputSchema; }
134
+ get: function () { return chunk5OEF32AG_cjs.shellSessionSnapshotEvidenceOutputSchema; }
131
135
  });
132
136
  Object.defineProperty(exports, "shellTools", {
133
137
  enumerable: true,
134
- get: function () { return chunkKK6HF3XF_cjs.shellTools; }
138
+ get: function () { return chunk5OEF32AG_cjs.shellTools; }
135
139
  });
136
140
  Object.defineProperty(exports, "skillTools", {
137
141
  enumerable: true,
138
- get: function () { return chunkKK6HF3XF_cjs.skillTools; }
142
+ get: function () { return chunk5OEF32AG_cjs.skillTools; }
139
143
  });
140
144
  Object.defineProperty(exports, "tools", {
141
145
  enumerable: true,
142
- get: function () { return chunkKK6HF3XF_cjs.tools; }
146
+ get: function () { return chunk5OEF32AG_cjs.tools; }
143
147
  });
@@ -61,6 +61,7 @@ declare const rootedWriteEvidenceOutputSchema: MCPToolInputSchema;
61
61
  declare const dualPathEvidenceOutputSchema: MCPToolInputSchema;
62
62
  declare const batchFlattenCopyEvidenceOutputSchema: MCPToolInputSchema;
63
63
  declare const fileDownloadEvidenceOutputSchema: MCPToolInputSchema;
64
+ declare const fileSaveAsEvidenceOutputSchema: MCPToolInputSchema;
64
65
  declare const fileUrlEvidenceOutputSchema: MCPToolInputSchema;
65
66
  declare const shellSessionSnapshotEvidenceOutputSchema: MCPToolInputSchema;
66
67
  declare const shellSessionOpenEvidenceOutputSchema: MCPToolInputSchema;
@@ -163,6 +164,12 @@ interface SeastudioFileDownloadOptions {
163
164
  /** 若设置则下载到该本地绝对目录(可含 ~),忽略 path 与 rootId */
164
165
  absoluteDir?: string;
165
166
  }
167
+ interface SeastudioFileSaveAsOptions extends SeastudioSinglePathOptions {
168
+ /** 原生保存对话框的默认文件名或路径 */
169
+ defaultPath?: string;
170
+ /** 原生保存对话框标题 */
171
+ title?: string;
172
+ }
166
173
  interface SeastudioFileSearchOptions {
167
174
  rootId?: SeastudioFilesystemRootId;
168
175
  path?: string;
@@ -379,6 +386,7 @@ declare const seastudio: {
379
386
  batchFlattenCopy: (sourcePath: string, destDir: string, taskId?: string, options?: SeastudioBatchFlattenCopyOptions) => Promise<MCPToolResult>;
380
387
  getUrl: (path: string, options?: SeastudioSinglePathOptions) => Promise<MCPToolResult>;
381
388
  download: (url: string, path: string, filenameHint?: string, options?: SeastudioFileDownloadOptions) => Promise<MCPToolResult>;
389
+ saveAs: (path: string, options?: SeastudioFileSaveAsOptions) => Promise<MCPToolResult>;
382
390
  writeBinary: (path: string, base64: string, options?: SeastudioSinglePathOptions) => Promise<MCPToolResult>;
383
391
  readBinary: (path: string, options?: SeastudioSinglePathOptions) => Promise<MCPToolResult>;
384
392
  };
@@ -672,6 +680,11 @@ declare const SeastudioNotifications: {
672
680
  * 通过 notifications/publish + publishTo 定向到对应 Agent 实例。
673
681
  */
674
682
  readonly SESSION_DELETE_REQUESTED: "session:delete_requested";
683
+ /**
684
+ * SeaStudio 主窗口前后台变化(blur/focus)。
685
+ * Agent 订阅后同步后端 host visibility,用于 session 完成 unread 策略。
686
+ */
687
+ readonly HOST_APP_VISIBILITY: "host:app_visibility";
675
688
  };
676
689
 
677
690
  /** 项目根在 MCP 文件工具中的寻址 id;browser 表示 URL 资源根 */
@@ -922,7 +935,7 @@ interface SessionCreatedParams extends SessionNotificationBase {
922
935
  /** 可选:状态文案,供 tooltip 展示 */
923
936
  statusLabel?: string;
924
937
  }
925
- type SessionSelectedReason = 'user' | 'agent' | 'host' | 'host_restore';
938
+ type SessionSelectedReason = 'user' | 'agent' | 'host' | 'host_restore' | 'host_foreground';
926
939
  interface SessionSelectedParams extends Omit<SessionNotificationBase, 'sessionId'> {
927
940
  /** Agent 侧对话 session 标识;null 表示进入无会话状态 */
928
941
  sessionId: string | null;
@@ -989,6 +1002,13 @@ interface SessionDeleteRequestedParams {
989
1002
  projectId?: string;
990
1003
  reason?: 'host_sidebar';
991
1004
  }
1005
+ /** 宿主主窗口前后台变化(blur/focus) */
1006
+ interface HostAppVisibilityParams {
1007
+ agentInstanceId: string;
1008
+ projectId?: string;
1009
+ /** true = focus/前台,false = blur/后台 */
1010
+ foreground: boolean;
1011
+ }
992
1012
 
993
1013
  /**
994
1014
  * SeaStudio MCP Module
@@ -999,4 +1019,4 @@ interface SessionDeleteRequestedParams {
999
1019
  declare const allTools: MCPTool[];
1000
1020
  declare const tools: MCPTool[];
1001
1021
 
1002
- export { type AgentInstanceSessionSnapshot, type FileDeletedParams, type FileKeepRequestedParams, type FileModifiedParams, type FileOpenRequestedParams, type FileRenamedParams, type FileSavedParams, type FileSelectedParams, type FileSendRequestedParams, type FileTransferRequestedParams, type FilesChangedParams, type GitChangeKind, type GitChangedParams, type GitFileChange, type GitLineChange, type GitLineChangeKind, type GitOpenDiffRequestedParams, type GitStatusResult, type GitSummary, type PluginTabTitleChangedParams, type ProposalChangedParams, type ProposalFeedbackFileSummary, type ProposalFeedbackHunk, type ProposalFeedbackOrigin, type ProposalFeedbackParams, type ProposalRecord, type ProposalRequestedFile, type ProposalRequestedHunk, type ProposalRequestedParams, type ProposalStatus, type RootsChangedParams, SINGLETON_BROWSER_SESSION_ID, type SeastudioBatchFlattenCopyOptions, type SeastudioBatchFlattenPreviewOptions, type SeastudioBrowserCertificateError, type SeastudioBrowserRect, type SeastudioBrowserSession, type SeastudioBrowserSessionOpenOptions, type SeastudioBrowserState, type SeastudioBrowserStatus, type SeastudioBrowserTab, type SeastudioBrowserViewportBinding, type SeastudioDragDropParams, type SeastudioDragEnterParams, type SeastudioDragFileData, type SeastudioDragRootId, type SeastudioDragStartParams, type SeastudioEditorProposalAction, type SeastudioEditorProposalOptions, type SeastudioEditorProposeOptions, type SeastudioFileDownloadOptions, type SeastudioFileInfo, type SeastudioFileInfoOptions, type SeastudioFileListOptions, type SeastudioFileReadOptions, type SeastudioFileSearchMatch, type SeastudioFileSearchOptions, type SeastudioFileTransferOptions, type SeastudioFileTreeOptions, type SeastudioFileWriteOptions, type SeastudioFilesystemRoot, type SeastudioFilesystemRootId, SeastudioNotifications, type SeastudioProjectInfo, type SeastudioProposalFile, type SeastudioProposalHunk, SeastudioRequests, type SeastudioRootId, type SeastudioShellCloseResult, type SeastudioShellEntry, type SeastudioShellEntryLevel, type SeastudioShellGetEntriesOptions, type SeastudioShellGetEntriesResult, type SeastudioShellKind, type SeastudioShellOneShotResult, type SeastudioShellOpenOptions, type SeastudioShellRunOptions, type SeastudioShellRunResult, type SeastudioShellSession, type SeastudioShellSignalResult, type SeastudioShellWaitResult, type SeastudioSinglePathOptions, type SeastudioWorkspacePathMode, type SeastudioWriteReviewMode, type SessionCreatedParams, type SessionDeleteRequestedParams, type SessionNewRequestedParams, type SessionNotificationBase, type SessionRemovedParams, type SessionSelectedParams, type SessionSelectedReason, type SessionSnapshotItem, type SessionStateSnapshotParams, type SessionStatus, type SessionStatusParams, type SessionSummaryParams, type TextSendRequestedParams, type TextSendRequestedSelectionRange, type TextSendRequestedSource, agentManagementTools, agentTabTools, allTools, annotateTool, batchFlattenCopyEvidenceOutputSchema, browserRuntimeTools, callTool, callToolText, dualPathEvidenceOutputSchema, editorTools, fileDownloadEvidenceOutputSchema, fileTools, fileUrlEvidenceOutputSchema, gitTools, pluginManagementTools, pluginTabTools, projectTools, request, rootedPathEvidenceOutputSchema, rootedWriteEvidenceOutputSchema, runOneShotShellCommand, seaCloudTools, seastudio, shellSessionCloseEvidenceOutputSchema, shellSessionOpenEvidenceOutputSchema, shellSessionRunEvidenceOutputSchema, shellSessionSignalEvidenceOutputSchema, shellSessionSnapshotEvidenceOutputSchema, shellTools, skillTools, tools };
1022
+ export { type AgentInstanceSessionSnapshot, type FileDeletedParams, type FileKeepRequestedParams, type FileModifiedParams, type FileOpenRequestedParams, type FileRenamedParams, type FileSavedParams, type FileSelectedParams, type FileSendRequestedParams, type FileTransferRequestedParams, type FilesChangedParams, type GitChangeKind, type GitChangedParams, type GitFileChange, type GitLineChange, type GitLineChangeKind, type GitOpenDiffRequestedParams, type GitStatusResult, type GitSummary, type HostAppVisibilityParams, type PluginTabTitleChangedParams, type ProposalChangedParams, type ProposalFeedbackFileSummary, type ProposalFeedbackHunk, type ProposalFeedbackOrigin, type ProposalFeedbackParams, type ProposalRecord, type ProposalRequestedFile, type ProposalRequestedHunk, type ProposalRequestedParams, type ProposalStatus, type RootsChangedParams, SINGLETON_BROWSER_SESSION_ID, type SeastudioBatchFlattenCopyOptions, type SeastudioBatchFlattenPreviewOptions, type SeastudioBrowserCertificateError, type SeastudioBrowserRect, type SeastudioBrowserSession, type SeastudioBrowserSessionOpenOptions, type SeastudioBrowserState, type SeastudioBrowserStatus, type SeastudioBrowserTab, type SeastudioBrowserViewportBinding, type SeastudioDragDropParams, type SeastudioDragEnterParams, type SeastudioDragFileData, type SeastudioDragRootId, type SeastudioDragStartParams, type SeastudioEditorProposalAction, type SeastudioEditorProposalOptions, type SeastudioEditorProposeOptions, type SeastudioFileDownloadOptions, type SeastudioFileInfo, type SeastudioFileInfoOptions, type SeastudioFileListOptions, type SeastudioFileReadOptions, type SeastudioFileSaveAsOptions, type SeastudioFileSearchMatch, type SeastudioFileSearchOptions, type SeastudioFileTransferOptions, type SeastudioFileTreeOptions, type SeastudioFileWriteOptions, type SeastudioFilesystemRoot, type SeastudioFilesystemRootId, SeastudioNotifications, type SeastudioProjectInfo, type SeastudioProposalFile, type SeastudioProposalHunk, SeastudioRequests, type SeastudioRootId, type SeastudioShellCloseResult, type SeastudioShellEntry, type SeastudioShellEntryLevel, type SeastudioShellGetEntriesOptions, type SeastudioShellGetEntriesResult, type SeastudioShellKind, type SeastudioShellOneShotResult, type SeastudioShellOpenOptions, type SeastudioShellRunOptions, type SeastudioShellRunResult, type SeastudioShellSession, type SeastudioShellSignalResult, type SeastudioShellWaitResult, type SeastudioSinglePathOptions, type SeastudioWorkspacePathMode, type SeastudioWriteReviewMode, type SessionCreatedParams, type SessionDeleteRequestedParams, type SessionNewRequestedParams, type SessionNotificationBase, type SessionRemovedParams, type SessionSelectedParams, type SessionSelectedReason, type SessionSnapshotItem, type SessionStateSnapshotParams, type SessionStatus, type SessionStatusParams, type SessionSummaryParams, type TextSendRequestedParams, type TextSendRequestedSelectionRange, type TextSendRequestedSource, agentManagementTools, agentTabTools, allTools, annotateTool, batchFlattenCopyEvidenceOutputSchema, browserRuntimeTools, callTool, callToolText, dualPathEvidenceOutputSchema, editorTools, fileDownloadEvidenceOutputSchema, fileSaveAsEvidenceOutputSchema, fileTools, fileUrlEvidenceOutputSchema, gitTools, pluginManagementTools, pluginTabTools, projectTools, request, rootedPathEvidenceOutputSchema, rootedWriteEvidenceOutputSchema, runOneShotShellCommand, seaCloudTools, seastudio, shellSessionCloseEvidenceOutputSchema, shellSessionOpenEvidenceOutputSchema, shellSessionRunEvidenceOutputSchema, shellSessionSignalEvidenceOutputSchema, shellSessionSnapshotEvidenceOutputSchema, shellTools, skillTools, tools };
@@ -61,6 +61,7 @@ declare const rootedWriteEvidenceOutputSchema: MCPToolInputSchema;
61
61
  declare const dualPathEvidenceOutputSchema: MCPToolInputSchema;
62
62
  declare const batchFlattenCopyEvidenceOutputSchema: MCPToolInputSchema;
63
63
  declare const fileDownloadEvidenceOutputSchema: MCPToolInputSchema;
64
+ declare const fileSaveAsEvidenceOutputSchema: MCPToolInputSchema;
64
65
  declare const fileUrlEvidenceOutputSchema: MCPToolInputSchema;
65
66
  declare const shellSessionSnapshotEvidenceOutputSchema: MCPToolInputSchema;
66
67
  declare const shellSessionOpenEvidenceOutputSchema: MCPToolInputSchema;
@@ -163,6 +164,12 @@ interface SeastudioFileDownloadOptions {
163
164
  /** 若设置则下载到该本地绝对目录(可含 ~),忽略 path 与 rootId */
164
165
  absoluteDir?: string;
165
166
  }
167
+ interface SeastudioFileSaveAsOptions extends SeastudioSinglePathOptions {
168
+ /** 原生保存对话框的默认文件名或路径 */
169
+ defaultPath?: string;
170
+ /** 原生保存对话框标题 */
171
+ title?: string;
172
+ }
166
173
  interface SeastudioFileSearchOptions {
167
174
  rootId?: SeastudioFilesystemRootId;
168
175
  path?: string;
@@ -379,6 +386,7 @@ declare const seastudio: {
379
386
  batchFlattenCopy: (sourcePath: string, destDir: string, taskId?: string, options?: SeastudioBatchFlattenCopyOptions) => Promise<MCPToolResult>;
380
387
  getUrl: (path: string, options?: SeastudioSinglePathOptions) => Promise<MCPToolResult>;
381
388
  download: (url: string, path: string, filenameHint?: string, options?: SeastudioFileDownloadOptions) => Promise<MCPToolResult>;
389
+ saveAs: (path: string, options?: SeastudioFileSaveAsOptions) => Promise<MCPToolResult>;
382
390
  writeBinary: (path: string, base64: string, options?: SeastudioSinglePathOptions) => Promise<MCPToolResult>;
383
391
  readBinary: (path: string, options?: SeastudioSinglePathOptions) => Promise<MCPToolResult>;
384
392
  };
@@ -672,6 +680,11 @@ declare const SeastudioNotifications: {
672
680
  * 通过 notifications/publish + publishTo 定向到对应 Agent 实例。
673
681
  */
674
682
  readonly SESSION_DELETE_REQUESTED: "session:delete_requested";
683
+ /**
684
+ * SeaStudio 主窗口前后台变化(blur/focus)。
685
+ * Agent 订阅后同步后端 host visibility,用于 session 完成 unread 策略。
686
+ */
687
+ readonly HOST_APP_VISIBILITY: "host:app_visibility";
675
688
  };
676
689
 
677
690
  /** 项目根在 MCP 文件工具中的寻址 id;browser 表示 URL 资源根 */
@@ -922,7 +935,7 @@ interface SessionCreatedParams extends SessionNotificationBase {
922
935
  /** 可选:状态文案,供 tooltip 展示 */
923
936
  statusLabel?: string;
924
937
  }
925
- type SessionSelectedReason = 'user' | 'agent' | 'host' | 'host_restore';
938
+ type SessionSelectedReason = 'user' | 'agent' | 'host' | 'host_restore' | 'host_foreground';
926
939
  interface SessionSelectedParams extends Omit<SessionNotificationBase, 'sessionId'> {
927
940
  /** Agent 侧对话 session 标识;null 表示进入无会话状态 */
928
941
  sessionId: string | null;
@@ -989,6 +1002,13 @@ interface SessionDeleteRequestedParams {
989
1002
  projectId?: string;
990
1003
  reason?: 'host_sidebar';
991
1004
  }
1005
+ /** 宿主主窗口前后台变化(blur/focus) */
1006
+ interface HostAppVisibilityParams {
1007
+ agentInstanceId: string;
1008
+ projectId?: string;
1009
+ /** true = focus/前台,false = blur/后台 */
1010
+ foreground: boolean;
1011
+ }
992
1012
 
993
1013
  /**
994
1014
  * SeaStudio MCP Module
@@ -999,4 +1019,4 @@ interface SessionDeleteRequestedParams {
999
1019
  declare const allTools: MCPTool[];
1000
1020
  declare const tools: MCPTool[];
1001
1021
 
1002
- export { type AgentInstanceSessionSnapshot, type FileDeletedParams, type FileKeepRequestedParams, type FileModifiedParams, type FileOpenRequestedParams, type FileRenamedParams, type FileSavedParams, type FileSelectedParams, type FileSendRequestedParams, type FileTransferRequestedParams, type FilesChangedParams, type GitChangeKind, type GitChangedParams, type GitFileChange, type GitLineChange, type GitLineChangeKind, type GitOpenDiffRequestedParams, type GitStatusResult, type GitSummary, type PluginTabTitleChangedParams, type ProposalChangedParams, type ProposalFeedbackFileSummary, type ProposalFeedbackHunk, type ProposalFeedbackOrigin, type ProposalFeedbackParams, type ProposalRecord, type ProposalRequestedFile, type ProposalRequestedHunk, type ProposalRequestedParams, type ProposalStatus, type RootsChangedParams, SINGLETON_BROWSER_SESSION_ID, type SeastudioBatchFlattenCopyOptions, type SeastudioBatchFlattenPreviewOptions, type SeastudioBrowserCertificateError, type SeastudioBrowserRect, type SeastudioBrowserSession, type SeastudioBrowserSessionOpenOptions, type SeastudioBrowserState, type SeastudioBrowserStatus, type SeastudioBrowserTab, type SeastudioBrowserViewportBinding, type SeastudioDragDropParams, type SeastudioDragEnterParams, type SeastudioDragFileData, type SeastudioDragRootId, type SeastudioDragStartParams, type SeastudioEditorProposalAction, type SeastudioEditorProposalOptions, type SeastudioEditorProposeOptions, type SeastudioFileDownloadOptions, type SeastudioFileInfo, type SeastudioFileInfoOptions, type SeastudioFileListOptions, type SeastudioFileReadOptions, type SeastudioFileSearchMatch, type SeastudioFileSearchOptions, type SeastudioFileTransferOptions, type SeastudioFileTreeOptions, type SeastudioFileWriteOptions, type SeastudioFilesystemRoot, type SeastudioFilesystemRootId, SeastudioNotifications, type SeastudioProjectInfo, type SeastudioProposalFile, type SeastudioProposalHunk, SeastudioRequests, type SeastudioRootId, type SeastudioShellCloseResult, type SeastudioShellEntry, type SeastudioShellEntryLevel, type SeastudioShellGetEntriesOptions, type SeastudioShellGetEntriesResult, type SeastudioShellKind, type SeastudioShellOneShotResult, type SeastudioShellOpenOptions, type SeastudioShellRunOptions, type SeastudioShellRunResult, type SeastudioShellSession, type SeastudioShellSignalResult, type SeastudioShellWaitResult, type SeastudioSinglePathOptions, type SeastudioWorkspacePathMode, type SeastudioWriteReviewMode, type SessionCreatedParams, type SessionDeleteRequestedParams, type SessionNewRequestedParams, type SessionNotificationBase, type SessionRemovedParams, type SessionSelectedParams, type SessionSelectedReason, type SessionSnapshotItem, type SessionStateSnapshotParams, type SessionStatus, type SessionStatusParams, type SessionSummaryParams, type TextSendRequestedParams, type TextSendRequestedSelectionRange, type TextSendRequestedSource, agentManagementTools, agentTabTools, allTools, annotateTool, batchFlattenCopyEvidenceOutputSchema, browserRuntimeTools, callTool, callToolText, dualPathEvidenceOutputSchema, editorTools, fileDownloadEvidenceOutputSchema, fileTools, fileUrlEvidenceOutputSchema, gitTools, pluginManagementTools, pluginTabTools, projectTools, request, rootedPathEvidenceOutputSchema, rootedWriteEvidenceOutputSchema, runOneShotShellCommand, seaCloudTools, seastudio, shellSessionCloseEvidenceOutputSchema, shellSessionOpenEvidenceOutputSchema, shellSessionRunEvidenceOutputSchema, shellSessionSignalEvidenceOutputSchema, shellSessionSnapshotEvidenceOutputSchema, shellTools, skillTools, tools };
1022
+ export { type AgentInstanceSessionSnapshot, type FileDeletedParams, type FileKeepRequestedParams, type FileModifiedParams, type FileOpenRequestedParams, type FileRenamedParams, type FileSavedParams, type FileSelectedParams, type FileSendRequestedParams, type FileTransferRequestedParams, type FilesChangedParams, type GitChangeKind, type GitChangedParams, type GitFileChange, type GitLineChange, type GitLineChangeKind, type GitOpenDiffRequestedParams, type GitStatusResult, type GitSummary, type HostAppVisibilityParams, type PluginTabTitleChangedParams, type ProposalChangedParams, type ProposalFeedbackFileSummary, type ProposalFeedbackHunk, type ProposalFeedbackOrigin, type ProposalFeedbackParams, type ProposalRecord, type ProposalRequestedFile, type ProposalRequestedHunk, type ProposalRequestedParams, type ProposalStatus, type RootsChangedParams, SINGLETON_BROWSER_SESSION_ID, type SeastudioBatchFlattenCopyOptions, type SeastudioBatchFlattenPreviewOptions, type SeastudioBrowserCertificateError, type SeastudioBrowserRect, type SeastudioBrowserSession, type SeastudioBrowserSessionOpenOptions, type SeastudioBrowserState, type SeastudioBrowserStatus, type SeastudioBrowserTab, type SeastudioBrowserViewportBinding, type SeastudioDragDropParams, type SeastudioDragEnterParams, type SeastudioDragFileData, type SeastudioDragRootId, type SeastudioDragStartParams, type SeastudioEditorProposalAction, type SeastudioEditorProposalOptions, type SeastudioEditorProposeOptions, type SeastudioFileDownloadOptions, type SeastudioFileInfo, type SeastudioFileInfoOptions, type SeastudioFileListOptions, type SeastudioFileReadOptions, type SeastudioFileSaveAsOptions, type SeastudioFileSearchMatch, type SeastudioFileSearchOptions, type SeastudioFileTransferOptions, type SeastudioFileTreeOptions, type SeastudioFileWriteOptions, type SeastudioFilesystemRoot, type SeastudioFilesystemRootId, SeastudioNotifications, type SeastudioProjectInfo, type SeastudioProposalFile, type SeastudioProposalHunk, SeastudioRequests, type SeastudioRootId, type SeastudioShellCloseResult, type SeastudioShellEntry, type SeastudioShellEntryLevel, type SeastudioShellGetEntriesOptions, type SeastudioShellGetEntriesResult, type SeastudioShellKind, type SeastudioShellOneShotResult, type SeastudioShellOpenOptions, type SeastudioShellRunOptions, type SeastudioShellRunResult, type SeastudioShellSession, type SeastudioShellSignalResult, type SeastudioShellWaitResult, type SeastudioSinglePathOptions, type SeastudioWorkspacePathMode, type SeastudioWriteReviewMode, type SessionCreatedParams, type SessionDeleteRequestedParams, type SessionNewRequestedParams, type SessionNotificationBase, type SessionRemovedParams, type SessionSelectedParams, type SessionSelectedReason, type SessionSnapshotItem, type SessionStateSnapshotParams, type SessionStatus, type SessionStatusParams, type SessionSummaryParams, type TextSendRequestedParams, type TextSendRequestedSelectionRange, type TextSendRequestedSource, agentManagementTools, agentTabTools, allTools, annotateTool, batchFlattenCopyEvidenceOutputSchema, browserRuntimeTools, callTool, callToolText, dualPathEvidenceOutputSchema, editorTools, fileDownloadEvidenceOutputSchema, fileSaveAsEvidenceOutputSchema, fileTools, fileUrlEvidenceOutputSchema, gitTools, pluginManagementTools, pluginTabTools, projectTools, request, rootedPathEvidenceOutputSchema, rootedWriteEvidenceOutputSchema, runOneShotShellCommand, seaCloudTools, seastudio, shellSessionCloseEvidenceOutputSchema, shellSessionOpenEvidenceOutputSchema, shellSessionRunEvidenceOutputSchema, shellSessionSignalEvidenceOutputSchema, shellSessionSnapshotEvidenceOutputSchema, shellTools, skillTools, tools };
@@ -1,2 +1,2 @@
1
- export { SINGLETON_BROWSER_SESSION_ID, SeastudioNotifications, SeastudioRequests, agentManagementTools, agentTabTools, allTools, annotateTool, batchFlattenCopyEvidenceOutputSchema, browserRuntimeTools, callTool, callToolText, dualPathEvidenceOutputSchema, editorTools, fileDownloadEvidenceOutputSchema, fileTools, fileUrlEvidenceOutputSchema, gitTools, pluginManagementTools, pluginTabTools, projectTools, request, rootedPathEvidenceOutputSchema, rootedWriteEvidenceOutputSchema, runOneShotShellCommand, seaCloudTools, seastudio, shellSessionCloseEvidenceOutputSchema, shellSessionOpenEvidenceOutputSchema, shellSessionRunEvidenceOutputSchema, shellSessionSignalEvidenceOutputSchema, shellSessionSnapshotEvidenceOutputSchema, shellTools, skillTools, tools } from '../../chunk-ZDUIJOH2.js';
1
+ export { SINGLETON_BROWSER_SESSION_ID, SeastudioNotifications, SeastudioRequests, agentManagementTools, agentTabTools, allTools, annotateTool, batchFlattenCopyEvidenceOutputSchema, browserRuntimeTools, callTool, callToolText, dualPathEvidenceOutputSchema, editorTools, fileDownloadEvidenceOutputSchema, fileSaveAsEvidenceOutputSchema, fileTools, fileUrlEvidenceOutputSchema, gitTools, pluginManagementTools, pluginTabTools, projectTools, request, rootedPathEvidenceOutputSchema, rootedWriteEvidenceOutputSchema, runOneShotShellCommand, seaCloudTools, seastudio, shellSessionCloseEvidenceOutputSchema, shellSessionOpenEvidenceOutputSchema, shellSessionRunEvidenceOutputSchema, shellSessionSignalEvidenceOutputSchema, shellSessionSnapshotEvidenceOutputSchema, shellTools, skillTools, tools } from '../../chunk-BRYHXO22.js';
2
2
  import '../../chunk-TJ3CGHWJ.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@seastudio/sdk",
3
- "version": "4.0.9",
3
+ "version": "4.0.11",
4
4
  "description": "SeaStudio SDK - UI 组件 + MCP 信息交换中心",
5
5
  "main": "dist/index.cjs",
6
6
  "module": "dist/index.js",