@seastudio/sdk 3.2.5 → 3.3.1

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" }
104
+ },
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" }
90
114
  },
91
- required: ["projectPath", "cwd", "promptLabel", "isRunning", "historyCount", "entryCount"]
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
  },
@@ -140,11 +173,11 @@ var fileTools = [
140
173
  }, rootedWriteEvidenceOutputSchema),
141
174
  annotateTool({
142
175
  name: "seastudio-file_list",
143
- description: "\u5217\u51FA\u6307\u5B9A\u76EE\u5F55\u4E0B\u7684\u6587\u4EF6\u548C\u5B50\u76EE\u5F55\u3002\u9002\u7528\u4E8E\u5728\u6267\u884C\u8BFB\u5199\u524D\u786E\u8BA4\u76EE\u5F55\u7ED3\u6784\u6216\u5B9A\u4F4D\u76EE\u6807\u8DEF\u5F84\u3002",
176
+ description: "\u5217\u51FA\u6307\u5B9A\u76EE\u5F55\u7684\u76F4\u63A5\u5B50\u9879\uFF08\u4E0D\u9012\u5F52\uFF0C\u7C7B\u4F3C ls\uFF09\u3002\u9002\u7528\u4E8E\u5728\u6267\u884C\u8BFB\u5199\u524D\u786E\u8BA4\u76EE\u5F55\u5185\u5BB9\u6216\u5B9A\u4F4D\u76EE\u6807\u8DEF\u5F84\u3002\u5982\u9700\u9012\u5F52\u904D\u5386\u5B50\u6811\u8BF7\u4F7F\u7528 seastudio-file_tree\u3002",
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"]
@@ -154,13 +187,31 @@ var fileTools = [
154
187
  requiresExecutionEvidence: false,
155
188
  rawDomain: "filesystem"
156
189
  }),
190
+ annotateTool({
191
+ name: "seastudio-file_tree",
192
+ description: "\u9012\u5F52\u5217\u51FA\u6307\u5B9A\u76EE\u5F55\u7684\u6574\u4E2A\u5B50\u6811\uFF08\u6241\u5E73 items \u5217\u8868\uFF0C\u6BCF\u9879\u542B\u76F8\u5BF9 rootId \u7684\u6839\u76F8\u5BF9\u8DEF\u5F84\uFF09\u3002\u4EC5\u5728\u786E\u5B9E\u9700\u8981\u5168\u6811\u89C6\u56FE\u65F6\u4F7F\u7528\uFF1B\u8FD4\u56DE\u7ED3\u679C\u53EF\u80FD\u5F88\u5927\uFF0C\u5EFA\u8BAE\u4F18\u5148\u4F7F\u7528 seastudio-file_list \u6309\u9700\u9010\u5C42\u63A2\u7D22\u3002",
193
+ inputSchema: {
194
+ type: "object",
195
+ properties: {
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" },
197
+ path: { type: "string", description: "\u76EE\u5F55\u8DEF\u5F84\uFF08\u76F8\u5BF9\u4E8E rootId\uFF09" },
198
+ maxDepth: { type: "number", description: "\u6700\u5927\u9012\u5F52\u6DF1\u5EA6\uFF080 \u8868\u793A\u53EA\u5217\u5F53\u524D\u76EE\u5F55\uFF0C\u7B49\u4EF7\u4E8E file_list\uFF1B\u7701\u7565\u8868\u793A\u4E0D\u9650\u5236\uFF09" },
199
+ maxEntries: { type: "number", description: "\u6700\u591A\u8FD4\u56DE\u591A\u5C11\u4E2A\u6761\u76EE\uFF0C\u8D85\u51FA\u540E\u622A\u65AD\u5E76\u5728\u54CD\u5E94\u91CC truncated=true\uFF08\u9ED8\u8BA4 50000\uFF09" }
200
+ },
201
+ required: ["rootId", "path"]
202
+ }
203
+ }, {
204
+ operationKind: "read",
205
+ requiresExecutionEvidence: false,
206
+ rawDomain: "filesystem"
207
+ }),
157
208
  annotateTool({
158
209
  name: "seastudio-file_delete",
159
210
  description: "\u5220\u9664\u6307\u5B9A\u8DEF\u5F84\u7684\u6587\u4EF6\u6216\u76EE\u5F55\u3002\u4EC5\u5728\u7528\u6237\u660E\u786E\u8981\u6C42\u79FB\u9664\u76EE\u6807\u65F6\u4F7F\u7528\uFF0C\u6210\u529F\u540E\u76EE\u6807\u4F1A\u4ECE\u9879\u76EE\u4E2D\u6D88\u5931\u3002",
160
211
  inputSchema: {
161
212
  type: "object",
162
213
  properties: {
163
- 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" },
164
215
  path: { type: "string", description: "\u8981\u5220\u9664\u7684\u8DEF\u5F84\uFF08\u76F8\u5BF9\u4E8E rootId\uFF09" }
165
216
  },
166
217
  required: ["rootId", "path"]
@@ -176,7 +227,7 @@ var fileTools = [
176
227
  inputSchema: {
177
228
  type: "object",
178
229
  properties: {
179
- 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" },
180
231
  path: { type: "string", description: "\u76EE\u5F55\u8DEF\u5F84\uFF08\u76F8\u5BF9\u4E8E rootId\uFF09" }
181
232
  },
182
233
  required: ["rootId", "path"]
@@ -192,7 +243,7 @@ var fileTools = [
192
243
  inputSchema: {
193
244
  type: "object",
194
245
  properties: {
195
- 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" },
196
247
  path: { type: "string", description: "\u8981\u68C0\u67E5\u7684\u8DEF\u5F84\uFF08\u76F8\u5BF9\u4E8E rootId\uFF09" }
197
248
  },
198
249
  required: ["rootId", "path"]
@@ -208,7 +259,7 @@ var fileTools = [
208
259
  inputSchema: {
209
260
  type: "object",
210
261
  properties: {
211
- 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" },
212
263
  path: { type: "string", description: "\u6587\u4EF6\u8DEF\u5F84" }
213
264
  },
214
265
  required: ["rootId", "path"]
@@ -224,7 +275,7 @@ var fileTools = [
224
275
  inputSchema: {
225
276
  type: "object",
226
277
  properties: {
227
- 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" },
228
279
  path: { type: "string", description: "\u6587\u4EF6\u6216\u76EE\u5F55\u8DEF\u5F84" }
229
280
  },
230
281
  required: ["rootId", "path"]
@@ -240,7 +291,7 @@ var fileTools = [
240
291
  inputSchema: {
241
292
  type: "object",
242
293
  properties: {
243
- rootId: { type: "string", enum: ["workspace"], description: "\u6839\u76EE\u5F55 ID" },
294
+ 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
295
  query: { type: "string", description: "\u641C\u7D22\u5185\u5BB9\u6216\u6A21\u5F0F" },
245
296
  path: { type: "string", description: "\u76F8\u5BF9 root \u7684\u641C\u7D22\u5B50\u8DEF\u5F84\uFF08\u53EF\u9009\uFF09" },
246
297
  glob: { type: "string", description: "\u6587\u4EF6 glob \u6A21\u5F0F\uFF08\u53EF\u9009\uFF09" },
@@ -259,7 +310,7 @@ var fileTools = [
259
310
  inputSchema: {
260
311
  type: "object",
261
312
  properties: {
262
- rootId: { type: "string", enum: ["workspace"], description: "\u6839\u76EE\u5F55 ID" },
313
+ 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
314
  path: { type: "string", description: "\u539F\u8DEF\u5F84\uFF08\u76F8\u5BF9\u4E8E rootId\uFF09" },
264
315
  newName: { type: "string", description: "\u65B0\u540D\u79F0" }
265
316
  },
@@ -276,9 +327,9 @@ var fileTools = [
276
327
  inputSchema: {
277
328
  type: "object",
278
329
  properties: {
279
- 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" },
280
331
  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" },
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" },
282
333
  destPath: { type: "string", description: "\u76EE\u6807\u8DEF\u5F84\uFF08\u76F8\u5BF9\u4E8E destRootId\uFF09" }
283
334
  },
284
335
  required: ["sourceRootId", "sourcePath", "destRootId", "destPath"]
@@ -294,9 +345,9 @@ var fileTools = [
294
345
  inputSchema: {
295
346
  type: "object",
296
347
  properties: {
297
- sourceRootId: { type: "string", enum: ["workspace"], description: "\u6E90\u6839\u76EE\u5F55 ID" },
348
+ 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
349
  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" },
350
+ 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
351
  destPath: { type: "string", description: "\u76EE\u6807\u8DEF\u5F84\uFF08\u76F8\u5BF9\u4E8E destRootId\uFF09" }
301
352
  },
302
353
  required: ["sourceRootId", "sourcePath", "destRootId", "destPath"]
@@ -312,7 +363,7 @@ var fileTools = [
312
363
  inputSchema: {
313
364
  type: "object",
314
365
  properties: {
315
- rootId: { type: "string", enum: ["workspace"], description: "\u6839\u76EE\u5F55 ID" },
366
+ 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
367
  path: { type: "string", description: "\u6587\u4EF6\u8DEF\u5F84\uFF08\u76F8\u5BF9\u4E8E rootId\uFF09" }
317
368
  },
318
369
  required: ["rootId", "path"]
@@ -324,11 +375,11 @@ var fileTools = [
324
375
  }),
325
376
  annotateTool({
326
377
  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",
378
+ 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
379
  inputSchema: {
329
380
  type: "object",
330
381
  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" },
382
+ 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
383
  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
384
  absoluteDir: {
334
385
  type: "string",
@@ -350,7 +401,7 @@ var fileTools = [
350
401
  inputSchema: {
351
402
  type: "object",
352
403
  properties: {
353
- rootId: { type: "string", enum: ["workspace"], description: "\u6839\u76EE\u5F55 ID" },
404
+ 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
405
  path: { type: "string", description: "\u6587\u4EF6\u8DEF\u5F84\uFF08\u76F8\u5BF9\u4E8E rootId\uFF09" },
355
406
  base64: { type: "string", description: "base64 \u7F16\u7801\u7684\u6587\u4EF6\u5185\u5BB9" }
356
407
  },
@@ -367,7 +418,7 @@ var fileTools = [
367
418
  inputSchema: {
368
419
  type: "object",
369
420
  properties: {
370
- rootId: { type: "string", enum: ["workspace"], description: "\u6839\u76EE\u5F55 ID" },
421
+ 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
422
  path: { type: "string", description: "\u6587\u4EF6\u8DEF\u5F84\uFF08\u76F8\u5BF9\u4E8E rootId\uFF09" }
372
423
  },
373
424
  required: ["rootId", "path"]
@@ -382,7 +433,7 @@ var fileTools = [
382
433
  inputSchema: {
383
434
  type: "object",
384
435
  properties: {
385
- 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" },
386
437
  path: { type: "string", description: "\u6587\u4EF6\u8DEF\u5F84\uFF08\u76F8\u5BF9\u4E8E rootId\uFF09" }
387
438
  },
388
439
  required: ["rootId", "path"]
@@ -398,7 +449,7 @@ var fileTools = [
398
449
  inputSchema: {
399
450
  type: "object",
400
451
  properties: {
401
- rootId: { type: "string", enum: ["workspace"], description: "\u6839\u76EE\u5F55 ID" },
452
+ 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
453
  path: { type: "string", description: "\u76EE\u6807\u76EE\u5F55\u8DEF\u5F84\uFF08\u76F8\u5BF9\u4E8E rootId\uFF09" }
403
454
  },
404
455
  required: ["rootId", "path"]
@@ -426,7 +477,7 @@ var fileTools = [
426
477
  inputSchema: {
427
478
  type: "object",
428
479
  properties: {
429
- 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" },
430
481
  path: { type: "string", description: "\u6587\u4EF6\u8DEF\u5F84\uFF08\u76F8\u5BF9\u4E8E rootId\uFF09" }
431
482
  },
432
483
  required: ["rootId", "path"]
@@ -442,7 +493,7 @@ var fileTools = [
442
493
  inputSchema: {
443
494
  type: "object",
444
495
  properties: {
445
- rootId: { type: "string", enum: ["workspace"], description: "\u6839\u76EE\u5F55 ID" },
496
+ 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
497
  path: { type: "string", description: "\u6587\u4EF6\u8DEF\u5F84\uFF08\u76F8\u5BF9\u4E8E rootId\uFF09" }
447
498
  },
448
499
  required: ["rootId", "path"]
@@ -476,7 +527,7 @@ var fileTools = [
476
527
  inputSchema: {
477
528
  type: "object",
478
529
  properties: {
479
- 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" },
480
531
  sourcePath: { type: "string", description: "\u6E90\u76EE\u5F55\u8DEF\u5F84\uFF08\u76F8\u5BF9\u4E8E sourceRootId\uFF09" }
481
532
  },
482
533
  required: ["sourceRootId", "sourcePath"]
@@ -492,9 +543,9 @@ var fileTools = [
492
543
  inputSchema: {
493
544
  type: "object",
494
545
  properties: {
495
- sourceRootId: { type: "string", enum: ["workspace"], description: "\u6E90\u6839\u76EE\u5F55 ID" },
546
+ 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
547
  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" },
548
+ 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
549
  destPath: { type: "string", description: "\u76EE\u6807\u76EE\u5F55\u8DEF\u5F84\uFF08\u76F8\u5BF9\u4E8E destRootId\uFF09" },
499
550
  taskId: { type: "string", description: "\u4EFB\u52A1 ID\uFF08\u7528\u4E8E\u8FDB\u5EA6\u901A\u77E5\uFF09" }
500
551
  },
@@ -508,27 +559,38 @@ var fileTools = [
508
559
  ];
509
560
 
510
561
  // src/mcp/seastudio/tools-shell.ts
562
+ var sessionSnapshotSchema = shellSessionSnapshotEvidenceOutputSchema;
511
563
  var shellTools = [
512
564
  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",
565
+ name: "seastudio-shell_session_open",
566
+ 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
567
  inputSchema: {
516
568
  type: "object",
517
569
  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"]
570
+ shell: {
571
+ type: "string",
572
+ enum: ["auto", "bash", "pwsh", "cmd", "sh"],
573
+ description: "shell \u7C7B\u578B\uFF0C\u9ED8\u8BA4 auto\uFF08Win\u2192pwsh\uFF0CPOSIX\u2192bash\uFF09"
574
+ },
575
+ cwd: { type: "string", description: "\u5DE5\u4F5C\u76EE\u5F55\uFF08\u7EDD\u5BF9\u8DEF\u5F84\uFF0C\u9ED8\u8BA4\u4E3A\u9879\u76EE\u6839\u76EE\u5F55\uFF09" },
576
+ env: {
577
+ type: "object",
578
+ description: "\u9644\u52A0\u73AF\u5883\u53D8\u91CF\uFF08\u4EC5\u5141\u8BB8\u5927\u5199\u5B57\u6BCD/\u4E0B\u5212\u7EBF\u5F00\u5934\u7684 key\uFF09",
579
+ additionalProperties: { type: "string" }
580
+ },
581
+ label: { type: "string", description: "\u4F1A\u8BDD\u5907\u6CE8\uFF08\u4EC5\u7528\u4E8E\u663E\u793A\uFF09" },
582
+ cols: { type: "number", description: "PTY \u5217\u6570\uFF08\u9ED8\u8BA4 120\uFF09" },
583
+ rows: { type: "number", description: "PTY \u884C\u6570\uFF08\u9ED8\u8BA4 30\uFF09" }
584
+ }
523
585
  }
524
586
  }, {
525
- operationKind: "system",
587
+ operationKind: "mutate",
526
588
  requiresExecutionEvidence: true,
527
589
  rawDomain: "shell"
528
- }, shellCommandEvidenceOutputSchema),
590
+ }, shellSessionOpenEvidenceOutputSchema),
529
591
  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",
592
+ name: "seastudio-shell_session_list",
593
+ description: "\u5217\u51FA\u5F53\u524D\u6240\u6709 PTY shell \u4F1A\u8BDD\u7684\u5FEB\u7167\u3002",
532
594
  inputSchema: {
533
595
  type: "object",
534
596
  properties: {}
@@ -540,25 +602,86 @@ var shellTools = [
540
602
  }, {
541
603
  type: "object",
542
604
  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" }
605
+ sessions: {
606
+ type: "array",
607
+ items: sessionSnapshotSchema
608
+ }
609
+ },
610
+ required: ["sessions"]
611
+ }),
612
+ annotateTool({
613
+ name: "seastudio-shell_session_get",
614
+ description: "\u83B7\u53D6\u6307\u5B9A session \u7684\u5F53\u524D\u5FEB\u7167\uFF08pending\u3001\u6700\u8FD1\u4E00\u6B21\u547D\u4EE4\u7B49\uFF09\u3002",
615
+ inputSchema: {
616
+ type: "object",
617
+ properties: {
618
+ sessionId: { type: "string", description: "session_open \u8FD4\u56DE\u7684 sessionId" }
619
+ },
620
+ required: ["sessionId"]
621
+ }
622
+ }, {
623
+ operationKind: "read",
624
+ requiresExecutionEvidence: false,
625
+ rawDomain: "shell"
626
+ }, sessionSnapshotSchema),
627
+ annotateTool({
628
+ name: "seastudio-shell_session_run",
629
+ 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",
630
+ inputSchema: {
631
+ type: "object",
632
+ properties: {
633
+ sessionId: { type: "string" },
634
+ command: { type: "string", description: "\u8981\u6267\u884C\u7684 shell \u547D\u4EE4" },
635
+ timeoutMs: {
636
+ type: "number",
637
+ 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"
638
+ }
639
+ },
640
+ required: ["sessionId", "command"]
552
641
  }
642
+ }, {
643
+ operationKind: "mutate",
644
+ requiresExecutionEvidence: true,
645
+ rawDomain: "shell"
646
+ }, shellSessionRunEvidenceOutputSchema),
647
+ annotateTool({
648
+ name: "seastudio-shell_session_wait",
649
+ 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",
650
+ inputSchema: {
651
+ type: "object",
652
+ properties: {
653
+ sessionId: { type: "string" },
654
+ commandId: { type: "string" },
655
+ timeoutMs: { type: "number", description: "\u53EF\u9009\u7B49\u5F85\u8D85\u65F6\uFF08\u6BEB\u79D2\uFF09" }
656
+ },
657
+ required: ["sessionId", "commandId"]
658
+ }
659
+ }, {
660
+ operationKind: "read",
661
+ requiresExecutionEvidence: false,
662
+ rawDomain: "shell"
663
+ }, {
664
+ type: "object",
665
+ properties: {
666
+ commandId: { type: "string" },
667
+ exitCode: { type: "number" },
668
+ durationMs: { type: "number" },
669
+ finished: { type: "boolean" },
670
+ timedOut: { type: "boolean" }
671
+ },
672
+ required: ["commandId", "durationMs", "finished", "timedOut"]
553
673
  }),
554
674
  annotateTool({
555
675
  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",
676
+ 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
677
  inputSchema: {
558
678
  type: "object",
559
679
  properties: {
560
- limit: { type: "number", description: "\u8FD4\u56DE\u6700\u8FD1\u591A\u5C11\u6761\u8BB0\u5F55\uFF0C\u9ED8\u8BA4 200\u3002" }
561
- }
680
+ sessionId: { type: "string" },
681
+ sinceId: { type: "number", description: "\u53EA\u8FD4\u56DE id > sinceId \u7684 entries\uFF08\u9ED8\u8BA4 0\uFF09" },
682
+ 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" }
683
+ },
684
+ required: ["sessionId"]
562
685
  }
563
686
  }, {
564
687
  operationKind: "read",
@@ -573,70 +696,71 @@ var shellTools = [
573
696
  type: "object",
574
697
  properties: {
575
698
  id: { type: "number" },
576
- level: { type: "string" },
699
+ level: { type: "string", enum: ["command", "stdout", "meta", "exit"] },
577
700
  content: { type: "string" },
578
- createdAt: { type: "number" }
579
- }
701
+ createdAt: { type: "number" },
702
+ commandId: { type: "string" }
703
+ },
704
+ required: ["id", "level", "content", "createdAt"]
580
705
  }
581
- }
582
- }
706
+ },
707
+ nextSinceId: { type: "number" },
708
+ totalEntries: { type: "number" },
709
+ droppedCount: { type: "number" }
710
+ },
711
+ required: ["entries", "nextSinceId", "totalEntries", "droppedCount"]
583
712
  }),
584
713
  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",
714
+ name: "seastudio-shell_session_signal",
715
+ 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
716
  inputSchema: {
588
717
  type: "object",
589
718
  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" }
719
+ sessionId: { type: "string" },
720
+ signal: { type: "string", enum: ["INT", "TERM", "KILL"] },
721
+ commandId: {
722
+ type: "string",
723
+ description: "\u53EF\u9009\uFF0C\u4EC5\u8BB0\u5F55\u5728 entries \u4E2D\uFF0C\u4E0D\u5F71\u54CD\u4FE1\u53F7\u8BED\u4E49"
724
+ }
593
725
  },
594
- required: ["command"]
726
+ required: ["sessionId", "signal"]
595
727
  }
596
728
  }, {
597
- operationKind: "system",
729
+ operationKind: "mutate",
598
730
  requiresExecutionEvidence: true,
599
731
  rawDomain: "shell"
600
- }, shellCommandEvidenceOutputSchema),
732
+ }, shellSessionSignalEvidenceOutputSchema),
601
733
  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",
734
+ name: "seastudio-shell_session_clear_entries",
735
+ description: "\u6E05\u7A7A session \u7684\u8F93\u51FA\u7F13\u51B2\uFF0C\u4F1A\u8BDD\u672C\u8EAB\u4E0D\u53D7\u5F71\u54CD\u3002",
604
736
  inputSchema: {
605
737
  type: "object",
606
738
  properties: {
607
- cwd: { type: "string", description: "\u76EE\u6807\u5DE5\u4F5C\u76EE\u5F55" }
739
+ sessionId: { type: "string" }
608
740
  },
609
- required: ["cwd"]
610
- }
611
- }, {
612
- operationKind: "mutate",
613
- requiresExecutionEvidence: true,
614
- rawDomain: "shell"
615
- }, shellSessionSnapshotEvidenceOutputSchema),
616
- 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",
619
- inputSchema: {
620
- type: "object",
621
- properties: {}
741
+ required: ["sessionId"]
622
742
  }
623
743
  }, {
624
744
  operationKind: "mutate",
625
745
  requiresExecutionEvidence: true,
626
746
  rawDomain: "shell"
627
- }, shellSessionSnapshotEvidenceOutputSchema),
747
+ }, sessionSnapshotSchema),
628
748
  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",
749
+ name: "seastudio-shell_session_close",
750
+ description: "\u5173\u95ED session \u5E76\u91CA\u653E PTY\u3002force=true \u65F6\u4F7F\u7528 SIGKILL\uFF1B\u9ED8\u8BA4 SIGTERM\u3002",
631
751
  inputSchema: {
632
752
  type: "object",
633
- properties: {}
753
+ properties: {
754
+ sessionId: { type: "string" },
755
+ force: { type: "boolean", description: "\u5F3A\u5236 KILL\uFF0C\u9ED8\u8BA4 false" }
756
+ },
757
+ required: ["sessionId"]
634
758
  }
635
759
  }, {
636
760
  operationKind: "mutate",
637
761
  requiresExecutionEvidence: true,
638
762
  rawDomain: "shell"
639
- }, shellSessionSnapshotEvidenceOutputSchema)
763
+ }, shellSessionCloseEvidenceOutputSchema)
640
764
  ];
641
765
 
642
766
  // src/mcp/seastudio/tools-aigc.ts
@@ -718,6 +842,10 @@ var seastudio = {
718
842
  roots: {
719
843
  list: () => request("roots/list")
720
844
  },
845
+ project: {
846
+ list: () => callTool("seastudio-project_list", {}),
847
+ getActive: () => callTool("seastudio-project_get_active", {})
848
+ },
721
849
  file: {
722
850
  getSelected: () => callTool("seastudio-file_get_selected", {}),
723
851
  read: (path, options) => callTool("seastudio-file_read", {
@@ -731,6 +859,12 @@ var seastudio = {
731
859
  rootId: options?.rootId ?? "workspace",
732
860
  path
733
861
  }),
862
+ tree: (path = "", options) => callTool("seastudio-file_tree", {
863
+ rootId: options?.rootId ?? "workspace",
864
+ path,
865
+ ...typeof options?.maxDepth === "number" ? { maxDepth: options.maxDepth } : {},
866
+ ...typeof options?.maxEntries === "number" ? { maxEntries: options.maxEntries } : {}
867
+ }),
734
868
  delete: (path, options) => callTool("seastudio-file_delete", { rootId: options?.rootId ?? "workspace", path }),
735
869
  mkdir: (path, options) => callTool("seastudio-file_mkdir", { rootId: options?.rootId ?? "workspace", path }),
736
870
  exists: (path, options) => callTool("seastudio-file_exists", { rootId: options?.rootId ?? "workspace", path }),
@@ -817,17 +951,74 @@ var seastudio = {
817
951
  readBinary: (path, options) => callTool("seastudio-file_read_binary", { rootId: options?.rootId ?? "workspace", path })
818
952
  },
819
953
  shell: {
820
- execute: (command, cwd, timeout) => callTool("seastudio-shell_execute", { command, cwd, timeout }),
821
954
  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", {})
955
+ open: (options = {}) => callTool("seastudio-shell_session_open", { ...options }),
956
+ list: () => callTool("seastudio-shell_session_list", {}),
957
+ get: (sessionId) => callTool("seastudio-shell_session_get", { sessionId }),
958
+ run: (sessionId, command, options = {}) => callTool("seastudio-shell_session_run", {
959
+ sessionId,
960
+ command,
961
+ ...typeof options.timeoutMs === "number" ? { timeoutMs: options.timeoutMs } : {}
962
+ }),
963
+ wait: (sessionId, commandId, timeoutMs) => callTool("seastudio-shell_session_wait", {
964
+ sessionId,
965
+ commandId,
966
+ ...typeof timeoutMs === "number" ? { timeoutMs } : {}
967
+ }),
968
+ getEntries: (sessionId, options = {}) => callTool("seastudio-shell_session_get_entries", {
969
+ sessionId,
970
+ ...typeof options.sinceId === "number" ? { sinceId: options.sinceId } : {},
971
+ ...typeof options.limit === "number" ? { limit: options.limit } : {}
972
+ }),
973
+ signal: (sessionId, signal, commandId) => callTool("seastudio-shell_session_signal", {
974
+ sessionId,
975
+ signal,
976
+ ...commandId ? { commandId } : {}
977
+ }),
978
+ clearEntries: (sessionId) => callTool("seastudio-shell_session_clear_entries", { sessionId }),
979
+ close: (sessionId, force = false) => callTool("seastudio-shell_session_close", { sessionId, force })
828
980
  }
829
981
  }
830
982
  };
983
+ async function runOneShotShellCommand(command, options = {}) {
984
+ const { timeoutMs, ...openOpts } = options;
985
+ const openRaw = await seastudio.shell.session.open(openOpts);
986
+ const openText = openRaw.content?.[0]?.text ?? "{}";
987
+ const opened = JSON.parse(openText);
988
+ const sessionId = opened.sessionId;
989
+ if (!sessionId) {
990
+ throw new Error("shell_session_open did not return sessionId");
991
+ }
992
+ try {
993
+ const runRaw = await seastudio.shell.session.run(sessionId, command, {
994
+ ...typeof timeoutMs === "number" ? { timeoutMs } : {}
995
+ });
996
+ const runText = runRaw.content?.[0]?.text ?? "{}";
997
+ const run = JSON.parse(runText);
998
+ const waitRaw = await seastudio.shell.session.wait(
999
+ sessionId,
1000
+ run.commandId,
1001
+ typeof timeoutMs === "number" ? timeoutMs + 5e3 : void 0
1002
+ );
1003
+ const waitText = waitRaw.content?.[0]?.text ?? "{}";
1004
+ const wait = JSON.parse(waitText);
1005
+ const entriesRaw = await seastudio.shell.session.getEntries(sessionId, {});
1006
+ const entriesText = entriesRaw.content?.[0]?.text ?? "{}";
1007
+ const entries = JSON.parse(entriesText);
1008
+ const stdout = entries.entries.filter((e) => e.commandId === run.commandId && e.level === "stdout").map((e) => e.content).join("\n");
1009
+ return {
1010
+ exitCode: wait.exitCode,
1011
+ stdout,
1012
+ durationMs: wait.durationMs,
1013
+ timedOut: wait.timedOut
1014
+ };
1015
+ } finally {
1016
+ try {
1017
+ await seastudio.shell.session.close(sessionId);
1018
+ } catch {
1019
+ }
1020
+ }
1021
+ }
831
1022
 
832
1023
  // src/mcp/seastudio/tools-plugin.ts
833
1024
  var pluginManagementTools = [
@@ -881,37 +1072,9 @@ var pluginManagementTools = [
881
1072
  operationKind: "mutate",
882
1073
  requiresExecutionEvidence: true
883
1074
  }),
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
1075
  annotateTool({
913
1076
  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",
1077
+ 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
1078
  inputSchema: {
916
1079
  type: "object",
917
1080
  properties: {
@@ -1057,37 +1220,9 @@ var agentManagementTools = [
1057
1220
  operationKind: "mutate",
1058
1221
  requiresExecutionEvidence: true
1059
1222
  }),
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
1223
  annotateTool({
1089
1224
  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",
1225
+ 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
1226
  inputSchema: {
1092
1227
  type: "object",
1093
1228
  properties: {
@@ -1181,6 +1316,32 @@ var agentTabTools = [
1181
1316
  })
1182
1317
  ];
1183
1318
 
1319
+ // src/mcp/seastudio/tools-project.ts
1320
+ var projectTools = [
1321
+ annotateTool({
1322
+ name: "seastudio-project_list",
1323
+ 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",
1324
+ inputSchema: {
1325
+ type: "object",
1326
+ properties: {}
1327
+ }
1328
+ }, {
1329
+ operationKind: "read",
1330
+ requiresExecutionEvidence: false
1331
+ }),
1332
+ annotateTool({
1333
+ name: "seastudio-project_get_active",
1334
+ 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",
1335
+ inputSchema: {
1336
+ type: "object",
1337
+ properties: {}
1338
+ }
1339
+ }, {
1340
+ operationKind: "read",
1341
+ requiresExecutionEvidence: false
1342
+ })
1343
+ ];
1344
+
1184
1345
  // src/mcp/seastudio/notifications.ts
1185
1346
  var SeastudioRequests = {
1186
1347
  /** 请求打开文件 -> 主程序发布 FILE_OPEN_REQUESTED */
@@ -1253,8 +1414,9 @@ var allTools = [
1253
1414
  ...pluginManagementTools,
1254
1415
  ...agentManagementTools,
1255
1416
  ...pluginTabTools,
1256
- ...agentTabTools
1417
+ ...agentTabTools,
1418
+ ...projectTools
1257
1419
  ];
1258
1420
  var tools = allTools;
1259
1421
 
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 };
1422
+ 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 };