@seastudio/sdk 3.0.0

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