@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
|
@@ -51,41 +51,77 @@ var batchFlattenCopyEvidenceOutputSchema = {
|
|
|
51
51
|
var fileDownloadEvidenceOutputSchema = {
|
|
52
52
|
type: "object",
|
|
53
53
|
properties: {
|
|
54
|
+
location: { type: "string", enum: ["workspace", "absolute"] },
|
|
54
55
|
rootId: { type: "string" },
|
|
56
|
+
absoluteDir: { type: "string" },
|
|
55
57
|
path: { type: "string" },
|
|
56
58
|
savedPath: { type: "string" },
|
|
57
|
-
size: { type: "number" }
|
|
59
|
+
size: { type: "number" },
|
|
60
|
+
mime: { type: "string" }
|
|
58
61
|
},
|
|
59
|
-
required: ["
|
|
62
|
+
required: ["location", "path", "savedPath", "size"]
|
|
60
63
|
};
|
|
61
|
-
var
|
|
64
|
+
var shellSessionSnapshotEvidenceOutputSchema = {
|
|
62
65
|
type: "object",
|
|
63
66
|
properties: {
|
|
64
|
-
|
|
67
|
+
sessionId: { type: "string" },
|
|
68
|
+
shell: { type: "string", enum: ["bash", "pwsh", "cmd", "sh"] },
|
|
65
69
|
cwd: { type: "string" },
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
70
|
+
pid: { type: "number" },
|
|
71
|
+
alive: { type: "boolean" },
|
|
72
|
+
openedAt: { type: "number" },
|
|
73
|
+
label: { type: "string" },
|
|
74
|
+
pluginId: { type: "string" },
|
|
75
|
+
projectId: { type: "string" },
|
|
76
|
+
agentInstanceId: { type: "string" },
|
|
77
|
+
pendingCommandId: { type: "string" },
|
|
78
|
+
lastCommandId: { type: "string" },
|
|
79
|
+
lastExitCode: { type: "number" },
|
|
80
|
+
lastDurationMs: { type: "number" },
|
|
81
|
+
entryCount: { type: "number" },
|
|
82
|
+
droppedCount: { type: "number" }
|
|
72
83
|
},
|
|
73
|
-
required: ["
|
|
84
|
+
required: ["sessionId", "shell", "pid", "alive", "openedAt", "entryCount", "droppedCount"]
|
|
74
85
|
};
|
|
75
|
-
var
|
|
86
|
+
var shellSessionOpenEvidenceOutputSchema = {
|
|
76
87
|
type: "object",
|
|
77
88
|
properties: {
|
|
78
|
-
|
|
89
|
+
sessionId: { type: "string" },
|
|
90
|
+
shell: { type: "string", enum: ["bash", "pwsh", "cmd", "sh"] },
|
|
79
91
|
cwd: { type: "string" },
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
92
|
+
pid: { type: "number" },
|
|
93
|
+
openedAt: { type: "number" }
|
|
94
|
+
},
|
|
95
|
+
required: ["sessionId", "shell", "pid", "openedAt"]
|
|
96
|
+
};
|
|
97
|
+
var shellSessionRunEvidenceOutputSchema = {
|
|
98
|
+
type: "object",
|
|
99
|
+
properties: {
|
|
100
|
+
sessionId: { type: "string" },
|
|
101
|
+
commandId: { type: "string" },
|
|
102
|
+
startedAt: { type: "number" },
|
|
103
|
+
running: { type: "boolean" }
|
|
87
104
|
},
|
|
88
|
-
required: ["
|
|
105
|
+
required: ["sessionId", "commandId", "startedAt", "running"]
|
|
106
|
+
};
|
|
107
|
+
var shellSessionSignalEvidenceOutputSchema = {
|
|
108
|
+
type: "object",
|
|
109
|
+
properties: {
|
|
110
|
+
sessionId: { type: "string" },
|
|
111
|
+
signal: { type: "string", enum: ["INT", "TERM", "KILL"] },
|
|
112
|
+
ok: { type: "boolean" },
|
|
113
|
+
deliveredAt: { type: "number" }
|
|
114
|
+
},
|
|
115
|
+
required: ["sessionId", "signal", "ok", "deliveredAt"]
|
|
116
|
+
};
|
|
117
|
+
var shellSessionCloseEvidenceOutputSchema = {
|
|
118
|
+
type: "object",
|
|
119
|
+
properties: {
|
|
120
|
+
sessionId: { type: "string" },
|
|
121
|
+
closed: { type: "boolean" },
|
|
122
|
+
exitCode: { type: "number" }
|
|
123
|
+
},
|
|
124
|
+
required: ["sessionId", "closed"]
|
|
89
125
|
};
|
|
90
126
|
var fileTools = [
|
|
91
127
|
annotateTool({
|
|
@@ -106,7 +142,7 @@ var fileTools = [
|
|
|
106
142
|
inputSchema: {
|
|
107
143
|
type: "object",
|
|
108
144
|
properties: {
|
|
109
|
-
rootId: { type: "string",
|
|
145
|
+
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" },
|
|
110
146
|
path: { type: "string", description: "\u6587\u4EF6\u8DEF\u5F84\uFF08\u76F8\u5BF9\u4E8E rootId\uFF09" },
|
|
111
147
|
offset: { type: "number", description: "\u8D77\u59CB\u884C\u504F\u79FB\uFF08\u53EF\u9009\uFF09" },
|
|
112
148
|
limit: { type: "number", description: "\u8BFB\u53D6\u884C\u6570\u9650\u5236\uFF08\u53EF\u9009\uFF09" }
|
|
@@ -124,7 +160,7 @@ var fileTools = [
|
|
|
124
160
|
inputSchema: {
|
|
125
161
|
type: "object",
|
|
126
162
|
properties: {
|
|
127
|
-
rootId: { type: "string",
|
|
163
|
+
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" },
|
|
128
164
|
path: { type: "string", description: "\u6587\u4EF6\u8DEF\u5F84\uFF08\u76F8\u5BF9\u4E8E rootId\uFF09" },
|
|
129
165
|
content: { type: "string", description: "\u6587\u4EF6\u5185\u5BB9" }
|
|
130
166
|
},
|
|
@@ -141,7 +177,7 @@ var fileTools = [
|
|
|
141
177
|
inputSchema: {
|
|
142
178
|
type: "object",
|
|
143
179
|
properties: {
|
|
144
|
-
rootId: { type: "string",
|
|
180
|
+
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" },
|
|
145
181
|
path: { type: "string", description: "\u76EE\u5F55\u8DEF\u5F84\uFF08\u76F8\u5BF9\u4E8E rootId\uFF09" }
|
|
146
182
|
},
|
|
147
183
|
required: ["rootId", "path"]
|
|
@@ -157,7 +193,7 @@ var fileTools = [
|
|
|
157
193
|
inputSchema: {
|
|
158
194
|
type: "object",
|
|
159
195
|
properties: {
|
|
160
|
-
rootId: { type: "string",
|
|
196
|
+
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" },
|
|
161
197
|
path: { type: "string", description: "\u8981\u5220\u9664\u7684\u8DEF\u5F84\uFF08\u76F8\u5BF9\u4E8E rootId\uFF09" }
|
|
162
198
|
},
|
|
163
199
|
required: ["rootId", "path"]
|
|
@@ -173,7 +209,7 @@ var fileTools = [
|
|
|
173
209
|
inputSchema: {
|
|
174
210
|
type: "object",
|
|
175
211
|
properties: {
|
|
176
|
-
rootId: { type: "string",
|
|
212
|
+
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" },
|
|
177
213
|
path: { type: "string", description: "\u76EE\u5F55\u8DEF\u5F84\uFF08\u76F8\u5BF9\u4E8E rootId\uFF09" }
|
|
178
214
|
},
|
|
179
215
|
required: ["rootId", "path"]
|
|
@@ -189,7 +225,7 @@ var fileTools = [
|
|
|
189
225
|
inputSchema: {
|
|
190
226
|
type: "object",
|
|
191
227
|
properties: {
|
|
192
|
-
rootId: { type: "string",
|
|
228
|
+
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" },
|
|
193
229
|
path: { type: "string", description: "\u8981\u68C0\u67E5\u7684\u8DEF\u5F84\uFF08\u76F8\u5BF9\u4E8E rootId\uFF09" }
|
|
194
230
|
},
|
|
195
231
|
required: ["rootId", "path"]
|
|
@@ -205,7 +241,7 @@ var fileTools = [
|
|
|
205
241
|
inputSchema: {
|
|
206
242
|
type: "object",
|
|
207
243
|
properties: {
|
|
208
|
-
rootId: { type: "string",
|
|
244
|
+
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" },
|
|
209
245
|
path: { type: "string", description: "\u6587\u4EF6\u8DEF\u5F84" }
|
|
210
246
|
},
|
|
211
247
|
required: ["rootId", "path"]
|
|
@@ -221,7 +257,7 @@ var fileTools = [
|
|
|
221
257
|
inputSchema: {
|
|
222
258
|
type: "object",
|
|
223
259
|
properties: {
|
|
224
|
-
rootId: { type: "string",
|
|
260
|
+
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" },
|
|
225
261
|
path: { type: "string", description: "\u6587\u4EF6\u6216\u76EE\u5F55\u8DEF\u5F84" }
|
|
226
262
|
},
|
|
227
263
|
required: ["rootId", "path"]
|
|
@@ -237,7 +273,7 @@ var fileTools = [
|
|
|
237
273
|
inputSchema: {
|
|
238
274
|
type: "object",
|
|
239
275
|
properties: {
|
|
240
|
-
rootId: { type: "string",
|
|
276
|
+
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" },
|
|
241
277
|
query: { type: "string", description: "\u641C\u7D22\u5185\u5BB9\u6216\u6A21\u5F0F" },
|
|
242
278
|
path: { type: "string", description: "\u76F8\u5BF9 root \u7684\u641C\u7D22\u5B50\u8DEF\u5F84\uFF08\u53EF\u9009\uFF09" },
|
|
243
279
|
glob: { type: "string", description: "\u6587\u4EF6 glob \u6A21\u5F0F\uFF08\u53EF\u9009\uFF09" },
|
|
@@ -256,7 +292,7 @@ var fileTools = [
|
|
|
256
292
|
inputSchema: {
|
|
257
293
|
type: "object",
|
|
258
294
|
properties: {
|
|
259
|
-
rootId: { type: "string",
|
|
295
|
+
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" },
|
|
260
296
|
path: { type: "string", description: "\u539F\u8DEF\u5F84\uFF08\u76F8\u5BF9\u4E8E rootId\uFF09" },
|
|
261
297
|
newName: { type: "string", description: "\u65B0\u540D\u79F0" }
|
|
262
298
|
},
|
|
@@ -273,9 +309,9 @@ var fileTools = [
|
|
|
273
309
|
inputSchema: {
|
|
274
310
|
type: "object",
|
|
275
311
|
properties: {
|
|
276
|
-
sourceRootId: { type: "string",
|
|
312
|
+
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" },
|
|
277
313
|
sourcePath: { type: "string", description: "\u6E90\u8DEF\u5F84\uFF08\u76F8\u5BF9\u4E8E sourceRootId\uFF09" },
|
|
278
|
-
destRootId: { type: "string",
|
|
314
|
+
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" },
|
|
279
315
|
destPath: { type: "string", description: "\u76EE\u6807\u8DEF\u5F84\uFF08\u76F8\u5BF9\u4E8E destRootId\uFF09" }
|
|
280
316
|
},
|
|
281
317
|
required: ["sourceRootId", "sourcePath", "destRootId", "destPath"]
|
|
@@ -291,9 +327,9 @@ var fileTools = [
|
|
|
291
327
|
inputSchema: {
|
|
292
328
|
type: "object",
|
|
293
329
|
properties: {
|
|
294
|
-
sourceRootId: { type: "string",
|
|
330
|
+
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" },
|
|
295
331
|
sourcePath: { type: "string", description: "\u6E90\u8DEF\u5F84\uFF08\u76F8\u5BF9\u4E8E sourceRootId\uFF09" },
|
|
296
|
-
destRootId: { type: "string",
|
|
332
|
+
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" },
|
|
297
333
|
destPath: { type: "string", description: "\u76EE\u6807\u8DEF\u5F84\uFF08\u76F8\u5BF9\u4E8E destRootId\uFF09" }
|
|
298
334
|
},
|
|
299
335
|
required: ["sourceRootId", "sourcePath", "destRootId", "destPath"]
|
|
@@ -309,7 +345,7 @@ var fileTools = [
|
|
|
309
345
|
inputSchema: {
|
|
310
346
|
type: "object",
|
|
311
347
|
properties: {
|
|
312
|
-
rootId: { type: "string",
|
|
348
|
+
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" },
|
|
313
349
|
path: { type: "string", description: "\u6587\u4EF6\u8DEF\u5F84\uFF08\u76F8\u5BF9\u4E8E rootId\uFF09" }
|
|
314
350
|
},
|
|
315
351
|
required: ["rootId", "path"]
|
|
@@ -321,16 +357,20 @@ var fileTools = [
|
|
|
321
357
|
}),
|
|
322
358
|
annotateTool({
|
|
323
359
|
name: "seastudio-file_download",
|
|
324
|
-
description: "\u4ECE\u8FDC\u7A0B URL \u4E0B\u8F7D\u6587\u4EF6\
|
|
360
|
+
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",
|
|
325
361
|
inputSchema: {
|
|
326
362
|
type: "object",
|
|
327
363
|
properties: {
|
|
328
|
-
rootId: { type: "string",
|
|
329
|
-
path: { type: "string", description: "\u4FDD\u5B58\u76EE\u5F55\u8DEF\u5F84\uFF08\u76F8\u5BF9\u4E8E rootId\uFF09" },
|
|
364
|
+
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" },
|
|
365
|
+
path: { type: "string", description: "\u4FDD\u5B58\u76EE\u5F55\u8DEF\u5F84\uFF08\u76F8\u5BF9\u4E8E rootId\uFF1B\u672A\u4F7F\u7528 absoluteDir \u65F6\u5FC5\u586B\uFF09" },
|
|
366
|
+
absoluteDir: {
|
|
367
|
+
type: "string",
|
|
368
|
+
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"
|
|
369
|
+
},
|
|
330
370
|
url: { type: "string", description: "\u8FDC\u7A0B\u6587\u4EF6 URL" },
|
|
331
371
|
filenameHint: { type: "string", description: "\u6587\u4EF6\u540D\u63D0\u793A\uFF08\u53EF\u9009\uFF09" }
|
|
332
372
|
},
|
|
333
|
-
required: ["
|
|
373
|
+
required: ["url"]
|
|
334
374
|
}
|
|
335
375
|
}, {
|
|
336
376
|
operationKind: "mutate",
|
|
@@ -343,7 +383,7 @@ var fileTools = [
|
|
|
343
383
|
inputSchema: {
|
|
344
384
|
type: "object",
|
|
345
385
|
properties: {
|
|
346
|
-
rootId: { type: "string",
|
|
386
|
+
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" },
|
|
347
387
|
path: { type: "string", description: "\u6587\u4EF6\u8DEF\u5F84\uFF08\u76F8\u5BF9\u4E8E rootId\uFF09" },
|
|
348
388
|
base64: { type: "string", description: "base64 \u7F16\u7801\u7684\u6587\u4EF6\u5185\u5BB9" }
|
|
349
389
|
},
|
|
@@ -360,7 +400,7 @@ var fileTools = [
|
|
|
360
400
|
inputSchema: {
|
|
361
401
|
type: "object",
|
|
362
402
|
properties: {
|
|
363
|
-
rootId: { type: "string",
|
|
403
|
+
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" },
|
|
364
404
|
path: { type: "string", description: "\u6587\u4EF6\u8DEF\u5F84\uFF08\u76F8\u5BF9\u4E8E rootId\uFF09" }
|
|
365
405
|
},
|
|
366
406
|
required: ["rootId", "path"]
|
|
@@ -375,7 +415,7 @@ var fileTools = [
|
|
|
375
415
|
inputSchema: {
|
|
376
416
|
type: "object",
|
|
377
417
|
properties: {
|
|
378
|
-
rootId: { type: "string",
|
|
418
|
+
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" },
|
|
379
419
|
path: { type: "string", description: "\u6587\u4EF6\u8DEF\u5F84\uFF08\u76F8\u5BF9\u4E8E rootId\uFF09" }
|
|
380
420
|
},
|
|
381
421
|
required: ["rootId", "path"]
|
|
@@ -391,7 +431,7 @@ var fileTools = [
|
|
|
391
431
|
inputSchema: {
|
|
392
432
|
type: "object",
|
|
393
433
|
properties: {
|
|
394
|
-
rootId: { type: "string",
|
|
434
|
+
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" },
|
|
395
435
|
path: { type: "string", description: "\u76EE\u6807\u76EE\u5F55\u8DEF\u5F84\uFF08\u76F8\u5BF9\u4E8E rootId\uFF09" }
|
|
396
436
|
},
|
|
397
437
|
required: ["rootId", "path"]
|
|
@@ -419,7 +459,7 @@ var fileTools = [
|
|
|
419
459
|
inputSchema: {
|
|
420
460
|
type: "object",
|
|
421
461
|
properties: {
|
|
422
|
-
rootId: { type: "string",
|
|
462
|
+
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" },
|
|
423
463
|
path: { type: "string", description: "\u6587\u4EF6\u8DEF\u5F84\uFF08\u76F8\u5BF9\u4E8E rootId\uFF09" }
|
|
424
464
|
},
|
|
425
465
|
required: ["rootId", "path"]
|
|
@@ -435,7 +475,7 @@ var fileTools = [
|
|
|
435
475
|
inputSchema: {
|
|
436
476
|
type: "object",
|
|
437
477
|
properties: {
|
|
438
|
-
rootId: { type: "string",
|
|
478
|
+
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" },
|
|
439
479
|
path: { type: "string", description: "\u6587\u4EF6\u8DEF\u5F84\uFF08\u76F8\u5BF9\u4E8E rootId\uFF09" }
|
|
440
480
|
},
|
|
441
481
|
required: ["rootId", "path"]
|
|
@@ -469,7 +509,7 @@ var fileTools = [
|
|
|
469
509
|
inputSchema: {
|
|
470
510
|
type: "object",
|
|
471
511
|
properties: {
|
|
472
|
-
sourceRootId: { type: "string",
|
|
512
|
+
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" },
|
|
473
513
|
sourcePath: { type: "string", description: "\u6E90\u76EE\u5F55\u8DEF\u5F84\uFF08\u76F8\u5BF9\u4E8E sourceRootId\uFF09" }
|
|
474
514
|
},
|
|
475
515
|
required: ["sourceRootId", "sourcePath"]
|
|
@@ -485,9 +525,9 @@ var fileTools = [
|
|
|
485
525
|
inputSchema: {
|
|
486
526
|
type: "object",
|
|
487
527
|
properties: {
|
|
488
|
-
sourceRootId: { type: "string",
|
|
528
|
+
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" },
|
|
489
529
|
sourcePath: { type: "string", description: "\u6E90\u76EE\u5F55\u8DEF\u5F84\uFF08\u76F8\u5BF9\u4E8E sourceRootId\uFF09" },
|
|
490
|
-
destRootId: { type: "string",
|
|
530
|
+
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" },
|
|
491
531
|
destPath: { type: "string", description: "\u76EE\u6807\u76EE\u5F55\u8DEF\u5F84\uFF08\u76F8\u5BF9\u4E8E destRootId\uFF09" },
|
|
492
532
|
taskId: { type: "string", description: "\u4EFB\u52A1 ID\uFF08\u7528\u4E8E\u8FDB\u5EA6\u901A\u77E5\uFF09" }
|
|
493
533
|
},
|
|
@@ -501,27 +541,38 @@ var fileTools = [
|
|
|
501
541
|
];
|
|
502
542
|
|
|
503
543
|
// src/mcp/seastudio/tools-shell.ts
|
|
544
|
+
var sessionSnapshotSchema = shellSessionSnapshotEvidenceOutputSchema;
|
|
504
545
|
var shellTools = [
|
|
505
546
|
annotateTool({
|
|
506
|
-
name: "seastudio-
|
|
507
|
-
description: "\
|
|
547
|
+
name: "seastudio-shell_session_open",
|
|
548
|
+
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",
|
|
508
549
|
inputSchema: {
|
|
509
550
|
type: "object",
|
|
510
551
|
properties: {
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
552
|
+
shell: {
|
|
553
|
+
type: "string",
|
|
554
|
+
enum: ["auto", "bash", "pwsh", "cmd", "sh"],
|
|
555
|
+
description: "shell \u7C7B\u578B\uFF0C\u9ED8\u8BA4 auto\uFF08Win\u2192pwsh\uFF0CPOSIX\u2192bash\uFF09"
|
|
556
|
+
},
|
|
557
|
+
cwd: { type: "string", description: "\u5DE5\u4F5C\u76EE\u5F55\uFF08\u7EDD\u5BF9\u8DEF\u5F84\uFF0C\u9ED8\u8BA4\u4E3A\u9879\u76EE\u6839\u76EE\u5F55\uFF09" },
|
|
558
|
+
env: {
|
|
559
|
+
type: "object",
|
|
560
|
+
description: "\u9644\u52A0\u73AF\u5883\u53D8\u91CF\uFF08\u4EC5\u5141\u8BB8\u5927\u5199\u5B57\u6BCD/\u4E0B\u5212\u7EBF\u5F00\u5934\u7684 key\uFF09",
|
|
561
|
+
additionalProperties: { type: "string" }
|
|
562
|
+
},
|
|
563
|
+
label: { type: "string", description: "\u4F1A\u8BDD\u5907\u6CE8\uFF08\u4EC5\u7528\u4E8E\u663E\u793A\uFF09" },
|
|
564
|
+
cols: { type: "number", description: "PTY \u5217\u6570\uFF08\u9ED8\u8BA4 120\uFF09" },
|
|
565
|
+
rows: { type: "number", description: "PTY \u884C\u6570\uFF08\u9ED8\u8BA4 30\uFF09" }
|
|
566
|
+
}
|
|
516
567
|
}
|
|
517
568
|
}, {
|
|
518
|
-
operationKind: "
|
|
569
|
+
operationKind: "mutate",
|
|
519
570
|
requiresExecutionEvidence: true,
|
|
520
571
|
rawDomain: "shell"
|
|
521
|
-
},
|
|
572
|
+
}, shellSessionOpenEvidenceOutputSchema),
|
|
522
573
|
annotateTool({
|
|
523
|
-
name: "seastudio-
|
|
524
|
-
description: "\
|
|
574
|
+
name: "seastudio-shell_session_list",
|
|
575
|
+
description: "\u5217\u51FA\u5F53\u524D\u6240\u6709 PTY shell \u4F1A\u8BDD\u7684\u5FEB\u7167\u3002",
|
|
525
576
|
inputSchema: {
|
|
526
577
|
type: "object",
|
|
527
578
|
properties: {}
|
|
@@ -533,25 +584,86 @@ var shellTools = [
|
|
|
533
584
|
}, {
|
|
534
585
|
type: "object",
|
|
535
586
|
properties: {
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
587
|
+
sessions: {
|
|
588
|
+
type: "array",
|
|
589
|
+
items: sessionSnapshotSchema
|
|
590
|
+
}
|
|
591
|
+
},
|
|
592
|
+
required: ["sessions"]
|
|
593
|
+
}),
|
|
594
|
+
annotateTool({
|
|
595
|
+
name: "seastudio-shell_session_get",
|
|
596
|
+
description: "\u83B7\u53D6\u6307\u5B9A session \u7684\u5F53\u524D\u5FEB\u7167\uFF08pending\u3001\u6700\u8FD1\u4E00\u6B21\u547D\u4EE4\u7B49\uFF09\u3002",
|
|
597
|
+
inputSchema: {
|
|
598
|
+
type: "object",
|
|
599
|
+
properties: {
|
|
600
|
+
sessionId: { type: "string", description: "session_open \u8FD4\u56DE\u7684 sessionId" }
|
|
601
|
+
},
|
|
602
|
+
required: ["sessionId"]
|
|
603
|
+
}
|
|
604
|
+
}, {
|
|
605
|
+
operationKind: "read",
|
|
606
|
+
requiresExecutionEvidence: false,
|
|
607
|
+
rawDomain: "shell"
|
|
608
|
+
}, sessionSnapshotSchema),
|
|
609
|
+
annotateTool({
|
|
610
|
+
name: "seastudio-shell_session_run",
|
|
611
|
+
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",
|
|
612
|
+
inputSchema: {
|
|
613
|
+
type: "object",
|
|
614
|
+
properties: {
|
|
615
|
+
sessionId: { type: "string" },
|
|
616
|
+
command: { type: "string", description: "\u8981\u6267\u884C\u7684 shell \u547D\u4EE4" },
|
|
617
|
+
timeoutMs: {
|
|
618
|
+
type: "number",
|
|
619
|
+
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"
|
|
620
|
+
}
|
|
621
|
+
},
|
|
622
|
+
required: ["sessionId", "command"]
|
|
623
|
+
}
|
|
624
|
+
}, {
|
|
625
|
+
operationKind: "mutate",
|
|
626
|
+
requiresExecutionEvidence: true,
|
|
627
|
+
rawDomain: "shell"
|
|
628
|
+
}, shellSessionRunEvidenceOutputSchema),
|
|
629
|
+
annotateTool({
|
|
630
|
+
name: "seastudio-shell_session_wait",
|
|
631
|
+
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",
|
|
632
|
+
inputSchema: {
|
|
633
|
+
type: "object",
|
|
634
|
+
properties: {
|
|
635
|
+
sessionId: { type: "string" },
|
|
636
|
+
commandId: { type: "string" },
|
|
637
|
+
timeoutMs: { type: "number", description: "\u53EF\u9009\u7B49\u5F85\u8D85\u65F6\uFF08\u6BEB\u79D2\uFF09" }
|
|
638
|
+
},
|
|
639
|
+
required: ["sessionId", "commandId"]
|
|
545
640
|
}
|
|
641
|
+
}, {
|
|
642
|
+
operationKind: "read",
|
|
643
|
+
requiresExecutionEvidence: false,
|
|
644
|
+
rawDomain: "shell"
|
|
645
|
+
}, {
|
|
646
|
+
type: "object",
|
|
647
|
+
properties: {
|
|
648
|
+
commandId: { type: "string" },
|
|
649
|
+
exitCode: { type: "number" },
|
|
650
|
+
durationMs: { type: "number" },
|
|
651
|
+
finished: { type: "boolean" },
|
|
652
|
+
timedOut: { type: "boolean" }
|
|
653
|
+
},
|
|
654
|
+
required: ["commandId", "durationMs", "finished", "timedOut"]
|
|
546
655
|
}),
|
|
547
656
|
annotateTool({
|
|
548
657
|
name: "seastudio-shell_session_get_entries",
|
|
549
|
-
description: "\u8BFB\u53D6
|
|
658
|
+
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",
|
|
550
659
|
inputSchema: {
|
|
551
660
|
type: "object",
|
|
552
661
|
properties: {
|
|
553
|
-
|
|
554
|
-
|
|
662
|
+
sessionId: { type: "string" },
|
|
663
|
+
sinceId: { type: "number", description: "\u53EA\u8FD4\u56DE id > sinceId \u7684 entries\uFF08\u9ED8\u8BA4 0\uFF09" },
|
|
664
|
+
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" }
|
|
665
|
+
},
|
|
666
|
+
required: ["sessionId"]
|
|
555
667
|
}
|
|
556
668
|
}, {
|
|
557
669
|
operationKind: "read",
|
|
@@ -566,70 +678,71 @@ var shellTools = [
|
|
|
566
678
|
type: "object",
|
|
567
679
|
properties: {
|
|
568
680
|
id: { type: "number" },
|
|
569
|
-
level: { type: "string" },
|
|
681
|
+
level: { type: "string", enum: ["command", "stdout", "meta", "exit"] },
|
|
570
682
|
content: { type: "string" },
|
|
571
|
-
createdAt: { type: "number" }
|
|
572
|
-
|
|
683
|
+
createdAt: { type: "number" },
|
|
684
|
+
commandId: { type: "string" }
|
|
685
|
+
},
|
|
686
|
+
required: ["id", "level", "content", "createdAt"]
|
|
573
687
|
}
|
|
574
|
-
}
|
|
575
|
-
|
|
688
|
+
},
|
|
689
|
+
nextSinceId: { type: "number" },
|
|
690
|
+
totalEntries: { type: "number" },
|
|
691
|
+
droppedCount: { type: "number" }
|
|
692
|
+
},
|
|
693
|
+
required: ["entries", "nextSinceId", "totalEntries", "droppedCount"]
|
|
576
694
|
}),
|
|
577
695
|
annotateTool({
|
|
578
|
-
name: "seastudio-
|
|
579
|
-
description: "\
|
|
696
|
+
name: "seastudio-shell_session_signal",
|
|
697
|
+
description: "\u5411 session \u53D1\u4FE1\u53F7\uFF1AINT \u7B49\u4EF7 Ctrl-C\uFF08\u4E0D\u6740 session\uFF09\uFF1BTERM/KILL \u6740\u6389 session \u672C\u8EAB\u3002",
|
|
580
698
|
inputSchema: {
|
|
581
699
|
type: "object",
|
|
582
700
|
properties: {
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
701
|
+
sessionId: { type: "string" },
|
|
702
|
+
signal: { type: "string", enum: ["INT", "TERM", "KILL"] },
|
|
703
|
+
commandId: {
|
|
704
|
+
type: "string",
|
|
705
|
+
description: "\u53EF\u9009\uFF0C\u4EC5\u8BB0\u5F55\u5728 entries \u4E2D\uFF0C\u4E0D\u5F71\u54CD\u4FE1\u53F7\u8BED\u4E49"
|
|
706
|
+
}
|
|
586
707
|
},
|
|
587
|
-
required: ["
|
|
708
|
+
required: ["sessionId", "signal"]
|
|
588
709
|
}
|
|
589
710
|
}, {
|
|
590
|
-
operationKind: "
|
|
711
|
+
operationKind: "mutate",
|
|
591
712
|
requiresExecutionEvidence: true,
|
|
592
713
|
rawDomain: "shell"
|
|
593
|
-
},
|
|
714
|
+
}, shellSessionSignalEvidenceOutputSchema),
|
|
594
715
|
annotateTool({
|
|
595
|
-
name: "seastudio-
|
|
596
|
-
description: "\
|
|
716
|
+
name: "seastudio-shell_session_clear_entries",
|
|
717
|
+
description: "\u6E05\u7A7A session \u7684\u8F93\u51FA\u7F13\u51B2\uFF0C\u4F1A\u8BDD\u672C\u8EAB\u4E0D\u53D7\u5F71\u54CD\u3002",
|
|
597
718
|
inputSchema: {
|
|
598
719
|
type: "object",
|
|
599
720
|
properties: {
|
|
600
|
-
|
|
721
|
+
sessionId: { type: "string" }
|
|
601
722
|
},
|
|
602
|
-
required: ["
|
|
723
|
+
required: ["sessionId"]
|
|
603
724
|
}
|
|
604
725
|
}, {
|
|
605
726
|
operationKind: "mutate",
|
|
606
727
|
requiresExecutionEvidence: true,
|
|
607
728
|
rawDomain: "shell"
|
|
608
|
-
},
|
|
729
|
+
}, sessionSnapshotSchema),
|
|
609
730
|
annotateTool({
|
|
610
|
-
name: "seastudio-
|
|
611
|
-
description: "\
|
|
731
|
+
name: "seastudio-shell_session_close",
|
|
732
|
+
description: "\u5173\u95ED session \u5E76\u91CA\u653E PTY\u3002force=true \u65F6\u4F7F\u7528 SIGKILL\uFF1B\u9ED8\u8BA4 SIGTERM\u3002",
|
|
612
733
|
inputSchema: {
|
|
613
734
|
type: "object",
|
|
614
|
-
properties: {
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
rawDomain: "shell"
|
|
620
|
-
}, shellSessionSnapshotEvidenceOutputSchema),
|
|
621
|
-
annotateTool({
|
|
622
|
-
name: "seastudio-shell_session_reset",
|
|
623
|
-
description: "\u91CD\u7F6E\u5F53\u524D Shell \u4F1A\u8BDD\uFF0Ccwd \u56DE\u5230\u9879\u76EE\u76EE\u5F55\u5E76\u6E05\u7A7A\u8F93\u51FA\u3001\u5386\u53F2\u4E0E\u6700\u8FD1\u6267\u884C\u72B6\u6001\u3002",
|
|
624
|
-
inputSchema: {
|
|
625
|
-
type: "object",
|
|
626
|
-
properties: {}
|
|
735
|
+
properties: {
|
|
736
|
+
sessionId: { type: "string" },
|
|
737
|
+
force: { type: "boolean", description: "\u5F3A\u5236 KILL\uFF0C\u9ED8\u8BA4 false" }
|
|
738
|
+
},
|
|
739
|
+
required: ["sessionId"]
|
|
627
740
|
}
|
|
628
741
|
}, {
|
|
629
742
|
operationKind: "mutate",
|
|
630
743
|
requiresExecutionEvidence: true,
|
|
631
744
|
rawDomain: "shell"
|
|
632
|
-
},
|
|
745
|
+
}, shellSessionCloseEvidenceOutputSchema)
|
|
633
746
|
];
|
|
634
747
|
|
|
635
748
|
// src/mcp/seastudio/tools-aigc.ts
|
|
@@ -711,6 +824,10 @@ var seastudio = {
|
|
|
711
824
|
roots: {
|
|
712
825
|
list: () => request("roots/list")
|
|
713
826
|
},
|
|
827
|
+
project: {
|
|
828
|
+
list: () => callTool("seastudio-project_list", {}),
|
|
829
|
+
getActive: () => callTool("seastudio-project_get_active", {})
|
|
830
|
+
},
|
|
714
831
|
file: {
|
|
715
832
|
getSelected: () => callTool("seastudio-file_get_selected", {}),
|
|
716
833
|
read: (path, options) => callTool("seastudio-file_read", {
|
|
@@ -799,22 +916,85 @@ var seastudio = {
|
|
|
799
916
|
});
|
|
800
917
|
},
|
|
801
918
|
getUrl: (path, options) => callTool("seastudio-file_get_url", { rootId: options?.rootId ?? "workspace", path }),
|
|
802
|
-
download: (url, path, filenameHint, options) =>
|
|
919
|
+
download: (url, path, filenameHint, options) => {
|
|
920
|
+
const absoluteDir = options?.absoluteDir?.trim();
|
|
921
|
+
if (absoluteDir) {
|
|
922
|
+
return callTool("seastudio-file_download", { url, absoluteDir, filenameHint });
|
|
923
|
+
}
|
|
924
|
+
return callTool("seastudio-file_download", { rootId: options?.rootId ?? "workspace", path, url, filenameHint });
|
|
925
|
+
},
|
|
803
926
|
writeBinary: (path, base64, options) => callTool("seastudio-file_write_binary", { rootId: options?.rootId ?? "workspace", path, base64 }),
|
|
804
927
|
readBinary: (path, options) => callTool("seastudio-file_read_binary", { rootId: options?.rootId ?? "workspace", path })
|
|
805
928
|
},
|
|
806
929
|
shell: {
|
|
807
|
-
execute: (command, cwd, timeout) => callTool("seastudio-shell_execute", { command, cwd, timeout }),
|
|
808
930
|
session: {
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
931
|
+
open: (options = {}) => callTool("seastudio-shell_session_open", { ...options }),
|
|
932
|
+
list: () => callTool("seastudio-shell_session_list", {}),
|
|
933
|
+
get: (sessionId) => callTool("seastudio-shell_session_get", { sessionId }),
|
|
934
|
+
run: (sessionId, command, options = {}) => callTool("seastudio-shell_session_run", {
|
|
935
|
+
sessionId,
|
|
936
|
+
command,
|
|
937
|
+
...typeof options.timeoutMs === "number" ? { timeoutMs: options.timeoutMs } : {}
|
|
938
|
+
}),
|
|
939
|
+
wait: (sessionId, commandId, timeoutMs) => callTool("seastudio-shell_session_wait", {
|
|
940
|
+
sessionId,
|
|
941
|
+
commandId,
|
|
942
|
+
...typeof timeoutMs === "number" ? { timeoutMs } : {}
|
|
943
|
+
}),
|
|
944
|
+
getEntries: (sessionId, options = {}) => callTool("seastudio-shell_session_get_entries", {
|
|
945
|
+
sessionId,
|
|
946
|
+
...typeof options.sinceId === "number" ? { sinceId: options.sinceId } : {},
|
|
947
|
+
...typeof options.limit === "number" ? { limit: options.limit } : {}
|
|
948
|
+
}),
|
|
949
|
+
signal: (sessionId, signal, commandId) => callTool("seastudio-shell_session_signal", {
|
|
950
|
+
sessionId,
|
|
951
|
+
signal,
|
|
952
|
+
...commandId ? { commandId } : {}
|
|
953
|
+
}),
|
|
954
|
+
clearEntries: (sessionId) => callTool("seastudio-shell_session_clear_entries", { sessionId }),
|
|
955
|
+
close: (sessionId, force = false) => callTool("seastudio-shell_session_close", { sessionId, force })
|
|
815
956
|
}
|
|
816
957
|
}
|
|
817
958
|
};
|
|
959
|
+
async function runOneShotShellCommand(command, options = {}) {
|
|
960
|
+
const { timeoutMs, ...openOpts } = options;
|
|
961
|
+
const openRaw = await seastudio.shell.session.open(openOpts);
|
|
962
|
+
const openText = openRaw.content?.[0]?.text ?? "{}";
|
|
963
|
+
const opened = JSON.parse(openText);
|
|
964
|
+
const sessionId = opened.sessionId;
|
|
965
|
+
if (!sessionId) {
|
|
966
|
+
throw new Error("shell_session_open did not return sessionId");
|
|
967
|
+
}
|
|
968
|
+
try {
|
|
969
|
+
const runRaw = await seastudio.shell.session.run(sessionId, command, {
|
|
970
|
+
...typeof timeoutMs === "number" ? { timeoutMs } : {}
|
|
971
|
+
});
|
|
972
|
+
const runText = runRaw.content?.[0]?.text ?? "{}";
|
|
973
|
+
const run = JSON.parse(runText);
|
|
974
|
+
const waitRaw = await seastudio.shell.session.wait(
|
|
975
|
+
sessionId,
|
|
976
|
+
run.commandId,
|
|
977
|
+
typeof timeoutMs === "number" ? timeoutMs + 5e3 : void 0
|
|
978
|
+
);
|
|
979
|
+
const waitText = waitRaw.content?.[0]?.text ?? "{}";
|
|
980
|
+
const wait = JSON.parse(waitText);
|
|
981
|
+
const entriesRaw = await seastudio.shell.session.getEntries(sessionId, {});
|
|
982
|
+
const entriesText = entriesRaw.content?.[0]?.text ?? "{}";
|
|
983
|
+
const entries = JSON.parse(entriesText);
|
|
984
|
+
const stdout = entries.entries.filter((e) => e.commandId === run.commandId && e.level === "stdout").map((e) => e.content).join("\n");
|
|
985
|
+
return {
|
|
986
|
+
exitCode: wait.exitCode,
|
|
987
|
+
stdout,
|
|
988
|
+
durationMs: wait.durationMs,
|
|
989
|
+
timedOut: wait.timedOut
|
|
990
|
+
};
|
|
991
|
+
} finally {
|
|
992
|
+
try {
|
|
993
|
+
await seastudio.shell.session.close(sessionId);
|
|
994
|
+
} catch {
|
|
995
|
+
}
|
|
996
|
+
}
|
|
997
|
+
}
|
|
818
998
|
|
|
819
999
|
// src/mcp/seastudio/tools-plugin.ts
|
|
820
1000
|
var pluginManagementTools = [
|
|
@@ -868,37 +1048,9 @@ var pluginManagementTools = [
|
|
|
868
1048
|
operationKind: "mutate",
|
|
869
1049
|
requiresExecutionEvidence: true
|
|
870
1050
|
}),
|
|
871
|
-
annotateTool({
|
|
872
|
-
name: "seastudio-plugin_enable",
|
|
873
|
-
description: "\u5728\u5F53\u524D\u9879\u76EE\u4E2D\u542F\u7528\u6307\u5B9A\u63D2\u4EF6\u3002\u9700\u63D0\u4F9B\u63D2\u4EF6 id\u3002",
|
|
874
|
-
inputSchema: {
|
|
875
|
-
type: "object",
|
|
876
|
-
properties: {
|
|
877
|
-
pluginId: { type: "string", description: "\u8981\u542F\u7528\u7684\u63D2\u4EF6 ID" }
|
|
878
|
-
},
|
|
879
|
-
required: ["pluginId"]
|
|
880
|
-
}
|
|
881
|
-
}, {
|
|
882
|
-
operationKind: "mutate",
|
|
883
|
-
requiresExecutionEvidence: true
|
|
884
|
-
}),
|
|
885
|
-
annotateTool({
|
|
886
|
-
name: "seastudio-plugin_disable",
|
|
887
|
-
description: "\u5728\u5F53\u524D\u9879\u76EE\u4E2D\u7981\u7528\u6307\u5B9A\u63D2\u4EF6\u3002\u9700\u63D0\u4F9B\u63D2\u4EF6 id\u3002",
|
|
888
|
-
inputSchema: {
|
|
889
|
-
type: "object",
|
|
890
|
-
properties: {
|
|
891
|
-
pluginId: { type: "string", description: "\u8981\u7981\u7528\u7684\u63D2\u4EF6 ID" }
|
|
892
|
-
},
|
|
893
|
-
required: ["pluginId"]
|
|
894
|
-
}
|
|
895
|
-
}, {
|
|
896
|
-
operationKind: "mutate",
|
|
897
|
-
requiresExecutionEvidence: true
|
|
898
|
-
}),
|
|
899
1051
|
annotateTool({
|
|
900
1052
|
name: "seastudio-plugin_get_status",
|
|
901
|
-
description: "\u83B7\u53D6\u6307\u5B9A\u63D2\u4EF6\u7684\u5B89\u88C5\u72B6\u6001\u3002\u8FD4\u56DE\u662F\u5426\u5DF2\u5B89\u88C5\u3001\u7248\u672C\
|
|
1053
|
+
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",
|
|
902
1054
|
inputSchema: {
|
|
903
1055
|
type: "object",
|
|
904
1056
|
properties: {
|
|
@@ -1044,37 +1196,9 @@ var agentManagementTools = [
|
|
|
1044
1196
|
operationKind: "mutate",
|
|
1045
1197
|
requiresExecutionEvidence: true
|
|
1046
1198
|
}),
|
|
1047
|
-
annotateTool({
|
|
1048
|
-
name: "seastudio-agent_enable",
|
|
1049
|
-
description: "\u5728\u5F53\u524D\u9879\u76EE\u4E2D\u542F\u7528\u6307\u5B9A Agent\u3002\u9700\u63D0\u4F9B Agent id\u3002",
|
|
1050
|
-
inputSchema: {
|
|
1051
|
-
type: "object",
|
|
1052
|
-
properties: {
|
|
1053
|
-
agentId: { type: "string", description: "\u8981\u542F\u7528\u7684 Agent ID" }
|
|
1054
|
-
},
|
|
1055
|
-
required: ["agentId"]
|
|
1056
|
-
}
|
|
1057
|
-
}, {
|
|
1058
|
-
operationKind: "mutate",
|
|
1059
|
-
requiresExecutionEvidence: true
|
|
1060
|
-
}),
|
|
1061
|
-
annotateTool({
|
|
1062
|
-
name: "seastudio-agent_disable",
|
|
1063
|
-
description: "\u5728\u5F53\u524D\u9879\u76EE\u4E2D\u7981\u7528\u6307\u5B9A Agent\u3002\u9700\u63D0\u4F9B Agent id\u3002",
|
|
1064
|
-
inputSchema: {
|
|
1065
|
-
type: "object",
|
|
1066
|
-
properties: {
|
|
1067
|
-
agentId: { type: "string", description: "\u8981\u7981\u7528\u7684 Agent ID" }
|
|
1068
|
-
},
|
|
1069
|
-
required: ["agentId"]
|
|
1070
|
-
}
|
|
1071
|
-
}, {
|
|
1072
|
-
operationKind: "mutate",
|
|
1073
|
-
requiresExecutionEvidence: true
|
|
1074
|
-
}),
|
|
1075
1199
|
annotateTool({
|
|
1076
1200
|
name: "seastudio-agent_get_status",
|
|
1077
|
-
description: "\u83B7\u53D6\u6307\u5B9A Agent \u7684\u5B89\u88C5\u72B6\u6001\u3002\u8FD4\u56DE\u662F\u5426\u5DF2\u5B89\u88C5\u3001\u7248\u672C\u3001\
|
|
1201
|
+
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",
|
|
1078
1202
|
inputSchema: {
|
|
1079
1203
|
type: "object",
|
|
1080
1204
|
properties: {
|
|
@@ -1168,6 +1292,32 @@ var agentTabTools = [
|
|
|
1168
1292
|
})
|
|
1169
1293
|
];
|
|
1170
1294
|
|
|
1295
|
+
// src/mcp/seastudio/tools-project.ts
|
|
1296
|
+
var projectTools = [
|
|
1297
|
+
annotateTool({
|
|
1298
|
+
name: "seastudio-project_list",
|
|
1299
|
+
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",
|
|
1300
|
+
inputSchema: {
|
|
1301
|
+
type: "object",
|
|
1302
|
+
properties: {}
|
|
1303
|
+
}
|
|
1304
|
+
}, {
|
|
1305
|
+
operationKind: "read",
|
|
1306
|
+
requiresExecutionEvidence: false
|
|
1307
|
+
}),
|
|
1308
|
+
annotateTool({
|
|
1309
|
+
name: "seastudio-project_get_active",
|
|
1310
|
+
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",
|
|
1311
|
+
inputSchema: {
|
|
1312
|
+
type: "object",
|
|
1313
|
+
properties: {}
|
|
1314
|
+
}
|
|
1315
|
+
}, {
|
|
1316
|
+
operationKind: "read",
|
|
1317
|
+
requiresExecutionEvidence: false
|
|
1318
|
+
})
|
|
1319
|
+
];
|
|
1320
|
+
|
|
1171
1321
|
// src/mcp/seastudio/notifications.ts
|
|
1172
1322
|
var SeastudioRequests = {
|
|
1173
1323
|
/** 请求打开文件 -> 主程序发布 FILE_OPEN_REQUESTED */
|
|
@@ -1240,8 +1390,9 @@ var allTools = [
|
|
|
1240
1390
|
...pluginManagementTools,
|
|
1241
1391
|
...agentManagementTools,
|
|
1242
1392
|
...pluginTabTools,
|
|
1243
|
-
...agentTabTools
|
|
1393
|
+
...agentTabTools,
|
|
1394
|
+
...projectTools
|
|
1244
1395
|
];
|
|
1245
1396
|
var tools = allTools;
|
|
1246
1397
|
|
|
1247
|
-
export { SeastudioNotifications, SeastudioRequests, agentManagementTools, agentTabTools, allTools, annotateTool, batchFlattenCopyEvidenceOutputSchema, callTool, callToolText, dualPathEvidenceOutputSchema, fileDownloadEvidenceOutputSchema, fileTools, pluginManagementTools, pluginTabTools, request, rootedPathEvidenceOutputSchema, rootedWriteEvidenceOutputSchema, seaCloudTools, seastudio,
|
|
1398
|
+
export { SeastudioNotifications, SeastudioRequests, agentManagementTools, agentTabTools, allTools, annotateTool, batchFlattenCopyEvidenceOutputSchema, callTool, callToolText, dualPathEvidenceOutputSchema, fileDownloadEvidenceOutputSchema, fileTools, pluginManagementTools, pluginTabTools, projectTools, request, rootedPathEvidenceOutputSchema, rootedWriteEvidenceOutputSchema, runOneShotShellCommand, seaCloudTools, seastudio, shellSessionCloseEvidenceOutputSchema, shellSessionOpenEvidenceOutputSchema, shellSessionRunEvidenceOutputSchema, shellSessionSignalEvidenceOutputSchema, shellSessionSnapshotEvidenceOutputSchema, shellTools, tools };
|