@seastudio/sdk 3.0.4 → 3.1.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 (35) hide show
  1. package/README.md +8 -0
  2. package/dist/{chunk-GPM5XGYM.js → chunk-4QK6VMIM.js} +743 -821
  3. package/dist/{chunk-3IVOSJIO.cjs → chunk-7I3A4U6V.cjs} +752 -824
  4. package/dist/{chunk-PYYG6U4M.cjs → chunk-E33WZ4UI.cjs} +4 -4
  5. package/dist/{chunk-AXT6ZLY2.js → chunk-IBRD7E5X.js} +2 -2
  6. package/dist/index.cjs +77 -89
  7. package/dist/index.d.cts +1 -1
  8. package/dist/index.d.ts +1 -1
  9. package/dist/index.js +3 -3
  10. package/dist/mcp/index.cjs +27 -39
  11. package/dist/mcp/index.d.cts +2 -2
  12. package/dist/mcp/index.d.ts +2 -2
  13. package/dist/mcp/index.js +2 -2
  14. package/dist/mcp/seastudio/index.cjs +47 -23
  15. package/dist/mcp/seastudio/index.d.cts +87 -33
  16. package/dist/mcp/seastudio/index.d.ts +87 -33
  17. package/dist/mcp/seastudio/index.js +1 -1
  18. package/package.json +5 -20
  19. package/bin/seastudio.js +0 -3
  20. package/dist/develop-tool/cli/index.cjs +0 -1210
  21. package/dist/develop-tool/cli/index.d.cts +0 -1
  22. package/dist/develop-tool/cli/index.d.ts +0 -1
  23. package/dist/develop-tool/cli/index.js +0 -1199
  24. package/src/develop-tool/templates/plugin/README.md.tmpl +0 -36
  25. package/src/develop-tool/templates/plugin/frontend/index.html.tmpl +0 -12
  26. package/src/develop-tool/templates/plugin/frontend/package.json.tmpl +0 -30
  27. package/src/develop-tool/templates/plugin/frontend/postcss.config.js +0 -6
  28. package/src/develop-tool/templates/plugin/frontend/src/App.css +0 -43
  29. package/src/develop-tool/templates/plugin/frontend/src/App.tsx.tmpl +0 -43
  30. package/src/develop-tool/templates/plugin/frontend/src/main.tsx +0 -13
  31. package/src/develop-tool/templates/plugin/frontend/src/mcp-entry.ts.tmpl +0 -12
  32. package/src/develop-tool/templates/plugin/frontend/src/vite-env.d.ts +0 -1
  33. package/src/develop-tool/templates/plugin/frontend/tsconfig.json +0 -20
  34. package/src/develop-tool/templates/plugin/frontend/vite.config.ts +0 -12
  35. package/src/develop-tool/templates/plugin/seastudio.config.json.tmpl +0 -14
@@ -1,1266 +1,1172 @@
1
1
  import { getDefaultClient } from './chunk-TJ3CGHWJ.js';
2
2
 
3
- // src/mcp/seastudio/tools-plugin.ts
4
- var pluginManagementTools = [
3
+ // src/mcp/seastudio/tools-file.ts
4
+ function annotateTool(tool, annotations, outputSchema) {
5
+ return {
6
+ ...tool,
7
+ annotations,
8
+ ...outputSchema ? { outputSchema } : {}
9
+ };
10
+ }
11
+ var rootedPathEvidenceOutputSchema = {
12
+ type: "object",
13
+ properties: {
14
+ rootId: { type: "string" },
15
+ path: { type: "string" }
16
+ },
17
+ required: ["rootId", "path"]
18
+ };
19
+ var rootedWriteEvidenceOutputSchema = {
20
+ type: "object",
21
+ properties: {
22
+ rootId: { type: "string" },
23
+ path: { type: "string" },
24
+ written: { type: "boolean" }
25
+ },
26
+ required: ["rootId", "path", "written"]
27
+ };
28
+ var dualPathEvidenceOutputSchema = {
29
+ type: "object",
30
+ properties: {
31
+ sourceRootId: { type: "string" },
32
+ sourcePath: { type: "string" },
33
+ destRootId: { type: "string" },
34
+ destPath: { type: "string" }
35
+ },
36
+ required: ["sourceRootId", "sourcePath", "destRootId", "destPath"]
37
+ };
38
+ var batchFlattenCopyEvidenceOutputSchema = {
39
+ type: "object",
40
+ properties: {
41
+ sourceRootId: { type: "string" },
42
+ sourcePath: { type: "string" },
43
+ destRootId: { type: "string" },
44
+ destPath: { type: "string" },
45
+ copiedCount: { type: "number" },
46
+ totalCount: { type: "number" },
47
+ errors: { type: "array", items: { type: "object", additionalProperties: true } }
48
+ },
49
+ required: ["sourceRootId", "sourcePath", "destRootId", "destPath", "copiedCount", "totalCount", "errors"]
50
+ };
51
+ var fileDownloadEvidenceOutputSchema = {
52
+ type: "object",
53
+ properties: {
54
+ rootId: { type: "string" },
55
+ path: { type: "string" },
56
+ savedPath: { type: "string" },
57
+ size: { type: "number" }
58
+ },
59
+ required: ["rootId", "path", "savedPath", "size"]
60
+ };
61
+ var shellCommandEvidenceOutputSchema = {
62
+ type: "object",
63
+ properties: {
64
+ command: { type: "string" },
65
+ cwd: { type: "string" },
66
+ exitCode: { type: "number" },
67
+ stdout: { type: "string" },
68
+ stderr: { type: "string" },
69
+ error: { type: "string" },
70
+ durationMs: { type: "number" },
71
+ usedFallback: { type: "boolean" }
72
+ },
73
+ required: ["command", "exitCode", "stdout", "stderr"]
74
+ };
75
+ var shellSessionSnapshotEvidenceOutputSchema = {
76
+ type: "object",
77
+ properties: {
78
+ projectPath: { type: "string" },
79
+ cwd: { type: "string" },
80
+ promptLabel: { type: "string" },
81
+ isRunning: { type: "boolean" },
82
+ lastExitCode: { type: "number" },
83
+ lastDurationMs: { type: "number" },
84
+ lastCommandAt: { type: "number" },
85
+ historyCount: { type: "number" },
86
+ entryCount: { type: "number" }
87
+ },
88
+ required: ["projectPath", "cwd", "promptLabel", "isRunning", "historyCount", "entryCount"]
89
+ };
90
+ var fileTools = [
5
91
  annotateTool({
6
- name: "seastudio-plugin_list_official",
7
- description: "\u5217\u51FA Registry \u4E2D\u6240\u6709\u5B98\u65B9\u63D2\u4EF6\u3002\u8FD4\u56DE\u6BCF\u4E2A\u63D2\u4EF6\u7684 id\u3001name\u3001version\u3001description \u7B49\u4FE1\u606F\u3002",
92
+ name: "seastudio-file_get_selected",
93
+ description: "\u83B7\u53D6\u5F53\u524D\u6587\u4EF6\u89C6\u56FE\u9009\u4E2D\u7684\u6587\u4EF6\u6216\u76EE\u5F55\u3002\u9002\u7528\u4E8E\u7EED\u63A5\u201C\u5F53\u524D\u9009\u4E2D\u9879\u201D\u7684\u4E0A\u4E0B\u6587\u3002",
8
94
  inputSchema: {
9
95
  type: "object",
10
96
  properties: {}
11
97
  }
12
98
  }, {
13
99
  operationKind: "read",
14
- requiresExecutionEvidence: false
100
+ requiresExecutionEvidence: false,
101
+ rawDomain: "filesystem"
15
102
  }),
16
103
  annotateTool({
17
- name: "seastudio-plugin_list_installed",
18
- description: "\u5217\u51FA\u672C\u5730\u5DF2\u5B89\u88C5\u7684\u6240\u6709\u63D2\u4EF6\u3002\u8FD4\u56DE\u6BCF\u4E2A\u63D2\u4EF6\u7684 id\u3001name\u3001version\u3001enabled \u72B6\u6001\u7B49\u3002",
104
+ name: "seastudio-file_read",
105
+ description: "\u8BFB\u53D6\u6307\u5B9A\u6587\u4EF6\u5185\u5BB9\u3002\u9002\u7528\u4E8E\u67E5\u770B\u3001\u5F15\u7528\u6216\u5206\u6790\u5DF2\u77E5\u8DEF\u5F84\u7684\u6587\u4EF6\uFF0C\u4E0D\u4F1A\u4FEE\u6539\u9879\u76EE\u3002",
19
106
  inputSchema: {
20
107
  type: "object",
21
- properties: {}
108
+ properties: {
109
+ rootId: { type: "string", enum: ["workspace"], description: "\u6839\u76EE\u5F55 ID" },
110
+ path: { type: "string", description: "\u6587\u4EF6\u8DEF\u5F84\uFF08\u76F8\u5BF9\u4E8E rootId\uFF09" },
111
+ offset: { type: "number", description: "\u8D77\u59CB\u884C\u504F\u79FB\uFF08\u53EF\u9009\uFF09" },
112
+ limit: { type: "number", description: "\u8BFB\u53D6\u884C\u6570\u9650\u5236\uFF08\u53EF\u9009\uFF09" }
113
+ },
114
+ required: ["rootId", "path"]
22
115
  }
23
116
  }, {
24
117
  operationKind: "read",
25
- requiresExecutionEvidence: false
118
+ requiresExecutionEvidence: false,
119
+ rawDomain: "filesystem"
26
120
  }),
27
121
  annotateTool({
28
- name: "seastudio-plugin_install",
29
- description: "\u4ECE Registry \u5B89\u88C5\u6307\u5B9A\u63D2\u4EF6\u3002\u9700\u63D0\u4F9B\u63D2\u4EF6 id\uFF0C\u7CFB\u7EDF\u4F1A\u4ECE\u5B98\u65B9 Registry \u4E0B\u8F7D\u5E76\u5B89\u88C5\u3002",
122
+ name: "seastudio-file_write",
123
+ description: "\u5C06\u6587\u672C\u5185\u5BB9\u5199\u5165\u6307\u5B9A\u8DEF\u5F84\u3002\u4EC5\u5728\u9700\u8981\u771F\u5B9E\u521B\u5EFA\u6216\u4FEE\u6539\u6587\u4EF6\u65F6\u4F7F\u7528\uFF0C\u6210\u529F\u540E\u6587\u4EF6\u5185\u5BB9\u4F1A\u843D\u76D8\u3002",
30
124
  inputSchema: {
31
125
  type: "object",
32
126
  properties: {
33
- pluginId: { type: "string", description: "\u8981\u5B89\u88C5\u7684\u63D2\u4EF6 ID" }
127
+ rootId: { type: "string", enum: ["workspace"], description: "\u6839\u76EE\u5F55 ID" },
128
+ path: { type: "string", description: "\u6587\u4EF6\u8DEF\u5F84\uFF08\u76F8\u5BF9\u4E8E rootId\uFF09" },
129
+ content: { type: "string", description: "\u6587\u4EF6\u5185\u5BB9" }
34
130
  },
35
- required: ["pluginId"]
131
+ required: ["rootId", "path", "content"]
36
132
  }
37
133
  }, {
38
134
  operationKind: "mutate",
39
- requiresExecutionEvidence: true
40
- }),
135
+ requiresExecutionEvidence: true,
136
+ rawDomain: "workspace"
137
+ }, rootedWriteEvidenceOutputSchema),
41
138
  annotateTool({
42
- name: "seastudio-plugin_uninstall",
43
- description: "\u5378\u8F7D\u6307\u5B9A\u63D2\u4EF6\u3002\u9700\u63D0\u4F9B\u63D2\u4EF6 id\u3002",
139
+ name: "seastudio-file_list",
140
+ description: "\u5217\u51FA\u6307\u5B9A\u76EE\u5F55\u4E0B\u7684\u6587\u4EF6\u548C\u5B50\u76EE\u5F55\u3002\u9002\u7528\u4E8E\u5728\u6267\u884C\u8BFB\u5199\u524D\u786E\u8BA4\u76EE\u5F55\u7ED3\u6784\u6216\u5B9A\u4F4D\u76EE\u6807\u8DEF\u5F84\u3002",
44
141
  inputSchema: {
45
142
  type: "object",
46
143
  properties: {
47
- pluginId: { type: "string", description: "\u8981\u5378\u8F7D\u7684\u63D2\u4EF6 ID" }
144
+ rootId: { type: "string", enum: ["workspace"], description: "\u6839\u76EE\u5F55 ID" },
145
+ path: { type: "string", description: "\u76EE\u5F55\u8DEF\u5F84\uFF08\u76F8\u5BF9\u4E8E rootId\uFF09" }
48
146
  },
49
- required: ["pluginId"]
147
+ required: ["rootId", "path"]
50
148
  }
51
149
  }, {
52
- operationKind: "mutate",
53
- requiresExecutionEvidence: true
150
+ operationKind: "read",
151
+ requiresExecutionEvidence: false,
152
+ rawDomain: "filesystem"
54
153
  }),
55
154
  annotateTool({
56
- name: "seastudio-plugin_enable",
57
- description: "\u5728\u5F53\u524D\u9879\u76EE\u4E2D\u542F\u7528\u6307\u5B9A\u63D2\u4EF6\u3002\u9700\u63D0\u4F9B\u63D2\u4EF6 id\u3002",
155
+ name: "seastudio-file_delete",
156
+ description: "\u5220\u9664\u6307\u5B9A\u8DEF\u5F84\u7684\u6587\u4EF6\u6216\u76EE\u5F55\u3002\u4EC5\u5728\u7528\u6237\u660E\u786E\u8981\u6C42\u79FB\u9664\u76EE\u6807\u65F6\u4F7F\u7528\uFF0C\u6210\u529F\u540E\u76EE\u6807\u4F1A\u4ECE\u9879\u76EE\u4E2D\u6D88\u5931\u3002",
58
157
  inputSchema: {
59
158
  type: "object",
60
159
  properties: {
61
- pluginId: { type: "string", description: "\u8981\u542F\u7528\u7684\u63D2\u4EF6 ID" }
160
+ rootId: { type: "string", enum: ["workspace"], description: "\u6839\u76EE\u5F55 ID" },
161
+ path: { type: "string", description: "\u8981\u5220\u9664\u7684\u8DEF\u5F84\uFF08\u76F8\u5BF9\u4E8E rootId\uFF09" }
62
162
  },
63
- required: ["pluginId"]
163
+ required: ["rootId", "path"]
64
164
  }
65
165
  }, {
66
166
  operationKind: "mutate",
67
- requiresExecutionEvidence: true
68
- }),
167
+ requiresExecutionEvidence: true,
168
+ rawDomain: "workspace"
169
+ }, rootedPathEvidenceOutputSchema),
69
170
  annotateTool({
70
- name: "seastudio-plugin_disable",
71
- description: "\u5728\u5F53\u524D\u9879\u76EE\u4E2D\u7981\u7528\u6307\u5B9A\u63D2\u4EF6\u3002\u9700\u63D0\u4F9B\u63D2\u4EF6 id\u3002",
171
+ name: "seastudio-file_mkdir",
172
+ description: "\u521B\u5EFA\u76EE\u5F55\uFF08\u652F\u6301\u9012\u5F52\u521B\u5EFA\uFF09\u3002\u9002\u7528\u4E8E\u4E3A\u65B0\u6587\u4EF6\u6216\u5BFC\u51FA\u7ED3\u679C\u51C6\u5907\u76EE\u6807\u76EE\u5F55\u3002",
72
173
  inputSchema: {
73
174
  type: "object",
74
175
  properties: {
75
- pluginId: { type: "string", description: "\u8981\u7981\u7528\u7684\u63D2\u4EF6 ID" }
176
+ rootId: { type: "string", enum: ["workspace"], description: "\u6839\u76EE\u5F55 ID" },
177
+ path: { type: "string", description: "\u76EE\u5F55\u8DEF\u5F84\uFF08\u76F8\u5BF9\u4E8E rootId\uFF09" }
76
178
  },
77
- required: ["pluginId"]
179
+ required: ["rootId", "path"]
78
180
  }
79
181
  }, {
80
182
  operationKind: "mutate",
81
- requiresExecutionEvidence: true
82
- }),
183
+ requiresExecutionEvidence: true,
184
+ rawDomain: "workspace"
185
+ }, rootedPathEvidenceOutputSchema),
83
186
  annotateTool({
84
- name: "seastudio-plugin_get_status",
85
- description: "\u83B7\u53D6\u6307\u5B9A\u63D2\u4EF6\u7684\u5B89\u88C5\u72B6\u6001\u3002\u8FD4\u56DE\u662F\u5426\u5DF2\u5B89\u88C5\u3001\u7248\u672C\u3001\u662F\u5426\u542F\u7528\u3001UI \u7C7B\u578B\u7B49\u8BE6\u7EC6\u4FE1\u606F\u3002\u82E5\u672A\u5B89\u88C5\u5219\u68C0\u67E5 Registry \u4E2D\u662F\u5426\u5B58\u5728\u3002",
187
+ name: "seastudio-file_exists",
188
+ description: "\u68C0\u67E5\u6587\u4EF6\u6216\u76EE\u5F55\u662F\u5426\u5B58\u5728\u3002\u9002\u7528\u4E8E\u5728\u6267\u884C\u5199\u5165\u3001\u5220\u9664\u3001\u91CD\u547D\u540D\u524D\u505A\u524D\u7F6E\u5224\u65AD\u3002",
86
189
  inputSchema: {
87
190
  type: "object",
88
191
  properties: {
89
- pluginId: { type: "string", description: "\u8981\u67E5\u8BE2\u7684\u63D2\u4EF6 ID" }
192
+ rootId: { type: "string", enum: ["workspace"], description: "\u6839\u76EE\u5F55 ID" },
193
+ path: { type: "string", description: "\u8981\u68C0\u67E5\u7684\u8DEF\u5F84\uFF08\u76F8\u5BF9\u4E8E rootId\uFF09" }
90
194
  },
91
- required: ["pluginId"]
195
+ required: ["rootId", "path"]
92
196
  }
93
197
  }, {
94
198
  operationKind: "read",
95
- requiresExecutionEvidence: false
96
- })
97
- ];
98
- var pluginTabTools = [
199
+ requiresExecutionEvidence: false,
200
+ rawDomain: "workspace"
201
+ }),
99
202
  annotateTool({
100
- name: "seastudio-plugin_tab_list",
101
- description: "\u83B7\u53D6\u5F53\u524D\u6240\u6709\u6253\u5F00\u7684\u63D2\u4EF6\u6807\u7B7E\u9875\u3002\u8FD4\u56DE\u6BCF\u4E2A\u6807\u7B7E\u7684 instanceId\u3001pluginId\u3001title \u7B49\u3002",
203
+ name: "seastudio-file_stat",
204
+ description: "\u83B7\u53D6\u6587\u4EF6\u6216\u76EE\u5F55\u7684\u72B6\u6001\u4FE1\u606F\uFF0C\u5982\u7C7B\u578B\u3001\u5927\u5C0F\u548C\u4FEE\u6539\u65F6\u95F4\uFF0C\u7528\u4E8E\u5224\u65AD\u76EE\u6807\u5BF9\u8C61\u7279\u5F81\u3002",
102
205
  inputSchema: {
103
206
  type: "object",
104
- properties: {}
207
+ properties: {
208
+ rootId: { type: "string", enum: ["workspace"], description: "\u6839\u76EE\u5F55 ID" },
209
+ path: { type: "string", description: "\u6587\u4EF6\u8DEF\u5F84" }
210
+ },
211
+ required: ["rootId", "path"]
105
212
  }
106
213
  }, {
107
214
  operationKind: "read",
108
- requiresExecutionEvidence: false
215
+ requiresExecutionEvidence: false,
216
+ rawDomain: "filesystem"
109
217
  }),
