@seastudio/sdk 3.2.4 → 3.3.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.
- package/dist/{chunk-OFGU4HO7.cjs → chunk-2MGJLIRZ.cjs} +4 -4
- package/dist/{chunk-P2PM5DNR.js → chunk-CJ2BXMJ3.js} +325 -174
- package/dist/{chunk-SYMWE636.cjs → chunk-GEPSOYJN.cjs} +12 -5
- package/dist/{chunk-2JKO4ISE.cjs → chunk-RRDE5HQX.cjs} +330 -174
- package/dist/{chunk-7WCCFXYM.js → chunk-VFDZPHJD.js} +1 -1
- package/dist/{chunk-4JAYW5GM.js → chunk-X62SRZS4.js} +12 -5
- package/dist/index.cjs +38 -38
- package/dist/index.js +3 -3
- package/dist/mcp/index.cjs +24 -24
- package/dist/mcp/index.js +2 -2
- package/dist/mcp/seastudio/index.cjs +45 -25
- package/dist/mcp/seastudio/index.d.cts +114 -27
- package/dist/mcp/seastudio/index.d.ts +114 -27
- package/dist/mcp/seastudio/index.js +1 -1
- package/dist/ui/index.cjs +14 -14
- package/dist/ui/index.js +1 -1
- package/package.json +1 -1
|
@@ -53,41 +53,77 @@ var batchFlattenCopyEvidenceOutputSchema = {
|
|
|
53
53
|
var fileDownloadEvidenceOutputSchema = {
|
|
54
54
|
type: "object",
|
|
55
55
|
properties: {
|
|
56
|
+
location: { type: "string", enum: ["workspace", "absolute"] },
|
|
56
57
|
rootId: { type: "string" },
|
|
58
|
+
absoluteDir: { type: "string" },
|
|
57
59
|
path: { type: "string" },
|
|
58
60
|
savedPath: { type: "string" },
|
|
59
|
-
size: { type: "number" }
|
|
61
|
+
size: { type: "number" },
|
|
62
|
+
mime: { type: "string" }
|
|
60
63
|
},
|
|
61
|
-
required: ["
|
|
64
|
+
required: ["location", "path", "savedPath", "size"]
|
|
62
65
|
};
|
|
63
|
-
var
|
|
66
|
+
var shellSessionSnapshotEvidenceOutputSchema = {
|
|
64
67
|
type: "object",
|
|
65
68
|
properties: {
|
|
66
|
-
|
|
69
|
+
sessionId: { type: "string" },
|
|
70
|
+
shell: { type: "string", enum: ["bash", "pwsh", "cmd", "sh"] },
|
|
67
71
|
cwd: { type: "string" },
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
72
|
+
pid: { type: "number" },
|
|
73
|
+
alive: { type: "boolean" },
|
|
74
|
+
openedAt: { type: "number" },
|
|
75
|
+
label: { type: "string" },
|
|
76
|
+
pluginId: { type: "string" },
|
|
77
|
+
projectId: { type: "string" },
|
|
78
|
+
agentInstanceId: { type: "string" },
|
|
79
|
+
pendingCommandId: { type: "string" },
|
|
80
|
+
lastCommandId: { type: "string" },
|
|
81
|
+
lastExitCode: { type: "number" },
|
|
82
|
+
lastDurationMs: { type: "number" },
|
|
83
|
+
entryCount: { type: "number" },
|
|
84
|
+
droppedCount: { type: "number" }
|
|
74
85
|
},
|
|
75
|
-
required: ["
|
|
86
|
+
required: ["sessionId", "shell", "pid", "alive", "openedAt", "entryCount", "droppedCount"]
|
|
76
87
|
};
|
|
77
|
-
var
|
|
88
|
+
var shellSessionOpenEvidenceOutputSchema = {
|
|
78
89
|
type: "object",
|
|
79
90
|
properties: {
|
|
80
|
-
|
|
91
|
+
sessionId: { type: "string" },
|
|
92
|
+
shell: { type: "string", enum: ["bash", "pwsh", "cmd", "sh"] },
|
|
81
93
|
cwd: { type: "string" },
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
94
|
+
pid: { type: "number" },
|
|
95
|
+
openedAt: { type: "number" }
|
|
96
|
+
},
|
|
97
|
+
required: ["sessionId", "shell", "pid", "openedAt"]
|
|
98
|
+
};
|
|
99
|
+
var shellSessionRunEvidenceOutputSchema = {
|
|
100
|
+
type: "object",
|
|
101
|
+
properties: {
|
|
102
|
+
sessionId: { type: "string" },
|
|
103
|
+
commandId: { type: "string" },
|
|
104
|
+
startedAt: { type: "number" },
|
|
105
|
+
running: { type: "boolean" }
|
|
89
106
|
},
|
|
90
|
-
required: ["
|
|
107
|
+
required: ["sessionId", "commandId", "startedAt", "running"]
|
|
108
|
+
};
|
|
109
|
+
var shellSessionSignalEvidenceOutputSchema = {
|
|
110
|
+
type: "object",
|
|
111
|
+
properties: {
|
|
112
|
+
sessionId: { type: "string" },
|
|
113
|
+
signal: { type: "string", enum: ["INT", "TERM", "KILL"] },
|
|
114
|
+
ok: { type: "boolean" },
|
|
115
|
+
deliveredAt: { type: "number" }
|
|
116
|
+
},
|
|
117
|
+
required: ["sessionId", "signal", "ok", "deliveredAt"]
|
|
118
|
+
};
|
|
119
|
+
var shellSessionCloseEvidenceOutputSchema = {
|
|
120
|
+
type: "object",
|
|
121
|
+
properties: {
|
|
122
|
+
sessionId: { type: "string" },
|
|
123
|
+
closed: { type: "boolean" },
|
|
124
|
+
exitCode: { type: "number" }
|
|
125
|
+
},
|
|
126
|
+
required: ["sessionId", "closed"]
|
|
91
127
|
};
|
|
92
128
|
var fileTools = [
|
|
93
129
|
annotateTool({
|
|
@@ -108,7 +144,7 @@ var fileTools = [
|
|
|
108
144
|
inputSchema: {
|
|
109
145
|
type: "object",
|
|
110
146
|
properties: {
|
|
111
|
-
rootId: { type: "string",
|
|
147
|
+
rootId: { type: "string", description: "\u76EE\u6807\u9879\u76EE\u6839\uFF1A'workspace' \u8868\u793A\u5F53\u524D\u6FC0\u6D3B\u9879\u76EE\uFF1B'proj-<projectId>' \u8868\u793A\u6309 id \u5BFB\u5740\u67D0\u4E2A\u9879\u76EE" },
|
|
112
148
|
path: { type: "string", description: "\u6587\u4EF6\u8DEF\u5F84\uFF08\u76F8\u5BF9\u4E8E rootId\uFF09" },
|
|
113
149
|
offset: { type: "number", description: "\u8D77\u59CB\u884C\u504F\u79FB\uFF08\u53EF\u9009\uFF09" },
|
|
114
150
|
limit: { type: "number", description: "\u8BFB\u53D6\u884C\u6570\u9650\u5236\uFF08\u53EF\u9009\uFF09" }
|
|
@@ -126,7 +162,7 @@ var fileTools = [
|
|
|
126
162
|
inputSchema: {
|
|
127
163
|
type: "object",
|
|
128
164
|
properties: {
|
|
129
|
-
rootId: { type: "string",
|
|
165
|
+
rootId: { type: "string", description: "\u76EE\u6807\u9879\u76EE\u6839\uFF1A'workspace' \u8868\u793A\u5F53\u524D\u6FC0\u6D3B\u9879\u76EE\uFF1B'proj-<projectId>' \u8868\u793A\u6309 id \u5BFB\u5740\u67D0\u4E2A\u9879\u76EE" },
|
|
130
166
|
path: { type: "string", description: "\u6587\u4EF6\u8DEF\u5F84\uFF08\u76F8\u5BF9\u4E8E rootId\uFF09" },
|
|
131
167
|
content: { type: "string", description: "\u6587\u4EF6\u5185\u5BB9" }
|
|
132
168
|
},
|
|
@@ -143,7 +179,7 @@ var fileTools = [
|
|
|
143
179
|
inputSchema: {
|
|
144
180
|
type: "object",
|
|
145
181
|
properties: {
|
|
146
|
-
rootId: { type: "string",
|
|
182
|
+
rootId: { type: "string", description: "\u76EE\u6807\u9879\u76EE\u6839\uFF1A'workspace' \u8868\u793A\u5F53\u524D\u6FC0\u6D3B\u9879\u76EE\uFF1B'proj-<projectId>' \u8868\u793A\u6309 id \u5BFB\u5740\u67D0\u4E2A\u9879\u76EE" },
|
|
147
183
|
path: { type: "string", description: "\u76EE\u5F55\u8DEF\u5F84\uFF08\u76F8\u5BF9\u4E8E rootId\uFF09" }
|
|
148
184
|
},
|
|
149
185
|
required: ["rootId", "path"]
|
|
@@ -159,7 +195,7 @@ var fileTools = [
|
|
|
159
195
|
inputSchema: {
|
|
160
196
|
type: "object",
|
|
161
197
|
properties: {
|
|
162
|
-
rootId: { type: "string",
|
|
198
|
+
rootId: { type: "string", description: "\u76EE\u6807\u9879\u76EE\u6839\uFF1A'workspace' \u8868\u793A\u5F53\u524D\u6FC0\u6D3B\u9879\u76EE\uFF1B'proj-<projectId>' \u8868\u793A\u6309 id \u5BFB\u5740\u67D0\u4E2A\u9879\u76EE" },
|
|
163
199
|
path: { type: "string", description: "\u8981\u5220\u9664\u7684\u8DEF\u5F84\uFF08\u76F8\u5BF9\u4E8E rootId\uFF09" }
|
|
164
200
|
},
|
|
165
201
|
required: ["rootId", "path"]
|
|
@@ -175,7 +211,7 @@ var fileTools = [
|
|
|
175
211
|
inputSchema: {
|
|
176
212
|
type: "object",
|
|
177
213
|
properties: {
|
|
178
|
-
rootId: { type: "string",
|
|
214
|
+
rootId: { type: "string", description: "\u76EE\u6807\u9879\u76EE\u6839\uFF1A'workspace' \u8868\u793A\u5F53\u524D\u6FC0\u6D3B\u9879\u76EE\uFF1B'proj-<projectId>' \u8868\u793A\u6309 id \u5BFB\u5740\u67D0\u4E2A\u9879\u76EE" },
|
|
179
215
|
path: { type: "string", description: "\u76EE\u5F55\u8DEF\u5F84\uFF08\u76F8\u5BF9\u4E8E rootId\uFF09" }
|
|
180
216
|
},
|
|
181
217
|
required: ["rootId", "path"]
|
|
@@ -191,7 +227,7 @@ var fileTools = [
|
|
|
191
227
|
inputSchema: {
|
|
192
228
|
type: "object",
|
|
193
229
|
properties: {
|
|
194
|
-
rootId: { type: "string",
|
|
230
|
+
rootId: { type: "string", description: "\u76EE\u6807\u9879\u76EE\u6839\uFF1A'workspace' \u8868\u793A\u5F53\u524D\u6FC0\u6D3B\u9879\u76EE\uFF1B'proj-<projectId>' \u8868\u793A\u6309 id \u5BFB\u5740\u67D0\u4E2A\u9879\u76EE" },
|
|
195
231
|
path: { type: "string", description: "\u8981\u68C0\u67E5\u7684\u8DEF\u5F84\uFF08\u76F8\u5BF9\u4E8E rootId\uFF09" }
|
|
196
232
|
},
|
|
197
233
|
required: ["rootId", "path"]
|
|
@@ -207,7 +243,7 @@ var fileTools = [
|
|
|
207
243
|
inputSchema: {
|
|
208
244
|
type: "object",
|
|
209
245
|
properties: {
|
|
210
|
-
rootId: { type: "string",
|
|
246
|
+
rootId: { type: "string", description: "\u76EE\u6807\u9879\u76EE\u6839\uFF1A'workspace' \u8868\u793A\u5F53\u524D\u6FC0\u6D3B\u9879\u76EE\uFF1B'proj-<projectId>' \u8868\u793A\u6309 id \u5BFB\u5740\u67D0\u4E2A\u9879\u76EE" },
|
|
211
247
|
path: { type: "string", description: "\u6587\u4EF6\u8DEF\u5F84" }
|
|
212
248
|
},
|
|
213
249
|
required: ["rootId", "path"]
|
|
@@ -223,7 +259,7 @@ var fileTools = [
|
|
|
223
259
|
inputSchema: {
|
|
224
260
|
type: "object",
|
|
225
261
|
properties: {
|
|
226
|
-
rootId: { type: "string",
|
|
262
|
+
rootId: { type: "string", description: "\u76EE\u6807\u9879\u76EE\u6839\uFF1A'workspace' \u8868\u793A\u5F53\u524D\u6FC0\u6D3B\u9879\u76EE\uFF1B'proj-<projectId>' \u8868\u793A\u6309 id \u5BFB\u5740\u67D0\u4E2A\u9879\u76EE" },
|
|
227
263
|
path: { type: "string", description: "\u6587\u4EF6\u6216\u76EE\u5F55\u8DEF\u5F84" }
|
|
228
264
|
},
|
|
229
265
|
required: ["rootId", "path"]
|
|
@@ -239,7 +275,7 @@ var fileTools = [
|
|
|
239
275
|
inputSchema: {
|
|
240
276
|
type: "object",
|
|
241
277
|
properties: {
|
|
242
|
-
rootId: { type: "string",
|
|
278
|
+
rootId: { type: "string", description: "\u76EE\u6807\u9879\u76EE\u6839\uFF1A'workspace' \u8868\u793A\u5F53\u524D\u6FC0\u6D3B\u9879\u76EE\uFF1B'proj-<projectId>' \u8868\u793A\u6309 id \u5BFB\u5740\u67D0\u4E2A\u9879\u76EE" },
|
|
243
279
|
query: { type: "string", description: "\u641C\u7D22\u5185\u5BB9\u6216\u6A21\u5F0F" },
|
|
244
280
|
path: { type: "string", description: "\u76F8\u5BF9 root \u7684\u641C\u7D22\u5B50\u8DEF\u5F84\uFF08\u53EF\u9009\uFF09" },
|
|
245
281
|
glob: { type: "string", description: "\u6587\u4EF6 glob \u6A21\u5F0F\uFF08\u53EF\u9009\uFF09" },
|
|
@@ -258,7 +294,7 @@ var fileTools = [
|
|
|
258
294
|
inputSchema: {
|
|
259
295
|
type: "object",
|
|
260
296
|
properties: {
|
|
261
|
-
rootId: { type: "string",
|
|
297
|
+
rootId: { type: "string", description: "\u76EE\u6807\u9879\u76EE\u6839\uFF1A'workspace' \u8868\u793A\u5F53\u524D\u6FC0\u6D3B\u9879\u76EE\uFF1B'proj-<projectId>' \u8868\u793A\u6309 id \u5BFB\u5740\u67D0\u4E2A\u9879\u76EE" },
|
|
262
298
|
path: { type: "string", description: "\u539F\u8DEF\u5F84\uFF08\u76F8\u5BF9\u4E8E rootId\uFF09" },
|
|
263
299
|
newName: { type: "string", description: "\u65B0\u540D\u79F0" }
|
|
264
300
|
},
|
|
@@ -275,9 +311,9 @@ var fileTools = [
|
|
|
275
311
|
inputSchema: {
|
|
276
312
|
type: "object",
|
|
277
313
|
properties: {
|
|
278
|
-
sourceRootId: { type: "string",
|
|
314
|
+
sourceRootId: { type: "string", description: "\u6E90\u9879\u76EE\u6839\uFF1A'workspace' \u8868\u793A\u5F53\u524D\u6FC0\u6D3B\u9879\u76EE\uFF1B'proj-<projectId>' \u8868\u793A\u6309 id \u5BFB\u5740\u67D0\u4E2A\u9879\u76EE" },
|
|
279
315
|
sourcePath: { type: "string", description: "\u6E90\u8DEF\u5F84\uFF08\u76F8\u5BF9\u4E8E sourceRootId\uFF09" },
|
|
280
|
-
destRootId: { type: "string",
|
|
316
|
+
destRootId: { type: "string", description: "\u76EE\u6807\u9879\u76EE\u6839\uFF1A'workspace' \u8868\u793A\u5F53\u524D\u6FC0\u6D3B\u9879\u76EE\uFF1B'proj-<projectId>' \u8868\u793A\u6309 id \u5BFB\u5740\u67D0\u4E2A\u9879\u76EE" },
|
|
281
317
|
destPath: { type: "string", description: "\u76EE\u6807\u8DEF\u5F84\uFF08\u76F8\u5BF9\u4E8E destRootId\uFF09" }
|
|
282
318
|
},
|
|
283
319
|
required: ["sourceRootId", "sourcePath", "destRootId", "destPath"]
|
|
@@ -293,9 +329,9 @@ var fileTools = [
|
|
|
293
329
|
inputSchema: {
|
|
294
330
|
type: "object",
|
|
295
331
|
properties: {
|
|
296
|
-
sourceRootId: { type: "string",
|
|
332
|
+
sourceRootId: { type: "string", description: "\u6E90\u9879\u76EE\u6839\uFF1A'workspace' \u8868\u793A\u5F53\u524D\u6FC0\u6D3B\u9879\u76EE\uFF1B'proj-<projectId>' \u8868\u793A\u6309 id \u5BFB\u5740\u67D0\u4E2A\u9879\u76EE" },
|
|
297
333
|
sourcePath: { type: "string", description: "\u6E90\u8DEF\u5F84\uFF08\u76F8\u5BF9\u4E8E sourceRootId\uFF09" },
|
|
298
|
-
destRootId: { type: "string",
|
|
334
|
+
destRootId: { type: "string", description: "\u76EE\u6807\u9879\u76EE\u6839\uFF1A'workspace' \u8868\u793A\u5F53\u524D\u6FC0\u6D3B\u9879\u76EE\uFF1B'proj-<projectId>' \u8868\u793A\u6309 id \u5BFB\u5740\u67D0\u4E2A\u9879\u76EE" },
|
|
299
335
|
destPath: { type: "string", description: "\u76EE\u6807\u8DEF\u5F84\uFF08\u76F8\u5BF9\u4E8E destRootId\uFF09" }
|
|
300
336
|
},
|
|
301
337
|
required: ["sourceRootId", "sourcePath", "destRootId", "destPath"]
|
|
@@ -311,7 +347,7 @@ var fileTools = [
|
|
|
311
347
|
inputSchema: {
|
|
312
348
|
type: "object",
|
|
313
349
|
properties: {
|
|
314
|
-
rootId: { type: "string",
|
|
350
|
+
rootId: { type: "string", description: "\u76EE\u6807\u9879\u76EE\u6839\uFF1A'workspace' \u8868\u793A\u5F53\u524D\u6FC0\u6D3B\u9879\u76EE\uFF1B'proj-<projectId>' \u8868\u793A\u6309 id \u5BFB\u5740\u67D0\u4E2A\u9879\u76EE" },
|
|
315
351
|
path: { type: "string", description: "\u6587\u4EF6\u8DEF\u5F84\uFF08\u76F8\u5BF9\u4E8E rootId\uFF09" }
|
|
316
352
|
},
|
|
317
353
|
required: ["rootId", "path"]
|
|
@@ -323,16 +359,20 @@ var fileTools = [
|
|
|
323
359
|
}),
|
|
324
360
|
annotateTool({
|
|
325
361
|
name: "seastudio-file_download",
|
|
326
|
-
description: "\u4ECE\u8FDC\u7A0B URL \u4E0B\u8F7D\u6587\u4EF6\
|
|
362
|
+
description: "\u4ECE\u8FDC\u7A0B URL \u4E0B\u8F7D\u6587\u4EF6\u3002\u4E8C\u9009\u4E00\uFF1A\u2460 \u5728\u76EE\u6807\u9879\u76EE\u6839\u4E0B\u6307\u5B9A\u76F8\u5BF9\u5B50\u76EE\u5F55\uFF08rootId + path\uFF09\uFF1B\u2461 \u6307\u5B9A absoluteDir \u4E3A\u672C\u5730\u7EDD\u5BF9\u8DEF\u5F84\u76EE\u5F55\uFF08\u542B ~/ \u5C55\u5F00\uFF09\uFF0C\u5FFD\u7565 rootId/path\u3002\u4EC5\u5728\u9700\u8981\u771F\u5B9E\u5F15\u5165\u8FDC\u7AEF\u8D44\u6E90\u65F6\u4F7F\u7528\u3002",
|
|
327
363
|
inputSchema: {
|
|
328
364
|
type: "object",
|
|
329
365
|
properties: {
|
|
330
|
-
rootId: { type: "string",
|
|
331
|
-
path: { type: "string", description: "\u4FDD\u5B58\u76EE\u5F55\u8DEF\u5F84\uFF08\u76F8\u5BF9\u4E8E rootId\uFF09" },
|
|
366
|
+
rootId: { type: "string", description: "\u76EE\u6807\u9879\u76EE\u6839\uFF08\u4E0E path \u8054\u7528\uFF1B\u82E5\u63D0\u4F9B absoluteDir \u5219\u5FFD\u7565\uFF09\u3002'workspace' \u8868\u793A\u5F53\u524D\u6FC0\u6D3B\u9879\u76EE\uFF1B'proj-<projectId>' \u6309 id \u5BFB\u5740\u3002" },
|
|
367
|
+
path: { type: "string", description: "\u4FDD\u5B58\u76EE\u5F55\u8DEF\u5F84\uFF08\u76F8\u5BF9\u4E8E rootId\uFF1B\u672A\u4F7F\u7528 absoluteDir \u65F6\u5FC5\u586B\uFF09" },
|
|
368
|
+
absoluteDir: {
|
|
369
|
+
type: "string",
|
|
370
|
+
description: "\u672C\u5730\u7EDD\u5BF9\u8DEF\u5F84\u76EE\u5F55\uFF08\u53EF\u542B ~ \u6216 ~/\uFF09\uFF1B\u82E5\u8BBE\u7F6E\u5219\u4E0B\u8F7D\u5230\u6B64\u76EE\u5F55\uFF0C\u4E0D\u518D\u4F7F\u7528 workspace \u76F8\u5BF9\u8DEF\u5F84"
|
|
371
|
+
},
|
|
332
372
|
url: { type: "string", description: "\u8FDC\u7A0B\u6587\u4EF6 URL" },
|
|
333
373
|
filenameHint: { type: "string", description: "\u6587\u4EF6\u540D\u63D0\u793A\uFF08\u53EF\u9009\uFF09" }
|
|
334
374
|
},
|
|
335
|
-
required: ["
|
|
375
|
+
required: ["url"]
|
|
336
376
|
}
|
|
337
377
|
}, {
|
|
338
378
|
operationKind: "mutate",
|
|
@@ -345,7 +385,7 @@ var fileTools = [
|
|
|
345
385
|
inputSchema: {
|
|
346
386
|
type: "object",
|
|
347
387
|
properties: {
|
|
348
|
-
rootId: { type: "string",
|
|
388
|
+
rootId: { type: "string", description: "\u76EE\u6807\u9879\u76EE\u6839\uFF1A'workspace' \u8868\u793A\u5F53\u524D\u6FC0\u6D3B\u9879\u76EE\uFF1B'proj-<projectId>' \u8868\u793A\u6309 id \u5BFB\u5740\u67D0\u4E2A\u9879\u76EE" },
|
|
349
389
|
path: { type: "string", description: "\u6587\u4EF6\u8DEF\u5F84\uFF08\u76F8\u5BF9\u4E8E rootId\uFF09" },
|
|
350
390
|
base64: { type: "string", description: "base64 \u7F16\u7801\u7684\u6587\u4EF6\u5185\u5BB9" }
|
|
351
391
|
},
|
|
@@ -362,7 +402,7 @@ var fileTools = [
|
|
|
362
402
|
inputSchema: {
|
|
363
403
|
type: "object",
|
|
364
404
|
properties: {
|
|
365
|
-
rootId: { type: "string",
|
|
405
|
+
rootId: { type: "string", description: "\u76EE\u6807\u9879\u76EE\u6839\uFF1A'workspace' \u8868\u793A\u5F53\u524D\u6FC0\u6D3B\u9879\u76EE\uFF1B'proj-<projectId>' \u8868\u793A\u6309 id \u5BFB\u5740\u67D0\u4E2A\u9879\u76EE" },
|
|
366
406
|
path: { type: "string", description: "\u6587\u4EF6\u8DEF\u5F84\uFF08\u76F8\u5BF9\u4E8E rootId\uFF09" }
|
|
367
407
|
},
|
|
368
408
|
required: ["rootId", "path"]
|
|
@@ -377,7 +417,7 @@ var fileTools = [
|
|
|
377
417
|
inputSchema: {
|
|
378
418
|
type: "object",
|
|
379
419
|
properties: {
|
|
380
|
-
rootId: { type: "string",
|
|
420
|
+
rootId: { type: "string", description: "\u76EE\u6807\u9879\u76EE\u6839\uFF1A'workspace' \u8868\u793A\u5F53\u524D\u6FC0\u6D3B\u9879\u76EE\uFF1B'proj-<projectId>' \u8868\u793A\u6309 id \u5BFB\u5740\u67D0\u4E2A\u9879\u76EE" },
|
|
381
421
|
path: { type: "string", description: "\u6587\u4EF6\u8DEF\u5F84\uFF08\u76F8\u5BF9\u4E8E rootId\uFF09" }
|
|
382
422
|
},
|
|
383
423
|
required: ["rootId", "path"]
|
|
@@ -393,7 +433,7 @@ var fileTools = [
|
|
|
393
433
|
inputSchema: {
|
|
394
434
|
type: "object",
|
|
395
435
|
properties: {
|
|
396
|
-
rootId: { type: "string",
|
|
436
|
+
rootId: { type: "string", description: "\u76EE\u6807\u9879\u76EE\u6839\uFF1A'workspace' \u8868\u793A\u5F53\u524D\u6FC0\u6D3B\u9879\u76EE\uFF1B'proj-<projectId>' \u8868\u793A\u6309 id \u5BFB\u5740\u67D0\u4E2A\u9879\u76EE" },
|
|
397
437
|
path: { type: "string", description: "\u76EE\u6807\u76EE\u5F55\u8DEF\u5F84\uFF08\u76F8\u5BF9\u4E8E rootId\uFF09" }
|
|
398
438
|
},
|
|
399
439
|
required: ["rootId", "path"]
|
|
@@ -421,7 +461,7 @@ var fileTools = [
|
|
|
421
461
|
inputSchema: {
|
|
422
462
|
type: "object",
|
|
423
463
|
properties: {
|
|
424
|
-
rootId: { type: "string",
|
|
464
|
+
rootId: { type: "string", description: "\u76EE\u6807\u9879\u76EE\u6839\uFF1A'workspace' \u8868\u793A\u5F53\u524D\u6FC0\u6D3B\u9879\u76EE\uFF1B'proj-<projectId>' \u8868\u793A\u6309 id \u5BFB\u5740\u67D0\u4E2A\u9879\u76EE" },
|
|
425
465
|
path: { type: "string", description: "\u6587\u4EF6\u8DEF\u5F84\uFF08\u76F8\u5BF9\u4E8E rootId\uFF09" }
|
|
426
466
|
},
|
|
427
467
|
required: ["rootId", "path"]
|
|
@@ -437,7 +477,7 @@ var fileTools = [
|
|
|
437
477
|
inputSchema: {
|
|
438
478
|
type: "object",
|
|
439
479
|
properties: {
|
|
440
|
-
rootId: { type: "string",
|
|
480
|
+
rootId: { type: "string", description: "\u76EE\u6807\u9879\u76EE\u6839\uFF1A'workspace' \u8868\u793A\u5F53\u524D\u6FC0\u6D3B\u9879\u76EE\uFF1B'proj-<projectId>' \u8868\u793A\u6309 id \u5BFB\u5740\u67D0\u4E2A\u9879\u76EE" },
|
|
441
481
|
path: { type: "string", description: "\u6587\u4EF6\u8DEF\u5F84\uFF08\u76F8\u5BF9\u4E8E rootId\uFF09" }
|
|
442
482
|
},
|
|
443
483
|
required: ["rootId", "path"]
|
|
@@ -471,7 +511,7 @@ var fileTools = [
|
|
|
471
511
|
inputSchema: {
|
|
472
512
|
type: "object",
|
|
473
513
|
properties: {
|
|
474
|
-
sourceRootId: { type: "string",
|
|
514
|
+
sourceRootId: { type: "string", description: "\u6E90\u9879\u76EE\u6839\uFF1A'workspace' \u8868\u793A\u5F53\u524D\u6FC0\u6D3B\u9879\u76EE\uFF1B'proj-<projectId>' \u8868\u793A\u6309 id \u5BFB\u5740\u67D0\u4E2A\u9879\u76EE" },
|
|
475
515
|
sourcePath: { type: "string", description: "\u6E90\u76EE\u5F55\u8DEF\u5F84\uFF08\u76F8\u5BF9\u4E8E sourceRootId\uFF09" }
|
|
476
516
|
},
|
|
477
517
|
required: ["sourceRootId", "sourcePath"]
|
|
@@ -487,9 +527,9 @@ var fileTools = [
|
|
|
487
527
|
inputSchema: {
|
|
488
528
|
type: "object",
|
|
489
529
|
properties: {
|
|
490
|
-
sourceRootId: { type: "string",
|
|
530
|
+
sourceRootId: { type: "string", description: "\u6E90\u9879\u76EE\u6839\uFF1A'workspace' \u8868\u793A\u5F53\u524D\u6FC0\u6D3B\u9879\u76EE\uFF1B'proj-<projectId>' \u8868\u793A\u6309 id \u5BFB\u5740\u67D0\u4E2A\u9879\u76EE" },
|
|
491
531
|
sourcePath: { type: "string", description: "\u6E90\u76EE\u5F55\u8DEF\u5F84\uFF08\u76F8\u5BF9\u4E8E sourceRootId\uFF09" },
|
|
492
|
-
destRootId: { type: "string",
|
|
532
|
+
destRootId: { type: "string", description: "\u76EE\u6807\u9879\u76EE\u6839\uFF1A'workspace' \u8868\u793A\u5F53\u524D\u6FC0\u6D3B\u9879\u76EE\uFF1B'proj-<projectId>' \u8868\u793A\u6309 id \u5BFB\u5740\u67D0\u4E2A\u9879\u76EE" },
|
|
493
533
|
destPath: { type: "string", description: "\u76EE\u6807\u76EE\u5F55\u8DEF\u5F84\uFF08\u76F8\u5BF9\u4E8E destRootId\uFF09" },
|
|
494
534
|
taskId: { type: "string", description: "\u4EFB\u52A1 ID\uFF08\u7528\u4E8E\u8FDB\u5EA6\u901A\u77E5\uFF09" }
|
|
495
535
|
},
|
|
@@ -503,27 +543,38 @@ var fileTools = [
|
|
|
503
543
|
];
|
|
504
544
|
|
|
505
545
|
// src/mcp/seastudio/tools-shell.ts
|
|
546
|
+
var sessionSnapshotSchema = shellSessionSnapshotEvidenceOutputSchema;
|
|
506
547
|
var shellTools = [
|
|
507
548
|
annotateTool({
|
|
508
|
-
name: "seastudio-
|
|
509
|
-
description: "\
|
|
549
|
+
name: "seastudio-shell_session_open",
|
|
550
|
+
description: "\u521B\u5EFA\u4E00\u4E2A\u65B0\u7684\u5E38\u9A7B PTY shell \u4F1A\u8BDD\uFF0C\u8FD4\u56DE sessionId\u3002\u7528\u4E8E\u540E\u7EED session_run \u5199\u5165\u547D\u4EE4\u3002 \u591A\u4E2A session \u4E4B\u95F4\u4E92\u76F8\u72EC\u7ACB\uFF0C\u957F\u4EFB\u52A1\uFF08\u5982 dev server\uFF09\u5929\u7136\u5B58\u6D3B\u76F4\u5230\u663E\u5F0F close\u3002",
|
|
510
551
|
inputSchema: {
|
|
511
552
|
type: "object",
|
|
512
553
|
properties: {
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
554
|
+
shell: {
|
|
555
|
+
type: "string",
|
|
556
|
+
enum: ["auto", "bash", "pwsh", "cmd", "sh"],
|
|
557
|
+
description: "shell \u7C7B\u578B\uFF0C\u9ED8\u8BA4 auto\uFF08Win\u2192pwsh\uFF0CPOSIX\u2192bash\uFF09"
|
|
558
|
+
},
|
|
559
|
+
cwd: { type: "string", description: "\u5DE5\u4F5C\u76EE\u5F55\uFF08\u7EDD\u5BF9\u8DEF\u5F84\uFF0C\u9ED8\u8BA4\u4E3A\u9879\u76EE\u6839\u76EE\u5F55\uFF09" },
|
|
560
|
+
env: {
|
|
561
|
+
type: "object",
|
|
562
|
+
description: "\u9644\u52A0\u73AF\u5883\u53D8\u91CF\uFF08\u4EC5\u5141\u8BB8\u5927\u5199\u5B57\u6BCD/\u4E0B\u5212\u7EBF\u5F00\u5934\u7684 key\uFF09",
|
|
563
|
+
additionalProperties: { type: "string" }
|
|
564
|
+
},
|
|
565
|
+
label: { type: "string", description: "\u4F1A\u8BDD\u5907\u6CE8\uFF08\u4EC5\u7528\u4E8E\u663E\u793A\uFF09" },
|
|
566
|
+
cols: { type: "number", description: "PTY \u5217\u6570\uFF08\u9ED8\u8BA4 120\uFF09" },
|
|
567
|
+
rows: { type: "number", description: "PTY \u884C\u6570\uFF08\u9ED8\u8BA4 30\uFF09" }
|
|
568
|
+
}
|
|
518
569
|
}
|
|
519
570
|
}, {
|
|
520
|
-
operationKind: "
|
|
571
|
+
operationKind: "mutate",
|
|
521
572
|
requiresExecutionEvidence: true,
|
|
522
573
|
rawDomain: "shell"
|
|
523
|
-
},
|
|
574
|
+
}, shellSessionOpenEvidenceOutputSchema),
|
|
524
575
|
annotateTool({
|
|
525
|
-
name: "seastudio-
|
|
526
|
-
description: "\
|
|
576
|
+
name: "seastudio-shell_session_list",
|
|
577
|
+
description: "\u5217\u51FA\u5F53\u524D\u6240\u6709 PTY shell \u4F1A\u8BDD\u7684\u5FEB\u7167\u3002",
|
|
527
578
|
inputSchema: {
|
|
528
579
|
type: "object",
|
|
529
580
|
properties: {}
|
|
@@ -535,25 +586,86 @@ var shellTools = [
|
|
|
535
586
|
}, {
|
|
536
587
|
type: "object",
|
|
537
588
|
properties: {
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
589
|
+
sessions: {
|
|
590
|
+
type: "array",
|
|
591
|
+
items: sessionSnapshotSchema
|
|
592
|
+
}
|
|
593
|
+
},
|
|
594
|
+
required: ["sessions"]
|
|
595
|
+
}),
|
|
596
|
+
annotateTool({
|
|
597
|
+
name: "seastudio-shell_session_get",
|
|
598
|
+
description: "\u83B7\u53D6\u6307\u5B9A session \u7684\u5F53\u524D\u5FEB\u7167\uFF08pending\u3001\u6700\u8FD1\u4E00\u6B21\u547D\u4EE4\u7B49\uFF09\u3002",
|
|
599
|
+
inputSchema: {
|
|
600
|
+
type: "object",
|
|
601
|
+
properties: {
|
|
602
|
+
sessionId: { type: "string", description: "session_open \u8FD4\u56DE\u7684 sessionId" }
|
|
603
|
+
},
|
|
604
|
+
required: ["sessionId"]
|
|
605
|
+
}
|
|
606
|
+
}, {
|
|
607
|
+
operationKind: "read",
|
|
608
|
+
requiresExecutionEvidence: false,
|
|
609
|
+
rawDomain: "shell"
|
|
610
|
+
}, sessionSnapshotSchema),
|
|
611
|
+
annotateTool({
|
|
612
|
+
name: "seastudio-shell_session_run",
|
|
613
|
+
description: "\u5728\u6307\u5B9A session \u4E2D\u5199\u5165\u547D\u4EE4\u5E76\u7ACB\u5373\u8FD4\u56DE commandId\uFF08\u4E0D\u963B\u585E\uFF09\u3002 \u4F7F\u7528 session_wait \u7B49\u5F85\u547D\u4EE4\u7ED3\u675F\uFF0C\u6216 session_get_entries \u589E\u91CF\u8BFB\u53D6\u6D41\u5F0F\u8F93\u51FA\u3002 \u540C\u4E00 session \u540C\u4E00\u65F6\u523B\u53EA\u80FD\u6709\u4E00\u6761 pending \u547D\u4EE4\uFF1B\u5982\u9700\u4E2D\u65AD\u8BF7\u8C03\u7528 session_signal\u3002",
|
|
614
|
+
inputSchema: {
|
|
615
|
+
type: "object",
|
|
616
|
+
properties: {
|
|
617
|
+
sessionId: { type: "string" },
|
|
618
|
+
command: { type: "string", description: "\u8981\u6267\u884C\u7684 shell \u547D\u4EE4" },
|
|
619
|
+
timeoutMs: {
|
|
620
|
+
type: "number",
|
|
621
|
+
description: "\u53EF\u9009\u8D85\u65F6\uFF08\u6BEB\u79D2\uFF09\u3002\u8D85\u65F6\u540E\u81EA\u52A8\u5411 session \u53D1 INT\uFF0C\u4F46\u4E0D\u6740 session \u672C\u8EAB\u3002"
|
|
622
|
+
}
|
|
623
|
+
},
|
|
624
|
+
required: ["sessionId", "command"]
|
|
625
|
+
}
|
|
626
|
+
}, {
|
|
627
|
+
operationKind: "mutate",
|
|
628
|
+
requiresExecutionEvidence: true,
|
|
629
|
+
rawDomain: "shell"
|
|
630
|
+
}, shellSessionRunEvidenceOutputSchema),
|
|
631
|
+
annotateTool({
|
|
632
|
+
name: "seastudio-shell_session_wait",
|
|
633
|
+
description: "\u7B49\u5F85\u6307\u5B9A commandId \u7ED3\u675F\u5E76\u8FD4\u56DE exitCode \u7B49\u4FE1\u606F\u3002 \u82E5\u63D0\u4F9B timeoutMs \u4E14\u8D85\u65F6\uFF0C\u5219\u8FD4\u56DE finished=false / timedOut=true\uFF0C\u4F46\u4E0D\u4F1A\u4E2D\u65AD\u547D\u4EE4\u3002",
|
|
634
|
+
inputSchema: {
|
|
635
|
+
type: "object",
|
|
636
|
+
properties: {
|
|
637
|
+
sessionId: { type: "string" },
|
|
638
|
+
commandId: { type: "string" },
|
|
639
|
+
timeoutMs: { type: "number", description: "\u53EF\u9009\u7B49\u5F85\u8D85\u65F6\uFF08\u6BEB\u79D2\uFF09" }
|
|
640
|
+
},
|
|
641
|
+
required: ["sessionId", "commandId"]
|
|
547
642
|
}
|
|
643
|
+
}, {
|
|
644
|
+
operationKind: "read",
|
|
645
|
+
requiresExecutionEvidence: false,
|
|
646
|
+
rawDomain: "shell"
|
|
647
|
+
}, {
|
|
648
|
+
type: "object",
|
|
649
|
+
properties: {
|
|
650
|
+
commandId: { type: "string" },
|
|
651
|
+
exitCode: { type: "number" },
|
|
652
|
+
durationMs: { type: "number" },
|
|
653
|
+
finished: { type: "boolean" },
|
|
654
|
+
timedOut: { type: "boolean" }
|
|
655
|
+
},
|
|
656
|
+
required: ["commandId", "durationMs", "finished", "timedOut"]
|
|
548
657
|
}),
|
|
549
658
|
annotateTool({
|
|
550
659
|
name: "seastudio-shell_session_get_entries",
|
|
551
|
-
description: "\u8BFB\u53D6
|
|
660
|
+
description: "\u589E\u91CF\u8BFB\u53D6 session \u7684\u8F93\u51FA\u6D41\u3002\u4F20\u5165 sinceId \u4EC5\u8FD4\u56DE\u66F4\u65B0\u90E8\u5206\uFF1B\u8FD4\u56DE nextSinceId \u7528\u4E8E\u4E0B\u4E00\u6B21\u8F6E\u8BE2\u3002 \u73AF\u5F62\u7F13\u51B2\u8D85\u51FA\u4E0A\u9650\u4F1A\u4E22\u5F03\u65E7 entries \u5E76\u7D2F\u52A0 droppedCount\u3002",
|
|
552
661
|
inputSchema: {
|
|
553
662
|
type: "object",
|
|
554
663
|
properties: {
|
|
555
|
-
|
|
556
|
-
|
|
664
|
+
sessionId: { type: "string" },
|
|
665
|
+
sinceId: { type: "number", description: "\u53EA\u8FD4\u56DE id > sinceId \u7684 entries\uFF08\u9ED8\u8BA4 0\uFF09" },
|
|
666
|
+
limit: { type: "number", description: "\u672C\u6B21\u6700\u591A\u8FD4\u56DE\u591A\u5C11\u6761\uFF08\u9ED8\u8BA4\u65E0\u9650\u5236\uFF0C\u53D7\u7F13\u51B2\u4E0A\u9650\u5236\u7EA6\uFF09" }
|
|
667
|
+
},
|
|
668
|
+
required: ["sessionId"]
|
|
557
669
|
}
|
|
558
670
|
}, {
|
|
559
671
|
operationKind: "read",
|
|
@@ -568,70 +680,71 @@ var shellTools = [
|
|
|
568
680
|
type: "object",
|
|
569
681
|
properties: {
|
|
570
682
|
id: { type: "number" },
|
|
571
|
-
level: { type: "string" },
|
|
683
|
+
level: { type: "string", enum: ["command", "stdout", "meta", "exit"] },
|
|
572
684
|
content: { type: "string" },
|
|
573
|
-
createdAt: { type: "number" }
|
|
574
|
-
|
|
685
|
+
createdAt: { type: "number" },
|
|
686
|
+
commandId: { type: "string" }
|
|
687
|
+
},
|
|
688
|
+
required: ["id", "level", "content", "createdAt"]
|
|
575
689
|
}
|
|
576
|
-
}
|
|
577
|
-
|
|
690
|
+
},
|
|
691
|
+
nextSinceId: { type: "number" },
|
|
692
|
+
totalEntries: { type: "number" },
|
|
693
|
+
droppedCount: { type: "number" }
|
|
694
|
+
},
|
|
695
|
+
required: ["entries", "nextSinceId", "totalEntries", "droppedCount"]
|
|
578
696
|
}),
|
|
579
697
|
annotateTool({
|
|
580
|
-
name: "seastudio-
|
|
581
|
-
description: "\
|
|
698
|
+
name: "seastudio-shell_session_signal",
|
|
699
|
+
description: "\u5411 session \u53D1\u4FE1\u53F7\uFF1AINT \u7B49\u4EF7 Ctrl-C\uFF08\u4E0D\u6740 session\uFF09\uFF1BTERM/KILL \u6740\u6389 session \u672C\u8EAB\u3002",
|
|
582
700
|
inputSchema: {
|
|
583
701
|
type: "object",
|
|
584
702
|
properties: {
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
703
|
+
sessionId: { type: "string" },
|
|
704
|
+
signal: { type: "string", enum: ["INT", "TERM", "KILL"] },
|
|
705
|
+
commandId: {
|
|
706
|
+
type: "string",
|
|
707
|
+
description: "\u53EF\u9009\uFF0C\u4EC5\u8BB0\u5F55\u5728 entries \u4E2D\uFF0C\u4E0D\u5F71\u54CD\u4FE1\u53F7\u8BED\u4E49"
|
|
708
|
+
}
|
|
588
709
|
},
|
|
589
|
-
required: ["
|
|
710
|
+
required: ["sessionId", "signal"]
|
|
590
711
|
}
|
|
591
712
|
}, {
|
|
592
|
-
operationKind: "
|
|
713
|
+
operationKind: "mutate",
|
|
593
714
|
requiresExecutionEvidence: true,
|
|
594
715
|
rawDomain: "shell"
|
|
595
|
-
},
|
|
716
|
+
}, shellSessionSignalEvidenceOutputSchema),
|
|
596
717
|
annotateTool({
|
|
597
|
-
name: "seastudio-
|
|
598
|
-
description: "\
|
|
718
|
+
name: "seastudio-shell_session_clear_entries",
|
|
719
|
+
description: "\u6E05\u7A7A session \u7684\u8F93\u51FA\u7F13\u51B2\uFF0C\u4F1A\u8BDD\u672C\u8EAB\u4E0D\u53D7\u5F71\u54CD\u3002",
|
|
599
720
|
inputSchema: {
|
|
600
721
|
type: "object",
|
|
601
722
|
properties: {
|
|
602
|
-
|
|
723
|
+
sessionId: { type: "string" }
|
|
603
724
|
},
|
|
604
|
-
required: ["
|
|
725
|
+
required: ["sessionId"]
|
|
605
726
|
}
|
|
606
727
|
}, {
|
|
607
728
|
operationKind: "mutate",
|
|
608
729
|
requiresExecutionEvidence: true,
|
|
609
730
|
rawDomain: "shell"
|
|
610
|
-
},
|
|
731
|
+
}, sessionSnapshotSchema),
|
|
611
732
|
annotateTool({
|
|
612
|
-
name: "seastudio-
|
|
613
|
-
description: "\
|
|
733
|
+
name: "seastudio-shell_session_close",
|
|
734
|
+
description: "\u5173\u95ED session \u5E76\u91CA\u653E PTY\u3002force=true \u65F6\u4F7F\u7528 SIGKILL\uFF1B\u9ED8\u8BA4 SIGTERM\u3002",
|
|
614
735
|
inputSchema: {
|
|
615
736
|
type: "object",
|
|
616
|
-
properties: {
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
rawDomain: "shell"
|
|
622
|
-
}, shellSessionSnapshotEvidenceOutputSchema),
|
|
623
|
-
annotateTool({
|
|
624
|
-
name: "seastudio-shell_session_reset",
|
|
625
|
-
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",
|
|
626
|
-
inputSchema: {
|
|
627
|
-
type: "object",
|
|
628
|
-
properties: {}
|
|
737
|
+
properties: {
|
|
738
|
+
sessionId: { type: "string" },
|
|
739
|
+
force: { type: "boolean", description: "\u5F3A\u5236 KILL\uFF0C\u9ED8\u8BA4 false" }
|
|
740
|
+
},
|
|
741
|
+
required: ["sessionId"]
|
|
629
742
|
}
|
|
630
743
|
}, {
|
|
631
744
|
operationKind: "mutate",
|
|
632
745
|
requiresExecutionEvidence: true,
|
|
633
746
|
rawDomain: "shell"
|
|
634
|
-
},
|
|
747
|
+
}, shellSessionCloseEvidenceOutputSchema)
|
|
635
748
|
];
|
|
636
749
|
|
|
637
750
|
// src/mcp/seastudio/tools-aigc.ts
|
|
@@ -713,6 +826,10 @@ var seastudio = {
|
|
|
713
826
|
roots: {
|
|
714
827
|
list: () => request("roots/list")
|
|
715
828
|
},
|
|
829
|
+
project: {
|
|
830
|
+
list: () => callTool("seastudio-project_list", {}),
|
|
831
|
+
getActive: () => callTool("seastudio-project_get_active", {})
|
|
832
|
+
},
|
|
716
833
|
file: {
|
|
717
834
|
getSelected: () => callTool("seastudio-file_get_selected", {}),
|
|
718
835
|
read: (path, options) => callTool("seastudio-file_read", {
|
|
@@ -801,22 +918,85 @@ var seastudio = {
|
|
|
801
918
|
});
|
|
802
919
|
},
|
|
803
920
|
getUrl: (path, options) => callTool("seastudio-file_get_url", { rootId: options?.rootId ?? "workspace", path }),
|
|
804
|
-
download: (url, path, filenameHint, options) =>
|
|
921
|
+
download: (url, path, filenameHint, options) => {
|
|
922
|
+
const absoluteDir = options?.absoluteDir?.trim();
|
|
923
|
+
if (absoluteDir) {
|
|
924
|
+
return callTool("seastudio-file_download", { url, absoluteDir, filenameHint });
|
|
925
|
+
}
|
|
926
|
+
return callTool("seastudio-file_download", { rootId: options?.rootId ?? "workspace", path, url, filenameHint });
|
|
927
|
+
},
|
|
805
928
|
writeBinary: (path, base64, options) => callTool("seastudio-file_write_binary", { rootId: options?.rootId ?? "workspace", path, base64 }),
|
|
806
929
|
readBinary: (path, options) => callTool("seastudio-file_read_binary", { rootId: options?.rootId ?? "workspace", path })
|
|
807
930
|
},
|
|
808
931
|
shell: {
|
|
809
|
-
execute: (command, cwd, timeout) => callTool("seastudio-shell_execute", { command, cwd, timeout }),
|
|
810
932
|
session: {
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
933
|
+
open: (options = {}) => callTool("seastudio-shell_session_open", { ...options }),
|
|
934
|
+
list: () => callTool("seastudio-shell_session_list", {}),
|
|
935
|
+
get: (sessionId) => callTool("seastudio-shell_session_get", { sessionId }),
|
|
936
|
+
run: (sessionId, command, options = {}) => callTool("seastudio-shell_session_run", {
|
|
937
|
+
sessionId,
|
|
938
|
+
command,
|
|
939
|
+
...typeof options.timeoutMs === "number" ? { timeoutMs: options.timeoutMs } : {}
|
|
940
|
+
}),
|
|
941
|
+
wait: (sessionId, commandId, timeoutMs) => callTool("seastudio-shell_session_wait", {
|
|
942
|
+
sessionId,
|
|
943
|
+
commandId,
|
|
944
|
+
...typeof timeoutMs === "number" ? { timeoutMs } : {}
|
|
945
|
+
}),
|
|
946
|
+
getEntries: (sessionId, options = {}) => callTool("seastudio-shell_session_get_entries", {
|
|
947
|
+
sessionId,
|
|
948
|
+
...typeof options.sinceId === "number" ? { sinceId: options.sinceId } : {},
|
|
949
|
+
...typeof options.limit === "number" ? { limit: options.limit } : {}
|
|
950
|
+
}),
|
|
951
|
+
signal: (sessionId, signal, commandId) => callTool("seastudio-shell_session_signal", {
|
|
952
|
+
sessionId,
|
|
953
|
+
signal,
|
|
954
|
+
...commandId ? { commandId } : {}
|
|
955
|
+
}),
|
|
956
|
+
clearEntries: (sessionId) => callTool("seastudio-shell_session_clear_entries", { sessionId }),
|
|
957
|
+
close: (sessionId, force = false) => callTool("seastudio-shell_session_close", { sessionId, force })
|
|
817
958
|
}
|
|
818
959
|
}
|
|
819
960
|
};
|
|
961
|
+
async function runOneShotShellCommand(command, options = {}) {
|
|
962
|
+
const { timeoutMs, ...openOpts } = options;
|
|
963
|
+
const openRaw = await seastudio.shell.session.open(openOpts);
|
|
964
|
+
const openText = openRaw.content?.[0]?.text ?? "{}";
|
|
965
|
+
const opened = JSON.parse(openText);
|
|
966
|
+
const sessionId = opened.sessionId;
|
|
967
|
+
if (!sessionId) {
|
|
968
|
+
throw new Error("shell_session_open did not return sessionId");
|
|
969
|
+
}
|
|
970
|
+
try {
|
|
971
|
+
const runRaw = await seastudio.shell.session.run(sessionId, command, {
|
|
972
|
+
...typeof timeoutMs === "number" ? { timeoutMs } : {}
|
|
973
|
+
});
|
|
974
|
+
const runText = runRaw.content?.[0]?.text ?? "{}";
|
|
975
|
+
const run = JSON.parse(runText);
|
|
976
|
+
const waitRaw = await seastudio.shell.session.wait(
|
|
977
|
+
sessionId,
|
|
978
|
+
run.commandId,
|
|
979
|
+
typeof timeoutMs === "number" ? timeoutMs + 5e3 : void 0
|
|
980
|
+
);
|
|
981
|
+
const waitText = waitRaw.content?.[0]?.text ?? "{}";
|
|
982
|
+
const wait = JSON.parse(waitText);
|
|
983
|
+
const entriesRaw = await seastudio.shell.session.getEntries(sessionId, {});
|
|
984
|
+
const entriesText = entriesRaw.content?.[0]?.text ?? "{}";
|
|
985
|
+
const entries = JSON.parse(entriesText);
|
|
986
|
+
const stdout = entries.entries.filter((e) => e.commandId === run.commandId && e.level === "stdout").map((e) => e.content).join("\n");
|
|
987
|
+
return {
|
|
988
|
+
exitCode: wait.exitCode,
|
|
989
|
+
stdout,
|
|
990
|
+
durationMs: wait.durationMs,
|
|
991
|
+
timedOut: wait.timedOut
|
|
992
|
+
};
|
|
993
|
+
} finally {
|
|
994
|
+
try {
|
|
995
|
+
await seastudio.shell.session.close(sessionId);
|
|
996
|
+
} catch {
|
|
997
|
+
}
|
|
998
|
+
}
|
|
999
|
+
}
|
|
820
1000
|
|
|
821
1001
|
// src/mcp/seastudio/tools-plugin.ts
|
|
822
1002
|
var pluginManagementTools = [
|
|
@@ -870,37 +1050,9 @@ var pluginManagementTools = [
|
|
|
870
1050
|
operationKind: "mutate",
|
|
871
1051
|
requiresExecutionEvidence: true
|
|
872
1052
|
}),
|
|
873
|
-
annotateTool({
|
|
874
|
-
name: "seastudio-plugin_enable",
|
|
875
|
-
description: "\u5728\u5F53\u524D\u9879\u76EE\u4E2D\u542F\u7528\u6307\u5B9A\u63D2\u4EF6\u3002\u9700\u63D0\u4F9B\u63D2\u4EF6 id\u3002",
|
|
876
|
-
inputSchema: {
|
|
877
|
-
type: "object",
|
|
878
|
-
properties: {
|
|
879
|
-
pluginId: { type: "string", description: "\u8981\u542F\u7528\u7684\u63D2\u4EF6 ID" }
|
|
880
|
-
},
|
|
881
|
-
required: ["pluginId"]
|
|
882
|
-
}
|
|
883
|
-
}, {
|
|
884
|
-
operationKind: "mutate",
|
|
885
|
-
requiresExecutionEvidence: true
|
|
886
|
-
}),
|
|
887
|
-
annotateTool({
|
|
888
|
-
name: "seastudio-plugin_disable",
|
|
889
|
-
description: "\u5728\u5F53\u524D\u9879\u76EE\u4E2D\u7981\u7528\u6307\u5B9A\u63D2\u4EF6\u3002\u9700\u63D0\u4F9B\u63D2\u4EF6 id\u3002",
|
|
890
|
-
inputSchema: {
|
|
891
|
-
type: "object",
|
|
892
|
-
properties: {
|
|
893
|
-
pluginId: { type: "string", description: "\u8981\u7981\u7528\u7684\u63D2\u4EF6 ID" }
|
|
894
|
-
},
|
|
895
|
-
required: ["pluginId"]
|
|
896
|
-
}
|
|
897
|
-
}, {
|
|
898
|
-
operationKind: "mutate",
|
|
899
|
-
requiresExecutionEvidence: true
|
|
900
|
-
}),
|
|
901
1053
|
annotateTool({
|
|
902
1054
|
name: "seastudio-plugin_get_status",
|
|
903
|
-
description: "\u83B7\u53D6\u6307\u5B9A\u63D2\u4EF6\u7684\u5B89\u88C5\u72B6\u6001\u3002\u8FD4\u56DE\u662F\u5426\u5DF2\u5B89\u88C5\u3001\u7248\u672C\
|
|
1055
|
+
description: "\u83B7\u53D6\u6307\u5B9A\u63D2\u4EF6\u7684\u5B89\u88C5\u72B6\u6001\u3002\u8FD4\u56DE\u662F\u5426\u5DF2\u5B89\u88C5\u3001\u7248\u672C\u3001UI \u7C7B\u578B\u7B49\u8BE6\u7EC6\u4FE1\u606F\u3002\u82E5\u672A\u5B89\u88C5\u5219\u68C0\u67E5 Registry \u4E2D\u662F\u5426\u5B58\u5728\u3002",
|
|
904
1056
|
inputSchema: {
|
|
905
1057
|
type: "object",
|
|
906
1058
|
properties: {
|
|
@@ -1046,37 +1198,9 @@ var agentManagementTools = [
|
|
|
1046
1198
|
operationKind: "mutate",
|
|
1047
1199
|
requiresExecutionEvidence: true
|
|
1048
1200
|
}),
|
|
1049
|
-
annotateTool({
|
|
1050
|
-
name: "seastudio-agent_enable",
|
|
1051
|
-
description: "\u5728\u5F53\u524D\u9879\u76EE\u4E2D\u542F\u7528\u6307\u5B9A Agent\u3002\u9700\u63D0\u4F9B Agent id\u3002",
|
|
1052
|
-
inputSchema: {
|
|
1053
|
-
type: "object",
|
|
1054
|
-
properties: {
|
|
1055
|
-
agentId: { type: "string", description: "\u8981\u542F\u7528\u7684 Agent ID" }
|
|
1056
|
-
},
|
|
1057
|
-
required: ["agentId"]
|
|
1058
|
-
}
|
|
1059
|
-
}, {
|
|
1060
|
-
operationKind: "mutate",
|
|
1061
|
-
requiresExecutionEvidence: true
|
|
1062
|
-
}),
|
|
1063
|
-
annotateTool({
|
|
1064
|
-
name: "seastudio-agent_disable",
|
|
1065
|
-
description: "\u5728\u5F53\u524D\u9879\u76EE\u4E2D\u7981\u7528\u6307\u5B9A Agent\u3002\u9700\u63D0\u4F9B Agent id\u3002",
|
|
1066
|
-
inputSchema: {
|
|
1067
|
-
type: "object",
|
|
1068
|
-
properties: {
|
|
1069
|
-
agentId: { type: "string", description: "\u8981\u7981\u7528\u7684 Agent ID" }
|
|
1070
|
-
},
|
|
1071
|
-
required: ["agentId"]
|
|
1072
|
-
}
|
|
1073
|
-
}, {
|
|
1074
|
-
operationKind: "mutate",
|
|
1075
|
-
requiresExecutionEvidence: true
|
|
1076
|
-
}),
|
|
1077
1201
|
annotateTool({
|
|
1078
1202
|
name: "seastudio-agent_get_status",
|
|
1079
|
-
description: "\u83B7\u53D6\u6307\u5B9A Agent \u7684\u5B89\u88C5\u72B6\u6001\u3002\u8FD4\u56DE\u662F\u5426\u5DF2\u5B89\u88C5\u3001\u7248\u672C\u3001\
|
|
1203
|
+
description: "\u83B7\u53D6\u6307\u5B9A Agent \u7684\u5B89\u88C5\u72B6\u6001\u3002\u8FD4\u56DE\u662F\u5426\u5DF2\u5B89\u88C5\u3001\u7248\u672C\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",
|
|
1080
1204
|
inputSchema: {
|
|
1081
1205
|
type: "object",
|
|
1082
1206
|
properties: {
|
|
@@ -1170,6 +1294,32 @@ var agentTabTools = [
|
|
|
1170
1294
|
})
|
|
1171
1295
|
];
|
|
1172
1296
|
|
|
1297
|
+
// src/mcp/seastudio/tools-project.ts
|
|
1298
|
+
var projectTools = [
|
|
1299
|
+
annotateTool({
|
|
1300
|
+
name: "seastudio-project_list",
|
|
1301
|
+
description: "\u5217\u51FA\u5F53\u524D\u7528\u6237\u7684\u6240\u6709\u9879\u76EE\uFF08\u6241\u5E73\u7ED3\u6784\uFF09\u3002\u8FD4\u56DE\u6BCF\u4E2A\u9879\u76EE\u7684 id\u3001name\u3001path\u3001lastActiveAt\u3001isActive\uFF0C\u4EE5\u53CA\u53EF\u76F4\u63A5\u4F20\u7ED9 file \u5DE5\u5177\u7684 rootId\uFF08\u5F62\u5982 'proj-<id>'\uFF09\u3002\u5F53\u9700\u8981\u8DE8\u9879\u76EE\u8BFB\u5199\u65F6\u5148\u8C03\u7528\u6B64\u5DE5\u5177\u3002",
|
|
1302
|
+
inputSchema: {
|
|
1303
|
+
type: "object",
|
|
1304
|
+
properties: {}
|
|
1305
|
+
}
|
|
1306
|
+
}, {
|
|
1307
|
+
operationKind: "read",
|
|
1308
|
+
requiresExecutionEvidence: false
|
|
1309
|
+
}),
|
|
1310
|
+
annotateTool({
|
|
1311
|
+
name: "seastudio-project_get_active",
|
|
1312
|
+
description: "\u83B7\u53D6\u5F53\u524D\u6FC0\u6D3B\u7684\u9879\u76EE\uFF08\u524D\u53F0\u805A\u7126\u7684\u9879\u76EE\uFF09\u3002\u8FD4\u56DE\u7ED3\u6784\u4E0E seastudio-project_list \u4E2D\u5355\u9879\u4E00\u81F4\uFF1B\u82E5\u5F53\u524D\u6CA1\u6709\u6FC0\u6D3B\u9879\u76EE\u5219\u8FD4\u56DE null\u3002",
|
|
1313
|
+
inputSchema: {
|
|
1314
|
+
type: "object",
|
|
1315
|
+
properties: {}
|
|
1316
|
+
}
|
|
1317
|
+
}, {
|
|
1318
|
+
operationKind: "read",
|
|
1319
|
+
requiresExecutionEvidence: false
|
|
1320
|
+
})
|
|
1321
|
+
];
|
|
1322
|
+
|
|
1173
1323
|
// src/mcp/seastudio/notifications.ts
|
|
1174
1324
|
var SeastudioRequests = {
|
|
1175
1325
|
/** 请求打开文件 -> 主程序发布 FILE_OPEN_REQUESTED */
|
|
@@ -1242,7 +1392,8 @@ var allTools = [
|
|
|
1242
1392
|
...pluginManagementTools,
|
|
1243
1393
|
...agentManagementTools,
|
|
1244
1394
|
...pluginTabTools,
|
|
1245
|
-
...agentTabTools
|
|
1395
|
+
...agentTabTools,
|
|
1396
|
+
...projectTools
|
|
1246
1397
|
];
|
|
1247
1398
|
var tools = allTools;
|
|
1248
1399
|
|
|
@@ -1260,12 +1411,17 @@ exports.fileDownloadEvidenceOutputSchema = fileDownloadEvidenceOutputSchema;
|
|
|
1260
1411
|
exports.fileTools = fileTools;
|
|
1261
1412
|
exports.pluginManagementTools = pluginManagementTools;
|
|
1262
1413
|
exports.pluginTabTools = pluginTabTools;
|
|
1414
|
+
exports.projectTools = projectTools;
|
|
1263
1415
|
exports.request = request;
|
|
1264
1416
|
exports.rootedPathEvidenceOutputSchema = rootedPathEvidenceOutputSchema;
|
|
1265
1417
|
exports.rootedWriteEvidenceOutputSchema = rootedWriteEvidenceOutputSchema;
|
|
1418
|
+
exports.runOneShotShellCommand = runOneShotShellCommand;
|
|
1266
1419
|
exports.seaCloudTools = seaCloudTools;
|
|
1267
1420
|
exports.seastudio = seastudio;
|
|
1268
|
-
exports.
|
|
1421
|
+
exports.shellSessionCloseEvidenceOutputSchema = shellSessionCloseEvidenceOutputSchema;
|
|
1422
|
+
exports.shellSessionOpenEvidenceOutputSchema = shellSessionOpenEvidenceOutputSchema;
|
|
1423
|
+
exports.shellSessionRunEvidenceOutputSchema = shellSessionRunEvidenceOutputSchema;
|
|
1424
|
+
exports.shellSessionSignalEvidenceOutputSchema = shellSessionSignalEvidenceOutputSchema;
|
|
1269
1425
|
exports.shellSessionSnapshotEvidenceOutputSchema = shellSessionSnapshotEvidenceOutputSchema;
|
|
1270
1426
|
exports.shellTools = shellTools;
|
|
1271
1427
|
exports.tools = tools;
|