@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,1293 @@
1
+ import { getDefaultClient } from './chunk-ANWOL7SM.js';
2
+
3
+ // src/mcp/seastudio/tools-plugin.ts
4
+ var pluginManagementTools = [
5
+ 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",
8
+ inputSchema: {
9
+ type: "object",
10
+ properties: {}
11
+ }
12
+ }, {
13
+ operationKind: "read",
14
+ requiresExecutionEvidence: false
15
+ }),
16
+ 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",
19
+ inputSchema: {
20
+ type: "object",
21
+ properties: {}
22
+ }
23
+ }, {
24
+ operationKind: "read",
25
+ requiresExecutionEvidence: false
26
+ }),
27
+ 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",
30
+ inputSchema: {
31
+ type: "object",
32
+ properties: {
33
+ pluginId: { type: "string", description: "\u8981\u5B89\u88C5\u7684\u63D2\u4EF6 ID" }
34
+ },
35
+ required: ["pluginId"]
36
+ }
37
+ }, {
38
+ operationKind: "mutate",
39
+ requiresExecutionEvidence: true
40
+ }),
41
+ annotateTool({
42
+ name: "seastudio-plugin_uninstall",
43
+ description: "\u5378\u8F7D\u6307\u5B9A\u63D2\u4EF6\u3002\u9700\u63D0\u4F9B\u63D2\u4EF6 id\u3002",
44
+ inputSchema: {
45
+ type: "object",
46
+ properties: {
47
+ pluginId: { type: "string", description: "\u8981\u5378\u8F7D\u7684\u63D2\u4EF6 ID" }
48
+ },
49
+ required: ["pluginId"]
50
+ }
51
+ }, {
52
+ operationKind: "mutate",
53
+ requiresExecutionEvidence: true
54
+ }),
55
+ 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",
58
+ inputSchema: {
59
+ type: "object",
60
+ properties: {
61
+ pluginId: { type: "string", description: "\u8981\u542F\u7528\u7684\u63D2\u4EF6 ID" }
62
+ },
63
+ required: ["pluginId"]
64
+ }
65
+ }, {
66
+ operationKind: "mutate",
67
+ requiresExecutionEvidence: true
68
+ }),
69
+ 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",
72
+ inputSchema: {
73
+ type: "object",
74
+ properties: {
75
+ pluginId: { type: "string", description: "\u8981\u7981\u7528\u7684\u63D2\u4EF6 ID" }
76
+ },
77
+ required: ["pluginId"]
78
+ }
79
+ }, {
80
+ operationKind: "mutate",
81
+ requiresExecutionEvidence: true
82
+ }),
83
+ 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",
86
+ inputSchema: {
87
+ type: "object",
88
+ properties: {
89
+ pluginId: { type: "string", description: "\u8981\u67E5\u8BE2\u7684\u63D2\u4EF6 ID" }
90
+ },
91
+ required: ["pluginId"]
92
+ }
93
+ }, {
94
+ operationKind: "read",
95
+ requiresExecutionEvidence: false
96
+ })
97
+ ];
98
+ var pluginTabTools = [
99
+ 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",
102
+ inputSchema: {
103
+ type: "object",
104
+ properties: {}
105
+ }
106
+ }, {
107
+ operationKind: "read",
108
+ requiresExecutionEvidence: false
109
+ }),
110
+ 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",
113
+ inputSchema: {
114
+ type: "object",
115
+ properties: {}
116
+ }
117
+ }, {
118
+ operationKind: "read",
119
+ requiresExecutionEvidence: false
120
+ }),
121
+ 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",
124
+ inputSchema: {
125
+ type: "object",
126
+ properties: {
127
+ pluginId: { type: "string", description: "\u8981\u6253\u5F00\u6807\u7B7E\u9875\u7684\u63D2\u4EF6 ID" }
128
+ },
129
+ required: ["pluginId"]
130
+ }
131
+ }, {
132
+ operationKind: "mutate",
133
+ requiresExecutionEvidence: true
134
+ }),
135
+ 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",
138
+ inputSchema: {
139
+ type: "object",
140
+ properties: {
141
+ instanceId: { type: "string", description: "\u8981\u5207\u6362\u5230\u7684\u6807\u7B7E\u5B9E\u4F8B ID" }
142
+ },
143
+ required: ["instanceId"]
144
+ }
145
+ }, {
146
+ operationKind: "mutate",
147
+ requiresExecutionEvidence: true
148
+ }),
149
+ 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",
152
+ inputSchema: {
153
+ type: "object",
154
+ properties: {
155
+ instanceId: { type: "string", description: "\u8981\u5173\u95ED\u7684\u6807\u7B7E\u5B9E\u4F8B ID" }
156
+ },
157
+ required: ["instanceId"]
158
+ }
159
+ }, {
160
+ 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",
166
+ inputSchema: {
167
+ type: "object",
168
+ properties: {
169
+ pluginId: { type: "string", description: "\u8981\u67E5\u8BE2\u6807\u7B7E\u72B6\u6001\u7684\u63D2\u4EF6 ID" }
170
+ },
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: {}
187
+ }
188
+ }, {
189
+ operationKind: "read",
190
+ requiresExecutionEvidence: false
191
+ }),
192
+ 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",
195
+ inputSchema: {
196
+ type: "object",
197
+ properties: {}
198
+ }
199
+ }, {
200
+ operationKind: "read",
201
+ requiresExecutionEvidence: false
202
+ }),
203
+ 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",
206
+ inputSchema: {
207
+ type: "object",
208
+ properties: {
209
+ agentId: { type: "string", description: "\u8981\u5B89\u88C5\u7684 Agent ID" }
210
+ },
211
+ required: ["agentId"]
212
+ }
213
+ }, {
214
+ operationKind: "mutate",
215
+ requiresExecutionEvidence: true
216
+ }),
217
+ annotateTool({
218
+ name: "seastudio-agent_uninstall",
219
+ description: "\u5378\u8F7D\u6307\u5B9A Agent\u3002\u9700\u63D0\u4F9B Agent id\u3002",
220
+ inputSchema: {
221
+ type: "object",
222
+ properties: {
223
+ agentId: { type: "string", description: "\u8981\u5378\u8F7D\u7684 Agent ID" }
224
+ },
225
+ required: ["agentId"]
226
+ }
227
+ }, {
228
+ operationKind: "mutate",
229
+ requiresExecutionEvidence: true
230
+ }),
231
+ 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",
234
+ inputSchema: {
235
+ type: "object",
236
+ properties: {
237
+ agentId: { type: "string", description: "\u8981\u542F\u7528\u7684 Agent ID" }
238
+ },
239
+ required: ["agentId"]
240
+ }
241
+ }, {
242
+ operationKind: "mutate",
243
+ requiresExecutionEvidence: true
244
+ }),
245
+ 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",
248
+ inputSchema: {
249
+ type: "object",
250
+ properties: {
251
+ agentId: { type: "string", description: "\u8981\u7981\u7528\u7684 Agent ID" }
252
+ },
253
+ required: ["agentId"]
254
+ }
255
+ }, {
256
+ operationKind: "mutate",
257
+ requiresExecutionEvidence: true
258
+ }),
259
+ 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",
262
+ inputSchema: {
263
+ type: "object",
264
+ properties: {
265
+ agentId: { type: "string", description: "\u8981\u67E5\u8BE2\u7684 Agent ID" }
266
+ },
267
+ required: ["agentId"]
268
+ }
269
+ }, {
270
+ operationKind: "read",
271
+ requiresExecutionEvidence: false
272
+ })
273
+ ];
274
+ var agentTabTools = [
275
+ 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",
278
+ inputSchema: {
279
+ type: "object",
280
+ properties: {}
281
+ }
282
+ }, {
283
+ operationKind: "read",
284
+ requiresExecutionEvidence: false
285
+ }),
286
+ 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",
289
+ inputSchema: {
290
+ type: "object",
291
+ properties: {}
292
+ }
293
+ }, {
294
+ operationKind: "read",
295
+ requiresExecutionEvidence: false
296
+ }),
297
+ 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",
300
+ inputSchema: {
301
+ type: "object",
302
+ properties: {
303
+ agentId: { type: "string", description: "\u8981\u6253\u5F00\u6807\u7B7E\u9875\u7684 Agent ID" }
304
+ },
305
+ required: ["agentId"]
306
+ }
307
+ }, {
308
+ operationKind: "mutate",
309
+ requiresExecutionEvidence: true
310
+ }),
311
+ 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",
314
+ inputSchema: {
315
+ type: "object",
316
+ properties: {
317
+ instanceId: { type: "string", description: "\u8981\u5207\u6362\u5230\u7684\u6807\u7B7E\u5B9E\u4F8B ID" }
318
+ },
319
+ required: ["instanceId"]
320
+ }
321
+ }, {
322
+ operationKind: "mutate",
323
+ requiresExecutionEvidence: true
324
+ }),
325
+ 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",
328
+ inputSchema: {
329
+ type: "object",
330
+ properties: {
331
+ instanceId: { type: "string", description: "\u8981\u5173\u95ED\u7684\u6807\u7B7E\u5B9E\u4F8B ID" }
332
+ },
333
+ required: ["instanceId"]
334
+ }
335
+ }, {
336
+ operationKind: "mutate",
337
+ requiresExecutionEvidence: true
338
+ }),
339
+ 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",
342
+ inputSchema: {
343
+ type: "object",
344
+ properties: {
345
+ agentId: { type: "string", description: "\u8981\u67E5\u8BE2\u6807\u7B7E\u72B6\u6001\u7684 Agent ID" }
346
+ },
347
+ required: ["agentId"]
348
+ }
349
+ }, {
350
+ operationKind: "read",
351
+ requiresExecutionEvidence: false
352
+ })
353
+ ];
354
+
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
+ }),
473
+ 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",
476
+ inputSchema: {
477
+ type: "object",
478
+ 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" }
482
+ },
483
+ required: ["rootId", "path", "content"]
484
+ }
485
+ }, {
486
+ operationKind: "mutate",
487
+ requiresExecutionEvidence: true,
488
+ rawDomain: "workspace"
489
+ }, rootedWriteEvidenceOutputSchema),
490
+ 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",
493
+ inputSchema: {
494
+ 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"]
500
+ }
501
+ }, {
502
+ operationKind: "read",
503
+ 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
+ }
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"]
548
+ }
549
+ }, {
550
+ operationKind: "read",
551
+ requiresExecutionEvidence: false,
552
+ rawDomain: "workspace"
553
+ }),
554
+ 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",
557
+ inputSchema: {
558
+ type: "object",
559
+ 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"]
564
+ }
565
+ }, {
566
+ operationKind: "read",
567
+ 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
+ }
581
+ }, {
582
+ operationKind: "read",
583
+ requiresExecutionEvidence: false,
584
+ rawDomain: "filesystem"
585
+ }),
586
+ 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",
589
+ inputSchema: {
590
+ type: "object",
591
+ 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" }
597
+ },
598
+ required: ["rootId", "query"]
599
+ }
600
+ }, {
601
+ operationKind: "read",
602
+ requiresExecutionEvidence: false,
603
+ rawDomain: "filesystem"
604
+ }),
605
+ 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",
608
+ inputSchema: {
609
+ type: "object",
610
+ 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" }
614
+ },
615
+ required: ["rootId", "path", "newName"]
616
+ }
617
+ }, {
618
+ operationKind: "mutate",
619
+ requiresExecutionEvidence: true,
620
+ rawDomain: "workspace"
621
+ }, rootedPathEvidenceOutputSchema),
622
+ 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",
625
+ inputSchema: {
626
+ 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"]
634
+ }
635
+ }, {
636
+ operationKind: "mutate",
637
+ requiresExecutionEvidence: true,
638
+ rawDomain: "workspace"
639
+ }, dualPathEvidenceOutputSchema),
640
+ 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",
643
+ inputSchema: {
644
+ 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"]
652
+ }
653
+ }, {
654
+ operationKind: "mutate",
655
+ requiresExecutionEvidence: true,
656
+ rawDomain: "workspace"
657
+ }, dualPathEvidenceOutputSchema),
658
+ 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",
661
+ inputSchema: {
662
+ type: "object",
663
+ 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"]
668
+ }
669
+ }, {
670
+ operationKind: "read",
671
+ requiresExecutionEvidence: false,
672
+ rawDomain: "filesystem"
673
+ }),
674
+ 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",
677
+ inputSchema: {
678
+ type: "object",
679
+ 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" }
684
+ },
685
+ required: ["rootId", "path", "url"]
686
+ }
687
+ }, {
688
+ operationKind: "mutate",
689
+ requiresExecutionEvidence: true,
690
+ rawDomain: "filesystem"
691
+ }, fileDownloadEvidenceOutputSchema),
692
+ 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",
695
+ inputSchema: {
696
+ type: "object",
697
+ 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" }
701
+ },
702
+ required: ["rootId", "path", "base64"]
703
+ }
704
+ }, {
705
+ operationKind: "mutate",
706
+ requiresExecutionEvidence: true,
707
+ rawDomain: "workspace"
708
+ }),
709
+ 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",
712
+ inputSchema: {
713
+ 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"]
719
+ }
720
+ }, {
721
+ operationKind: "read",
722
+ rawDomain: "filesystem"
723
+ })
724
+ ];
725
+ var shellTools = [
726
+ 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",
729
+ inputSchema: {
730
+ type: "object",
731
+ 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" }
735
+ },
736
+ required: ["command"]
737
+ }
738
+ }, {
739
+ operationKind: "system",
740
+ requiresExecutionEvidence: true,
741
+ rawDomain: "shell"
742
+ }, shellCommandEvidenceOutputSchema),
743
+ 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",
746
+ inputSchema: {
747
+ type: "object",
748
+ properties: {}
749
+ }
750
+ }, {
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
+ }
767
+ }),
768
+ 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",
771
+ inputSchema: {
772
+ type: "object",
773
+ properties: {
774
+ limit: { type: "number", description: "\u8FD4\u56DE\u6700\u8FD1\u591A\u5C11\u6761\u8BB0\u5F55\uFF0C\u9ED8\u8BA4 200\u3002" }
775
+ }
776
+ }
777
+ }, {
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
+ }
797
+ }),
798
+ 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",
801
+ inputSchema: {
802
+ type: "object",
803
+ 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" }
807
+ },
808
+ required: ["command"]
809
+ }
810
+ }, {
811
+ operationKind: "system",
812
+ requiresExecutionEvidence: true,
813
+ rawDomain: "shell"
814
+ }, shellCommandEvidenceOutputSchema),
815
+ 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",
818
+ inputSchema: {
819
+ type: "object",
820
+ properties: {
821
+ cwd: { type: "string", description: "\u76EE\u6807\u5DE5\u4F5C\u76EE\u5F55" }
822
+ },
823
+ required: ["cwd"]
824
+ }
825
+ }, {
826
+ operationKind: "mutate",
827
+ requiresExecutionEvidence: true,
828
+ rawDomain: "shell"
829
+ }, shellSessionSnapshotEvidenceOutputSchema),
830
+ 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",
833
+ inputSchema: {
834
+ type: "object",
835
+ properties: {}
836
+ }
837
+ }, {
838
+ operationKind: "mutate",
839
+ requiresExecutionEvidence: true,
840
+ rawDomain: "shell"
841
+ }, shellSessionSnapshotEvidenceOutputSchema),
842
+ 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",
845
+ inputSchema: {
846
+ type: "object",
847
+ properties: {}
848
+ }
849
+ }, {
850
+ operationKind: "mutate",
851
+ requiresExecutionEvidence: true,
852
+ rawDomain: "shell"
853
+ }, shellSessionSnapshotEvidenceOutputSchema)
854
+ ];
855
+ var gitTools = [
856
+ 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",
859
+ inputSchema: {
860
+ type: "object",
861
+ properties: {}
862
+ }
863
+ }, {
864
+ operationKind: "read",
865
+ requiresExecutionEvidence: false,
866
+ rawDomain: "git"
867
+ }),
868
+ 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",
871
+ inputSchema: {
872
+ type: "object",
873
+ 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
+ }
877
+ }
878
+ }, {
879
+ operationKind: "read",
880
+ requiresExecutionEvidence: false,
881
+ rawDomain: "git"
882
+ })
883
+ ];
884
+ var clipboardTools = [
885
+ 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",
888
+ inputSchema: {
889
+ type: "object",
890
+ 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" }
893
+ },
894
+ required: ["rootId", "path"]
895
+ }
896
+ }, {
897
+ operationKind: "system",
898
+ requiresExecutionEvidence: true,
899
+ rawDomain: "workspace"
900
+ }, rootedPathEvidenceOutputSchema),
901
+ annotateTool({
902
+ name: "seastudio-file_paste",
903
+ description: "\u4ECE\u526A\u8D34\u677F\u7C98\u8D34\u6587\u4EF6/\u6587\u4EF6\u5939",
904
+ inputSchema: {
905
+ type: "object",
906
+ 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" }
909
+ },
910
+ required: ["rootId", "path"]
911
+ }
912
+ }, {
913
+ operationKind: "system",
914
+ requiresExecutionEvidence: true,
915
+ rawDomain: "workspace"
916
+ }, rootedPathEvidenceOutputSchema),
917
+ annotateTool({
918
+ name: "seastudio-file_clipboard_check",
919
+ description: "\u68C0\u67E5\u526A\u8D34\u677F\u662F\u5426\u6709\u6709\u6548\u7684\u6587\u4EF6\u8DEF\u5F84",
920
+ inputSchema: {
921
+ type: "object",
922
+ properties: {}
923
+ }
924
+ }, {
925
+ operationKind: "read",
926
+ requiresExecutionEvidence: false,
927
+ rawDomain: "workspace"
928
+ }),
929
+ annotateTool({
930
+ name: "seastudio-file_copy_path",
931
+ description: "\u590D\u5236\u6587\u4EF6\u8DEF\u5F84\u6587\u672C\u5230\u526A\u8D34\u677F",
932
+ inputSchema: {
933
+ 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"]
939
+ }
940
+ }, {
941
+ operationKind: "system",
942
+ requiresExecutionEvidence: true,
943
+ rawDomain: "workspace"
944
+ }, rootedPathEvidenceOutputSchema),
945
+ 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",
948
+ inputSchema: {
949
+ type: "object",
950
+ 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" }
953
+ },
954
+ required: ["rootId", "path"]
955
+ }
956
+ }, {
957
+ operationKind: "mutate",
958
+ requiresExecutionEvidence: true,
959
+ rawDomain: "workspace"
960
+ }, rootedPathEvidenceOutputSchema)
961
+ ];
962
+ var codeQualityTools = [
963
+ annotateTool({
964
+ name: "seastudio-run_test",
965
+ description: "\u8FD0\u884C\u9879\u76EE\u6D4B\u8BD5",
966
+ inputSchema: {
967
+ type: "object",
968
+ 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
+ }
972
+ }
973
+ }, {
974
+ operationKind: "system",
975
+ requiresExecutionEvidence: true,
976
+ rawDomain: "shell"
977
+ }, shellCommandEvidenceOutputSchema),
978
+ annotateTool({
979
+ name: "seastudio-run_typecheck",
980
+ description: "\u8FD0\u884C\u7C7B\u578B\u68C0\u67E5",
981
+ inputSchema: {
982
+ type: "object",
983
+ 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
+ }
987
+ }
988
+ }, {
989
+ operationKind: "system",
990
+ requiresExecutionEvidence: true,
991
+ rawDomain: "shell"
992
+ }, shellCommandEvidenceOutputSchema),
993
+ annotateTool({
994
+ name: "seastudio-run_lint",
995
+ description: "\u8FD0\u884C\u4EE3\u7801\u68C0\u67E5",
996
+ inputSchema: {
997
+ type: "object",
998
+ 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
+ }
1002
+ }
1003
+ }, {
1004
+ operationKind: "system",
1005
+ requiresExecutionEvidence: true,
1006
+ rawDomain: "shell"
1007
+ }, shellCommandEvidenceOutputSchema),
1008
+ 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",
1011
+ inputSchema: {
1012
+ type: "object",
1013
+ 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" }
1018
+ },
1019
+ required: ["pattern"]
1020
+ }
1021
+ }, {
1022
+ operationKind: "read",
1023
+ requiresExecutionEvidence: false,
1024
+ rawDomain: "workspace"
1025
+ })
1026
+ ];
1027
+ var batchFileTools = [
1028
+ 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",
1031
+ inputSchema: {
1032
+ 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"]
1038
+ }
1039
+ }, {
1040
+ operationKind: "read",
1041
+ requiresExecutionEvidence: false,
1042
+ rawDomain: "workspace"
1043
+ }),
1044
+ 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",
1047
+ inputSchema: {
1048
+ type: "object",
1049
+ 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" }
1055
+ },
1056
+ required: ["sourceRootId", "sourcePath", "destRootId", "destPath"]
1057
+ }
1058
+ }, {
1059
+ operationKind: "mutate",
1060
+ requiresExecutionEvidence: true,
1061
+ rawDomain: "workspace"
1062
+ }, batchFlattenCopyEvidenceOutputSchema)
1063
+ ];
1064
+ var seaCloudTools = [
1065
+ 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",
1068
+ inputSchema: {
1069
+ type: "object",
1070
+ 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
+ }
1073
+ }
1074
+ }, {
1075
+ operationKind: "read",
1076
+ requiresExecutionEvidence: false,
1077
+ rawDomain: "asset"
1078
+ }),
1079
+ 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",
1082
+ inputSchema: {
1083
+ type: "object",
1084
+ 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" }
1089
+ },
1090
+ required: ["model", "params"]
1091
+ }
1092
+ }, {
1093
+ operationKind: "mutate",
1094
+ requiresExecutionEvidence: false,
1095
+ rawDomain: "asset"
1096
+ }),
1097
+ 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',
1100
+ inputSchema: {
1101
+ type: "object",
1102
+ properties: {
1103
+ task_id: { type: "string", description: "\u4EFB\u52A1 ID\uFF08\u7531 create_task \u8FD4\u56DE\uFF09" }
1104
+ },
1105
+ required: ["task_id"]
1106
+ }
1107
+ }, {
1108
+ operationKind: "read",
1109
+ requiresExecutionEvidence: false,
1110
+ rawDomain: "asset"
1111
+ })
1112
+ ];
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
+
1265
+ // src/mcp/seastudio/notifications.ts
1266
+ var SeastudioRequests = {
1267
+ /** 请求打开文件 -> 主程序发布 FILE_OPEN_REQUESTED */
1268
+ FILE_OPEN: "request:file_open",
1269
+ /** 请求标记文件已修改 -> 主程序发布 FILE_MODIFIED */
1270
+ FILE_MODIFIED: "request:file_modified",
1271
+ /** 请求标记文件已保存 -> 主程序发布 FILE_SAVED */
1272
+ FILE_SAVED: "request:file_saved",
1273
+ /** 请求发送文本给 Agent -> 主程序发布 TEXT_SEND_REQUESTED */
1274
+ TEXT_SEND: "request:text_send"
1275
+ };
1276
+ var SeastudioNotifications = {
1277
+ /** 文件系统变化通知(fs.watch 触发) */
1278
+ FILES_CHANGED: "files:changed",
1279
+ /** 根目录变化通知 */
1280
+ ROOTS_CHANGED: "roots:changed",
1281
+ /** 文件打开请求,可广播也可定向 */
1282
+ FILE_OPEN_REQUESTED: "seastudio:file-open_requested",
1283
+ /** 文件已修改通知(内容变化,未保存) */
1284
+ FILE_MODIFIED: "file:modified",
1285
+ /** 文件已保存通知 */
1286
+ FILE_SAVED: "file:saved",
1287
+ /** 文件发送请求 */
1288
+ FILE_SEND_REQUESTED: "seastudio:file-send_requested",
1289
+ /** 文本发送请求 */
1290
+ TEXT_SEND_REQUESTED: "seastudio:text-send_requested"
1291
+ };
1292
+
1293
+ export { SeastudioNotifications, SeastudioRequests, agentManagementTools, agentTabTools, allTools, annotateTool, batchFileTools, clipboardTools, codeQualityTools, fileTools, gitTools, pluginManagementTools, pluginTabTools, seaCloudTools, seastudio, shellTools, tools };