110
218
  annotateTool({
111
- name: "seastudio-plugin_tab_get_active",
112
- description: "\u83B7\u53D6\u5F53\u524D\u805A\u7126\uFF08\u6FC0\u6D3B\uFF09\u7684\u63D2\u4EF6\u6807\u7B7E\u9875\u3002\u8FD4\u56DE\u8BE5\u6807\u7B7E\u7684 instanceId\u3001pluginId\u3001title\u3002",
219
+ name: "seastudio-file_info",
220
+ description: "\u83B7\u53D6\u6587\u4EF6\u6216\u76EE\u5F55\u7684\u8BE6\u7EC6\u4FE1\u606F\uFF0C\u5982\u7C7B\u578B\u3001\u5927\u5C0F\u3001\u4FEE\u6539\u65F6\u95F4\u548C MIME\uFF0C\u7528\u4E8E\u5728\u8BFB\u53D6\u524D\u505A\u5224\u65AD\u3002",
113
221
  inputSchema: {
114
222
  type: "object",
115
- properties: {}
223
+ properties: {
224
+ rootId: { type: "string", enum: ["workspace"], description: "\u6839\u76EE\u5F55 ID" },
225
+ path: { type: "string", description: "\u6587\u4EF6\u6216\u76EE\u5F55\u8DEF\u5F84" }
226
+ },
227
+ required: ["rootId", "path"]
116
228
  }
117
229
  }, {
118
230
  operationKind: "read",
119
- requiresExecutionEvidence: false
231
+ requiresExecutionEvidence: false,
232
+ rawDomain: "filesystem"
120
233
  }),
121
234
  annotateTool({
122
- name: "seastudio-plugin_tab_open",
123
- description: "\u4E3A\u6307\u5B9A\u63D2\u4EF6\u65B0\u5EFA\u4E00\u4E2A\u6807\u7B7E\u9875\u5E76\u6FC0\u6D3B\u3002\u9700\u63D0\u4F9B\u63D2\u4EF6 id\u3002",
235
+ name: "seastudio-file_search",
236
+ description: "\u5728\u6307\u5B9A root \u4E2D\u6309 query \u641C\u7D22\u6587\u4EF6\u5185\u5BB9\uFF0C\u53EF\u9009\u9650\u5B9A\u5B50\u8DEF\u5F84\u548C glob\u3002",
124
237
  inputSchema: {
125
238
  type: "object",
126
239
  properties: {
127
- pluginId: { type: "string", description: "\u8981\u6253\u5F00\u6807\u7B7E\u9875\u7684\u63D2\u4EF6 ID" }
240
+ rootId: { type: "string", enum: ["workspace"], description: "\u6839\u76EE\u5F55 ID" },
241
+ query: { type: "string", description: "\u641C\u7D22\u5185\u5BB9\u6216\u6A21\u5F0F" },
242
+ path: { type: "string", description: "\u76F8\u5BF9 root \u7684\u641C\u7D22\u5B50\u8DEF\u5F84\uFF08\u53EF\u9009\uFF09" },
243
+ glob: { type: "string", description: "\u6587\u4EF6 glob \u6A21\u5F0F\uFF08\u53EF\u9009\uFF09" },
244
+ headLimit: { type: "number", description: "\u8FD4\u56DE\u7ED3\u679C\u6570\u91CF\u9650\u5236\uFF08\u53EF\u9009\uFF09" }
128
245
  },
129
- required: ["pluginId"]
246
+ required: ["rootId", "query"]
130
247
  }
131
248
  }, {
132
- operationKind: "mutate",
133
- requiresExecutionEvidence: true
249
+ operationKind: "read",
250
+ requiresExecutionEvidence: false,
251
+ rawDomain: "filesystem"
134
252
  }),
135
253
  annotateTool({
136
- name: "seastudio-plugin_tab_switch",
137
- description: "\u5207\u6362\u5230\u6307\u5B9A\u7684\u63D2\u4EF6\u6807\u7B7E\u9875\u3002\u9700\u63D0\u4F9B\u6807\u7B7E\u5B9E\u4F8B ID\uFF08instanceId\uFF09\u3002",
254
+ name: "seastudio-file_rename",
255
+ description: "\u91CD\u547D\u540D\u6587\u4EF6\u6216\u76EE\u5F55\u3002\u4EC5\u5728\u7528\u6237\u660E\u786E\u8981\u6C42\u6539\u540D\u65F6\u4F7F\u7528\uFF0C\u6210\u529F\u540E\u539F\u8DEF\u5F84\u4F1A\u53D8\u66F4\u4E3A\u65B0\u540D\u79F0\u3002",
138
256
  inputSchema: {
139
257
  type: "object",
140
258
  properties: {
141
- instanceId: { type: "string", description: "\u8981\u5207\u6362\u5230\u7684\u6807\u7B7E\u5B9E\u4F8B ID" }
259
+ rootId: { type: "string", enum: ["workspace"], description: "\u6839\u76EE\u5F55 ID" },
260
+ path: { type: "string", description: "\u539F\u8DEF\u5F84\uFF08\u76F8\u5BF9\u4E8E rootId\uFF09" },
261
+ newName: { type: "string", description: "\u65B0\u540D\u79F0" }
142
262
  },
143
- required: ["instanceId"]
263
+ required: ["rootId", "path", "newName"]
144
264
  }
145
265
  }, {
146
266
  operationKind: "mutate",
147
- requiresExecutionEvidence: true
148
- }),
267
+ requiresExecutionEvidence: true,
268
+ rawDomain: "workspace"
269
+ }, rootedPathEvidenceOutputSchema),
149
270
  annotateTool({
150
- name: "seastudio-plugin_tab_close",
151
- description: "\u5173\u95ED\u6307\u5B9A\u7684\u63D2\u4EF6\u6807\u7B7E\u9875\u3002\u9700\u63D0\u4F9B\u6807\u7B7E\u5B9E\u4F8B ID\uFF08instanceId\uFF09\u3002",
271
+ name: "seastudio-file_move",
272
+ description: "\u5C06\u6E90\u8DEF\u5F84\u79FB\u52A8\u5230\u76EE\u6807\u8DEF\u5F84\u3002\u8DEF\u5F84\u7EDF\u4E00\u4F7F\u7528 rootId + path\u3002",
152
273
  inputSchema: {
153
274
  type: "object",
154
275
  properties: {
155
- instanceId: { type: "string", description: "\u8981\u5173\u95ED\u7684\u6807\u7B7E\u5B9E\u4F8B ID" }
276
+ sourceRootId: { type: "string", enum: ["workspace"], description: "\u6E90\u6839\u76EE\u5F55 ID" },
277
+ sourcePath: { type: "string", description: "\u6E90\u8DEF\u5F84\uFF08\u76F8\u5BF9\u4E8E sourceRootId\uFF09" },
278
+ destRootId: { type: "string", enum: ["workspace"], description: "\u76EE\u6807\u6839\u76EE\u5F55 ID" },
279
+ destPath: { type: "string", description: "\u76EE\u6807\u8DEF\u5F84\uFF08\u76F8\u5BF9\u4E8E destRootId\uFF09" }
156
280
  },
157
- required: ["instanceId"]
281
+ required: ["sourceRootId", "sourcePath", "destRootId", "destPath"]
158
282
  }
159
283
  }, {
160
284
  operationKind: "mutate",
161
- requiresExecutionEvidence: true
162
- }),
163
- annotateTool({
164
- name: "seastudio-plugin_tab_get_status",
165
- description: "\u83B7\u53D6\u6307\u5B9A\u63D2\u4EF6\u7684\u6807\u7B7E\u72B6\u6001\u3002\u8FD4\u56DE\u8BE5\u63D2\u4EF6\u6253\u5F00\u4E86\u51E0\u4E2A\u6807\u7B7E\u3001\u5404\u6807\u7B7E\u7684 instanceId/title\u3001\u54EA\u4E2A\u662F\u5F53\u524D\u805A\u7126\u6001\u3002",
285
+ requiresExecutionEvidence: true,
286
+ rawDomain: "workspace"
287
+ }, dualPathEvidenceOutputSchema),
288
+ annotateTool({
289
+ name: "seastudio-file_copy_to",
290
+ description: "\u5C06\u6E90\u8DEF\u5F84\u590D\u5236\u5230\u76EE\u6807\u8DEF\u5F84\u3002\u8DEF\u5F84\u7EDF\u4E00\u4F7F\u7528 rootId + path\u3002",
166
291
  inputSchema: {
167
292
  type: "object",
168
293
  properties: {
169
- pluginId: { type: "string", description: "\u8981\u67E5\u8BE2\u6807\u7B7E\u72B6\u6001\u7684\u63D2\u4EF6 ID" }
294
+ sourceRootId: { type: "string", enum: ["workspace"], description: "\u6E90\u6839\u76EE\u5F55 ID" },
295
+ sourcePath: { type: "string", description: "\u6E90\u8DEF\u5F84\uFF08\u76F8\u5BF9\u4E8E sourceRootId\uFF09" },
296
+ destRootId: { type: "string", enum: ["workspace"], description: "\u76EE\u6807\u6839\u76EE\u5F55 ID" },
297
+ destPath: { type: "string", description: "\u76EE\u6807\u8DEF\u5F84\uFF08\u76F8\u5BF9\u4E8E destRootId\uFF09" }
170
298
  },
171
- required: ["pluginId"]
172
- }
173
- }, {
174
- operationKind: "read",
175
- requiresExecutionEvidence: false
176
- })
177
- ];
178
-
179
- // src/mcp/seastudio/tools-agent.ts
180
- var agentManagementTools = [
181
- annotateTool({
182
- name: "seastudio-agent_list_official",
183
- description: "\u5217\u51FA Registry \u4E2D\u6240\u6709\u5B98\u65B9 Agent\u3002\u8FD4\u56DE\u6BCF\u4E2A Agent \u7684 id\u3001name\u3001version\u3001description \u7B49\u4FE1\u606F\u3002",
184
- inputSchema: {
185
- type: "object",
186
- properties: {}
299
+ required: ["sourceRootId", "sourcePath", "destRootId", "destPath"]
187
300
  }
188
301
  }, {
189
- operationKind: "read",
190
- requiresExecutionEvidence: false
191
- }),
302
+ operationKind: "mutate",
303
+ requiresExecutionEvidence: true,
304
+ rawDomain: "workspace"
305
+ }, dualPathEvidenceOutputSchema),
192
306
  annotateTool({
193
- name: "seastudio-agent_list_installed",
194
- description: "\u5217\u51FA\u672C\u5730\u5DF2\u5B89\u88C5\u7684\u6240\u6709 Agent\u3002\u8FD4\u56DE\u6BCF\u4E2A Agent \u7684 id\u3001name\u3001version\u3001enabled \u72B6\u6001\u7B49\u3002",
307
+ name: "seastudio-file_get_url",
308
+ description: "\u83B7\u53D6\u6307\u5B9A\u6839\u76EE\u5F55\u4E2D\u6587\u4EF6\u7684\u53EF\u8BBF\u95EE URL\uFF0C\u9002\u7528\u4E8E\u4E8C\u8FDB\u5236\u6587\u4EF6\u7684\u6D4F\u89C8\u5668\u7AEF\u8BFB\u53D6\u3002",
195
309
  inputSchema: {
196
310
  type: "object",
197
- properties: {}
311
+ properties: {
312
+ rootId: { type: "string", enum: ["workspace"], description: "\u6839\u76EE\u5F55 ID" },
313
+ path: { type: "string", description: "\u6587\u4EF6\u8DEF\u5F84\uFF08\u76F8\u5BF9\u4E8E rootId\uFF09" }
314
+ },
315
+ required: ["rootId", "path"]
198
316
  }
199
317
  }, {
200
318
  operationKind: "read",
201
- requiresExecutionEvidence: false
319
+ requiresExecutionEvidence: false,
320
+ rawDomain: "filesystem"
202
321
  }),
203
322
  annotateTool({
204
- name: "seastudio-agent_install",
205
- description: "\u4ECE Registry \u5B89\u88C5\u6307\u5B9A Agent\u3002\u9700\u63D0\u4F9B Agent id\uFF0C\u7CFB\u7EDF\u4F1A\u4ECE\u5B98\u65B9 Registry \u4E0B\u8F7D\u5E76\u5B89\u88C5\u3002",
323
+ name: "seastudio-file_download",
324
+ description: "\u4ECE\u8FDC\u7A0B URL \u4E0B\u8F7D\u6587\u4EF6\u5230\u6307\u5B9A\u6839\u76EE\u5F55\u548C\u8DEF\u5F84\u3002\u4EC5\u5728\u9700\u8981\u771F\u5B9E\u5F15\u5165\u8FDC\u7AEF\u8D44\u6E90\u65F6\u4F7F\u7528\u3002",
206
325
  inputSchema: {
207
326
  type: "object",
208
327
  properties: {
209
- agentId: { type: "string", description: "\u8981\u5B89\u88C5\u7684 Agent ID" }
328
+ rootId: { type: "string", enum: ["workspace"], description: "\u6839\u76EE\u5F55 ID" },
329
+ path: { type: "string", description: "\u4FDD\u5B58\u76EE\u5F55\u8DEF\u5F84\uFF08\u76F8\u5BF9\u4E8E rootId\uFF09" },
330
+ url: { type: "string", description: "\u8FDC\u7A0B\u6587\u4EF6 URL" },
331
+ filenameHint: { type: "string", description: "\u6587\u4EF6\u540D\u63D0\u793A\uFF08\u53EF\u9009\uFF09" }
210
332
  },
211
- required: ["agentId"]
333
+ required: ["rootId", "path", "url"]
212
334
  }
213
335
  }, {
214
336
  operationKind: "mutate",
215
- requiresExecutionEvidence: true
216
- }),
337
+ requiresExecutionEvidence: true,
338
+ rawDomain: "filesystem"
339
+ }, fileDownloadEvidenceOutputSchema),
217
340
  annotateTool({
218
- name: "seastudio-agent_uninstall",
219
- description: "\u5378\u8F7D\u6307\u5B9A Agent\u3002\u9700\u63D0\u4F9B Agent id\u3002",
341
+ name: "seastudio-file_write_binary",
342
+ description: "\u5C06 base64 \u7F16\u7801\u7684\u4E8C\u8FDB\u5236\u5185\u5BB9\u5199\u5165\u6307\u5B9A\u8DEF\u5F84\uFF0C\u9002\u7528\u4E8E xlsx/xls \u7B49\u4E8C\u8FDB\u5236\u6587\u4EF6\u7684\u4FDD\u5B58\u3002",
220
343
  inputSchema: {
221
344
  type: "object",
222
345
  properties: {
223
- agentId: { type: "string", description: "\u8981\u5378\u8F7D\u7684 Agent ID" }
346
+ rootId: { type: "string", enum: ["workspace"], description: "\u6839\u76EE\u5F55 ID" },
347
+ path: { type: "string", description: "\u6587\u4EF6\u8DEF\u5F84\uFF08\u76F8\u5BF9\u4E8E rootId\uFF09" },
348
+ base64: { type: "string", description: "base64 \u7F16\u7801\u7684\u6587\u4EF6\u5185\u5BB9" }
224
349
  },
225
- required: ["agentId"]
350
+ required: ["rootId", "path", "base64"]
226
351
  }
227
352
  }, {
228
353
  operationKind: "mutate",
229
- requiresExecutionEvidence: true
354
+ requiresExecutionEvidence: true,
355
+ rawDomain: "workspace"
230
356
  }),
