@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.
@@ -61,34 +61,67 @@ var fileDownloadEvidenceOutputSchema = {
61
61
  },
62
62
  required: ["location", "path", "savedPath", "size"]
63
63
  };
64
- var shellCommandEvidenceOutputSchema = {
64
+ var shellSessionSnapshotEvidenceOutputSchema = {
65
65
  type: "object",
66
66
  properties: {
67
- command: { type: "string" },
67
+ sessionId: { type: "string" },
68
+ shell: { type: "string", enum: ["bash", "pwsh", "cmd", "sh"] },
68
69
  cwd: { type: "string" },
69
- exitCode: { type: "number" },
70
- stdout: { type: "string" },
71
- stderr: { type: "string" },
72
- error: { type: "string" },
73
- durationMs: { type: "number" },
74
- usedFallback: { type: "boolean" }
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" }
75
83
  },
76
- required: ["command", "exitCode", "stdout", "stderr"]
84
+ required: ["sessionId", "shell", "pid", "alive", "openedAt", "entryCount", "droppedCount"]
77
85
  };
78
- var shellSessionSnapshotEvidenceOutputSchema = {
86
+ var shellSessionOpenEvidenceOutputSchema = {
79
87
  type: "object",
80
88
  properties: {
81
- projectPath: { type: "string" },
89
+ sessionId: { type: "string" },
90
+ shell: { type: "string", enum: ["bash", "pwsh", "cmd", "sh"] },
82
91
  cwd: { type: "string" },
83
- promptLabel: { type: "string" },
84
- isRunning: { type: "boolean" },
85
- lastExitCode: { type: "number" },
86
- lastDurationMs: { type: "number" },
87
- lastCommandAt: { type: "number" },
88
- historyCount: { type: "number" },
89
- entryCount: { type: "number" }
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" }
90
104
  },
91
- required: ["projectPath", "cwd", "promptLabel", "isRunning", "historyCount", "entryCount"]
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"]
92
125
  };
93
126
  var fileTools = [
94
127
  annotateTool({
@@ -109,7 +142,7 @@ var fileTools = [
109
142
  inputSchema: {
110
143
  type: "object",
111
144
  properties: {
112
- rootId: { type: "string", enum: ["workspace"], description: "\u6839\u76EE\u5F55 ID" },
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" },
113
146
  path: { type: "string", description: "\u6587\u4EF6\u8DEF\u5F84\uFF08\u76F8\u5BF9\u4E8E rootId\uFF09" },
114
147
  offset: { type: "number", description: "\u8D77\u59CB\u884C\u504F\u79FB\uFF08\u53EF\u9009\uFF09" },
115
148
  limit: { type: "number", description: "\u8BFB\u53D6\u884C\u6570\u9650\u5236\uFF08\u53EF\u9009\uFF09" }
@@ -127,7 +160,7 @@ var fileTools = [
127
160
  inputSchema: {
128
161
  type: "object",
129
162
  properties: {
130
- rootId: { type: "string", enum: ["workspace"], description: "\u6839\u76EE\u5F55 ID" },
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" },
131
164
  path: { type: "string", description: "\u6587\u4EF6\u8DEF\u5F84\uFF08\u76F8\u5BF9\u4E8E rootId\uFF09" },
132
165
  content: { type: "string", description: "\u6587\u4EF6\u5185\u5BB9" }
133
166
  },
@@ -144,7 +177,7 @@ var fileTools = [
144
177
  inputSchema: {
145
178
  type: "object",
146
179
  properties: {
147
- rootId: { type: "string", enum: ["workspace"], description: "\u6839\u76EE\u5F55 ID" },
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" },
148
181
  path: { type: "string", description: "\u76EE\u5F55\u8DEF\u5F84\uFF08\u76F8\u5BF9\u4E8E rootId\uFF09" }
149
182
  },
150
183
  required: ["rootId", "path"]
@@ -160,7 +193,7 @@ var fileTools = [
160
193
  inputSchema: {
161
194
  type: "object",
162
195
  properties: {
163
- rootId: { type: "string", enum: ["workspace"], description: "\u6839\u76EE\u5F55 ID" },
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" },
164
197
  path: { type: "string", description: "\u8981\u5220\u9664\u7684\u8DEF\u5F84\uFF08\u76F8\u5BF9\u4E8E rootId\uFF09" }
165
198
  },
166
199
  required: ["rootId", "path"]
@@ -176,7 +209,7 @@ var fileTools = [
176
209
  inputSchema: {
177
210
  type: "object",
178
211
  properties: {
179
- rootId: { type: "string", enum: ["workspace"], description: "\u6839\u76EE\u5F55 ID" },
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" },
180
213
  path: { type: "string", description: "\u76EE\u5F55\u8DEF\u5F84\uFF08\u76F8\u5BF9\u4E8E rootId\uFF09" }
181
214
  },
182
215
  required: ["rootId", "path"]
@@ -192,7 +225,7 @@ var fileTools = [
192
225
  inputSchema: {
193
226
  type: "object",
194
227
  properties: {
195
- rootId: { type: "string", enum: ["workspace"], description: "\u6839\u76EE\u5F55 ID" },
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" },
196
229
  path: { type: "string", description: "\u8981\u68C0\u67E5\u7684\u8DEF\u5F84\uFF08\u76F8\u5BF9\u4E8E rootId\uFF09" }
197
230
  },
198
231
  required: ["rootId", "path"]
@@ -208,7 +241,7 @@ var fileTools = [
208
241
  inputSchema: {
209
242
  type: "object",
210
243
  properties: {
211
- rootId: { type: "string", enum: ["workspace"], description: "\u6839\u76EE\u5F55 ID" },
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" },
212
245
  path: { type: "string", description: "\u6587\u4EF6\u8DEF\u5F84" }
213
246
  },
214
247
  required: ["rootId", "path"]
@@ -224,7 +257,7 @@ var fileTools = [
224
257
  inputSchema: {
225
258
  type: "object",
226
259
  properties: {
227
- rootId: { type: "string", enum: ["workspace"], description: "\u6839\u76EE\u5F55 ID" },
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" },
228
261
  path: { type: "string", description: "\u6587\u4EF6\u6216\u76EE\u5F55\u8DEF\u5F84" }
229
262
  },
230
263
  required: ["rootId", "path"]
@@ -240,7 +273,7 @@ var fileTools = [
240
273
  inputSchema: {
241
274
  type: "object",
242
275
  properties: {
243
- rootId: { type: "string", enum: ["workspace"], description: "\u6839\u76EE\u5F55 ID" },
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" },
244
277
  query: { type: "string", description: "\u641C\u7D22\u5185\u5BB9\u6216\u6A21\u5F0F" },
245
278
  path: { type: "string", description: "\u76F8\u5BF9 root \u7684\u641C\u7D22\u5B50\u8DEF\u5F84\uFF08\u53EF\u9009\uFF09" },
246
279
  glob: { type: "string", description: "\u6587\u4EF6 glob \u6A21\u5F0F\uFF08\u53EF\u9009\uFF09" },
@@ -259,7 +292,7 @@ var fileTools = [
259
292
  inputSchema: {
260
293
  type: "object",
261
294
  properties: {
262
- rootId: { type: "string", enum: ["workspace"], description: "\u6839\u76EE\u5F55 ID" },
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" },
263
296
  path: { type: "string", description: "\u539F\u8DEF\u5F84\uFF08\u76F8\u5BF9\u4E8E rootId\uFF09" },
264
297
  newName: { type: "string", description: "\u65B0\u540D\u79F0" }
265
298
  },
@@ -276,9 +309,9 @@ var fileTools = [
276
309
  inputSchema: {
277
310
  type: "object",
278
311
  properties: {
279
- sourceRootId: { type: "string", enum: ["workspace"], description: "\u6E90\u6839\u76EE\u5F55 ID" },
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" },
280
313
  sourcePath: { type: "string", description: "\u6E90\u8DEF\u5F84\uFF08\u76F8\u5BF9\u4E8E sourceRootId\uFF09" },
281
- destRootId: { type: "string", enum: ["workspace"], description: "\u76EE\u6807\u6839\u76EE\u5F55 ID" },
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" },
282
315
  destPath: { type: "string", description: "\u76EE\u6807\u8DEF\u5F84\uFF08\u76F8\u5BF9\u4E8E destRootId\uFF09" }
283
316
  },
284
317
  required: ["sourceRootId", "sourcePath", "destRootId", "destPath"]
@@ -294,9 +327,9 @@ var fileTools = [
294
327
  inputSchema: {
295
328
  type: "object",
296
329
  properties: {
297
- sourceRootId: { type: "string", enum: ["workspace"], description: "\u6E90\u6839\u76EE\u5F55 ID" },
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" },
298
331
  sourcePath: { type: "string", description: "\u6E90\u8DEF\u5F84\uFF08\u76F8\u5BF9\u4E8E sourceRootId\uFF09" },
299
- destRootId: { type: "string", enum: ["workspace"], description: "\u76EE\u6807\u6839\u76EE\u5F55 ID" },
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" },
300
333
  destPath: { type: "string", description: "\u76EE\u6807\u8DEF\u5F84\uFF08\u76F8\u5BF9\u4E8E destRootId\uFF09" }
301
334
  },
302
335
  required: ["sourceRootId", "sourcePath", "destRootId", "destPath"]
@@ -312,7 +345,7 @@ var fileTools = [
312
345
  inputSchema: {
313
346
  type: "object",
314
347
  properties: {
315
- rootId: { type: "string", enum: ["workspace"], description: "\u6839\u76EE\u5F55 ID" },
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" },
316
349
  path: { type: "string", description: "\u6587\u4EF6\u8DEF\u5F84\uFF08\u76F8\u5BF9\u4E8E rootId\uFF09" }
317
350
  },
318
351
  required: ["rootId", "path"]
@@ -324,11 +357,11 @@ var fileTools = [
324
357
  }),
325
358
  annotateTool({
326
359
  name: "seastudio-file_download",
327
- 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",
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",
328
361
  inputSchema: {
329
362
  type: "object",
330
363
  properties: {
331
- rootId: { type: "string", enum: ["workspace"], description: "\u6839\u76EE\u5F55 ID\uFF08\u4E0E path \u8054\u7528\uFF1B\u82E5\u63D0\u4F9B absoluteDir \u5219\u5FFD\u7565\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" },
332
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" },
333
366
  absoluteDir: {
334
367
  type: "string",
@@ -350,7 +383,7 @@ var fileTools = [
350
383
  inputSchema: {
351
384
  type: "object",
352
385
  properties: {
353
- rootId: { type: "string", enum: ["workspace"], description: "\u6839\u76EE\u5F55 ID" },
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" },
354
387
  path: { type: "string", description: "\u6587\u4EF6\u8DEF\u5F84\uFF08\u76F8\u5BF9\u4E8E rootId\uFF09" },
355
388
  base64: { type: "string", description: "base64 \u7F16\u7801\u7684\u6587\u4EF6\u5185\u5BB9" }
356
389
  },
@@ -367,7 +400,7 @@ var fileTools = [
367
400
  inputSchema: {
368
401
  type: "object",
369
402
  properties: {
370
- rootId: { type: "string", enum: ["workspace"], description: "\u6839\u76EE\u5F55 ID" },
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" },
371
404
  path: { type: "string", description: "\u6587\u4EF6\u8DEF\u5F84\uFF08\u76F8\u5BF9\u4E8E rootId\uFF09" }
372
405
  },
373
406
  required: ["rootId", "path"]
@@ -382,7 +415,7 @@ var fileTools = [
382
415
  inputSchema: {
383
416
  type: "object",
384
417
  properties: {
385
- rootId: { type: "string", enum: ["workspace"], description: "\u6839\u76EE\u5F55 ID" },
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" },
386
419
  path: { type: "string", description: "\u6587\u4EF6\u8DEF\u5F84\uFF08\u76F8\u5BF9\u4E8E rootId\uFF09" }
387
420
  },
388
421
  required: ["rootId", "path"]
@@ -398,7 +431,7 @@ var fileTools = [
398
431
  inputSchema: {
399
432
  type: "object",
400
433
  properties: {
401
- rootId: { type: "string", enum: ["workspace"], description: "\u6839\u76EE\u5F55 ID" },
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" },
402
435
  path: { type: "string", description: "\u76EE\u6807\u76EE\u5F55\u8DEF\u5F84\uFF08\u76F8\u5BF9\u4E8E rootId\uFF09" }
403
436
  },
404
437
  required: ["rootId", "path"]
@@ -426,7 +459,7 @@ var fileTools = [
426
459
  inputSchema: {
427
460
  type: "object",
428
461
  properties: {
429
- rootId: { type: "string", enum: ["workspace"], description: "\u6839\u76EE\u5F55 ID" },
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" },
430
463
  path: { type: "string", description: "\u6587\u4EF6\u8DEF\u5F84\uFF08\u76F8\u5BF9\u4E8E rootId\uFF09" }
431
464
  },
432
465
  required: ["rootId", "path"]
@@ -442,7 +475,7 @@ var fileTools = [
442
475
  inputSchema: {
443
476
  type: "object",
444
477
  properties: {
445
- rootId: { type: "string", enum: ["workspace"], description: "\u6839\u76EE\u5F55 ID" },
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" },
446
479
  path: { type: "string", description: "\u6587\u4EF6\u8DEF\u5F84\uFF08\u76F8\u5BF9\u4E8E rootId\uFF09" }
447
480
  },
448
481
  required: ["rootId", "path"]
@@ -476,7 +509,7 @@ var fileTools = [
476
509
  inputSchema: {
477
510
  type: "object",
478
511
  properties: {
479
- sourceRootId: { type: "string", enum: ["workspace"], description: "\u6E90\u6839\u76EE\u5F55 ID" },
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" },
480
513
  sourcePath: { type: "string", description: "\u6E90\u76EE\u5F55\u8DEF\u5F84\uFF08\u76F8\u5BF9\u4E8E sourceRootId\uFF09" }
481
514
  },
482
515
  required: ["sourceRootId", "sourcePath"]
@@ -492,9 +525,9 @@ var fileTools = [
492
525
  inputSchema: {
493
526
  type: "object",
494
527
  properties: {
495
- sourceRootId: { type: "string", enum: ["workspace"], description: "\u6E90\u6839\u76EE\u5F55 ID" },
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" },
496
529
  sourcePath: { type: "string", description: "\u6E90\u76EE\u5F55\u8DEF\u5F84\uFF08\u76F8\u5BF9\u4E8E sourceRootId\uFF09" },
497
- destRootId: { type: "string", enum: ["workspace"], description: "\u76EE\u6807\u6839\u76EE\u5F55 ID" },
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" },
498
531
  destPath: { type: "string", description: "\u76EE\u6807\u76EE\u5F55\u8DEF\u5F84\uFF08\u76F8\u5BF9\u4E8E destRootId\uFF09" },
499
532
  taskId: { type: "string", description: "\u4EFB\u52A1 ID\uFF08\u7528\u4E8E\u8FDB\u5EA6\u901A\u77E5\uFF09" }
500
533
  },
@@ -508,27 +541,38 @@ var fileTools = [
508
541
  ];
509
542
 
510
543
  // src/mcp/seastudio/tools-shell.ts
544
+ var sessionSnapshotSchema = shellSessionSnapshotEvidenceOutputSchema;
511
545
  var shellTools = [
512
546
  annotateTool({
513
- name: "seastudio-shell_execute",
514
- 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",
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",
515
549
  inputSchema: {
516
550
  type: "object",
517
551
  properties: {
518
- command: { type: "string", description: "\u8981\u6267\u884C\u7684\u547D\u4EE4" },
519
- cwd: { type: "string", description: "\u5DE5\u4F5C\u76EE\u5F55\uFF08\u53EF\u9009\uFF0C\u9ED8\u8BA4\u4E3A\u9879\u76EE\u6839\u76EE\u5F55\uFF09" },
520
- timeout: { type: "number", description: "\u8D85\u65F6\u65F6\u95F4\uFF08\u6BEB\u79D2\uFF0C\u53EF\u9009\uFF09" }
521
- },
522
- required: ["command"]
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
+ }
523
567
  }
524
568
  }, {
525
- operationKind: "system",
569
+ operationKind: "mutate",
526
570
  requiresExecutionEvidence: true,
527
571
  rawDomain: "shell"
528
- }, shellCommandEvidenceOutputSchema),
572
+ }, shellSessionOpenEvidenceOutputSchema),
529
573
  annotateTool({
530
- name: "seastudio-shell_session_get",
531
- 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",
574
+ name: "seastudio-shell_session_list",
575
+ description: "\u5217\u51FA\u5F53\u524D\u6240\u6709 PTY shell \u4F1A\u8BDD\u7684\u5FEB\u7167\u3002",
532
576
  inputSchema: {
533
577
  type: "object",
534
578
  properties: {}
@@ -540,25 +584,86 @@ var shellTools = [
540
584
  }, {
541
585
  type: "object",
542
586
  properties: {
543
- projectPath: { type: "string" },
544
- cwd: { type: "string" },
545
- promptLabel: { type: "string" },
546
- isRunning: { type: "boolean" },
547
- lastExitCode: { type: "number" },
548
- lastDurationMs: { type: "number" },
549
- lastCommandAt: { type: "number" },
550
- historyCount: { type: "number" },
551
- entryCount: { type: "number" }
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"]
552
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"]
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"]
553
655
  }),
554
656
  annotateTool({
555
657
  name: "seastudio-shell_session_get_entries",
556
- 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",
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",
557
659
  inputSchema: {
558
660
  type: "object",
559
661
  properties: {
560
- limit: { type: "number", description: "\u8FD4\u56DE\u6700\u8FD1\u591A\u5C11\u6761\u8BB0\u5F55\uFF0C\u9ED8\u8BA4 200\u3002" }
561
- }
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"]
562
667
  }
563
668
  }, {
564
669
  operationKind: "read",
@@ -573,70 +678,71 @@ var shellTools = [
573
678
  type: "object",
574
679
  properties: {
575
680
  id: { type: "number" },
576
- level: { type: "string" },
681
+ level: { type: "string", enum: ["command", "stdout", "meta", "exit"] },
577
682
  content: { type: "string" },
578
- createdAt: { type: "number" }
579
- }
683
+ createdAt: { type: "number" },
684
+ commandId: { type: "string" }
685
+ },
686
+ required: ["id", "level", "content", "createdAt"]
580
687
  }
581
- }
582
- }
688
+ },
689
+ nextSinceId: { type: "number" },
690
+ totalEntries: { type: "number" },
691
+ droppedCount: { type: "number" }
692
+ },
693
+ required: ["entries", "nextSinceId", "totalEntries", "droppedCount"]
583
694
  }),
584
695
  annotateTool({
585
- name: "seastudio-shell_session_run_command",
586
- 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",
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",
587
698
  inputSchema: {
588
699
  type: "object",
589
700
  properties: {
590
- command: { type: "string", description: "\u8981\u6267\u884C\u7684\u547D\u4EE4" },
591
- cwd: { type: "string", description: "\u53EF\u9009\uFF0C\u8986\u76D6\u5F53\u524D\u4F1A\u8BDD\u5DE5\u4F5C\u76EE\u5F55" },
592
- timeout: { type: "number", description: "\u53EF\u9009\uFF0C\u8D85\u65F6\u65F6\u95F4\uFF08\u6BEB\u79D2\uFF09" }
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
+ }
593
707
  },
594
- required: ["command"]
708
+ required: ["sessionId", "signal"]
595
709
  }
596
710
  }, {
597
- operationKind: "system",
711
+ operationKind: "mutate",
598
712
  requiresExecutionEvidence: true,
599
713
  rawDomain: "shell"
600
- }, shellCommandEvidenceOutputSchema),
714
+ }, shellSessionSignalEvidenceOutputSchema),
601
715
  annotateTool({
602
- name: "seastudio-shell_session_set_cwd",
603
- description: "\u76F4\u63A5\u8BBE\u7F6E\u5F53\u524D Shell \u4F1A\u8BDD\u5DE5\u4F5C\u76EE\u5F55\uFF0C\u4E0D\u6267\u884C\u547D\u4EE4\u3002",
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",
604
718
  inputSchema: {
605
719
  type: "object",
606
720
  properties: {
607
- cwd: { type: "string", description: "\u76EE\u6807\u5DE5\u4F5C\u76EE\u5F55" }
721
+ sessionId: { type: "string" }
608
722
  },
609
- required: ["cwd"]
723
+ required: ["sessionId"]
610
724
  }
611
725
  }, {
612
726
  operationKind: "mutate",
613
727
  requiresExecutionEvidence: true,
614
728
  rawDomain: "shell"
615
- }, shellSessionSnapshotEvidenceOutputSchema),
729
+ }, sessionSnapshotSchema),
616
730
  annotateTool({
617
- name: "seastudio-shell_session_clear",
618
- 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",
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",
619
733
  inputSchema: {
620
734
  type: "object",
621
- properties: {}
622
- }
623
- }, {
624
- operationKind: "mutate",
625
- requiresExecutionEvidence: true,
626
- rawDomain: "shell"
627
- }, shellSessionSnapshotEvidenceOutputSchema),
628
- annotateTool({
629
- name: "seastudio-shell_session_reset",
630
- 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",
631
- inputSchema: {
632
- type: "object",
633
- properties: {}
735
+ properties: {
736
+ sessionId: { type: "string" },
737
+ force: { type: "boolean", description: "\u5F3A\u5236 KILL\uFF0C\u9ED8\u8BA4 false" }
738
+ },
739
+ required: ["sessionId"]
634
740
  }
635
741
  }, {
636
742
  operationKind: "mutate",
637
743
  requiresExecutionEvidence: true,
638
744
  rawDomain: "shell"
639
- }, shellSessionSnapshotEvidenceOutputSchema)
745
+ }, shellSessionCloseEvidenceOutputSchema)
640
746
  ];
641
747
 
642
748
  // src/mcp/seastudio/tools-aigc.ts
@@ -718,6 +824,10 @@ var seastudio = {
718
824
  roots: {
719
825
  list: () => request("roots/list")
720
826
  },
827
+ project: {
828
+ list: () => callTool("seastudio-project_list", {}),
829
+ getActive: () => callTool("seastudio-project_get_active", {})
830
+ },
721
831
  file: {
722
832
  getSelected: () => callTool("seastudio-file_get_selected", {}),
723
833
  read: (path, options) => callTool("seastudio-file_read", {
@@ -817,17 +927,74 @@ var seastudio = {
817
927
  readBinary: (path, options) => callTool("seastudio-file_read_binary", { rootId: options?.rootId ?? "workspace", path })
818
928
  },
819
929
  shell: {
820
- execute: (command, cwd, timeout) => callTool("seastudio-shell_execute", { command, cwd, timeout }),
821
930
  session: {
822
- get: () => callTool("seastudio-shell_session_get", {}),
823
- getEntries: (limit) => callTool("seastudio-shell_session_get_entries", { limit }),
824
- runCommand: (command, cwd, timeout) => callTool("seastudio-shell_session_run_command", { command, cwd, timeout }),
825
- setCwd: (cwd) => callTool("seastudio-shell_session_set_cwd", { cwd }),
826
- clear: () => callTool("seastudio-shell_session_clear", {}),
827
- reset: () => callTool("seastudio-shell_session_reset", {})
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 })
828
956
  }
829
957
  }
830
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
+ }
831
998
 
832
999
  // src/mcp/seastudio/tools-plugin.ts
833
1000
  var pluginManagementTools = [
@@ -881,37 +1048,9 @@ var pluginManagementTools = [
881
1048
  operationKind: "mutate",
882
1049
  requiresExecutionEvidence: true
883
1050
  }),
884
- annotateTool({
885
- name: "seastudio-plugin_enable",
886
- description: "\u5728\u5F53\u524D\u9879\u76EE\u4E2D\u542F\u7528\u6307\u5B9A\u63D2\u4EF6\u3002\u9700\u63D0\u4F9B\u63D2\u4EF6 id\u3002",
887
- inputSchema: {
888
- type: "object",
889
- properties: {
890
- pluginId: { type: "string", description: "\u8981\u542F\u7528\u7684\u63D2\u4EF6 ID" }
891
- },
892
- required: ["pluginId"]
893
- }
894
- }, {
895
- operationKind: "mutate",
896
- requiresExecutionEvidence: true
897
- }),
898
- annotateTool({
899
- name: "seastudio-plugin_disable",
900
- description: "\u5728\u5F53\u524D\u9879\u76EE\u4E2D\u7981\u7528\u6307\u5B9A\u63D2\u4EF6\u3002\u9700\u63D0\u4F9B\u63D2\u4EF6 id\u3002",
901
- inputSchema: {
902
- type: "object",
903
- properties: {
904
- pluginId: { type: "string", description: "\u8981\u7981\u7528\u7684\u63D2\u4EF6 ID" }
905
- },
906
- required: ["pluginId"]
907
- }
908
- }, {
909
- operationKind: "mutate",
910
- requiresExecutionEvidence: true
911
- }),
912
1051
  annotateTool({
913
1052
  name: "seastudio-plugin_get_status",
914
- 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",
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",
915
1054
  inputSchema: {
916
1055
  type: "object",
917
1056
  properties: {
@@ -1057,37 +1196,9 @@ var agentManagementTools = [
1057
1196
  operationKind: "mutate",
1058
1197
  requiresExecutionEvidence: true
1059
1198
  }),
1060
- annotateTool({
1061
- name: "seastudio-agent_enable",
1062
- description: "\u5728\u5F53\u524D\u9879\u76EE\u4E2D\u542F\u7528\u6307\u5B9A Agent\u3002\u9700\u63D0\u4F9B Agent id\u3002",
1063
- inputSchema: {
1064
- type: "object",
1065
- properties: {
1066
- agentId: { type: "string", description: "\u8981\u542F\u7528\u7684 Agent ID" }
1067
- },
1068
- required: ["agentId"]
1069
- }
1070
- }, {
1071
- operationKind: "mutate",
1072
- requiresExecutionEvidence: true
1073
- }),
1074
- annotateTool({
1075
- name: "seastudio-agent_disable",
1076
- description: "\u5728\u5F53\u524D\u9879\u76EE\u4E2D\u7981\u7528\u6307\u5B9A Agent\u3002\u9700\u63D0\u4F9B Agent id\u3002",
1077
- inputSchema: {
1078
- type: "object",
1079
- properties: {
1080
- agentId: { type: "string", description: "\u8981\u7981\u7528\u7684 Agent ID" }
1081
- },
1082
- required: ["agentId"]
1083
- }
1084
- }, {
1085
- operationKind: "mutate",
1086
- requiresExecutionEvidence: true
1087
- }),
1088
1199
  annotateTool({
1089
1200
  name: "seastudio-agent_get_status",
1090
- 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",
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",
1091
1202
  inputSchema: {
1092
1203
  type: "object",
1093
1204
  properties: {
@@ -1181,6 +1292,32 @@ var agentTabTools = [
1181
1292
  })
1182
1293
  ];
1183
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
+
1184
1321
  // src/mcp/seastudio/notifications.ts
1185
1322
  var SeastudioRequests = {
1186
1323
  /** 请求打开文件 -> 主程序发布 FILE_OPEN_REQUESTED */
@@ -1253,8 +1390,9 @@ var allTools = [
1253
1390
  ...pluginManagementTools,
1254
1391
  ...agentManagementTools,
1255
1392
  ...pluginTabTools,
1256
- ...agentTabTools
1393
+ ...agentTabTools,
1394
+ ...projectTools
1257
1395
  ];
1258
1396
  var tools = allTools;
1259
1397
 
1260
- export { SeastudioNotifications, SeastudioRequests, agentManagementTools, agentTabTools, allTools, annotateTool, batchFlattenCopyEvidenceOutputSchema, callTool, callToolText, dualPathEvidenceOutputSchema, fileDownloadEvidenceOutputSchema, fileTools, pluginManagementTools, pluginTabTools, request, rootedPathEvidenceOutputSchema, rootedWriteEvidenceOutputSchema, seaCloudTools, seastudio, shellCommandEvidenceOutputSchema, shellSessionSnapshotEvidenceOutputSchema, shellTools, tools };
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 };