@seastudio/sdk 3.2.5 → 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.
@@ -63,34 +63,67 @@ var fileDownloadEvidenceOutputSchema = {
63
63
  },
64
64
  required: ["location", "path", "savedPath", "size"]
65
65
  };
66
- var shellCommandEvidenceOutputSchema = {
66
+ var shellSessionSnapshotEvidenceOutputSchema = {
67
67
  type: "object",
68
68
  properties: {
69
- command: { type: "string" },
69
+ sessionId: { type: "string" },
70
+ shell: { type: "string", enum: ["bash", "pwsh", "cmd", "sh"] },
70
71
  cwd: { type: "string" },
71
- exitCode: { type: "number" },
72
- stdout: { type: "string" },
73
- stderr: { type: "string" },
74
- error: { type: "string" },
75
- durationMs: { type: "number" },
76
- usedFallback: { type: "boolean" }
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" }
77
85
  },
78
- required: ["command", "exitCode", "stdout", "stderr"]
86
+ required: ["sessionId", "shell", "pid", "alive", "openedAt", "entryCount", "droppedCount"]
79
87
  };
80
- var shellSessionSnapshotEvidenceOutputSchema = {
88
+ var shellSessionOpenEvidenceOutputSchema = {
81
89
  type: "object",
82
90
  properties: {
83
- projectPath: { type: "string" },
91
+ sessionId: { type: "string" },
92
+ shell: { type: "string", enum: ["bash", "pwsh", "cmd", "sh"] },
84
93
  cwd: { type: "string" },
85
- promptLabel: { type: "string" },
86
- isRunning: { type: "boolean" },
87
- lastExitCode: { type: "number" },
88
- lastDurationMs: { type: "number" },
89
- lastCommandAt: { type: "number" },
90
- historyCount: { type: "number" },
91
- entryCount: { type: "number" }
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" }
92
106
  },
93
- required: ["projectPath", "cwd", "promptLabel", "isRunning", "historyCount", "entryCount"]
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"]
94
127
  };
95
128
  var fileTools = [
96
129
  annotateTool({
@@ -111,7 +144,7 @@ var fileTools = [
111
144
  inputSchema: {
112
145
  type: "object",
113
146
  properties: {
114
- rootId: { type: "string", enum: ["workspace"], description: "\u6839\u76EE\u5F55 ID" },
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" },
115
148
  path: { type: "string", description: "\u6587\u4EF6\u8DEF\u5F84\uFF08\u76F8\u5BF9\u4E8E rootId\uFF09" },
116
149
  offset: { type: "number", description: "\u8D77\u59CB\u884C\u504F\u79FB\uFF08\u53EF\u9009\uFF09" },
117
150
  limit: { type: "number", description: "\u8BFB\u53D6\u884C\u6570\u9650\u5236\uFF08\u53EF\u9009\uFF09" }
@@ -129,7 +162,7 @@ var fileTools = [
129
162
  inputSchema: {
130
163
  type: "object",
131
164
  properties: {
132
- rootId: { type: "string", enum: ["workspace"], description: "\u6839\u76EE\u5F55 ID" },
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" },
133
166
  path: { type: "string", description: "\u6587\u4EF6\u8DEF\u5F84\uFF08\u76F8\u5BF9\u4E8E rootId\uFF09" },
134
167
  content: { type: "string", description: "\u6587\u4EF6\u5185\u5BB9" }
135
168
  },
@@ -146,7 +179,7 @@ var fileTools = [
146
179
  inputSchema: {
147
180
  type: "object",
148
181
  properties: {
149
- rootId: { type: "string", enum: ["workspace"], description: "\u6839\u76EE\u5F55 ID" },
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" },
150
183
  path: { type: "string", description: "\u76EE\u5F55\u8DEF\u5F84\uFF08\u76F8\u5BF9\u4E8E rootId\uFF09" }
151
184
  },
152
185
  required: ["rootId", "path"]
@@ -162,7 +195,7 @@ var fileTools = [
162
195
  inputSchema: {
163
196
  type: "object",
164
197
  properties: {
165
- rootId: { type: "string", enum: ["workspace"], description: "\u6839\u76EE\u5F55 ID" },
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" },
166
199
  path: { type: "string", description: "\u8981\u5220\u9664\u7684\u8DEF\u5F84\uFF08\u76F8\u5BF9\u4E8E rootId\uFF09" }
167
200
  },
168
201
  required: ["rootId", "path"]
@@ -178,7 +211,7 @@ var fileTools = [
178
211
  inputSchema: {
179
212
  type: "object",
180
213
  properties: {
181
- rootId: { type: "string", enum: ["workspace"], description: "\u6839\u76EE\u5F55 ID" },
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" },
182
215
  path: { type: "string", description: "\u76EE\u5F55\u8DEF\u5F84\uFF08\u76F8\u5BF9\u4E8E rootId\uFF09" }
183
216
  },
184
217
  required: ["rootId", "path"]
@@ -194,7 +227,7 @@ var fileTools = [
194
227
  inputSchema: {
195
228
  type: "object",
196
229
  properties: {
197
- rootId: { type: "string", enum: ["workspace"], description: "\u6839\u76EE\u5F55 ID" },
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" },
198
231
  path: { type: "string", description: "\u8981\u68C0\u67E5\u7684\u8DEF\u5F84\uFF08\u76F8\u5BF9\u4E8E rootId\uFF09" }
199
232
  },
200
233
  required: ["rootId", "path"]
@@ -210,7 +243,7 @@ var fileTools = [
210
243
  inputSchema: {
211
244
  type: "object",
212
245
  properties: {
213
- rootId: { type: "string", enum: ["workspace"], description: "\u6839\u76EE\u5F55 ID" },
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" },
214
247
  path: { type: "string", description: "\u6587\u4EF6\u8DEF\u5F84" }
215
248
  },
216
249
  required: ["rootId", "path"]
@@ -226,7 +259,7 @@ var fileTools = [
226
259
  inputSchema: {
227
260
  type: "object",
228
261
  properties: {
229
- rootId: { type: "string", enum: ["workspace"], description: "\u6839\u76EE\u5F55 ID" },
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" },
230
263
  path: { type: "string", description: "\u6587\u4EF6\u6216\u76EE\u5F55\u8DEF\u5F84" }
231
264
  },
232
265
  required: ["rootId", "path"]
@@ -242,7 +275,7 @@ var fileTools = [
242
275
  inputSchema: {
243
276
  type: "object",
244
277
  properties: {
245
- rootId: { type: "string", enum: ["workspace"], description: "\u6839\u76EE\u5F55 ID" },
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" },
246
279
  query: { type: "string", description: "\u641C\u7D22\u5185\u5BB9\u6216\u6A21\u5F0F" },
247
280
  path: { type: "string", description: "\u76F8\u5BF9 root \u7684\u641C\u7D22\u5B50\u8DEF\u5F84\uFF08\u53EF\u9009\uFF09" },
248
281
  glob: { type: "string", description: "\u6587\u4EF6 glob \u6A21\u5F0F\uFF08\u53EF\u9009\uFF09" },
@@ -261,7 +294,7 @@ var fileTools = [
261
294
  inputSchema: {
262
295
  type: "object",
263
296
  properties: {
264
- rootId: { type: "string", enum: ["workspace"], description: "\u6839\u76EE\u5F55 ID" },
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" },
265
298
  path: { type: "string", description: "\u539F\u8DEF\u5F84\uFF08\u76F8\u5BF9\u4E8E rootId\uFF09" },
266
299
  newName: { type: "string", description: "\u65B0\u540D\u79F0" }
267
300
  },
@@ -278,9 +311,9 @@ var fileTools = [
278
311
  inputSchema: {
279
312
  type: "object",
280
313
  properties: {
281
- sourceRootId: { type: "string", enum: ["workspace"], description: "\u6E90\u6839\u76EE\u5F55 ID" },
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" },
282
315
  sourcePath: { type: "string", description: "\u6E90\u8DEF\u5F84\uFF08\u76F8\u5BF9\u4E8E sourceRootId\uFF09" },
283
- destRootId: { type: "string", enum: ["workspace"], description: "\u76EE\u6807\u6839\u76EE\u5F55 ID" },
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" },
284
317
  destPath: { type: "string", description: "\u76EE\u6807\u8DEF\u5F84\uFF08\u76F8\u5BF9\u4E8E destRootId\uFF09" }
285
318
  },
286
319
  required: ["sourceRootId", "sourcePath", "destRootId", "destPath"]
@@ -296,9 +329,9 @@ var fileTools = [
296
329
  inputSchema: {
297
330
  type: "object",
298
331
  properties: {
299
- sourceRootId: { type: "string", enum: ["workspace"], description: "\u6E90\u6839\u76EE\u5F55 ID" },
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" },
300
333
  sourcePath: { type: "string", description: "\u6E90\u8DEF\u5F84\uFF08\u76F8\u5BF9\u4E8E sourceRootId\uFF09" },
301
- destRootId: { type: "string", enum: ["workspace"], description: "\u76EE\u6807\u6839\u76EE\u5F55 ID" },
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" },
302
335
  destPath: { type: "string", description: "\u76EE\u6807\u8DEF\u5F84\uFF08\u76F8\u5BF9\u4E8E destRootId\uFF09" }
303
336
  },
304
337
  required: ["sourceRootId", "sourcePath", "destRootId", "destPath"]
@@ -314,7 +347,7 @@ var fileTools = [
314
347
  inputSchema: {
315
348
  type: "object",
316
349
  properties: {
317
- rootId: { type: "string", enum: ["workspace"], description: "\u6839\u76EE\u5F55 ID" },
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" },
318
351
  path: { type: "string", description: "\u6587\u4EF6\u8DEF\u5F84\uFF08\u76F8\u5BF9\u4E8E rootId\uFF09" }
319
352
  },
320
353
  required: ["rootId", "path"]
@@ -326,11 +359,11 @@ var fileTools = [
326
359
  }),
327
360
  annotateTool({
328
361
  name: "seastudio-file_download",
329
- description: "\u4ECE\u8FDC\u7A0B URL \u4E0B\u8F7D\u6587\u4EF6\u3002\u4E8C\u9009\u4E00\uFF1A\u2460 \u5728 workspace \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",
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",
330
363
  inputSchema: {
331
364
  type: "object",
332
365
  properties: {
333
- rootId: { type: "string", enum: ["workspace"], description: "\u6839\u76EE\u5F55 ID\uFF08\u4E0E path \u8054\u7528\uFF1B\u82E5\u63D0\u4F9B absoluteDir \u5219\u5FFD\u7565\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" },
334
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" },
335
368
  absoluteDir: {
336
369
  type: "string",
@@ -352,7 +385,7 @@ var fileTools = [
352
385
  inputSchema: {
353
386
  type: "object",
354
387
  properties: {
355
- rootId: { type: "string", enum: ["workspace"], description: "\u6839\u76EE\u5F55 ID" },
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" },
356
389
  path: { type: "string", description: "\u6587\u4EF6\u8DEF\u5F84\uFF08\u76F8\u5BF9\u4E8E rootId\uFF09" },
357
390
  base64: { type: "string", description: "base64 \u7F16\u7801\u7684\u6587\u4EF6\u5185\u5BB9" }
358
391
  },
@@ -369,7 +402,7 @@ var fileTools = [
369
402
  inputSchema: {
370
403
  type: "object",
371
404
  properties: {
372
- rootId: { type: "string", enum: ["workspace"], description: "\u6839\u76EE\u5F55 ID" },
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" },
373
406
  path: { type: "string", description: "\u6587\u4EF6\u8DEF\u5F84\uFF08\u76F8\u5BF9\u4E8E rootId\uFF09" }
374
407
  },
375
408
  required: ["rootId", "path"]
@@ -384,7 +417,7 @@ var fileTools = [
384
417
  inputSchema: {
385
418
  type: "object",
386
419
  properties: {
387
- rootId: { type: "string", enum: ["workspace"], description: "\u6839\u76EE\u5F55 ID" },
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" },
388
421
  path: { type: "string", description: "\u6587\u4EF6\u8DEF\u5F84\uFF08\u76F8\u5BF9\u4E8E rootId\uFF09" }
389
422
  },
390
423
  required: ["rootId", "path"]
@@ -400,7 +433,7 @@ var fileTools = [
400
433
  inputSchema: {
401
434
  type: "object",
402
435
  properties: {
403
- rootId: { type: "string", enum: ["workspace"], description: "\u6839\u76EE\u5F55 ID" },
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" },
404
437
  path: { type: "string", description: "\u76EE\u6807\u76EE\u5F55\u8DEF\u5F84\uFF08\u76F8\u5BF9\u4E8E rootId\uFF09" }
405
438
  },
406
439
  required: ["rootId", "path"]
@@ -428,7 +461,7 @@ var fileTools = [
428
461
  inputSchema: {
429
462
  type: "object",
430
463
  properties: {
431
- rootId: { type: "string", enum: ["workspace"], description: "\u6839\u76EE\u5F55 ID" },
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" },
432
465
  path: { type: "string", description: "\u6587\u4EF6\u8DEF\u5F84\uFF08\u76F8\u5BF9\u4E8E rootId\uFF09" }
433
466
  },
434
467
  required: ["rootId", "path"]
@@ -444,7 +477,7 @@ var fileTools = [
444
477
  inputSchema: {
445
478
  type: "object",
446
479
  properties: {
447
- rootId: { type: "string", enum: ["workspace"], description: "\u6839\u76EE\u5F55 ID" },
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" },
448
481
  path: { type: "string", description: "\u6587\u4EF6\u8DEF\u5F84\uFF08\u76F8\u5BF9\u4E8E rootId\uFF09" }
449
482
  },
450
483
  required: ["rootId", "path"]
@@ -478,7 +511,7 @@ var fileTools = [
478
511
  inputSchema: {
479
512
  type: "object",
480
513
  properties: {
481
- sourceRootId: { type: "string", enum: ["workspace"], description: "\u6E90\u6839\u76EE\u5F55 ID" },
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" },
482
515
  sourcePath: { type: "string", description: "\u6E90\u76EE\u5F55\u8DEF\u5F84\uFF08\u76F8\u5BF9\u4E8E sourceRootId\uFF09" }
483
516
  },
484
517
  required: ["sourceRootId", "sourcePath"]
@@ -494,9 +527,9 @@ var fileTools = [
494
527
  inputSchema: {
495
528
  type: "object",
496
529
  properties: {
497
- sourceRootId: { type: "string", enum: ["workspace"], description: "\u6E90\u6839\u76EE\u5F55 ID" },
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" },
498
531
  sourcePath: { type: "string", description: "\u6E90\u76EE\u5F55\u8DEF\u5F84\uFF08\u76F8\u5BF9\u4E8E sourceRootId\uFF09" },
499
- destRootId: { type: "string", enum: ["workspace"], description: "\u76EE\u6807\u6839\u76EE\u5F55 ID" },
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" },
500
533
  destPath: { type: "string", description: "\u76EE\u6807\u76EE\u5F55\u8DEF\u5F84\uFF08\u76F8\u5BF9\u4E8E destRootId\uFF09" },
501
534
  taskId: { type: "string", description: "\u4EFB\u52A1 ID\uFF08\u7528\u4E8E\u8FDB\u5EA6\u901A\u77E5\uFF09" }
502
535
  },
@@ -510,27 +543,38 @@ var fileTools = [
510
543
  ];
511
544
 
512
545
  // src/mcp/seastudio/tools-shell.ts
546
+ var sessionSnapshotSchema = shellSessionSnapshotEvidenceOutputSchema;
513
547
  var shellTools = [
514
548
  annotateTool({
515
- name: "seastudio-shell_execute",
516
- 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",
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",
517
551
  inputSchema: {
518
552
  type: "object",
519
553
  properties: {
520
- command: { type: "string", description: "\u8981\u6267\u884C\u7684\u547D\u4EE4" },
521
- cwd: { type: "string", description: "\u5DE5\u4F5C\u76EE\u5F55\uFF08\u53EF\u9009\uFF0C\u9ED8\u8BA4\u4E3A\u9879\u76EE\u6839\u76EE\u5F55\uFF09" },
522
- timeout: { type: "number", description: "\u8D85\u65F6\u65F6\u95F4\uFF08\u6BEB\u79D2\uFF0C\u53EF\u9009\uFF09" }
523
- },
524
- required: ["command"]
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
+ }
525
569
  }
526
570
  }, {
527
- operationKind: "system",
571
+ operationKind: "mutate",
528
572
  requiresExecutionEvidence: true,
529
573
  rawDomain: "shell"
530
- }, shellCommandEvidenceOutputSchema),
574
+ }, shellSessionOpenEvidenceOutputSchema),
531
575
  annotateTool({
532
- name: "seastudio-shell_session_get",
533
- 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",
576
+ name: "seastudio-shell_session_list",
577
+ description: "\u5217\u51FA\u5F53\u524D\u6240\u6709 PTY shell \u4F1A\u8BDD\u7684\u5FEB\u7167\u3002",
534
578
  inputSchema: {
535
579
  type: "object",
536
580
  properties: {}
@@ -542,25 +586,86 @@ var shellTools = [
542
586
  }, {
543
587
  type: "object",
544
588
  properties: {
545
- projectPath: { type: "string" },
546
- cwd: { type: "string" },
547
- promptLabel: { type: "string" },
548
- isRunning: { type: "boolean" },
549
- lastExitCode: { type: "number" },
550
- lastDurationMs: { type: "number" },
551
- lastCommandAt: { type: "number" },
552
- historyCount: { type: "number" },
553
- entryCount: { type: "number" }
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"]
554
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"]
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"]
555
657
  }),
556
658
  annotateTool({
557
659
  name: "seastudio-shell_session_get_entries",
558
- 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",
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",
559
661
  inputSchema: {
560
662
  type: "object",
561
663
  properties: {
562
- limit: { type: "number", description: "\u8FD4\u56DE\u6700\u8FD1\u591A\u5C11\u6761\u8BB0\u5F55\uFF0C\u9ED8\u8BA4 200\u3002" }
563
- }
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"]
564
669
  }
565
670
  }, {
566
671
  operationKind: "read",
@@ -575,70 +680,71 @@ var shellTools = [
575
680
  type: "object",
576
681
  properties: {
577
682
  id: { type: "number" },
578
- level: { type: "string" },
683
+ level: { type: "string", enum: ["command", "stdout", "meta", "exit"] },
579
684
  content: { type: "string" },
580
- createdAt: { type: "number" }
581
- }
685
+ createdAt: { type: "number" },
686
+ commandId: { type: "string" }
687
+ },
688
+ required: ["id", "level", "content", "createdAt"]
582
689
  }
583
- }
584
- }
690
+ },
691
+ nextSinceId: { type: "number" },
692
+ totalEntries: { type: "number" },
693
+ droppedCount: { type: "number" }
694
+ },
695
+ required: ["entries", "nextSinceId", "totalEntries", "droppedCount"]
585
696
  }),
586
697
  annotateTool({
587
- name: "seastudio-shell_session_run_command",
588
- 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",
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",
589
700
  inputSchema: {
590
701
  type: "object",
591
702
  properties: {
592
- command: { type: "string", description: "\u8981\u6267\u884C\u7684\u547D\u4EE4" },
593
- cwd: { type: "string", description: "\u53EF\u9009\uFF0C\u8986\u76D6\u5F53\u524D\u4F1A\u8BDD\u5DE5\u4F5C\u76EE\u5F55" },
594
- timeout: { type: "number", description: "\u53EF\u9009\uFF0C\u8D85\u65F6\u65F6\u95F4\uFF08\u6BEB\u79D2\uFF09" }
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
+ }
595
709
  },
596
- required: ["command"]
710
+ required: ["sessionId", "signal"]
597
711
  }
598
712
  }, {
599
- operationKind: "system",
713
+ operationKind: "mutate",
600
714
  requiresExecutionEvidence: true,
601
715
  rawDomain: "shell"
602
- }, shellCommandEvidenceOutputSchema),
716
+ }, shellSessionSignalEvidenceOutputSchema),
603
717
  annotateTool({
604
- name: "seastudio-shell_session_set_cwd",
605
- description: "\u76F4\u63A5\u8BBE\u7F6E\u5F53\u524D Shell \u4F1A\u8BDD\u5DE5\u4F5C\u76EE\u5F55\uFF0C\u4E0D\u6267\u884C\u547D\u4EE4\u3002",
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",
606
720
  inputSchema: {
607
721
  type: "object",
608
722
  properties: {
609
- cwd: { type: "string", description: "\u76EE\u6807\u5DE5\u4F5C\u76EE\u5F55" }
723
+ sessionId: { type: "string" }
610
724
  },
611
- required: ["cwd"]
725
+ required: ["sessionId"]
612
726
  }
613
727
  }, {
614
728
  operationKind: "mutate",
615
729
  requiresExecutionEvidence: true,
616
730
  rawDomain: "shell"
617
- }, shellSessionSnapshotEvidenceOutputSchema),
731
+ }, sessionSnapshotSchema),
618
732
  annotateTool({
619
- name: "seastudio-shell_session_clear",
620
- 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",
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",
621
735
  inputSchema: {
622
736
  type: "object",
623
- properties: {}
624
- }
625
- }, {
626
- operationKind: "mutate",
627
- requiresExecutionEvidence: true,
628
- rawDomain: "shell"
629
- }, shellSessionSnapshotEvidenceOutputSchema),
630
- annotateTool({
631
- name: "seastudio-shell_session_reset",
632
- 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",
633
- inputSchema: {
634
- type: "object",
635
- properties: {}
737
+ properties: {
738
+ sessionId: { type: "string" },
739
+ force: { type: "boolean", description: "\u5F3A\u5236 KILL\uFF0C\u9ED8\u8BA4 false" }
740
+ },
741
+ required: ["sessionId"]
636
742
  }
637
743
  }, {
638
744
  operationKind: "mutate",
639
745
  requiresExecutionEvidence: true,
640
746
  rawDomain: "shell"
641
- }, shellSessionSnapshotEvidenceOutputSchema)
747
+ }, shellSessionCloseEvidenceOutputSchema)
642
748
  ];
643
749
 
644
750
  // src/mcp/seastudio/tools-aigc.ts
@@ -720,6 +826,10 @@ var seastudio = {
720
826
  roots: {
721
827
  list: () => request("roots/list")
722
828
  },
829
+ project: {
830
+ list: () => callTool("seastudio-project_list", {}),
831
+ getActive: () => callTool("seastudio-project_get_active", {})
832
+ },
723
833
  file: {
724
834
  getSelected: () => callTool("seastudio-file_get_selected", {}),
725
835
  read: (path, options) => callTool("seastudio-file_read", {
@@ -819,17 +929,74 @@ var seastudio = {
819
929
  readBinary: (path, options) => callTool("seastudio-file_read_binary", { rootId: options?.rootId ?? "workspace", path })
820
930
  },
821
931
  shell: {
822
- execute: (command, cwd, timeout) => callTool("seastudio-shell_execute", { command, cwd, timeout }),
823
932
  session: {
824
- get: () => callTool("seastudio-shell_session_get", {}),
825
- getEntries: (limit) => callTool("seastudio-shell_session_get_entries", { limit }),
826
- runCommand: (command, cwd, timeout) => callTool("seastudio-shell_session_run_command", { command, cwd, timeout }),
827
- setCwd: (cwd) => callTool("seastudio-shell_session_set_cwd", { cwd }),
828
- clear: () => callTool("seastudio-shell_session_clear", {}),
829
- reset: () => callTool("seastudio-shell_session_reset", {})
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 })
830
958
  }
831
959
  }
832
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
+ }
833
1000
 
834
1001
  // src/mcp/seastudio/tools-plugin.ts
835
1002
  var pluginManagementTools = [
@@ -883,37 +1050,9 @@ var pluginManagementTools = [
883
1050
  operationKind: "mutate",
884
1051
  requiresExecutionEvidence: true
885
1052
  }),
886
- annotateTool({
887
- name: "seastudio-plugin_enable",
888
- description: "\u5728\u5F53\u524D\u9879\u76EE\u4E2D\u542F\u7528\u6307\u5B9A\u63D2\u4EF6\u3002\u9700\u63D0\u4F9B\u63D2\u4EF6 id\u3002",
889
- inputSchema: {
890
- type: "object",
891
- properties: {
892
- pluginId: { type: "string", description: "\u8981\u542F\u7528\u7684\u63D2\u4EF6 ID" }
893
- },
894
- required: ["pluginId"]
895
- }
896
- }, {
897
- operationKind: "mutate",
898
- requiresExecutionEvidence: true
899
- }),
900
- annotateTool({
901
- name: "seastudio-plugin_disable",
902
- description: "\u5728\u5F53\u524D\u9879\u76EE\u4E2D\u7981\u7528\u6307\u5B9A\u63D2\u4EF6\u3002\u9700\u63D0\u4F9B\u63D2\u4EF6 id\u3002",
903
- inputSchema: {
904
- type: "object",
905
- properties: {
906
- pluginId: { type: "string", description: "\u8981\u7981\u7528\u7684\u63D2\u4EF6 ID" }
907
- },
908
- required: ["pluginId"]
909
- }
910
- }, {
911
- operationKind: "mutate",
912
- requiresExecutionEvidence: true
913
- }),
914
1053
  annotateTool({
915
1054
  name: "seastudio-plugin_get_status",
916
- 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",
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",
917
1056
  inputSchema: {
918
1057
  type: "object",
919
1058
  properties: {
@@ -1059,37 +1198,9 @@ var agentManagementTools = [
1059
1198
  operationKind: "mutate",
1060
1199
  requiresExecutionEvidence: true
1061
1200
  }),
1062
- annotateTool({
1063
- name: "seastudio-agent_enable",
1064
- description: "\u5728\u5F53\u524D\u9879\u76EE\u4E2D\u542F\u7528\u6307\u5B9A Agent\u3002\u9700\u63D0\u4F9B Agent id\u3002",
1065
- inputSchema: {
1066
- type: "object",
1067
- properties: {
1068
- agentId: { type: "string", description: "\u8981\u542F\u7528\u7684 Agent ID" }
1069
- },
1070
- required: ["agentId"]
1071
- }
1072
- }, {
1073
- operationKind: "mutate",
1074
- requiresExecutionEvidence: true
1075
- }),
1076
- annotateTool({
1077
- name: "seastudio-agent_disable",
1078
- description: "\u5728\u5F53\u524D\u9879\u76EE\u4E2D\u7981\u7528\u6307\u5B9A Agent\u3002\u9700\u63D0\u4F9B Agent id\u3002",
1079
- inputSchema: {
1080
- type: "object",
1081
- properties: {
1082
- agentId: { type: "string", description: "\u8981\u7981\u7528\u7684 Agent ID" }
1083
- },
1084
- required: ["agentId"]
1085
- }
1086
- }, {
1087
- operationKind: "mutate",
1088
- requiresExecutionEvidence: true
1089
- }),
1090
1201
  annotateTool({
1091
1202
  name: "seastudio-agent_get_status",
1092
- 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",
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",
1093
1204
  inputSchema: {
1094
1205
  type: "object",
1095
1206
  properties: {
@@ -1183,6 +1294,32 @@ var agentTabTools = [
1183
1294
  })
1184
1295
  ];
1185
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
+
1186
1323
  // src/mcp/seastudio/notifications.ts
1187
1324
  var SeastudioRequests = {
1188
1325
  /** 请求打开文件 -> 主程序发布 FILE_OPEN_REQUESTED */
@@ -1255,7 +1392,8 @@ var allTools = [
1255
1392
  ...pluginManagementTools,
1256
1393
  ...agentManagementTools,
1257
1394
  ...pluginTabTools,
1258
- ...agentTabTools
1395
+ ...agentTabTools,
1396
+ ...projectTools
1259
1397
  ];
1260
1398
  var tools = allTools;
1261
1399
 
@@ -1273,12 +1411,17 @@ exports.fileDownloadEvidenceOutputSchema = fileDownloadEvidenceOutputSchema;
1273
1411
  exports.fileTools = fileTools;
1274
1412
  exports.pluginManagementTools = pluginManagementTools;
1275
1413
  exports.pluginTabTools = pluginTabTools;
1414
+ exports.projectTools = projectTools;
1276
1415
  exports.request = request;
1277
1416
  exports.rootedPathEvidenceOutputSchema = rootedPathEvidenceOutputSchema;
1278
1417
  exports.rootedWriteEvidenceOutputSchema = rootedWriteEvidenceOutputSchema;
1418
+ exports.runOneShotShellCommand = runOneShotShellCommand;
1279
1419
  exports.seaCloudTools = seaCloudTools;
1280
1420
  exports.seastudio = seastudio;
1281
- exports.shellCommandEvidenceOutputSchema = shellCommandEvidenceOutputSchema;
1421
+ exports.shellSessionCloseEvidenceOutputSchema = shellSessionCloseEvidenceOutputSchema;
1422
+ exports.shellSessionOpenEvidenceOutputSchema = shellSessionOpenEvidenceOutputSchema;
1423
+ exports.shellSessionRunEvidenceOutputSchema = shellSessionRunEvidenceOutputSchema;
1424
+ exports.shellSessionSignalEvidenceOutputSchema = shellSessionSignalEvidenceOutputSchema;
1282
1425
  exports.shellSessionSnapshotEvidenceOutputSchema = shellSessionSnapshotEvidenceOutputSchema;
1283
1426
  exports.shellTools = shellTools;
1284
1427
  exports.tools = tools;