231
357
  annotateTool({
232
- name: "seastudio-agent_enable",
233
- description: "\u5728\u5F53\u524D\u9879\u76EE\u4E2D\u542F\u7528\u6307\u5B9A Agent\u3002\u9700\u63D0\u4F9B Agent id\u3002",
358
+ name: "seastudio-file_read_binary",
359
+ description: "\u8BFB\u53D6\u4E8C\u8FDB\u5236\u6587\u4EF6\u5E76\u8FD4\u56DE base64 \u7F16\u7801\u5185\u5BB9\uFF0C\u9002\u7528\u4E8E xlsx/xls \u7B49\u4E8C\u8FDB\u5236\u6587\u4EF6\u7684\u8BFB\u53D6\u3002",
234
360
  inputSchema: {
235
361
  type: "object",
236
362
  properties: {
237
- agentId: { type: "string", description: "\u8981\u542F\u7528\u7684 Agent ID" }
363
+ rootId: { type: "string", enum: ["workspace"], description: "\u6839\u76EE\u5F55 ID" },
364
+ path: { type: "string", description: "\u6587\u4EF6\u8DEF\u5F84\uFF08\u76F8\u5BF9\u4E8E rootId\uFF09" }
238
365
  },
239
- required: ["agentId"]
366
+ required: ["rootId", "path"]
240
367
  }
241
368
  }, {
242
- operationKind: "mutate",
243
- requiresExecutionEvidence: true
369
+ operationKind: "read",
370
+ rawDomain: "filesystem"
244
371
  }),
245
372
  annotateTool({
246
- name: "seastudio-agent_disable",
247
- description: "\u5728\u5F53\u524D\u9879\u76EE\u4E2D\u7981\u7528\u6307\u5B9A Agent\u3002\u9700\u63D0\u4F9B Agent id\u3002",
373
+ name: "seastudio-file_copy",
374
+ description: "\u590D\u5236\u6587\u4EF6\u8DEF\u5F84\u5230\u526A\u8D34\u677F\uFF08\u7528\u4E8E\u540E\u7EED\u7C98\u8D34\uFF09",
248
375
  inputSchema: {
249
376
  type: "object",
250
377
  properties: {
251
- agentId: { type: "string", description: "\u8981\u7981\u7528\u7684 Agent ID" }
378
+ rootId: { type: "string", enum: ["workspace"], description: "\u6839\u76EE\u5F55 ID" },
379
+ path: { type: "string", description: "\u6587\u4EF6\u8DEF\u5F84\uFF08\u76F8\u5BF9\u4E8E rootId\uFF09" }
252
380
  },
253
- required: ["agentId"]
381
+ required: ["rootId", "path"]
254
382
  }
255
383
  }, {
256
- operationKind: "mutate",
257
- requiresExecutionEvidence: true
258
- }),
384
+ operationKind: "system",
385
+ requiresExecutionEvidence: true,
386
+ rawDomain: "workspace"
387
+ }, rootedPathEvidenceOutputSchema),
259
388
  annotateTool({
260
- name: "seastudio-agent_get_status",
261
- description: "\u83B7\u53D6\u6307\u5B9A Agent \u7684\u5B89\u88C5\u72B6\u6001\u3002\u8FD4\u56DE\u662F\u5426\u5DF2\u5B89\u88C5\u3001\u7248\u672C\u3001\u662F\u5426\u542F\u7528\u3001\u540E\u7AEF\u6A21\u5F0F\u7B49\u8BE6\u7EC6\u4FE1\u606F\u3002\u82E5\u672A\u5B89\u88C5\u5219\u68C0\u67E5 Registry \u4E2D\u662F\u5426\u5B58\u5728\u3002",
389
+ name: "seastudio-file_paste",
390
+ description: "\u4ECE\u526A\u8D34\u677F\u7C98\u8D34\u6587\u4EF6/\u6587\u4EF6\u5939",
262
391
  inputSchema: {
263
392
  type: "object",
264
393
  properties: {
265
- agentId: { type: "string", description: "\u8981\u67E5\u8BE2\u7684 Agent ID" }
394
+ rootId: { type: "string", enum: ["workspace"], description: "\u6839\u76EE\u5F55 ID" },
395
+ path: { type: "string", description: "\u76EE\u6807\u76EE\u5F55\u8DEF\u5F84\uFF08\u76F8\u5BF9\u4E8E rootId\uFF09" }
266
396
  },
267
- required: ["agentId"]
397
+ required: ["rootId", "path"]
268
398
  }
269
399
  }, {
270
- operationKind: "read",
271
- requiresExecutionEvidence: false
272
- })
273
- ];
274
- var agentTabTools = [
400
+ operationKind: "system",
401
+ requiresExecutionEvidence: true,
402
+ rawDomain: "workspace"
403
+ }, rootedPathEvidenceOutputSchema),
275
404
  annotateTool({
276
- name: "seastudio-agent_tab_list",
277
- description: "\u83B7\u53D6\u5F53\u524D\u6240\u6709\u6253\u5F00\u7684 Agent \u6807\u7B7E\u9875\u3002\u8FD4\u56DE\u6BCF\u4E2A\u6807\u7B7E\u7684 instanceId\u3001agentId\u3001name \u7B49\u3002",
405
+ name: "seastudio-file_clipboard_check",
406
+ description: "\u68C0\u67E5\u526A\u8D34\u677F\u662F\u5426\u6709\u6709\u6548\u7684\u6587\u4EF6\u8DEF\u5F84",
278
407
  inputSchema: {
279
408
  type: "object",
280
409
  properties: {}
281
410
  }
282
411
  }, {
283
412
  operationKind: "read",
284
- requiresExecutionEvidence: false
413
+ requiresExecutionEvidence: false,
414
+ rawDomain: "workspace"
285
415
  }),
286
416
  annotateTool({
287
- name: "seastudio-agent_tab_get_active",
288
- description: "\u83B7\u53D6\u5F53\u524D\u805A\u7126\uFF08\u6FC0\u6D3B\uFF09\u7684 Agent \u6807\u7B7E\u9875\u3002\u8FD4\u56DE\u8BE5\u6807\u7B7E\u7684 instanceId\u3001agentId\u3001name\u3002",
417
+ name: "seastudio-file_copy_path",
418
+ description: "\u590D\u5236\u6587\u4EF6\u8DEF\u5F84\u6587\u672C\u5230\u526A\u8D34\u677F",
289
419
  inputSchema: {
290
420
  type: "object",
291
- properties: {}
421
+ properties: {
422
+ rootId: { type: "string", enum: ["workspace"], description: "\u6839\u76EE\u5F55 ID" },
423
+ path: { type: "string", description: "\u6587\u4EF6\u8DEF\u5F84\uFF08\u76F8\u5BF9\u4E8E rootId\uFF09" }
424
+ },
425
+ required: ["rootId", "path"]
292
426
  }
293
427
  }, {
294
- operationKind: "read",
295
- requiresExecutionEvidence: false
296
- }),
428
+ operationKind: "system",
429
+ requiresExecutionEvidence: true,
430
+ rawDomain: "workspace"
431
+ }, rootedPathEvidenceOutputSchema),
297
432
  annotateTool({
298
- name: "seastudio-agent_tab_open",
299
- description: "\u4E3A\u6307\u5B9A Agent \u65B0\u5EFA\u4E00\u4E2A\u6807\u7B7E\u9875\u5E76\u6FC0\u6D3B\u3002\u9700\u63D0\u4F9B Agent id\u3002",
433
+ name: "seastudio-file_trash",
434
+ description: "\u5C06\u6587\u4EF6\u6216\u6587\u4EF6\u5939\u79FB\u52A8\u5230\u7CFB\u7EDF\u56DE\u6536\u7AD9\u3002\u4EC5\u5728\u7528\u6237\u660E\u786E\u8981\u6C42\u79FB\u9664\u76EE\u6807\u4F46\u4FDD\u7559\u53EF\u6062\u590D\u6027\u65F6\u4F7F\u7528\u3002",
300
435
  inputSchema: {
301
436
  type: "object",
302
437
  properties: {
303
- agentId: { type: "string", description: "\u8981\u6253\u5F00\u6807\u7B7E\u9875\u7684 Agent ID" }
438
+ rootId: { type: "string", enum: ["workspace"], description: "\u6839\u76EE\u5F55 ID" },
439
+ path: { type: "string", description: "\u6587\u4EF6\u8DEF\u5F84\uFF08\u76F8\u5BF9\u4E8E rootId\uFF09" }
304
440
  },
305
- required: ["agentId"]
441
+ required: ["rootId", "path"]
306
442
  }
307
443
  }, {
308
444
  operationKind: "mutate",
309
- requiresExecutionEvidence: true
310
- }),
445
+ requiresExecutionEvidence: true,
446
+ rawDomain: "workspace"
447
+ }, rootedPathEvidenceOutputSchema),
311
448
  annotateTool({
312
- name: "seastudio-agent_tab_switch",
313
- description: "\u5207\u6362\u5230\u6307\u5B9A\u7684 Agent \u6807\u7B7E\u9875\u3002\u9700\u63D0\u4F9B\u6807\u7B7E\u5B9E\u4F8B ID\uFF08instanceId\uFF09\u3002",
449
+ name: "seastudio-code_search",
450
+ description: "\u5728\u9879\u76EE\u4E2D\u6309\u6A21\u5F0F\u641C\u7D22\u4EE3\u7801\u6216\u6587\u672C\u5185\u5BB9\u3002\u9002\u7528\u4E8E\u5B9A\u4F4D\u5B9A\u4E49\u3001\u8C03\u7528\u70B9\u6216\u6587\u672C\u7247\u6BB5\uFF0C\u4E0D\u4F1A\u4FEE\u6539\u6587\u4EF6\u3002",
314
451
  inputSchema: {
315
452
  type: "object",
316
453
  properties: {
317
- instanceId: { type: "string", description: "\u8981\u5207\u6362\u5230\u7684\u6807\u7B7E\u5B9E\u4F8B ID" }
454
+ pattern: { type: "string", description: "\u641C\u7D22\u6A21\u5F0F\uFF08\u6B63\u5219\u8868\u8FBE\u5F0F\uFF09" },
455
+ path: { type: "string", description: "\u641C\u7D22\u8DEF\u5F84" },
456
+ glob: { type: "string", description: "\u6587\u4EF6 glob \u6A21\u5F0F" },
457
+ headLimit: { type: "number", description: "\u8FD4\u56DE\u7ED3\u679C\u6570\u91CF\u9650\u5236" }
318
458
  },
319
- required: ["instanceId"]
459
+ required: ["pattern"]
320
460
  }
321
461
  }, {
322
- operationKind: "mutate",
323
- requiresExecutionEvidence: true
462
+ operationKind: "read",
463
+ requiresExecutionEvidence: false,
464
+ rawDomain: "workspace"
324
465
  }),
325
466
  annotateTool({
326
- name: "seastudio-agent_tab_close",
327
- description: "\u5173\u95ED\u6307\u5B9A\u7684 Agent \u6807\u7B7E\u9875\u3002\u9700\u63D0\u4F9B\u6807\u7B7E\u5B9E\u4F8B ID\uFF08instanceId\uFF09\u3002",
467
+ name: "seastudio-file_batch_flatten_preview",
468
+ description: "\u9884\u89C8\u6587\u4EF6\u5939\u5185\u6240\u6709\u6587\u4EF6\uFF08\u7528\u4E8E\u6279\u91CF\u5E73\u94FA\u590D\u5236\uFF09\u3002\u8DEF\u5F84\u7EDF\u4E00\u4F7F\u7528 rootId + path\u3002",
328
469
  inputSchema: {
329
470
  type: "object",
330
471
  properties: {
331
- instanceId: { type: "string", description: "\u8981\u5173\u95ED\u7684\u6807\u7B7E\u5B9E\u4F8B ID" }
472
+ sourceRootId: { type: "string", enum: ["workspace"], description: "\u6E90\u6839\u76EE\u5F55 ID" },
473
+ sourcePath: { type: "string", description: "\u6E90\u76EE\u5F55\u8DEF\u5F84\uFF08\u76F8\u5BF9\u4E8E sourceRootId\uFF09" }
332
474
  },
333
- required: ["instanceId"]
475
+ required: ["sourceRootId", "sourcePath"]
334
476
  }
335
477
  }, {
336
- operationKind: "mutate",
337
- requiresExecutionEvidence: true
478
+ operationKind: "read",
479
+ requiresExecutionEvidence: false,
480
+ rawDomain: "workspace"
338
481
  }),
339
482
  annotateTool({
340
- name: "seastudio-agent_tab_get_status",
341
- description: "\u83B7\u53D6\u6307\u5B9A Agent \u7684\u6807\u7B7E\u72B6\u6001\u3002\u8FD4\u56DE\u8BE5 Agent \u6253\u5F00\u4E86\u51E0\u4E2A\u6807\u7B7E\u3001\u5404\u6807\u7B7E\u7684 instanceId/name\u3001\u54EA\u4E2A\u662F\u5F53\u524D\u805A\u7126\u6001\u3002",
483
+ name: "seastudio-file_batch_flatten_copy",
484
+ description: "\u6279\u91CF\u5E73\u94FA\u590D\u5236\u6587\u4EF6\u5939\u5185\u6240\u6709\u6587\u4EF6\u5230\u76EE\u6807\u76EE\u5F55\u3002\u8DEF\u5F84\u7EDF\u4E00\u4F7F\u7528 rootId + path\u3002",
342
485
  inputSchema: {
343
486
  type: "object",
344
487
  properties: {
345
- agentId: { type: "string", description: "\u8981\u67E5\u8BE2\u6807\u7B7E\u72B6\u6001\u7684 Agent ID" }
488
+ sourceRootId: { type: "string", enum: ["workspace"], description: "\u6E90\u6839\u76EE\u5F55 ID" },
489
+ sourcePath: { type: "string", description: "\u6E90\u76EE\u5F55\u8DEF\u5F84\uFF08\u76F8\u5BF9\u4E8E sourceRootId\uFF09" },
490
+ destRootId: { type: "string", enum: ["workspace"], description: "\u76EE\u6807\u6839\u76EE\u5F55 ID" },
491
+ destPath: { type: "string", description: "\u76EE\u6807\u76EE\u5F55\u8DEF\u5F84\uFF08\u76F8\u5BF9\u4E8E destRootId\uFF09" },
492
+ taskId: { type: "string", description: "\u4EFB\u52A1 ID\uFF08\u7528\u4E8E\u8FDB\u5EA6\u901A\u77E5\uFF09" }
346
493
  },
347
- required: ["agentId"]
494
+ required: ["sourceRootId", "sourcePath", "destRootId", "destPath"]
348
495
  }
349
496
  }, {
350
- operationKind: "read",
351
- requiresExecutionEvidence: false
352
- })
497
+ operationKind: "mutate",
498
+ requiresExecutionEvidence: true,
499
+ rawDomain: "workspace"
500
+ }, batchFlattenCopyEvidenceOutputSchema)
353
501
  ];
354
502
 
355
- // src/mcp/seastudio/tools.ts
356
- function annotateTool(tool, annotations, outputSchema) {
357
- return {
358
- ...tool,
359
- annotations,
360
- ...outputSchema ? { outputSchema } : {}
361
- };
362
- }
363
- var rootedPathEvidenceOutputSchema = {
364
- type: "object",
365
- properties: {
366
- rootId: { type: "string" },
367
- path: { type: "string" }
368
- },
369
- required: ["rootId", "path"]
370
- };
371
- var rootedWriteEvidenceOutputSchema = {
372
- type: "object",
373
- properties: {
374
- rootId: { type: "string" },
375
- path: { type: "string" },
376
- written: { type: "boolean" }
377
- },
378
- required: ["rootId", "path", "written"]
379
- };
380
- var dualPathEvidenceOutputSchema = {
381
- type: "object",
382
- properties: {
383
- sourceRootId: { type: "string" },
384
- sourcePath: { type: "string" },
385
- destRootId: { type: "string" },
386
- destPath: { type: "string" }
387
- },
388
- required: ["sourceRootId", "sourcePath", "destRootId", "destPath"]
389
- };
390
- var batchFlattenCopyEvidenceOutputSchema = {
391
- type: "object",
392
- properties: {
393
- sourceRootId: { type: "string" },
394
- sourcePath: { type: "string" },
395
- destRootId: { type: "string" },
396
- destPath: { type: "string" },
397
- copiedCount: { type: "number" },
398
- totalCount: { type: "number" },
399
- errors: { type: "array", items: { type: "object", additionalProperties: true } }
400
- },
401
- required: ["sourceRootId", "sourcePath", "destRootId", "destPath", "copiedCount", "totalCount", "errors"]
402
- };
403
- var fileDownloadEvidenceOutputSchema = {
404
- type: "object",
405
- properties: {
406
- rootId: { type: "string" },
407
- path: { type: "string" },
408
- savedPath: { type: "string" },
409
- size: { type: "number" }
410
- },
411
- required: ["rootId", "path", "savedPath", "size"]
412
- };
413
- var shellCommandEvidenceOutputSchema = {
414
- type: "object",
415
- properties: {
416
- command: { type: "string" },
417
- cwd: { type: "string" },
418
- exitCode: { type: "number" },
419
- stdout: { type: "string" },
420
- stderr: { type: "string" },
421
- error: { type: "string" },
422
- durationMs: { type: "number" },
423
- usedFallback: { type: "boolean" }
424
- },
425
- required: ["command", "exitCode", "stdout", "stderr"]
426
- };
427
- var shellSessionSnapshotEvidenceOutputSchema = {
428
- type: "object",
429
- properties: {
430
- projectPath: { type: "string" },
431
- cwd: { type: "string" },
432
- promptLabel: { type: "string" },
433
- isRunning: { type: "boolean" },
434
- lastExitCode: { type: "number" },
435
- lastDurationMs: { type: "number" },
436
- lastCommandAt: { type: "number" },
437
- historyCount: { type: "number" },
438
- entryCount: { type: "number" }
439
- },
440
- required: ["projectPath", "cwd", "promptLabel", "isRunning", "historyCount", "entryCount"]
441
- };
442
- var fileTools = [
443
- annotateTool({
444
- name: "seastudio-file_get_selected",
445
- description: "\u83B7\u53D6\u5F53\u524D\u6587\u4EF6\u89C6\u56FE\u9009\u4E2D\u7684\u6587\u4EF6\u6216\u76EE\u5F55\u3002\u9002\u7528\u4E8E\u7EED\u63A5\u201C\u5F53\u524D\u9009\u4E2D\u9879\u201D\u7684\u4E0A\u4E0B\u6587\u3002",
446
- inputSchema: {
447
- type: "object",
448
- properties: {}
449
- }
450
- }, {
451
- operationKind: "read",
452
- requiresExecutionEvidence: false,
453
- rawDomain: "filesystem"
454
- }),
455
- annotateTool({
456
- name: "seastudio-file_read",
457
- description: "\u8BFB\u53D6\u6307\u5B9A\u6587\u4EF6\u5185\u5BB9\u3002\u9002\u7528\u4E8E\u67E5\u770B\u3001\u5F15\u7528\u6216\u5206\u6790\u5DF2\u77E5\u8DEF\u5F84\u7684\u6587\u4EF6\uFF0C\u4E0D\u4F1A\u4FEE\u6539\u9879\u76EE\u3002",
458
- inputSchema: {
459
- type: "object",
460
- properties: {
461
- rootId: { type: "string", enum: ["workspace"], description: "\u6839\u76EE\u5F55 ID" },
462
- path: { type: "string", description: "\u6587\u4EF6\u8DEF\u5F84\uFF08\u76F8\u5BF9\u4E8E rootId\uFF09" },
463
- offset: { type: "number", description: "\u8D77\u59CB\u884C\u504F\u79FB\uFF08\u53EF\u9009\uFF09" },
464
- limit: { type: "number", description: "\u8BFB\u53D6\u884C\u6570\u9650\u5236\uFF08\u53EF\u9009\uFF09" }
465
- },
466
- required: ["rootId", "path"]
467
- }
468
- }, {
469
- operationKind: "read",
470
- requiresExecutionEvidence: false,
471
- rawDomain: "filesystem"
472
- }),
503
+ // src/mcp/seastudio/tools-shell.ts
504
+ var shellTools = [
473
505
  annotateTool({
474
- name: "seastudio-file_write",
475
- description: "\u5C06\u6587\u672C\u5185\u5BB9\u5199\u5165\u6307\u5B9A\u8DEF\u5F84\u3002\u4EC5\u5728\u9700\u8981\u771F\u5B9E\u521B\u5EFA\u6216\u4FEE\u6539\u6587\u4EF6\u65F6\u4F7F\u7528\uFF0C\u6210\u529F\u540E\u6587\u4EF6\u5185\u5BB9\u4F1A\u843D\u76D8\u3002",
506
+ name: "seastudio-shell_execute",
507
+ description: "\u5728\u9879\u76EE\u76EE\u5F55\u4E0B\u6267\u884C Shell \u547D\u4EE4\u3002\u4EC5\u5728\u786E\u5B9E\u9700\u8981\u547D\u4EE4\u884C\u80FD\u529B\u65F6\u4F7F\u7528\uFF0C\u526F\u4F5C\u7528\u53D6\u51B3\u4E8E\u547D\u4EE4\u672C\u8EAB\u3002",
476
508
  inputSchema: {
477
509
  type: "object",
478
510
  properties: {
479
- rootId: { type: "string", enum: ["workspace"], description: "\u6839\u76EE\u5F55 ID" },
480
- path: { type: "string", description: "\u6587\u4EF6\u8DEF\u5F84\uFF08\u76F8\u5BF9\u4E8E rootId\uFF09" },
481
- content: { type: "string", description: "\u6587\u4EF6\u5185\u5BB9" }
511
+ command: { type: "string", description: "\u8981\u6267\u884C\u7684\u547D\u4EE4" },
512
+ cwd: { type: "string", description: "\u5DE5\u4F5C\u76EE\u5F55\uFF08\u53EF\u9009\uFF0C\u9ED8\u8BA4\u4E3A\u9879\u76EE\u6839\u76EE\u5F55\uFF09" },
513
+ timeout: { type: "number", description: "\u8D85\u65F6\u65F6\u95F4\uFF08\u6BEB\u79D2\uFF0C\u53EF\u9009\uFF09" }
482
514
  },
483
- required: ["rootId", "path", "content"]
515
+ required: ["command"]
484
516
  }
485
517
  }, {
486
- operationKind: "mutate",
518
+ operationKind: "system",
487
519
  requiresExecutionEvidence: true,
488
- rawDomain: "workspace"
489
- }, rootedWriteEvidenceOutputSchema),
520
+ rawDomain: "shell"
521
+ }, shellCommandEvidenceOutputSchema),
490
522
  annotateTool({
491
- name: "seastudio-file_list",
492
- description: "\u5217\u51FA\u6307\u5B9A\u76EE\u5F55\u4E0B\u7684\u6587\u4EF6\u548C\u5B50\u76EE\u5F55\u3002\u9002\u7528\u4E8E\u5728\u6267\u884C\u8BFB\u5199\u524D\u786E\u8BA4\u76EE\u5F55\u7ED3\u6784\u6216\u5B9A\u4F4D\u76EE\u6807\u8DEF\u5F84\u3002",
523
+ name: "seastudio-shell_session_get",
524
+ description: "\u83B7\u53D6\u5F53\u524D Shell \u4F1A\u8BDD\u5FEB\u7167\uFF0C\u5305\u62EC cwd\u3001\u8FD0\u884C\u72B6\u6001\u3001\u6700\u8FD1\u4E00\u6B21\u6267\u884C\u4FE1\u606F\u548C prompt \u6807\u7B7E\u3002",
493
525
  inputSchema: {
494
526
  type: "object",
495
- properties: {
496
- rootId: { type: "string", enum: ["workspace"], description: "\u6839\u76EE\u5F55 ID" },
497
- path: { type: "string", description: "\u76EE\u5F55\u8DEF\u5F84\uFF08\u76F8\u5BF9\u4E8E rootId\uFF09" }
498
- },
499
- required: ["rootId", "path"]
527
+ properties: {}
500
528
  }
501
529
  }, {
502
530
  operationKind: "read",
503
531
  requiresExecutionEvidence: false,
504
- rawDomain: "filesystem"
505
- }),
506
- annotateTool({
507
- name: "seastudio-file_delete",
508
- description: "\u5220\u9664\u6307\u5B9A\u8DEF\u5F84\u7684\u6587\u4EF6\u6216\u76EE\u5F55\u3002\u4EC5\u5728\u7528\u6237\u660E\u786E\u8981\u6C42\u79FB\u9664\u76EE\u6807\u65F6\u4F7F\u7528\uFF0C\u6210\u529F\u540E\u76EE\u6807\u4F1A\u4ECE\u9879\u76EE\u4E2D\u6D88\u5931\u3002",
509
- inputSchema: {
510
- type: "object",
511
- properties: {
512
- rootId: { type: "string", enum: ["workspace"], description: "\u6839\u76EE\u5F55 ID" },
513
- path: { type: "string", description: "\u8981\u5220\u9664\u7684\u8DEF\u5F84\uFF08\u76F8\u5BF9\u4E8E rootId\uFF09" }
514
- },
515
- required: ["rootId", "path"]
516
- }
517
- }, {
518
- operationKind: "mutate",
519
- requiresExecutionEvidence: true,
520
- rawDomain: "workspace"
521
- }, rootedPathEvidenceOutputSchema),
522
- annotateTool({
523
- name: "seastudio-file_mkdir",
524
- description: "\u521B\u5EFA\u76EE\u5F55\uFF08\u652F\u6301\u9012\u5F52\u521B\u5EFA\uFF09\u3002\u9002\u7528\u4E8E\u4E3A\u65B0\u6587\u4EF6\u6216\u5BFC\u51FA\u7ED3\u679C\u51C6\u5907\u76EE\u6807\u76EE\u5F55\u3002",
525
- inputSchema: {
526
- type: "object",
527
- properties: {
528
- rootId: { type: "string", enum: ["workspace"], description: "\u6839\u76EE\u5F55 ID" },
529
- path: { type: "string", description: "\u76EE\u5F55\u8DEF\u5F84\uFF08\u76F8\u5BF9\u4E8E rootId\uFF09" }
530
- },
531
- required: ["rootId", "path"]
532
- }
532
+ rawDomain: "shell"
533
533
  }, {
534
- operationKind: "mutate",
535
- requiresExecutionEvidence: true,
536
- rawDomain: "workspace"
537
- }, rootedPathEvidenceOutputSchema),
538
- annotateTool({
539
- name: "seastudio-file_exists",
540
- description: "\u68C0\u67E5\u6587\u4EF6\u6216\u76EE\u5F55\u662F\u5426\u5B58\u5728\u3002\u9002\u7528\u4E8E\u5728\u6267\u884C\u5199\u5165\u3001\u5220\u9664\u3001\u91CD\u547D\u540D\u524D\u505A\u524D\u7F6E\u5224\u65AD\u3002",
541
- inputSchema: {
542
- type: "object",
543
- properties: {
544
- rootId: { type: "string", enum: ["workspace"], description: "\u6839\u76EE\u5F55 ID" },
545
- path: { type: "string", description: "\u8981\u68C0\u67E5\u7684\u8DEF\u5F84\uFF08\u76F8\u5BF9\u4E8E rootId\uFF09" }
546
- },
547
- required: ["rootId", "path"]
534
+ type: "object",
535
+ properties: {
536
+ projectPath: { type: "string" },
537
+ cwd: { type: "string" },
538
+ promptLabel: { type: "string" },
539
+ isRunning: { type: "boolean" },
540
+ lastExitCode: { type: "number" },
541
+ lastDurationMs: { type: "number" },
542
+ lastCommandAt: { type: "number" },
543
+ historyCount: { type: "number" },
544
+ entryCount: { type: "number" }
548
545
  }
549
- }, {
550
- operationKind: "read",
551
- requiresExecutionEvidence: false,
552
- rawDomain: "workspace"
553
546
  }),
554
547
  annotateTool({
555
- name: "seastudio-file_stat",
556
- description: "\u83B7\u53D6\u6587\u4EF6\u6216\u76EE\u5F55\u7684\u72B6\u6001\u4FE1\u606F\uFF0C\u5982\u7C7B\u578B\u3001\u5927\u5C0F\u548C\u4FEE\u6539\u65F6\u95F4\uFF0C\u7528\u4E8E\u5224\u65AD\u76EE\u6807\u5BF9\u8C61\u7279\u5F81\u3002",
548
+ name: "seastudio-shell_session_get_entries",
549
+ description: "\u8BFB\u53D6\u5F53\u524D Shell \u4F1A\u8BDD\u8F93\u51FA\u6D41\uFF0C\u7528\u4E8E\u83B7\u53D6\u5386\u53F2\u547D\u4EE4\u3001stdout\u3001stderr \u4E0E meta \u4FE1\u606F\u3002",
557
550
  inputSchema: {
558
551
  type: "object",
559
552
  properties: {
560
- rootId: { type: "string", enum: ["workspace"], description: "\u6839\u76EE\u5F55 ID" },
561
- path: { type: "string", description: "\u6587\u4EF6\u8DEF\u5F84" }
562
- },
563
- required: ["rootId", "path"]
553
+ limit: { type: "number", description: "\u8FD4\u56DE\u6700\u8FD1\u591A\u5C11\u6761\u8BB0\u5F55\uFF0C\u9ED8\u8BA4 200\u3002" }
554
+ }
564
555
  }
565
556
  }, {
566
557
  operationKind: "read",
567
558
  requiresExecutionEvidence: false,
568
- rawDomain: "filesystem"
569
- }),
570
- annotateTool({
571
- name: "seastudio-file_info",
572
- description: "\u83B7\u53D6\u6587\u4EF6\u6216\u76EE\u5F55\u7684\u8BE6\u7EC6\u4FE1\u606F\uFF0C\u5982\u7C7B\u578B\u3001\u5927\u5C0F\u3001\u4FEE\u6539\u65F6\u95F4\u548C MIME\uFF0C\u7528\u4E8E\u5728\u8BFB\u53D6\u524D\u505A\u5224\u65AD\u3002",
573
- inputSchema: {
574
- type: "object",
575
- properties: {
576
- rootId: { type: "string", enum: ["workspace"], description: "\u6839\u76EE\u5F55 ID" },
577
- path: { type: "string", description: "\u6587\u4EF6\u6216\u76EE\u5F55\u8DEF\u5F84" }
578
- },
579
- required: ["rootId", "path"]
580
- }
559
+ rawDomain: "shell"
581
560
  }, {
582
- operationKind: "read",
583
- requiresExecutionEvidence: false,
584
- rawDomain: "filesystem"
561
+ type: "object",
562
+ properties: {
563
+ entries: {
564
+ type: "array",
565
+ items: {
566
+ type: "object",
567
+ properties: {
568
+ id: { type: "number" },
569
+ level: { type: "string" },
570
+ content: { type: "string" },
571
+ createdAt: { type: "number" }
572
+ }
573
+ }
574
+ }
575
+ }
585
576
  }),
586
577
  annotateTool({
587
- name: "seastudio-file_search",
588
- description: "\u5728\u6307\u5B9A root \u4E2D\u6309 query \u641C\u7D22\u6587\u4EF6\u5185\u5BB9\uFF0C\u53EF\u9009\u9650\u5B9A\u5B50\u8DEF\u5F84\u548C glob\u3002",
578
+ name: "seastudio-shell_session_run_command",
579
+ description: "\u5728\u5F53\u524D Shell \u4F1A\u8BDD\u4E0A\u4E0B\u6587\u4E2D\u6267\u884C\u547D\u4EE4\uFF0C\u4F1A\u66F4\u65B0\u4F1A\u8BDD cwd\u3001\u5386\u53F2\u4E0E\u8F93\u51FA\u6D41\u3002",
589
580
  inputSchema: {
590
581
  type: "object",
591
582
  properties: {
592
- rootId: { type: "string", enum: ["workspace"], description: "\u6839\u76EE\u5F55 ID" },
593
- query: { type: "string", description: "\u641C\u7D22\u5185\u5BB9\u6216\u6A21\u5F0F" },
594
- path: { type: "string", description: "\u76F8\u5BF9 root \u7684\u641C\u7D22\u5B50\u8DEF\u5F84\uFF08\u53EF\u9009\uFF09" },
595
- glob: { type: "string", description: "\u6587\u4EF6 glob \u6A21\u5F0F\uFF08\u53EF\u9009\uFF09" },
596
- headLimit: { type: "number", description: "\u8FD4\u56DE\u7ED3\u679C\u6570\u91CF\u9650\u5236\uFF08\u53EF\u9009\uFF09" }
583
+ command: { type: "string", description: "\u8981\u6267\u884C\u7684\u547D\u4EE4" },
584
+ cwd: { type: "string", description: "\u53EF\u9009\uFF0C\u8986\u76D6\u5F53\u524D\u4F1A\u8BDD\u5DE5\u4F5C\u76EE\u5F55" },
585
+ timeout: { type: "number", description: "\u53EF\u9009\uFF0C\u8D85\u65F6\u65F6\u95F4\uFF08\u6BEB\u79D2\uFF09" }
597
586
  },
598
- required: ["rootId", "query"]
587
+ required: ["command"]
599
588
  }
600
589
  }, {
601
- operationKind: "read",
602
- requiresExecutionEvidence: false,
603
- rawDomain: "filesystem"
604
- }),
590
+ operationKind: "system",
591
+ requiresExecutionEvidence: true,
592
+ rawDomain: "shell"
593
+ }, shellCommandEvidenceOutputSchema),
605
594
  annotateTool({
606
- name: "seastudio-file_rename",
607
- description: "\u91CD\u547D\u540D\u6587\u4EF6\u6216\u76EE\u5F55\u3002\u4EC5\u5728\u7528\u6237\u660E\u786E\u8981\u6C42\u6539\u540D\u65F6\u4F7F\u7528\uFF0C\u6210\u529F\u540E\u539F\u8DEF\u5F84\u4F1A\u53D8\u66F4\u4E3A\u65B0\u540D\u79F0\u3002",
595
+ name: "seastudio-shell_session_set_cwd",
596
+ description: "\u76F4\u63A5\u8BBE\u7F6E\u5F53\u524D Shell \u4F1A\u8BDD\u5DE5\u4F5C\u76EE\u5F55\uFF0C\u4E0D\u6267\u884C\u547D\u4EE4\u3002",
608
597
  inputSchema: {
609
598
  type: "object",
610
599
  properties: {
611
- rootId: { type: "string", enum: ["workspace"], description: "\u6839\u76EE\u5F55 ID" },
612
- path: { type: "string", description: "\u539F\u8DEF\u5F84\uFF08\u76F8\u5BF9\u4E8E rootId\uFF09" },
613
- newName: { type: "string", description: "\u65B0\u540D\u79F0" }
600
+ cwd: { type: "string", description: "\u76EE\u6807\u5DE5\u4F5C\u76EE\u5F55" }
614
601
  },
615
- required: ["rootId", "path", "newName"]
602
+ required: ["cwd"]
616
603
  }
617
604
  }, {
618
605
  operationKind: "mutate",
619
606
  requiresExecutionEvidence: true,
620
- rawDomain: "workspace"
621
- }, rootedPathEvidenceOutputSchema),
607
+ rawDomain: "shell"
608
+ }, shellSessionSnapshotEvidenceOutputSchema),
622
609
  annotateTool({
623
- name: "seastudio-file_move",
624
- description: "\u5C06\u6E90\u8DEF\u5F84\u79FB\u52A8\u5230\u76EE\u6807\u8DEF\u5F84\u3002\u8DEF\u5F84\u7EDF\u4E00\u4F7F\u7528 rootId + path\u3002",
610
+ name: "seastudio-shell_session_clear",
611
+ description: "\u6E05\u7A7A\u5F53\u524D Shell \u4F1A\u8BDD\u8F93\u51FA\u6D41\uFF0C\u4FDD\u7559\u4F1A\u8BDD\u4E0A\u4E0B\u6587\u4E0E\u547D\u4EE4\u5386\u53F2\u3002",
625
612
  inputSchema: {
626
613
  type: "object",
627
- properties: {
628
- sourceRootId: { type: "string", enum: ["workspace"], description: "\u6E90\u6839\u76EE\u5F55 ID" },
629
- sourcePath: { type: "string", description: "\u6E90\u8DEF\u5F84\uFF08\u76F8\u5BF9\u4E8E sourceRootId\uFF09" },
630
- destRootId: { type: "string", enum: ["workspace"], description: "\u76EE\u6807\u6839\u76EE\u5F55 ID" },
631
- destPath: { type: "string", description: "\u76EE\u6807\u8DEF\u5F84\uFF08\u76F8\u5BF9\u4E8E destRootId\uFF09" }
632
- },
633
- required: ["sourceRootId", "sourcePath", "destRootId", "destPath"]
614
+ properties: {}
634
615
  }
635
616
  }, {
636
617
  operationKind: "mutate",
637
618
  requiresExecutionEvidence: true,
638
- rawDomain: "workspace"
639
- }, dualPathEvidenceOutputSchema),
619
+ rawDomain: "shell"
620
+ }, shellSessionSnapshotEvidenceOutputSchema),
640
621
  annotateTool({
641
- name: "seastudio-file_copy_to",
642
- description: "\u5C06\u6E90\u8DEF\u5F84\u590D\u5236\u5230\u76EE\u6807\u8DEF\u5F84\u3002\u8DEF\u5F84\u7EDF\u4E00\u4F7F\u7528 rootId + path\u3002",
622
+ name: "seastudio-shell_session_reset",
623
+ description: "\u91CD\u7F6E\u5F53\u524D Shell \u4F1A\u8BDD\uFF0Ccwd \u56DE\u5230\u9879\u76EE\u76EE\u5F55\u5E76\u6E05\u7A7A\u8F93\u51FA\u3001\u5386\u53F2\u4E0E\u6700\u8FD1\u6267\u884C\u72B6\u6001\u3002",
643
624
  inputSchema: {
644
625
  type: "object",
645
- properties: {
646
- sourceRootId: { type: "string", enum: ["workspace"], description: "\u6E90\u6839\u76EE\u5F55 ID" },
647
- sourcePath: { type: "string", description: "\u6E90\u8DEF\u5F84\uFF08\u76F8\u5BF9\u4E8E sourceRootId\uFF09" },
648
- destRootId: { type: "string", enum: ["workspace"], description: "\u76EE\u6807\u6839\u76EE\u5F55 ID" },
649
- destPath: { type: "string", description: "\u76EE\u6807\u8DEF\u5F84\uFF08\u76F8\u5BF9\u4E8E destRootId\uFF09" }
650
- },
651
- required: ["sourceRootId", "sourcePath", "destRootId", "destPath"]
626
+ properties: {}
652
627
  }
653
628
  }, {
654
629
  operationKind: "mutate",
655
630
  requiresExecutionEvidence: true,
656
- rawDomain: "workspace"
657
- }, dualPathEvidenceOutputSchema),
631
+ rawDomain: "shell"
632
+ }, shellSessionSnapshotEvidenceOutputSchema)
633
+ ];
634
+
635
+ // src/mcp/seastudio/tools-aigc.ts
636
+ var seaCloudTools = [
658
637
  annotateTool({
659
- name: "seastudio-file_get_url",
660
- description: "\u83B7\u53D6\u6307\u5B9A\u6839\u76EE\u5F55\u4E2D\u6587\u4EF6\u7684\u53EF\u8BBF\u95EE URL\uFF0C\u9002\u7528\u4E8E\u4E8C\u8FDB\u5236\u6587\u4EF6\u7684\u6D4F\u89C8\u5668\u7AEF\u8BFB\u53D6\u3002",
638
+ name: "seastudio-seacloud_list_models",
639
+ description: "\u5217\u51FA SeaCloud \u63A8\u7406\u7F51\u5173\u53EF\u7528\u7684\u591A\u6A21\u6001\u751F\u6210\u6A21\u578B\u53CA\u5176\u53C2\u6570 schema\u3002\u53EF\u6309 tag \u8FC7\u6EE4\uFF08\u5982 vidu\u3001tencent\u3001musicfy \u7B49\uFF09\u3002\u8FD4\u56DE\u6BCF\u4E2A\u6A21\u578B\u7684\u540D\u79F0\u3001\u6807\u7B7E\u548C\u53EF\u7528\u7684 body \u53C2\u6570\u5B9A\u4E49\u3002",
661
640
  inputSchema: {
662
641
  type: "object",
663
642
  properties: {
664
- rootId: { type: "string", enum: ["workspace"], description: "\u6839\u76EE\u5F55 ID" },
665
- path: { type: "string", description: "\u6587\u4EF6\u8DEF\u5F84\uFF08\u76F8\u5BF9\u4E8E rootId\uFF09" }
666
- },
667
- required: ["rootId", "path"]
643
+ tag: { type: "string", description: '\u6309\u6807\u7B7E\u8FC7\u6EE4\u6A21\u578B\uFF08\u53EF\u9009\uFF09\uFF0C\u5982 "vidu"\u3001"musicfy"\u3001"tencent" \u7B49' }
644
+ }
668
645
  }
669
646
  }, {
670
647
  operationKind: "read",
671
648
  requiresExecutionEvidence: false,
672
- rawDomain: "filesystem"
649
+ rawDomain: "asset"
673
650
  }),
674
651
  annotateTool({
675
- name: "seastudio-file_download",
676
- description: "\u4ECE\u8FDC\u7A0B URL \u4E0B\u8F7D\u6587\u4EF6\u5230\u6307\u5B9A\u6839\u76EE\u5F55\u548C\u8DEF\u5F84\u3002\u4EC5\u5728\u9700\u8981\u771F\u5B9E\u5F15\u5165\u8FDC\u7AEF\u8D44\u6E90\u65F6\u4F7F\u7528\u3002",
652
+ name: "seastudio-seacloud_create_task",
653
+ description: "\u901A\u8FC7 SeaCloud \u63A8\u7406\u7F51\u5173\u521B\u5EFA\u591A\u6A21\u6001\u751F\u6210\u4EFB\u52A1\u3002\u9700\u6307\u5B9A\u6A21\u578B\u540D\u79F0\u548C\u5BF9\u5E94\u53C2\u6570\uFF0C\u53C2\u6570\u683C\u5F0F\u53C2\u7167 list_models \u8FD4\u56DE\u7684 schema\u3002\u8FD4\u56DE task_id \u7528\u4E8E\u540E\u7EED\u67E5\u8BE2\u3002",
677
654
  inputSchema: {
678
655
  type: "object",
679
656
  properties: {
680
- rootId: { type: "string", enum: ["workspace"], description: "\u6839\u76EE\u5F55 ID" },
681
- path: { type: "string", description: "\u4FDD\u5B58\u76EE\u5F55\u8DEF\u5F84\uFF08\u76F8\u5BF9\u4E8E rootId\uFF09" },
682
- url: { type: "string", description: "\u8FDC\u7A0B\u6587\u4EF6 URL" },
683
- filenameHint: { type: "string", description: "\u6587\u4EF6\u540D\u63D0\u793A\uFF08\u53EF\u9009\uFF09" }
657
+ model: { type: "string", description: "\u6A21\u578B\u540D\u79F0\uFF08\u6765\u81EA list_models \u8FD4\u56DE\u7684 model \u5B57\u6BB5\uFF09" },
658
+ params: { type: "object", description: "\u6A21\u578B\u53C2\u6570\uFF08\u6765\u81EA list_models \u8FD4\u56DE\u7684\u53C2\u6570 schema\uFF09" },
659
+ dash_scope: { type: "boolean", description: "\u662F\u5426\u89E3\u9664\u533A\u57DF\u9650\u5236\uFF0C\u9ED8\u8BA4 true" },
660
+ moderation: { type: "boolean", description: "\u662F\u5426\u89E3\u9664\u529F\u80FD\u9650\u5236\uFF0C\u9ED8\u8BA4 false" }
684
661
  },
685
- required: ["rootId", "path", "url"]
662
+ required: ["model", "params"]
686
663
  }
687
664
  }, {
688
665
  operationKind: "mutate",
689
- requiresExecutionEvidence: true,
690
- rawDomain: "filesystem"
691
- }, fileDownloadEvidenceOutputSchema),
666
+ requiresExecutionEvidence: false,
667
+ rawDomain: "asset"
668
+ }),
692
669
  annotateTool({
693
- name: "seastudio-file_write_binary",
694
- description: "\u5C06 base64 \u7F16\u7801\u7684\u4E8C\u8FDB\u5236\u5185\u5BB9\u5199\u5165\u6307\u5B9A\u8DEF\u5F84\uFF0C\u9002\u7528\u4E8E xlsx/xls \u7B49\u4E8C\u8FDB\u5236\u6587\u4EF6\u7684\u4FDD\u5B58\u3002",
670
+ name: "seastudio-seacloud_query_task",
671
+ description: '\u67E5\u8BE2 SeaCloud \u751F\u6210\u4EFB\u52A1\u7684\u72B6\u6001\u548C\u7ED3\u679C\u3002status \u4E3A "completed" \u65F6 output \u4E2D\u5305\u542B\u751F\u6210\u7684\u8D44\u6E90 URL\uFF0C"in_progress" \u8868\u793A\u4ECD\u5728\u5904\u7406\uFF0C"failed" \u8868\u793A\u5931\u8D25\u3002',
695
672
  inputSchema: {
696
673
  type: "object",
697
674
  properties: {
698
- rootId: { type: "string", enum: ["workspace"], description: "\u6839\u76EE\u5F55 ID" },
699
- path: { type: "string", description: "\u6587\u4EF6\u8DEF\u5F84\uFF08\u76F8\u5BF9\u4E8E rootId\uFF09" },
700
- base64: { type: "string", description: "base64 \u7F16\u7801\u7684\u6587\u4EF6\u5185\u5BB9" }
675
+ task_id: { type: "string", description: "\u4EFB\u52A1 ID\uFF08\u7531 create_task \u8FD4\u56DE\uFF09" }
701
676
  },
702
- required: ["rootId", "path", "base64"]
677
+ required: ["task_id"]
703
678
  }
704
679
  }, {
705
- operationKind: "mutate",
706
- requiresExecutionEvidence: true,
707
- rawDomain: "workspace"
708
- }),
680
+ operationKind: "read",
681
+ requiresExecutionEvidence: false,
682
+ rawDomain: "asset"
683
+ })
684
+ ];
685
+
686
+ // src/mcp/seastudio/client.ts
687
+ async function callTool(name, args = {}) {
688
+ return getDefaultClient().callTool(name, args);
689
+ }
690
+ async function request(method, params) {
691
+ return getDefaultClient().request(method, params);
692
+ }
693
+ async function callToolText(name, args = {}) {
694
+ return getDefaultClient().callToolText(name, args);
695
+ }
696
+ function usesAbsolutePathMode(mode) {
697
+ return mode === "absolute";
698
+ }
699
+ function getPathBasename(path) {
700
+ const trimmed = path.replace(/[\\/]+$/g, "");
701
+ if (!trimmed) return "";
702
+ const parts = trimmed.split(/[\\/]/).filter(Boolean);
703
+ return parts[parts.length - 1] ?? "";
704
+ }
705
+ function joinWorkspacePath(dir, name) {
706
+ const normalizedDir = dir.replace(/\\/g, "/").replace(/\/+$/g, "");
707
+ const normalizedName = name.replace(/^\/+/g, "");
708
+ return normalizedDir ? `${normalizedDir}/${normalizedName}` : normalizedName;
709
+ }
710
+ var seastudio = {
711
+ roots: {
712
+ list: () => request("roots/list")
713
+ },
714
+ file: {
715
+ getSelected: () => callTool("seastudio-file_get_selected", {}),
716
+ read: (path, options) => callTool("seastudio-file_read", {
717
+ rootId: options?.rootId ?? "workspace",
718
+ path,
719
+ ...typeof options?.offset === "number" ? { offset: options.offset } : {},
720
+ ...typeof options?.limit === "number" ? { limit: options.limit } : {}
721
+ }),
722
+ write: (path, content, options) => callTool("seastudio-file_write", { rootId: options?.rootId ?? "workspace", path, content }),
723
+ list: (path = "", options) => callTool("seastudio-file_list", {
724
+ rootId: options?.rootId ?? "workspace",
725
+ path
726
+ }),
727
+ delete: (path, options) => callTool("seastudio-file_delete", { rootId: options?.rootId ?? "workspace", path }),
728
+ mkdir: (path, options) => callTool("seastudio-file_mkdir", { rootId: options?.rootId ?? "workspace", path }),
729
+ exists: (path, options) => callTool("seastudio-file_exists", { rootId: options?.rootId ?? "workspace", path }),
730
+ stat: (path, options) => callTool("seastudio-file_stat", {
731
+ rootId: options?.rootId ?? "workspace",
732
+ path
733
+ }),
734
+ info: (path, options) => callTool("seastudio-file_info", {
735
+ rootId: options?.rootId ?? "workspace",
736
+ path
737
+ }),
738
+ search: (query, options) => callTool("seastudio-file_search", {
739
+ query,
740
+ rootId: options?.rootId ?? "workspace",
741
+ path: options?.path ?? "",
742
+ ...options?.glob ? { glob: options.glob } : {},
743
+ ...typeof options?.headLimit === "number" ? { headLimit: options.headLimit } : {}
744
+ }),
745
+ codeSearch: (pattern, path, glob, headLimit) => callTool("seastudio-code_search", { pattern, path, glob, headLimit }),
746
+ rename: (path, newName, options) => callTool("seastudio-file_rename", { rootId: options?.rootId ?? "workspace", path, newName }),
747
+ move: (sourcePath, destDir, options) => {
748
+ if (usesAbsolutePathMode(options?.sourcePathMode) || usesAbsolutePathMode(options?.destPathMode)) {
749
+ return callTool("seastudio-file_move", { sourcePath, destDir, ...options });
750
+ }
751
+ const srcRoot = options?.sourceRootId ?? "workspace";
752
+ const dstRoot = options?.destRootId ?? srcRoot;
753
+ return callTool("seastudio-file_move", {
754
+ sourceRootId: srcRoot,
755
+ sourcePath,
756
+ destRootId: dstRoot,
757
+ destPath: joinWorkspacePath(destDir, getPathBasename(sourcePath))
758
+ });
759
+ },
760
+ copyTo: (sourcePath, destDir, options) => {
761
+ if (usesAbsolutePathMode(options?.sourcePathMode) || usesAbsolutePathMode(options?.destPathMode)) {
762
+ return callTool("seastudio-file_copy_to", { sourcePath, destDir, ...options });
763
+ }
764
+ const srcRoot = options?.sourceRootId ?? "workspace";
765
+ const dstRoot = options?.destRootId ?? srcRoot;
766
+ return callTool("seastudio-file_copy_to", {
767
+ sourceRootId: srcRoot,
768
+ sourcePath,
769
+ destRootId: dstRoot,
770
+ destPath: joinWorkspacePath(destDir, getPathBasename(sourcePath))
771
+ });
772
+ },
773
+ copy: (path, options) => callTool("seastudio-file_copy", { rootId: options?.rootId ?? "workspace", path }),
774
+ paste: (path = "", options) => callTool("seastudio-file_paste", { rootId: options?.rootId ?? "workspace", path }),
775
+ clipboardCheck: () => callTool("seastudio-file_clipboard_check", {}),
776
+ copyPath: (path, options) => callTool("seastudio-file_copy_path", { rootId: options?.rootId ?? "workspace", path }),
777
+ trash: (path, options) => callTool("seastudio-file_trash", { rootId: options?.rootId ?? "workspace", path }),
778
+ batchFlattenPreview: (sourcePath, options) => {
779
+ if (usesAbsolutePathMode(options?.sourcePathMode)) {
780
+ return callTool("seastudio-file_batch_flatten_preview", { sourcePath, ...options });
781
+ }
782
+ return callTool("seastudio-file_batch_flatten_preview", {
783
+ sourceRootId: options?.sourceRootId ?? "workspace",
784
+ sourcePath
785
+ });
786
+ },
787
+ batchFlattenCopy: (sourcePath, destDir, taskId, options) => {
788
+ if (usesAbsolutePathMode(options?.sourcePathMode) || usesAbsolutePathMode(options?.destPathMode)) {
789
+ return callTool("seastudio-file_batch_flatten_copy", { sourcePath, destDir, taskId, ...options });
790
+ }
791
+ const srcRoot = options?.sourceRootId ?? "workspace";
792
+ const dstRoot = options?.destRootId ?? srcRoot;
793
+ return callTool("seastudio-file_batch_flatten_copy", {
794
+ sourceRootId: srcRoot,
795
+ sourcePath,
796
+ destRootId: dstRoot,
797
+ destPath: destDir,
798
+ ...typeof taskId === "string" ? { taskId } : {}
799
+ });
800
+ },
801
+ getUrl: (path, options) => callTool("seastudio-file_get_url", { rootId: options?.rootId ?? "workspace", path }),
802
+ download: (url, path, filenameHint, options) => callTool("seastudio-file_download", { rootId: options?.rootId ?? "workspace", path, url, filenameHint }),
803
+ writeBinary: (path, base64, options) => callTool("seastudio-file_write_binary", { rootId: options?.rootId ?? "workspace", path, base64 }),
804
+ readBinary: (path, options) => callTool("seastudio-file_read_binary", { rootId: options?.rootId ?? "workspace", path })
805
+ },
806
+ shell: {
807
+ execute: (command, cwd, timeout) => callTool("seastudio-shell_execute", { command, cwd, timeout }),
808
+ session: {
809
+ get: () => callTool("seastudio-shell_session_get", {}),
810
+ getEntries: (limit) => callTool("seastudio-shell_session_get_entries", { limit }),
811
+ runCommand: (command, cwd, timeout) => callTool("seastudio-shell_session_run_command", { command, cwd, timeout }),
812
+ setCwd: (cwd) => callTool("seastudio-shell_session_set_cwd", { cwd }),
813
+ clear: () => callTool("seastudio-shell_session_clear", {}),
814
+ reset: () => callTool("seastudio-shell_session_reset", {})
815
+ }
816
+ }
817
+ };
818
+
819
+ // src/mcp/seastudio/tools-plugin.ts
820
+ var pluginManagementTools = [
709
821
  annotateTool({
710
- name: "seastudio-file_read_binary",
711
- description: "\u8BFB\u53D6\u4E8C\u8FDB\u5236\u6587\u4EF6\u5E76\u8FD4\u56DE base64 \u7F16\u7801\u5185\u5BB9\uFF0C\u9002\u7528\u4E8E xlsx/xls \u7B49\u4E8C\u8FDB\u5236\u6587\u4EF6\u7684\u8BFB\u53D6\u3002",
822
+ name: "seastudio-plugin_list_official",
823
+ description: "\u5217\u51FA Registry \u4E2D\u6240\u6709\u5B98\u65B9\u63D2\u4EF6\u3002\u8FD4\u56DE\u6BCF\u4E2A\u63D2\u4EF6\u7684 id\u3001name\u3001version\u3001description \u7B49\u4FE1\u606F\u3002",
712
824
  inputSchema: {
713
825
  type: "object",
714
- properties: {
715
- rootId: { type: "string", enum: ["workspace"], description: "\u6839\u76EE\u5F55 ID" },
716
- path: { type: "string", description: "\u6587\u4EF6\u8DEF\u5F84\uFF08\u76F8\u5BF9\u4E8E rootId\uFF09" }
717
- },
718
- required: ["rootId", "path"]
826
+ properties: {}
719
827
  }
720
828
  }, {
721
829
  operationKind: "read",
722
- rawDomain: "filesystem"
723
- })
724
- ];
725
- var shellTools = [
830
+ requiresExecutionEvidence: false
831
+ }),
726
832
  annotateTool({
727
- name: "seastudio-shell_execute",
728
- description: "\u5728\u9879\u76EE\u76EE\u5F55\u4E0B\u6267\u884C Shell \u547D\u4EE4\u3002\u4EC5\u5728\u786E\u5B9E\u9700\u8981\u547D\u4EE4\u884C\u80FD\u529B\u65F6\u4F7F\u7528\uFF0C\u526F\u4F5C\u7528\u53D6\u51B3\u4E8E\u547D\u4EE4\u672C\u8EAB\u3002",
833
+ name: "seastudio-plugin_list_installed",
834
+ description: "\u5217\u51FA\u672C\u5730\u5DF2\u5B89\u88C5\u7684\u6240\u6709\u63D2\u4EF6\u3002\u8FD4\u56DE\u6BCF\u4E2A\u63D2\u4EF6\u7684 id\u3001name\u3001version\u3001enabled \u72B6\u6001\u7B49\u3002",
835
+ inputSchema: {
836
+ type: "object",
837
+ properties: {}
838
+ }
839
+ }, {
840
+ operationKind: "read",
841
+ requiresExecutionEvidence: false
842
+ }),
843
+ annotateTool({
844
+ name: "seastudio-plugin_install",
845
+ description: "\u4ECE Registry \u5B89\u88C5\u6307\u5B9A\u63D2\u4EF6\u3002\u9700\u63D0\u4F9B\u63D2\u4EF6 id\uFF0C\u7CFB\u7EDF\u4F1A\u4ECE\u5B98\u65B9 Registry \u4E0B\u8F7D\u5E76\u5B89\u88C5\u3002",
729
846
  inputSchema: {
730
847
  type: "object",
731
848
  properties: {
732
- command: { type: "string", description: "\u8981\u6267\u884C\u7684\u547D\u4EE4" },
733
- cwd: { type: "string", description: "\u5DE5\u4F5C\u76EE\u5F55\uFF08\u53EF\u9009\uFF0C\u9ED8\u8BA4\u4E3A\u9879\u76EE\u6839\u76EE\u5F55\uFF09" },
734
- timeout: { type: "number", description: "\u8D85\u65F6\u65F6\u95F4\uFF08\u6BEB\u79D2\uFF0C\u53EF\u9009\uFF09" }
849
+ pluginId: { type: "string", description: "\u8981\u5B89\u88C5\u7684\u63D2\u4EF6 ID" }
735
850
  },
736
- required: ["command"]
851
+ required: ["pluginId"]
737
852
  }
738
853
  }, {
739
- operationKind: "system",
740
- requiresExecutionEvidence: true,
741
- rawDomain: "shell"
742
- }, shellCommandEvidenceOutputSchema),
854
+ operationKind: "mutate",
855
+ requiresExecutionEvidence: true
856
+ }),
743
857
  annotateTool({
744
- name: "seastudio-shell_session_get",
745
- description: "\u83B7\u53D6\u5F53\u524D Shell \u4F1A\u8BDD\u5FEB\u7167\uFF0C\u5305\u62EC cwd\u3001\u8FD0\u884C\u72B6\u6001\u3001\u6700\u8FD1\u4E00\u6B21\u6267\u884C\u4FE1\u606F\u548C prompt \u6807\u7B7E\u3002",
858
+ name: "seastudio-plugin_uninstall",
859
+ description: "\u5378\u8F7D\u6307\u5B9A\u63D2\u4EF6\u3002\u9700\u63D0\u4F9B\u63D2\u4EF6 id\u3002",
746
860
  inputSchema: {
747
861
  type: "object",
748
- properties: {}
862
+ properties: {
863
+ pluginId: { type: "string", description: "\u8981\u5378\u8F7D\u7684\u63D2\u4EF6 ID" }
864
+ },
865
+ required: ["pluginId"]
749
866
  }
750
867
  }, {
751
- operationKind: "read",
752
- requiresExecutionEvidence: false,
753
- rawDomain: "shell"
754
- }, {
755
- type: "object",
756
- properties: {
757
- projectPath: { type: "string" },
758
- cwd: { type: "string" },
759
- promptLabel: { type: "string" },
760
- isRunning: { type: "boolean" },
761
- lastExitCode: { type: "number" },
762
- lastDurationMs: { type: "number" },
763
- lastCommandAt: { type: "number" },
764
- historyCount: { type: "number" },
765
- entryCount: { type: "number" }
766
- }
868
+ operationKind: "mutate",
869
+ requiresExecutionEvidence: true
767
870
  }),
768
871
  annotateTool({
769
- name: "seastudio-shell_session_get_entries",
770
- description: "\u8BFB\u53D6\u5F53\u524D Shell \u4F1A\u8BDD\u8F93\u51FA\u6D41\uFF0C\u7528\u4E8E\u83B7\u53D6\u5386\u53F2\u547D\u4EE4\u3001stdout\u3001stderr \u4E0E meta \u4FE1\u606F\u3002",
872
+ name: "seastudio-plugin_enable",
873
+ description: "\u5728\u5F53\u524D\u9879\u76EE\u4E2D\u542F\u7528\u6307\u5B9A\u63D2\u4EF6\u3002\u9700\u63D0\u4F9B\u63D2\u4EF6 id\u3002",
771
874
  inputSchema: {
772
875
  type: "object",
773
876
  properties: {
774
- limit: { type: "number", description: "\u8FD4\u56DE\u6700\u8FD1\u591A\u5C11\u6761\u8BB0\u5F55\uFF0C\u9ED8\u8BA4 200\u3002" }
775
- }
877
+ pluginId: { type: "string", description: "\u8981\u542F\u7528\u7684\u63D2\u4EF6 ID" }
878
+ },
879
+ required: ["pluginId"]
776
880
  }
777
881
  }, {
778
- operationKind: "read",
779
- requiresExecutionEvidence: false,
780
- rawDomain: "shell"
781
- }, {
782
- type: "object",
783
- properties: {
784
- entries: {
785
- type: "array",
786
- items: {
787
- type: "object",
788
- properties: {
789
- id: { type: "number" },
790
- level: { type: "string" },
791
- content: { type: "string" },
792
- createdAt: { type: "number" }
793
- }
794
- }
795
- }
796
- }
882
+ operationKind: "mutate",
883
+ requiresExecutionEvidence: true
797
884
  }),
798
885
  annotateTool({
799
- name: "seastudio-shell_session_run_command",
800
- description: "\u5728\u5F53\u524D Shell \u4F1A\u8BDD\u4E0A\u4E0B\u6587\u4E2D\u6267\u884C\u547D\u4EE4\uFF0C\u4F1A\u66F4\u65B0\u4F1A\u8BDD cwd\u3001\u5386\u53F2\u4E0E\u8F93\u51FA\u6D41\u3002",
886
+ name: "seastudio-plugin_disable",
887
+ description: "\u5728\u5F53\u524D\u9879\u76EE\u4E2D\u7981\u7528\u6307\u5B9A\u63D2\u4EF6\u3002\u9700\u63D0\u4F9B\u63D2\u4EF6 id\u3002",
801
888
  inputSchema: {
802
889
  type: "object",
803
890
  properties: {
804
- command: { type: "string", description: "\u8981\u6267\u884C\u7684\u547D\u4EE4" },
805
- cwd: { type: "string", description: "\u53EF\u9009\uFF0C\u8986\u76D6\u5F53\u524D\u4F1A\u8BDD\u5DE5\u4F5C\u76EE\u5F55" },
806
- timeout: { type: "number", description: "\u53EF\u9009\uFF0C\u8D85\u65F6\u65F6\u95F4\uFF08\u6BEB\u79D2\uFF09" }
891
+ pluginId: { type: "string", description: "\u8981\u7981\u7528\u7684\u63D2\u4EF6 ID" }
807
892
  },
808
- required: ["command"]
893
+ required: ["pluginId"]
809
894
  }
810
895
  }, {
811
- operationKind: "system",
812
- requiresExecutionEvidence: true,
813
- rawDomain: "shell"
814
- }, shellCommandEvidenceOutputSchema),
896
+ operationKind: "mutate",
897
+ requiresExecutionEvidence: true
898
+ }),
815
899
  annotateTool({
816
- name: "seastudio-shell_session_set_cwd",
817
- description: "\u76F4\u63A5\u8BBE\u7F6E\u5F53\u524D Shell \u4F1A\u8BDD\u5DE5\u4F5C\u76EE\u5F55\uFF0C\u4E0D\u6267\u884C\u547D\u4EE4\u3002",
900
+ name: "seastudio-plugin_get_status",
901
+ description: "\u83B7\u53D6\u6307\u5B9A\u63D2\u4EF6\u7684\u5B89\u88C5\u72B6\u6001\u3002\u8FD4\u56DE\u662F\u5426\u5DF2\u5B89\u88C5\u3001\u7248\u672C\u3001\u662F\u5426\u542F\u7528\u3001UI \u7C7B\u578B\u7B49\u8BE6\u7EC6\u4FE1\u606F\u3002\u82E5\u672A\u5B89\u88C5\u5219\u68C0\u67E5 Registry \u4E2D\u662F\u5426\u5B58\u5728\u3002",
818
902
  inputSchema: {
819
903
  type: "object",
820
904
  properties: {
821
- cwd: { type: "string", description: "\u76EE\u6807\u5DE5\u4F5C\u76EE\u5F55" }
905
+ pluginId: { type: "string", description: "\u8981\u67E5\u8BE2\u7684\u63D2\u4EF6 ID" }
822
906
  },
823
- required: ["cwd"]
907
+ required: ["pluginId"]
824
908
  }
825
909
  }, {
826
- operationKind: "mutate",
827
- requiresExecutionEvidence: true,
828
- rawDomain: "shell"
829
- }, shellSessionSnapshotEvidenceOutputSchema),
910
+ operationKind: "read",
911
+ requiresExecutionEvidence: false
912
+ })
913
+ ];
914
+ var pluginTabTools = [
830
915
  annotateTool({
831
- name: "seastudio-shell_session_clear",
832
- description: "\u6E05\u7A7A\u5F53\u524D Shell \u4F1A\u8BDD\u8F93\u51FA\u6D41\uFF0C\u4FDD\u7559\u4F1A\u8BDD\u4E0A\u4E0B\u6587\u4E0E\u547D\u4EE4\u5386\u53F2\u3002",
916
+ name: "seastudio-plugin_tab_list",
917
+ description: "\u83B7\u53D6\u5F53\u524D\u6240\u6709\u6253\u5F00\u7684\u63D2\u4EF6\u6807\u7B7E\u9875\u3002\u8FD4\u56DE\u6BCF\u4E2A\u6807\u7B7E\u7684 instanceId\u3001pluginId\u3001title \u7B49\u3002",
833
918
  inputSchema: {
834
919
  type: "object",
835
920
  properties: {}
836
921
  }
837
922
  }, {
838
- operationKind: "mutate",
839
- requiresExecutionEvidence: true,
840
- rawDomain: "shell"
841
- }, shellSessionSnapshotEvidenceOutputSchema),
923
+ operationKind: "read",
924
+ requiresExecutionEvidence: false
925
+ }),
842
926
  annotateTool({
843
- name: "seastudio-shell_session_reset",
844
- description: "\u91CD\u7F6E\u5F53\u524D Shell \u4F1A\u8BDD\uFF0Ccwd \u56DE\u5230\u9879\u76EE\u76EE\u5F55\u5E76\u6E05\u7A7A\u8F93\u51FA\u3001\u5386\u53F2\u4E0E\u6700\u8FD1\u6267\u884C\u72B6\u6001\u3002",
927
+ name: "seastudio-plugin_tab_get_active",
928
+ description: "\u83B7\u53D6\u5F53\u524D\u805A\u7126\uFF08\u6FC0\u6D3B\uFF09\u7684\u63D2\u4EF6\u6807\u7B7E\u9875\u3002\u8FD4\u56DE\u8BE5\u6807\u7B7E\u7684 instanceId\u3001pluginId\u3001title\u3002",
845
929
  inputSchema: {
846
930
  type: "object",
847
931
  properties: {}
848
932
  }
849
933
  }, {
850
- operationKind: "mutate",
851
- requiresExecutionEvidence: true,
852
- rawDomain: "shell"
853
- }, shellSessionSnapshotEvidenceOutputSchema)
854
- ];
855
- var gitTools = [
934
+ operationKind: "read",
935
+ requiresExecutionEvidence: false
936
+ }),
856
937
  annotateTool({
857
- name: "seastudio-git_status",
858
- description: "\u83B7\u53D6\u5F53\u524D Git \u4ED3\u5E93\u72B6\u6001\uFF0C\u7528\u4E8E\u786E\u8BA4\u5DE5\u4F5C\u533A\u4FEE\u6539\u3001\u672A\u8DDF\u8E2A\u6587\u4EF6\u548C\u6682\u5B58\u72B6\u6001\u3002",
938
+ name: "seastudio-plugin_tab_open",
939
+ description: "\u4E3A\u6307\u5B9A\u63D2\u4EF6\u65B0\u5EFA\u4E00\u4E2A\u6807\u7B7E\u9875\u5E76\u6FC0\u6D3B\u3002\u9700\u63D0\u4F9B\u63D2\u4EF6 id\u3002",
859
940
  inputSchema: {
860
941
  type: "object",
861
- properties: {}
942
+ properties: {
943
+ pluginId: { type: "string", description: "\u8981\u6253\u5F00\u6807\u7B7E\u9875\u7684\u63D2\u4EF6 ID" }
944
+ },
945
+ required: ["pluginId"]
862
946
  }
863
947
  }, {
864
- operationKind: "read",
865
- requiresExecutionEvidence: false,
866
- rawDomain: "git"
948
+ operationKind: "mutate",
949
+ requiresExecutionEvidence: true
867
950
  }),
868
951
  annotateTool({
869
- name: "seastudio-git_diff",
870
- description: "\u83B7\u53D6 Git \u5DEE\u5F02\uFF0C\u7528\u4E8E\u67E5\u770B\u6307\u5B9A\u6587\u4EF6\u6216\u6682\u5B58\u533A\u7684\u6539\u52A8\u5185\u5BB9\uFF0C\u4E0D\u4F1A\u4FEE\u6539\u4ED3\u5E93\u3002",
952
+ name: "seastudio-plugin_tab_switch",
953
+ description: "\u5207\u6362\u5230\u6307\u5B9A\u7684\u63D2\u4EF6\u6807\u7B7E\u9875\u3002\u9700\u63D0\u4F9B\u6807\u7B7E\u5B9E\u4F8B ID\uFF08instanceId\uFF09\u3002",
871
954
  inputSchema: {
872
955
  type: "object",
873
956
  properties: {
874
- staged: { type: "boolean", description: "\u662F\u5426\u53EA\u663E\u793A\u6682\u5B58\u7684\u66F4\u6539" },
875
- path: { type: "string", description: "\u6307\u5B9A\u6587\u4EF6\u8DEF\u5F84\uFF08\u53EF\u9009\uFF09" }
876
- }
957
+ instanceId: { type: "string", description: "\u8981\u5207\u6362\u5230\u7684\u6807\u7B7E\u5B9E\u4F8B ID" }
958
+ },
959
+ required: ["instanceId"]
877
960
  }
878
961
  }, {
879
- operationKind: "read",
880
- requiresExecutionEvidence: false,
881
- rawDomain: "git"
882
- })
883
- ];
884
- var clipboardTools = [
962
+ operationKind: "mutate",
963
+ requiresExecutionEvidence: true
964
+ }),
885
965
  annotateTool({
886
- name: "seastudio-file_copy",
887
- description: "\u590D\u5236\u6587\u4EF6\u8DEF\u5F84\u5230\u526A\u8D34\u677F\uFF08\u7528\u4E8E\u540E\u7EED\u7C98\u8D34\uFF09",
966
+ name: "seastudio-plugin_tab_close",
967
+ description: "\u5173\u95ED\u6307\u5B9A\u7684\u63D2\u4EF6\u6807\u7B7E\u9875\u3002\u9700\u63D0\u4F9B\u6807\u7B7E\u5B9E\u4F8B ID\uFF08instanceId\uFF09\u3002",
888
968
  inputSchema: {
889
969
  type: "object",
890
970
  properties: {
891
- rootId: { type: "string", enum: ["workspace"], description: "\u6839\u76EE\u5F55 ID" },
892
- path: { type: "string", description: "\u6587\u4EF6\u8DEF\u5F84\uFF08\u76F8\u5BF9\u4E8E rootId\uFF09" }
971
+ instanceId: { type: "string", description: "\u8981\u5173\u95ED\u7684\u6807\u7B7E\u5B9E\u4F8B ID" }
893
972
  },
894
- required: ["rootId", "path"]
973
+ required: ["instanceId"]
895
974
  }
896
975
  }, {
897
- operationKind: "system",
898
- requiresExecutionEvidence: true,
899
- rawDomain: "workspace"
900
- }, rootedPathEvidenceOutputSchema),
976
+ operationKind: "mutate",
977
+ requiresExecutionEvidence: true
978
+ }),
901
979
  annotateTool({
902
- name: "seastudio-file_paste",
903
- description: "\u4ECE\u526A\u8D34\u677F\u7C98\u8D34\u6587\u4EF6/\u6587\u4EF6\u5939",
980
+ name: "seastudio-plugin_tab_get_status",
981
+ description: "\u83B7\u53D6\u6307\u5B9A\u63D2\u4EF6\u7684\u6807\u7B7E\u72B6\u6001\u3002\u8FD4\u56DE\u8BE5\u63D2\u4EF6\u6253\u5F00\u4E86\u51E0\u4E2A\u6807\u7B7E\u3001\u5404\u6807\u7B7E\u7684 instanceId/title\u3001\u54EA\u4E2A\u662F\u5F53\u524D\u805A\u7126\u6001\u3002",
904
982
  inputSchema: {
905
983
  type: "object",
906
984
  properties: {
907
- rootId: { type: "string", enum: ["workspace"], description: "\u6839\u76EE\u5F55 ID" },
908
- path: { type: "string", description: "\u76EE\u6807\u76EE\u5F55\u8DEF\u5F84\uFF08\u76F8\u5BF9\u4E8E rootId\uFF09" }
985
+ pluginId: { type: "string", description: "\u8981\u67E5\u8BE2\u6807\u7B7E\u72B6\u6001\u7684\u63D2\u4EF6 ID" }
909
986
  },
910
- required: ["rootId", "path"]
987
+ required: ["pluginId"]
911
988
  }
912
989
  }, {
913
- operationKind: "system",
914
- requiresExecutionEvidence: true,
915
- rawDomain: "workspace"
916
- }, rootedPathEvidenceOutputSchema),
990
+ operationKind: "read",
991
+ requiresExecutionEvidence: false
992
+ })
993
+ ];
994
+
995
+ // src/mcp/seastudio/tools-agent.ts
996
+ var agentManagementTools = [
917
997
  annotateTool({
918
- name: "seastudio-file_clipboard_check",
919
- description: "\u68C0\u67E5\u526A\u8D34\u677F\u662F\u5426\u6709\u6709\u6548\u7684\u6587\u4EF6\u8DEF\u5F84",
998
+ name: "seastudio-agent_list_official",
999
+ description: "\u5217\u51FA Registry \u4E2D\u6240\u6709\u5B98\u65B9 Agent\u3002\u8FD4\u56DE\u6BCF\u4E2A Agent \u7684 id\u3001name\u3001version\u3001description \u7B49\u4FE1\u606F\u3002",
920
1000
  inputSchema: {
921
1001
  type: "object",
922
1002
  properties: {}
923
1003
  }
924
1004
  }, {
925
1005
  operationKind: "read",
926
- requiresExecutionEvidence: false,
927
- rawDomain: "workspace"
1006
+ requiresExecutionEvidence: false
928
1007
  }),
929
1008
  annotateTool({
930
- name: "seastudio-file_copy_path",
931
- description: "\u590D\u5236\u6587\u4EF6\u8DEF\u5F84\u6587\u672C\u5230\u526A\u8D34\u677F",
1009
+ name: "seastudio-agent_list_installed",
1010
+ description: "\u5217\u51FA\u672C\u5730\u5DF2\u5B89\u88C5\u7684\u6240\u6709 Agent\u3002\u8FD4\u56DE\u6BCF\u4E2A Agent \u7684 id\u3001name\u3001version\u3001enabled \u72B6\u6001\u7B49\u3002",
932
1011
  inputSchema: {
933
1012
  type: "object",
934
- properties: {
935
- rootId: { type: "string", enum: ["workspace"], description: "\u6839\u76EE\u5F55 ID" },
936
- path: { type: "string", description: "\u6587\u4EF6\u8DEF\u5F84\uFF08\u76F8\u5BF9\u4E8E rootId\uFF09" }
937
- },
938
- required: ["rootId", "path"]
1013
+ properties: {}
939
1014
  }
940
1015
  }, {
941
- operationKind: "system",
942
- requiresExecutionEvidence: true,
943
- rawDomain: "workspace"
944
- }, rootedPathEvidenceOutputSchema),
1016
+ operationKind: "read",
1017
+ requiresExecutionEvidence: false
1018
+ }),
945
1019
  annotateTool({
946
- name: "seastudio-file_trash",
947
- description: "\u5C06\u6587\u4EF6\u6216\u6587\u4EF6\u5939\u79FB\u52A8\u5230\u7CFB\u7EDF\u56DE\u6536\u7AD9\u3002\u4EC5\u5728\u7528\u6237\u660E\u786E\u8981\u6C42\u79FB\u9664\u76EE\u6807\u4F46\u4FDD\u7559\u53EF\u6062\u590D\u6027\u65F6\u4F7F\u7528\u3002",
1020
+ name: "seastudio-agent_install",
1021
+ description: "\u4ECE Registry \u5B89\u88C5\u6307\u5B9A Agent\u3002\u9700\u63D0\u4F9B Agent id\uFF0C\u7CFB\u7EDF\u4F1A\u4ECE\u5B98\u65B9 Registry \u4E0B\u8F7D\u5E76\u5B89\u88C5\u3002",
948
1022
  inputSchema: {
949
1023
  type: "object",
950
1024
  properties: {
951
- rootId: { type: "string", enum: ["workspace"], description: "\u6839\u76EE\u5F55 ID" },
952
- path: { type: "string", description: "\u6587\u4EF6\u8DEF\u5F84\uFF08\u76F8\u5BF9\u4E8E rootId\uFF09" }
1025
+ agentId: { type: "string", description: "\u8981\u5B89\u88C5\u7684 Agent ID" }
953
1026
  },
954
- required: ["rootId", "path"]
1027
+ required: ["agentId"]
955
1028
  }
956
1029
  }, {
957
1030
  operationKind: "mutate",
958
- requiresExecutionEvidence: true,
959
- rawDomain: "workspace"
960
- }, rootedPathEvidenceOutputSchema)
961
- ];
962
- var codeQualityTools = [
1031
+ requiresExecutionEvidence: true
1032
+ }),
963
1033
  annotateTool({
964
- name: "seastudio-run_test",
965
- description: "\u8FD0\u884C\u9879\u76EE\u6D4B\u8BD5",
1034
+ name: "seastudio-agent_uninstall",
1035
+ description: "\u5378\u8F7D\u6307\u5B9A Agent\u3002\u9700\u63D0\u4F9B Agent id\u3002",
966
1036
  inputSchema: {
967
1037
  type: "object",
968
1038
  properties: {
969
- command: { type: "string", description: "\u81EA\u5B9A\u4E49\u6D4B\u8BD5\u547D\u4EE4" },
970
- timeout: { type: "number", description: "\u8D85\u65F6\u65F6\u95F4\uFF08\u6BEB\u79D2\uFF09" }
971
- }
1039
+ agentId: { type: "string", description: "\u8981\u5378\u8F7D\u7684 Agent ID" }
1040
+ },
1041
+ required: ["agentId"]
972
1042
  }
973
1043
  }, {
974
- operationKind: "system",
975
- requiresExecutionEvidence: true,
976
- rawDomain: "shell"
977
- }, shellCommandEvidenceOutputSchema),
1044
+ operationKind: "mutate",
1045
+ requiresExecutionEvidence: true
1046
+ }),
978
1047
  annotateTool({
979
- name: "seastudio-run_typecheck",
980
- description: "\u8FD0\u884C\u7C7B\u578B\u68C0\u67E5",
1048
+ name: "seastudio-agent_enable",
1049
+ description: "\u5728\u5F53\u524D\u9879\u76EE\u4E2D\u542F\u7528\u6307\u5B9A Agent\u3002\u9700\u63D0\u4F9B Agent id\u3002",
981
1050
  inputSchema: {
982
1051
  type: "object",
983
1052
  properties: {
984
- command: { type: "string", description: "\u81EA\u5B9A\u4E49\u7C7B\u578B\u68C0\u67E5\u547D\u4EE4" },
985
- timeout: { type: "number", description: "\u8D85\u65F6\u65F6\u95F4\uFF08\u6BEB\u79D2\uFF09" }
986
- }
1053
+ agentId: { type: "string", description: "\u8981\u542F\u7528\u7684 Agent ID" }
1054
+ },
1055
+ required: ["agentId"]
987
1056
  }
988
1057
  }, {
989
- operationKind: "system",
990
- requiresExecutionEvidence: true,
991
- rawDomain: "shell"
992
- }, shellCommandEvidenceOutputSchema),
1058
+ operationKind: "mutate",
1059
+ requiresExecutionEvidence: true
1060
+ }),
993
1061
  annotateTool({
994
- name: "seastudio-run_lint",
995
- description: "\u8FD0\u884C\u4EE3\u7801\u68C0\u67E5",
1062
+ name: "seastudio-agent_disable",
1063
+ description: "\u5728\u5F53\u524D\u9879\u76EE\u4E2D\u7981\u7528\u6307\u5B9A Agent\u3002\u9700\u63D0\u4F9B Agent id\u3002",
996
1064
  inputSchema: {
997
1065
  type: "object",
998
1066
  properties: {
999
- command: { type: "string", description: "\u81EA\u5B9A\u4E49 lint \u547D\u4EE4" },
1000
- timeout: { type: "number", description: "\u8D85\u65F6\u65F6\u95F4\uFF08\u6BEB\u79D2\uFF09" }
1001
- }
1067
+ agentId: { type: "string", description: "\u8981\u7981\u7528\u7684 Agent ID" }
1068
+ },
1069
+ required: ["agentId"]
1002
1070
  }
1003
1071
  }, {
1004
- operationKind: "system",
1005
- requiresExecutionEvidence: true,
1006
- rawDomain: "shell"
1007
- }, shellCommandEvidenceOutputSchema),
1072
+ operationKind: "mutate",
1073
+ requiresExecutionEvidence: true
1074
+ }),
1008
1075
  annotateTool({
1009
- name: "seastudio-code_search",
1010
- description: "\u5728\u9879\u76EE\u4E2D\u6309\u6A21\u5F0F\u641C\u7D22\u4EE3\u7801\u6216\u6587\u672C\u5185\u5BB9\u3002\u9002\u7528\u4E8E\u5B9A\u4F4D\u5B9A\u4E49\u3001\u8C03\u7528\u70B9\u6216\u6587\u672C\u7247\u6BB5\uFF0C\u4E0D\u4F1A\u4FEE\u6539\u6587\u4EF6\u3002",
1076
+ name: "seastudio-agent_get_status",
1077
+ description: "\u83B7\u53D6\u6307\u5B9A Agent \u7684\u5B89\u88C5\u72B6\u6001\u3002\u8FD4\u56DE\u662F\u5426\u5DF2\u5B89\u88C5\u3001\u7248\u672C\u3001\u662F\u5426\u542F\u7528\u3001\u540E\u7AEF\u6A21\u5F0F\u7B49\u8BE6\u7EC6\u4FE1\u606F\u3002\u82E5\u672A\u5B89\u88C5\u5219\u68C0\u67E5 Registry \u4E2D\u662F\u5426\u5B58\u5728\u3002",
1011
1078
  inputSchema: {
1012
1079
  type: "object",
1013
1080
  properties: {
1014
- pattern: { type: "string", description: "\u641C\u7D22\u6A21\u5F0F\uFF08\u6B63\u5219\u8868\u8FBE\u5F0F\uFF09" },
1015
- path: { type: "string", description: "\u641C\u7D22\u8DEF\u5F84" },
1016
- glob: { type: "string", description: "\u6587\u4EF6 glob \u6A21\u5F0F" },
1017
- headLimit: { type: "number", description: "\u8FD4\u56DE\u7ED3\u679C\u6570\u91CF\u9650\u5236" }
1081
+ agentId: { type: "string", description: "\u8981\u67E5\u8BE2\u7684 Agent ID" }
1018
1082
  },
1019
- required: ["pattern"]
1083
+ required: ["agentId"]
1020
1084
  }
1021
1085
  }, {
1022
1086
  operationKind: "read",
1023
- requiresExecutionEvidence: false,
1024
- rawDomain: "workspace"
1087
+ requiresExecutionEvidence: false
1025
1088
  })
1026
1089
  ];
1027
- var batchFileTools = [
1090
+ var agentTabTools = [
1028
1091
  annotateTool({
1029
- name: "seastudio-file_batch_flatten_preview",
1030
- description: "\u9884\u89C8\u6587\u4EF6\u5939\u5185\u6240\u6709\u6587\u4EF6\uFF08\u7528\u4E8E\u6279\u91CF\u5E73\u94FA\u590D\u5236\uFF09\u3002\u8DEF\u5F84\u7EDF\u4E00\u4F7F\u7528 rootId + path\u3002",
1092
+ name: "seastudio-agent_tab_list",
1093
+ description: "\u83B7\u53D6\u5F53\u524D\u6240\u6709\u6253\u5F00\u7684 Agent \u6807\u7B7E\u9875\u3002\u8FD4\u56DE\u6BCF\u4E2A\u6807\u7B7E\u7684 instanceId\u3001agentId\u3001name \u7B49\u3002",
1031
1094
  inputSchema: {
1032
1095
  type: "object",
1033
- properties: {
1034
- sourceRootId: { type: "string", enum: ["workspace"], description: "\u6E90\u6839\u76EE\u5F55 ID" },
1035
- sourcePath: { type: "string", description: "\u6E90\u76EE\u5F55\u8DEF\u5F84\uFF08\u76F8\u5BF9\u4E8E sourceRootId\uFF09" }
1036
- },
1037
- required: ["sourceRootId", "sourcePath"]
1096
+ properties: {}
1038
1097
  }
1039
1098
  }, {
1040
1099
  operationKind: "read",
1041
- requiresExecutionEvidence: false,
1042
- rawDomain: "workspace"
1100
+ requiresExecutionEvidence: false
1043
1101
  }),
1044
1102
  annotateTool({
1045
- name: "seastudio-file_batch_flatten_copy",
1046
- description: "\u6279\u91CF\u5E73\u94FA\u590D\u5236\u6587\u4EF6\u5939\u5185\u6240\u6709\u6587\u4EF6\u5230\u76EE\u6807\u76EE\u5F55\u3002\u8DEF\u5F84\u7EDF\u4E00\u4F7F\u7528 rootId + path\u3002",
1103
+ name: "seastudio-agent_tab_get_active",
1104
+ description: "\u83B7\u53D6\u5F53\u524D\u805A\u7126\uFF08\u6FC0\u6D3B\uFF09\u7684 Agent \u6807\u7B7E\u9875\u3002\u8FD4\u56DE\u8BE5\u6807\u7B7E\u7684 instanceId\u3001agentId\u3001name\u3002",
1105
+ inputSchema: {
1106
+ type: "object",
1107
+ properties: {}
1108
+ }
1109
+ }, {
1110
+ operationKind: "read",
1111
+ requiresExecutionEvidence: false
1112
+ }),
1113
+ annotateTool({
1114
+ name: "seastudio-agent_tab_open",
1115
+ description: "\u4E3A\u6307\u5B9A Agent \u65B0\u5EFA\u4E00\u4E2A\u6807\u7B7E\u9875\u5E76\u6FC0\u6D3B\u3002\u9700\u63D0\u4F9B Agent id\u3002",
1047
1116
  inputSchema: {
1048
1117
  type: "object",
1049
1118
  properties: {
1050
- sourceRootId: { type: "string", enum: ["workspace"], description: "\u6E90\u6839\u76EE\u5F55 ID" },
1051
- sourcePath: { type: "string", description: "\u6E90\u76EE\u5F55\u8DEF\u5F84\uFF08\u76F8\u5BF9\u4E8E sourceRootId\uFF09" },
1052
- destRootId: { type: "string", enum: ["workspace"], description: "\u76EE\u6807\u6839\u76EE\u5F55 ID" },
1053
- destPath: { type: "string", description: "\u76EE\u6807\u76EE\u5F55\u8DEF\u5F84\uFF08\u76F8\u5BF9\u4E8E destRootId\uFF09" },
1054
- taskId: { type: "string", description: "\u4EFB\u52A1 ID\uFF08\u7528\u4E8E\u8FDB\u5EA6\u901A\u77E5\uFF09" }
1119
+ agentId: { type: "string", description: "\u8981\u6253\u5F00\u6807\u7B7E\u9875\u7684 Agent ID" }
1055
1120
  },
1056
- required: ["sourceRootId", "sourcePath", "destRootId", "destPath"]
1121
+ required: ["agentId"]
1057
1122
  }
1058
1123
  }, {
1059
1124
  operationKind: "mutate",
1060
- requiresExecutionEvidence: true,
1061
- rawDomain: "workspace"
1062
- }, batchFlattenCopyEvidenceOutputSchema)
1063
- ];
1064
- var seaCloudTools = [
1125
+ requiresExecutionEvidence: true
1126
+ }),
1065
1127
  annotateTool({
1066
- name: "seastudio-seacloud_list_models",
1067
- description: "\u5217\u51FA SeaCloud \u63A8\u7406\u7F51\u5173\u53EF\u7528\u7684\u591A\u6A21\u6001\u751F\u6210\u6A21\u578B\u53CA\u5176\u53C2\u6570 schema\u3002\u53EF\u6309 tag \u8FC7\u6EE4\uFF08\u5982 vidu\u3001tencent\u3001musicfy \u7B49\uFF09\u3002\u8FD4\u56DE\u6BCF\u4E2A\u6A21\u578B\u7684\u540D\u79F0\u3001\u6807\u7B7E\u548C\u53EF\u7528\u7684 body \u53C2\u6570\u5B9A\u4E49\u3002",
1128
+ name: "seastudio-agent_tab_switch",
1129
+ description: "\u5207\u6362\u5230\u6307\u5B9A\u7684 Agent \u6807\u7B7E\u9875\u3002\u9700\u63D0\u4F9B\u6807\u7B7E\u5B9E\u4F8B ID\uFF08instanceId\uFF09\u3002",
1068
1130
  inputSchema: {
1069
1131
  type: "object",
1070
1132
  properties: {
1071
- tag: { type: "string", description: '\u6309\u6807\u7B7E\u8FC7\u6EE4\u6A21\u578B\uFF08\u53EF\u9009\uFF09\uFF0C\u5982 "vidu"\u3001"musicfy"\u3001"tencent" \u7B49' }
1072
- }
1133
+ instanceId: { type: "string", description: "\u8981\u5207\u6362\u5230\u7684\u6807\u7B7E\u5B9E\u4F8B ID" }
1134
+ },
1135
+ required: ["instanceId"]
1073
1136
  }
1074
1137
  }, {
1075
- operationKind: "read",
1076
- requiresExecutionEvidence: false,
1077
- rawDomain: "asset"
1138
+ operationKind: "mutate",
1139
+ requiresExecutionEvidence: true
1078
1140
  }),
1079
1141
  annotateTool({
1080
- name: "seastudio-seacloud_create_task",
1081
- description: "\u901A\u8FC7 SeaCloud \u63A8\u7406\u7F51\u5173\u521B\u5EFA\u591A\u6A21\u6001\u751F\u6210\u4EFB\u52A1\u3002\u9700\u6307\u5B9A\u6A21\u578B\u540D\u79F0\u548C\u5BF9\u5E94\u53C2\u6570\uFF0C\u53C2\u6570\u683C\u5F0F\u53C2\u7167 list_models \u8FD4\u56DE\u7684 schema\u3002\u8FD4\u56DE task_id \u7528\u4E8E\u540E\u7EED\u67E5\u8BE2\u3002",
1142
+ name: "seastudio-agent_tab_close",
1143
+ description: "\u5173\u95ED\u6307\u5B9A\u7684 Agent \u6807\u7B7E\u9875\u3002\u9700\u63D0\u4F9B\u6807\u7B7E\u5B9E\u4F8B ID\uFF08instanceId\uFF09\u3002",
1082
1144
  inputSchema: {
1083
1145
  type: "object",
1084
1146
  properties: {
1085
- model: { type: "string", description: "\u6A21\u578B\u540D\u79F0\uFF08\u6765\u81EA list_models \u8FD4\u56DE\u7684 model \u5B57\u6BB5\uFF09" },
1086
- params: { type: "object", description: "\u6A21\u578B\u53C2\u6570\uFF08\u6765\u81EA list_models \u8FD4\u56DE\u7684\u53C2\u6570 schema\uFF09" },
1087
- dash_scope: { type: "boolean", description: "\u662F\u5426\u89E3\u9664\u533A\u57DF\u9650\u5236\uFF0C\u9ED8\u8BA4 true" },
1088
- moderation: { type: "boolean", description: "\u662F\u5426\u89E3\u9664\u529F\u80FD\u9650\u5236\uFF0C\u9ED8\u8BA4 false" }
1147
+ instanceId: { type: "string", description: "\u8981\u5173\u95ED\u7684\u6807\u7B7E\u5B9E\u4F8B ID" }
1089
1148
  },
1090
- required: ["model", "params"]
1149
+ required: ["instanceId"]
1091
1150
  }
1092
1151
  }, {
1093
1152
  operationKind: "mutate",
1094
- requiresExecutionEvidence: false,
1095
- rawDomain: "asset"
1153
+ requiresExecutionEvidence: true
1096
1154
  }),
1097
1155
  annotateTool({
1098
- name: "seastudio-seacloud_query_task",
1099
- description: '\u67E5\u8BE2 SeaCloud \u751F\u6210\u4EFB\u52A1\u7684\u72B6\u6001\u548C\u7ED3\u679C\u3002status \u4E3A "completed" \u65F6 output \u4E2D\u5305\u542B\u751F\u6210\u7684\u8D44\u6E90 URL\uFF0C"in_progress" \u8868\u793A\u4ECD\u5728\u5904\u7406\uFF0C"failed" \u8868\u793A\u5931\u8D25\u3002',
1156
+ name: "seastudio-agent_tab_get_status",
1157
+ description: "\u83B7\u53D6\u6307\u5B9A Agent \u7684\u6807\u7B7E\u72B6\u6001\u3002\u8FD4\u56DE\u8BE5 Agent \u6253\u5F00\u4E86\u51E0\u4E2A\u6807\u7B7E\u3001\u5404\u6807\u7B7E\u7684 instanceId/name\u3001\u54EA\u4E2A\u662F\u5F53\u524D\u805A\u7126\u6001\u3002",
1100
1158
  inputSchema: {
1101
1159
  type: "object",
1102
1160
  properties: {
1103
- task_id: { type: "string", description: "\u4EFB\u52A1 ID\uFF08\u7531 create_task \u8FD4\u56DE\uFF09" }
1161
+ agentId: { type: "string", description: "\u8981\u67E5\u8BE2\u6807\u7B7E\u72B6\u6001\u7684 Agent ID" }
1104
1162
  },
1105
- required: ["task_id"]
1163
+ required: ["agentId"]
1106
1164
  }
1107
1165
  }, {
1108
1166
  operationKind: "read",
1109
- requiresExecutionEvidence: false,
1110
- rawDomain: "asset"
1167
+ requiresExecutionEvidence: false
1111
1168
  })
1112
1169
  ];
1113
- var allTools = [
1114
- ...fileTools,
1115
- ...shellTools,
1116
- ...gitTools,
1117
- ...clipboardTools,
1118
- ...codeQualityTools,
1119
- ...batchFileTools,
1120
- ...seaCloudTools,
1121
- ...pluginManagementTools,
1122
- ...agentManagementTools,
1123
- ...pluginTabTools,
1124
- ...agentTabTools
1125
- ];
1126
- var tools = allTools;
1127
- async function callTool(name, args = {}) {
1128
- return getDefaultClient().callTool(name, args);
1129
- }
1130
- async function request(method, params) {
1131
- return getDefaultClient().request(method, params);
1132
- }
1133
- function usesAbsolutePathMode(mode) {
1134
- return mode === "absolute";
1135
- }
1136
- function getPathBasename(path) {
1137
- const trimmed = path.replace(/[\\/]+$/g, "");
1138
- if (!trimmed) return "";
1139
- const parts = trimmed.split(/[\\/]/).filter(Boolean);
1140
- return parts[parts.length - 1] ?? "";
1141
- }
1142
- function joinWorkspacePath(dir, name) {
1143
- const normalizedDir = dir.replace(/\\/g, "/").replace(/\/+$/g, "");
1144
- const normalizedName = name.replace(/^\/+/g, "");
1145
- return normalizedDir ? `${normalizedDir}/${normalizedName}` : normalizedName;
1146
- }
1147
- var seastudio = {
1148
- roots: {
1149
- list: () => request("roots/list")
1150
- },
1151
- file: {
1152
- getSelected: () => callTool("seastudio-file_get_selected", {}),
1153
- read: (path, options) => callTool("seastudio-file_read", {
1154
- rootId: options?.rootId ?? "workspace",
1155
- path,
1156
- ...typeof options?.offset === "number" ? { offset: options.offset } : {},
1157
- ...typeof options?.limit === "number" ? { limit: options.limit } : {}
1158
- }),
1159
- write: (path, content, options) => callTool("seastudio-file_write", { rootId: options?.rootId ?? "workspace", path, content }),
1160
- list: (path, options) => callTool("seastudio-file_list", {
1161
- rootId: options?.rootId ?? "workspace",
1162
- path: typeof path === "string" ? path : ""
1163
- }),
1164
- delete: (path, options) => callTool("seastudio-file_delete", { rootId: options?.rootId ?? "workspace", path }),
1165
- mkdir: (path, options) => callTool("seastudio-file_mkdir", { rootId: options?.rootId ?? "workspace", path }),
1166
- exists: (path, options) => callTool("seastudio-file_exists", { rootId: options?.rootId ?? "workspace", path }),
1167
- stat: (path, options) => callTool("seastudio-file_stat", {
1168
- rootId: options?.rootId ?? "workspace",
1169
- path
1170
- }),
1171
- info: (path, options) => callTool("seastudio-file_info", {
1172
- rootId: options?.rootId ?? "workspace",
1173
- path
1174
- }),
1175
- search: (query, options) => callTool("seastudio-file_search", {
1176
- query,
1177
- rootId: options?.rootId ?? "workspace",
1178
- path: options?.path ?? "",
1179
- ...options?.glob ? { glob: options.glob } : {},
1180
- ...typeof options?.headLimit === "number" ? { headLimit: options.headLimit } : {}
1181
- }),
1182
- rename: (path, newName, options) => callTool("seastudio-file_rename", { rootId: options?.rootId ?? "workspace", path, newName }),
1183
- move: (sourcePath, destDir, options) => {
1184
- if (usesAbsolutePathMode(options?.sourcePathMode) || usesAbsolutePathMode(options?.destPathMode)) {
1185
- return callTool("seastudio-file_move", { sourcePath, destDir, ...options });
1186
- }
1187
- const srcRoot = options?.sourceRootId ?? "workspace";
1188
- const dstRoot = options?.destRootId ?? srcRoot;
1189
- return callTool("seastudio-file_move", {
1190
- sourceRootId: srcRoot,
1191
- sourcePath,
1192
- destRootId: dstRoot,
1193
- destPath: joinWorkspacePath(destDir, getPathBasename(sourcePath))
1194
- });
1195
- },
1196
- copyTo: (sourcePath, destDir, options) => {
1197
- if (usesAbsolutePathMode(options?.sourcePathMode) || usesAbsolutePathMode(options?.destPathMode)) {
1198
- return callTool("seastudio-file_copy_to", { sourcePath, destDir, ...options });
1199
- }
1200
- const srcRoot = options?.sourceRootId ?? "workspace";
1201
- const dstRoot = options?.destRootId ?? srcRoot;
1202
- return callTool("seastudio-file_copy_to", {
1203
- sourceRootId: srcRoot,
1204
- sourcePath,
1205
- destRootId: dstRoot,
1206
- destPath: joinWorkspacePath(destDir, getPathBasename(sourcePath))
1207
- });
1208
- },
1209
- copy: (path, options) => callTool("seastudio-file_copy", { rootId: options?.rootId ?? "workspace", path }),
1210
- paste: (path = "", options) => callTool("seastudio-file_paste", { rootId: options?.rootId ?? "workspace", path }),
1211
- clipboardCheck: () => callTool("seastudio-file_clipboard_check", {}),
1212
- copyPath: (path, options) => callTool("seastudio-file_copy_path", { rootId: options?.rootId ?? "workspace", path }),
1213
- trash: (path, options) => callTool("seastudio-file_trash", { rootId: options?.rootId ?? "workspace", path }),
1214
- batchFlattenPreview: (sourcePath, options) => {
1215
- if (usesAbsolutePathMode(options?.sourcePathMode)) {
1216
- return callTool("seastudio-file_batch_flatten_preview", { sourcePath, ...options });
1217
- }
1218
- return callTool("seastudio-file_batch_flatten_preview", {
1219
- sourceRootId: options?.sourceRootId ?? "workspace",
1220
- sourcePath
1221
- });
1222
- },
1223
- batchFlattenCopy: (sourcePath, destDir, taskId, options) => {
1224
- if (usesAbsolutePathMode(options?.sourcePathMode) || usesAbsolutePathMode(options?.destPathMode)) {
1225
- return callTool("seastudio-file_batch_flatten_copy", { sourcePath, destDir, taskId, ...options });
1226
- }
1227
- const srcRoot = options?.sourceRootId ?? "workspace";
1228
- const dstRoot = options?.destRootId ?? srcRoot;
1229
- return callTool("seastudio-file_batch_flatten_copy", {
1230
- sourceRootId: srcRoot,
1231
- sourcePath,
1232
- destRootId: dstRoot,
1233
- destPath: destDir,
1234
- ...typeof taskId === "string" ? { taskId } : {}
1235
- });
1236
- },
1237
- getUrl: (path, options) => callTool("seastudio-file_get_url", { rootId: options?.rootId ?? "workspace", path }),
1238
- download: (url, path, filenameHint, options) => callTool("seastudio-file_download", { rootId: options?.rootId ?? "workspace", path, url, filenameHint }),
1239
- writeBinary: (path, base64, options) => callTool("seastudio-file_write_binary", { rootId: options?.rootId ?? "workspace", path, base64 }),
1240
- readBinary: (path, options) => callTool("seastudio-file_read_binary", { rootId: options?.rootId ?? "workspace", path })
1241
- },
1242
- shell: {
1243
- execute: (command, cwd, timeout) => callTool("seastudio-shell_execute", { command, cwd, timeout }),
1244
- session: {
1245
- get: () => callTool("seastudio-shell_session_get", {}),
1246
- getEntries: (limit) => callTool("seastudio-shell_session_get_entries", { limit }),
1247
- runCommand: (command, cwd, timeout) => callTool("seastudio-shell_session_run_command", { command, cwd, timeout }),
1248
- setCwd: (cwd) => callTool("seastudio-shell_session_set_cwd", { cwd }),
1249
- clear: () => callTool("seastudio-shell_session_clear", {}),
1250
- reset: () => callTool("seastudio-shell_session_reset", {})
1251
- }
1252
- },
1253
- git: {
1254
- status: () => callTool("seastudio-git_status", {}),
1255
- diff: (staged, path) => callTool("seastudio-git_diff", { staged, path })
1256
- },
1257
- codeQuality: {
1258
- runTest: (command, timeout) => callTool("seastudio-run_test", { command, timeout }),
1259
- runTypecheck: (command, timeout) => callTool("seastudio-run_typecheck", { command, timeout }),
1260
- runLint: (command, timeout) => callTool("seastudio-run_lint", { command, timeout }),
1261
- codeSearch: (pattern, path, glob, headLimit) => callTool("seastudio-code_search", { pattern, path, glob, headLimit })
1262
- }
1263
- };
1264
1170
 
1265
1171
  // src/mcp/seastudio/notifications.ts
1266
1172
  var SeastudioRequests = {
@@ -1276,6 +1182,10 @@ var SeastudioRequests = {
1276
1182
  var SeastudioNotifications = {
1277
1183
  /** 文件系统变化通知(fs.watch 触发) */
1278
1184
  FILES_CHANGED: "files:changed",
1185
+ /** 文件或目录被重命名/移动 */
1186
+ FILE_RENAMED: "file:renamed",
1187
+ /** 文件或目录被删除/移入回收站 */
1188
+ FILE_DELETED: "file:deleted",
1279
1189
  /** 根目录变化通知 */
1280
1190
  ROOTS_CHANGED: "roots:changed",
1281
1191
  /** 文件打开请求,可广播也可定向 */
@@ -1292,4 +1202,16 @@ var SeastudioNotifications = {
1292
1202
  PROPOSAL_FEEDBACK: "seastudio:proposal-feedback"
1293
1203
  };
1294
1204
 
1295
- export { SeastudioNotifications, SeastudioRequests, agentManagementTools, agentTabTools, allTools, annotateTool, batchFileTools, clipboardTools, codeQualityTools, fileTools, gitTools, pluginManagementTools, pluginTabTools, seaCloudTools, seastudio, shellTools, tools };
1205
+ // src/mcp/seastudio/index.ts
1206
+ var allTools = [
1207
+ ...fileTools,
1208
+ ...shellTools,
1209
+ ...seaCloudTools,
1210
+ ...pluginManagementTools,
1211
+ ...agentManagementTools,
1212
+ ...pluginTabTools,
1213
+ ...agentTabTools
1214
+ ];
1215
+ var tools = allTools;
1216
+
1217
+ export { SeastudioNotifications, SeastudioRequests, agentManagementTools, agentTabTools, allTools, annotateTool, batchFlattenCopyEvidenceOutputSchema, callTool, callToolText, dualPathEvidenceOutputSchema, fileDownloadEvidenceOutputSchema, fileTools, pluginManagementTools, pluginTabTools, request, rootedPathEvidenceOutputSchema, rootedWriteEvidenceOutputSchema, seaCloudTools, seastudio, shellCommandEvidenceOutputSchema, shellSessionSnapshotEvidenceOutputSchema, shellTools, tools };