@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.
@@ -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" }
106
+ },
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" }
92
116
  },
93
- required: ["projectPath", "cwd", "promptLabel", "isRunning", "historyCount", "entryCount"]
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
  },
@@ -142,11 +175,11 @@ var fileTools = [
142
175
  }, rootedWriteEvidenceOutputSchema),
143
176
  annotateTool({
144
177
  name: "seastudio-file_list",
145
- 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",
178
+ 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",
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"]
@@ -156,13 +189,31 @@ var fileTools = [
156
189
  requiresExecutionEvidence: false,
157
190
  rawDomain: "filesystem"
158
191
  }),
192
+ annotateTool({
193
+ name: "seastudio-file_tree",
194
+ 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",
195
+ inputSchema: {
196
+ type: "object",
197
+ properties: {
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" },
199
+ path: { type: "string", description: "\u76EE\u5F55\u8DEF\u5F84\uFF08\u76F8\u5BF9\u4E8E rootId\uFF09" },
200
+ 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" },
201
+ 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" }
202
+ },
203
+ required: ["rootId", "path"]
204
+ }
205
+ }, {
206
+ operationKind: "read",
207
+ requiresExecutionEvidence: false,
208
+ rawDomain: "filesystem"
209
+ }),
159
210
  annotateTool({
160
211
  name: "seastudio-file_delete",
161
212
  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",
162
213
  inputSchema: {
163
214
  type: "object",
164
215
  properties: {
165
- rootId: { type: "string", enum: ["workspace"], description: "\u6839\u76EE\u5F55 ID" },
216
+ 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
217
  path: { type: "string", description: "\u8981\u5220\u9664\u7684\u8DEF\u5F84\uFF08\u76F8\u5BF9\u4E8E rootId\uFF09" }
167
218
  },
168
219
  required: ["rootId", "path"]
@@ -178,7 +229,7 @@ var fileTools = [
178
229
  inputSchema: {
179
230
  type: "object",
180
231
  properties: {
181
- rootId: { type: "string", enum: ["workspace"], description: "\u6839\u76EE\u5F55 ID" },
232
+ 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
233
  path: { type: "string", description: "\u76EE\u5F55\u8DEF\u5F84\uFF08\u76F8\u5BF9\u4E8E rootId\uFF09" }
183
234
  },
184
235
  required: ["rootId", "path"]
@@ -194,7 +245,7 @@ var fileTools = [
194
245
  inputSchema: {
195
246
  type: "object",
196
247
  properties: {
197
- rootId: { type: "string", enum: ["workspace"], description: "\u6839\u76EE\u5F55 ID" },
248
+ 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
249
  path: { type: "string", description: "\u8981\u68C0\u67E5\u7684\u8DEF\u5F84\uFF08\u76F8\u5BF9\u4E8E rootId\uFF09" }
199
250
  },
200
251
  required: ["rootId", "path"]
@@ -210,7 +261,7 @@ var fileTools = [
210
261
  inputSchema: {
211
262
  type: "object",
212
263
  properties: {
213
- rootId: { type: "string", enum: ["workspace"], description: "\u6839\u76EE\u5F55 ID" },
264
+ 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
265
  path: { type: "string", description: "\u6587\u4EF6\u8DEF\u5F84" }
215
266
  },
216
267
  required: ["rootId", "path"]
@@ -226,7 +277,7 @@ var fileTools = [
226
277
  inputSchema: {
227
278
  type: "object",
228
279
  properties: {
229
- rootId: { type: "string", enum: ["workspace"], description: "\u6839\u76EE\u5F55 ID" },
280
+ 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
281
  path: { type: "string", description: "\u6587\u4EF6\u6216\u76EE\u5F55\u8DEF\u5F84" }
231
282
  },
232
283
  required: ["rootId", "path"]
@@ -242,7 +293,7 @@ var fileTools = [
242
293
  inputSchema: {
243
294
  type: "object",
244
295
  properties: {
245
- rootId: { type: "string", enum: ["workspace"], description: "\u6839\u76EE\u5F55 ID" },
296
+ 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
297
  query: { type: "string", description: "\u641C\u7D22\u5185\u5BB9\u6216\u6A21\u5F0F" },
247
298
  path: { type: "string", description: "\u76F8\u5BF9 root \u7684\u641C\u7D22\u5B50\u8DEF\u5F84\uFF08\u53EF\u9009\uFF09" },
248
299
  glob: { type: "string", description: "\u6587\u4EF6 glob \u6A21\u5F0F\uFF08\u53EF\u9009\uFF09" },
@@ -261,7 +312,7 @@ var fileTools = [
261
312
  inputSchema: {
262
313
  type: "object",
263
314
  properties: {
264
- rootId: { type: "string", enum: ["workspace"], description: "\u6839\u76EE\u5F55 ID" },
315
+ 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
316
  path: { type: "string", description: "\u539F\u8DEF\u5F84\uFF08\u76F8\u5BF9\u4E8E rootId\uFF09" },
266
317
  newName: { type: "string", description: "\u65B0\u540D\u79F0" }
267
318
  },
@@ -278,9 +329,9 @@ var fileTools = [
278
329
  inputSchema: {
279
330
  type: "object",
280
331
  properties: {
281
- 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" },
282
333
  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" },
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" },
284
335
  destPath: { type: "string", description: "\u76EE\u6807\u8DEF\u5F84\uFF08\u76F8\u5BF9\u4E8E destRootId\uFF09" }
285
336
  },
286
337
  required: ["sourceRootId", "sourcePath", "destRootId", "destPath"]
@@ -296,9 +347,9 @@ var fileTools = [
296
347
  inputSchema: {
297
348
  type: "object",
298
349
  properties: {
299
- sourceRootId: { type: "string", enum: ["workspace"], description: "\u6E90\u6839\u76EE\u5F55 ID" },
350
+ 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
351
  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" },
352
+ 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
353
  destPath: { type: "string", description: "\u76EE\u6807\u8DEF\u5F84\uFF08\u76F8\u5BF9\u4E8E destRootId\uFF09" }
303
354
  },
304
355
  required: ["sourceRootId", "sourcePath", "destRootId", "destPath"]
@@ -314,7 +365,7 @@ var fileTools = [
314
365
  inputSchema: {
315
366
  type: "object",
316
367
  properties: {
317
- rootId: { type: "string", enum: ["workspace"], description: "\u6839\u76EE\u5F55 ID" },
368
+ 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
369
  path: { type: "string", description: "\u6587\u4EF6\u8DEF\u5F84\uFF08\u76F8\u5BF9\u4E8E rootId\uFF09" }
319
370
  },
320
371
  required: ["rootId", "path"]
@@ -326,11 +377,11 @@ var fileTools = [
326
377
  }),
327
378
  annotateTool({
328
379
  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",
380
+ 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
381
  inputSchema: {
331
382
  type: "object",
332
383
  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" },
384
+ 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
385
  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
386
  absoluteDir: {
336
387
  type: "string",
@@ -352,7 +403,7 @@ var fileTools = [
352
403
  inputSchema: {
353
404
  type: "object",
354
405
  properties: {
355
- rootId: { type: "string", enum: ["workspace"], description: "\u6839\u76EE\u5F55 ID" },
406
+ 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
407
  path: { type: "string", description: "\u6587\u4EF6\u8DEF\u5F84\uFF08\u76F8\u5BF9\u4E8E rootId\uFF09" },
357
408
  base64: { type: "string", description: "base64 \u7F16\u7801\u7684\u6587\u4EF6\u5185\u5BB9" }
358
409
  },
@@ -369,7 +420,7 @@ var fileTools = [
369
420
  inputSchema: {
370
421
  type: "object",
371
422
  properties: {
372
- rootId: { type: "string", enum: ["workspace"], description: "\u6839\u76EE\u5F55 ID" },
423
+ 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
424
  path: { type: "string", description: "\u6587\u4EF6\u8DEF\u5F84\uFF08\u76F8\u5BF9\u4E8E rootId\uFF09" }
374
425
  },
375
426
  required: ["rootId", "path"]
@@ -384,7 +435,7 @@ var fileTools = [
384
435
  inputSchema: {
385
436
  type: "object",
386
437
  properties: {
387
- rootId: { type: "string", enum: ["workspace"], description: "\u6839\u76EE\u5F55 ID" },
438
+ 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
439
  path: { type: "string", description: "\u6587\u4EF6\u8DEF\u5F84\uFF08\u76F8\u5BF9\u4E8E rootId\uFF09" }
389
440
  },
390
441
  required: ["rootId", "path"]
@@ -400,7 +451,7 @@ var fileTools = [
400
451
  inputSchema: {
401
452
  type: "object",
402
453
  properties: {
403
- rootId: { type: "string", enum: ["workspace"], description: "\u6839\u76EE\u5F55 ID" },
454
+ 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
455
  path: { type: "string", description: "\u76EE\u6807\u76EE\u5F55\u8DEF\u5F84\uFF08\u76F8\u5BF9\u4E8E rootId\uFF09" }
405
456
  },
406
457
  required: ["rootId", "path"]
@@ -428,7 +479,7 @@ var fileTools = [
428
479
  inputSchema: {
429
480
  type: "object",
430
481
  properties: {
431
- rootId: { type: "string", enum: ["workspace"], description: "\u6839\u76EE\u5F55 ID" },
482
+ 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
483
  path: { type: "string", description: "\u6587\u4EF6\u8DEF\u5F84\uFF08\u76F8\u5BF9\u4E8E rootId\uFF09" }
433
484
  },
434
485
  required: ["rootId", "path"]
@@ -444,7 +495,7 @@ var fileTools = [
444
495
  inputSchema: {
445
496
  type: "object",
446
497
  properties: {
447
- rootId: { type: "string", enum: ["workspace"], description: "\u6839\u76EE\u5F55 ID" },
498
+ 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
499
  path: { type: "string", description: "\u6587\u4EF6\u8DEF\u5F84\uFF08\u76F8\u5BF9\u4E8E rootId\uFF09" }
449
500
  },
450
501
  required: ["rootId", "path"]
@@ -478,7 +529,7 @@ var fileTools = [
478
529
  inputSchema: {
479
530
  type: "object",
480
531
  properties: {
481
- sourceRootId: { type: "string", enum: ["workspace"], description: "\u6E90\u6839\u76EE\u5F55 ID" },
532
+ 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
533
  sourcePath: { type: "string", description: "\u6E90\u76EE\u5F55\u8DEF\u5F84\uFF08\u76F8\u5BF9\u4E8E sourceRootId\uFF09" }
483
534
  },
484
535
  required: ["sourceRootId", "sourcePath"]
@@ -494,9 +545,9 @@ var fileTools = [
494
545
  inputSchema: {
495
546
  type: "object",
496
547
  properties: {
497
- sourceRootId: { type: "string", enum: ["workspace"], description: "\u6E90\u6839\u76EE\u5F55 ID" },
548
+ 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
549
  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" },
550
+ 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
551
  destPath: { type: "string", description: "\u76EE\u6807\u76EE\u5F55\u8DEF\u5F84\uFF08\u76F8\u5BF9\u4E8E destRootId\uFF09" },
501
552
  taskId: { type: "string", description: "\u4EFB\u52A1 ID\uFF08\u7528\u4E8E\u8FDB\u5EA6\u901A\u77E5\uFF09" }
502
553
  },
@@ -510,27 +561,38 @@ var fileTools = [
510
561
  ];
511
562
 
512
563
  // src/mcp/seastudio/tools-shell.ts
564
+ var sessionSnapshotSchema = shellSessionSnapshotEvidenceOutputSchema;
513
565
  var shellTools = [
514
566
  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",
567
+ name: "seastudio-shell_session_open",
568
+ 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
569
  inputSchema: {
518
570
  type: "object",
519
571
  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"]
572
+ shell: {
573
+ type: "string",
574
+ enum: ["auto", "bash", "pwsh", "cmd", "sh"],
575
+ description: "shell \u7C7B\u578B\uFF0C\u9ED8\u8BA4 auto\uFF08Win\u2192pwsh\uFF0CPOSIX\u2192bash\uFF09"
576
+ },
577
+ cwd: { type: "string", description: "\u5DE5\u4F5C\u76EE\u5F55\uFF08\u7EDD\u5BF9\u8DEF\u5F84\uFF0C\u9ED8\u8BA4\u4E3A\u9879\u76EE\u6839\u76EE\u5F55\uFF09" },
578
+ env: {
579
+ type: "object",
580
+ description: "\u9644\u52A0\u73AF\u5883\u53D8\u91CF\uFF08\u4EC5\u5141\u8BB8\u5927\u5199\u5B57\u6BCD/\u4E0B\u5212\u7EBF\u5F00\u5934\u7684 key\uFF09",
581
+ additionalProperties: { type: "string" }
582
+ },
583
+ label: { type: "string", description: "\u4F1A\u8BDD\u5907\u6CE8\uFF08\u4EC5\u7528\u4E8E\u663E\u793A\uFF09" },
584
+ cols: { type: "number", description: "PTY \u5217\u6570\uFF08\u9ED8\u8BA4 120\uFF09" },
585
+ rows: { type: "number", description: "PTY \u884C\u6570\uFF08\u9ED8\u8BA4 30\uFF09" }
586
+ }
525
587
  }
526
588
  }, {
527
- operationKind: "system",
589
+ operationKind: "mutate",
528
590
  requiresExecutionEvidence: true,
529
591
  rawDomain: "shell"
530
- }, shellCommandEvidenceOutputSchema),
592
+ }, shellSessionOpenEvidenceOutputSchema),
531
593
  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",
594
+ name: "seastudio-shell_session_list",
595
+ description: "\u5217\u51FA\u5F53\u524D\u6240\u6709 PTY shell \u4F1A\u8BDD\u7684\u5FEB\u7167\u3002",
534
596
  inputSchema: {
535
597
  type: "object",
536
598
  properties: {}
@@ -542,25 +604,86 @@ var shellTools = [
542
604
  }, {
543
605
  type: "object",
544
606
  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" }
607
+ sessions: {
608
+ type: "array",
609
+ items: sessionSnapshotSchema
610
+ }
611
+ },
612
+ required: ["sessions"]
613
+ }),
614
+ annotateTool({
615
+ name: "seastudio-shell_session_get",
616
+ description: "\u83B7\u53D6\u6307\u5B9A session \u7684\u5F53\u524D\u5FEB\u7167\uFF08pending\u3001\u6700\u8FD1\u4E00\u6B21\u547D\u4EE4\u7B49\uFF09\u3002",
617
+ inputSchema: {
618
+ type: "object",
619
+ properties: {
620
+ sessionId: { type: "string", description: "session_open \u8FD4\u56DE\u7684 sessionId" }
621
+ },
622
+ required: ["sessionId"]
623
+ }
624
+ }, {
625
+ operationKind: "read",
626
+ requiresExecutionEvidence: false,
627
+ rawDomain: "shell"
628
+ }, sessionSnapshotSchema),
629
+ annotateTool({
630
+ name: "seastudio-shell_session_run",
631
+ 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",
632
+ inputSchema: {
633
+ type: "object",
634
+ properties: {
635
+ sessionId: { type: "string" },
636
+ command: { type: "string", description: "\u8981\u6267\u884C\u7684 shell \u547D\u4EE4" },
637
+ timeoutMs: {
638
+ type: "number",
639
+ 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"
640
+ }
641
+ },
642
+ required: ["sessionId", "command"]
554
643
  }
644
+ }, {
645
+ operationKind: "mutate",
646
+ requiresExecutionEvidence: true,
647
+ rawDomain: "shell"
648
+ }, shellSessionRunEvidenceOutputSchema),
649
+ annotateTool({
650
+ name: "seastudio-shell_session_wait",
651
+ 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",
652
+ inputSchema: {
653
+ type: "object",
654
+ properties: {
655
+ sessionId: { type: "string" },
656
+ commandId: { type: "string" },
657
+ timeoutMs: { type: "number", description: "\u53EF\u9009\u7B49\u5F85\u8D85\u65F6\uFF08\u6BEB\u79D2\uFF09" }
658
+ },
659
+ required: ["sessionId", "commandId"]
660
+ }
661
+ }, {
662
+ operationKind: "read",
663
+ requiresExecutionEvidence: false,
664
+ rawDomain: "shell"
665
+ }, {
666
+ type: "object",
667
+ properties: {
668
+ commandId: { type: "string" },
669
+ exitCode: { type: "number" },
670
+ durationMs: { type: "number" },
671
+ finished: { type: "boolean" },
672
+ timedOut: { type: "boolean" }
673
+ },
674
+ required: ["commandId", "durationMs", "finished", "timedOut"]
555
675
  }),
556
676
  annotateTool({
557
677
  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",
678
+ 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
679
  inputSchema: {
560
680
  type: "object",
561
681
  properties: {
562
- limit: { type: "number", description: "\u8FD4\u56DE\u6700\u8FD1\u591A\u5C11\u6761\u8BB0\u5F55\uFF0C\u9ED8\u8BA4 200\u3002" }
563
- }
682
+ sessionId: { type: "string" },
683
+ sinceId: { type: "number", description: "\u53EA\u8FD4\u56DE id > sinceId \u7684 entries\uFF08\u9ED8\u8BA4 0\uFF09" },
684
+ 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" }
685
+ },
686
+ required: ["sessionId"]
564
687
  }
565
688
  }, {
566
689
  operationKind: "read",
@@ -575,70 +698,71 @@ var shellTools = [
575
698
  type: "object",
576
699
  properties: {
577
700
  id: { type: "number" },
578
- level: { type: "string" },
701
+ level: { type: "string", enum: ["command", "stdout", "meta", "exit"] },
579
702
  content: { type: "string" },
580
- createdAt: { type: "number" }
581
- }
703
+ createdAt: { type: "number" },
704
+ commandId: { type: "string" }
705
+ },
706
+ required: ["id", "level", "content", "createdAt"]
582
707
  }
583
- }
584
- }
708
+ },
709
+ nextSinceId: { type: "number" },
710
+ totalEntries: { type: "number" },
711
+ droppedCount: { type: "number" }
712
+ },
713
+ required: ["entries", "nextSinceId", "totalEntries", "droppedCount"]
585
714
  }),
586
715
  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",
716
+ name: "seastudio-shell_session_signal",
717
+ 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
718
  inputSchema: {
590
719
  type: "object",
591
720
  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" }
721
+ sessionId: { type: "string" },
722
+ signal: { type: "string", enum: ["INT", "TERM", "KILL"] },
723
+ commandId: {
724
+ type: "string",
725
+ description: "\u53EF\u9009\uFF0C\u4EC5\u8BB0\u5F55\u5728 entries \u4E2D\uFF0C\u4E0D\u5F71\u54CD\u4FE1\u53F7\u8BED\u4E49"
726
+ }
595
727
  },
596
- required: ["command"]
728
+ required: ["sessionId", "signal"]
597
729
  }
598
730
  }, {
599
- operationKind: "system",
731
+ operationKind: "mutate",
600
732
  requiresExecutionEvidence: true,
601
733
  rawDomain: "shell"
602
- }, shellCommandEvidenceOutputSchema),
734
+ }, shellSessionSignalEvidenceOutputSchema),
603
735
  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",
736
+ name: "seastudio-shell_session_clear_entries",
737
+ description: "\u6E05\u7A7A session \u7684\u8F93\u51FA\u7F13\u51B2\uFF0C\u4F1A\u8BDD\u672C\u8EAB\u4E0D\u53D7\u5F71\u54CD\u3002",
606
738
  inputSchema: {
607
739
  type: "object",
608
740
  properties: {
609
- cwd: { type: "string", description: "\u76EE\u6807\u5DE5\u4F5C\u76EE\u5F55" }
741
+ sessionId: { type: "string" }
610
742
  },
611
- required: ["cwd"]
612
- }
613
- }, {
614
- operationKind: "mutate",
615
- requiresExecutionEvidence: true,
616
- rawDomain: "shell"
617
- }, shellSessionSnapshotEvidenceOutputSchema),
618
- 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",
621
- inputSchema: {
622
- type: "object",
623
- properties: {}
743
+ required: ["sessionId"]
624
744
  }
625
745
  }, {
626
746
  operationKind: "mutate",
627
747
  requiresExecutionEvidence: true,
628
748
  rawDomain: "shell"
629
- }, shellSessionSnapshotEvidenceOutputSchema),
749
+ }, sessionSnapshotSchema),
630
750
  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",
751
+ name: "seastudio-shell_session_close",
752
+ description: "\u5173\u95ED session \u5E76\u91CA\u653E PTY\u3002force=true \u65F6\u4F7F\u7528 SIGKILL\uFF1B\u9ED8\u8BA4 SIGTERM\u3002",
633
753
  inputSchema: {
634
754
  type: "object",
635
- properties: {}
755
+ properties: {
756
+ sessionId: { type: "string" },
757
+ force: { type: "boolean", description: "\u5F3A\u5236 KILL\uFF0C\u9ED8\u8BA4 false" }
758
+ },
759
+ required: ["sessionId"]
636
760
  }
637
761
  }, {
638
762
  operationKind: "mutate",
639
763
  requiresExecutionEvidence: true,
640
764
  rawDomain: "shell"
641
- }, shellSessionSnapshotEvidenceOutputSchema)
765
+ }, shellSessionCloseEvidenceOutputSchema)
642
766
  ];
643
767
 
644
768
  // src/mcp/seastudio/tools-aigc.ts
@@ -720,6 +844,10 @@ var seastudio = {
720
844
  roots: {
721
845
  list: () => request("roots/list")
722
846
  },
847
+ project: {
848
+ list: () => callTool("seastudio-project_list", {}),
849
+ getActive: () => callTool("seastudio-project_get_active", {})
850
+ },
723
851
  file: {
724
852
  getSelected: () => callTool("seastudio-file_get_selected", {}),
725
853
  read: (path, options) => callTool("seastudio-file_read", {
@@ -733,6 +861,12 @@ var seastudio = {
733
861
  rootId: options?.rootId ?? "workspace",
734
862
  path
735
863
  }),
864
+ tree: (path = "", options) => callTool("seastudio-file_tree", {
865
+ rootId: options?.rootId ?? "workspace",
866
+ path,
867
+ ...typeof options?.maxDepth === "number" ? { maxDepth: options.maxDepth } : {},
868
+ ...typeof options?.maxEntries === "number" ? { maxEntries: options.maxEntries } : {}
869
+ }),
736
870
  delete: (path, options) => callTool("seastudio-file_delete", { rootId: options?.rootId ?? "workspace", path }),
737
871
  mkdir: (path, options) => callTool("seastudio-file_mkdir", { rootId: options?.rootId ?? "workspace", path }),
738
872
  exists: (path, options) => callTool("seastudio-file_exists", { rootId: options?.rootId ?? "workspace", path }),
@@ -819,17 +953,74 @@ var seastudio = {
819
953
  readBinary: (path, options) => callTool("seastudio-file_read_binary", { rootId: options?.rootId ?? "workspace", path })
820
954
  },
821
955
  shell: {
822
- execute: (command, cwd, timeout) => callTool("seastudio-shell_execute", { command, cwd, timeout }),
823
956
  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", {})
957
+ open: (options = {}) => callTool("seastudio-shell_session_open", { ...options }),
958
+ list: () => callTool("seastudio-shell_session_list", {}),
959
+ get: (sessionId) => callTool("seastudio-shell_session_get", { sessionId }),
960
+ run: (sessionId, command, options = {}) => callTool("seastudio-shell_session_run", {
961
+ sessionId,
962
+ command,
963
+ ...typeof options.timeoutMs === "number" ? { timeoutMs: options.timeoutMs } : {}
964
+ }),
965
+ wait: (sessionId, commandId, timeoutMs) => callTool("seastudio-shell_session_wait", {
966
+ sessionId,
967
+ commandId,
968
+ ...typeof timeoutMs === "number" ? { timeoutMs } : {}
969
+ }),
970
+ getEntries: (sessionId, options = {}) => callTool("seastudio-shell_session_get_entries", {
971
+ sessionId,
972
+ ...typeof options.sinceId === "number" ? { sinceId: options.sinceId } : {},
973
+ ...typeof options.limit === "number" ? { limit: options.limit } : {}
974
+ }),
975
+ signal: (sessionId, signal, commandId) => callTool("seastudio-shell_session_signal", {
976
+ sessionId,
977
+ signal,
978
+ ...commandId ? { commandId } : {}
979
+ }),
980
+ clearEntries: (sessionId) => callTool("seastudio-shell_session_clear_entries", { sessionId }),
981
+ close: (sessionId, force = false) => callTool("seastudio-shell_session_close", { sessionId, force })
830
982
  }
831
983
  }
832
984
  };
985
+ async function runOneShotShellCommand(command, options = {}) {
986
+ const { timeoutMs, ...openOpts } = options;
987
+ const openRaw = await seastudio.shell.session.open(openOpts);
988
+ const openText = openRaw.content?.[0]?.text ?? "{}";
989
+ const opened = JSON.parse(openText);
990
+ const sessionId = opened.sessionId;
991
+ if (!sessionId) {
992
+ throw new Error("shell_session_open did not return sessionId");
993
+ }
994
+ try {
995
+ const runRaw = await seastudio.shell.session.run(sessionId, command, {
996
+ ...typeof timeoutMs === "number" ? { timeoutMs } : {}
997
+ });
998
+ const runText = runRaw.content?.[0]?.text ?? "{}";
999
+ const run = JSON.parse(runText);
1000
+ const waitRaw = await seastudio.shell.session.wait(
1001
+ sessionId,
1002
+ run.commandId,
1003
+ typeof timeoutMs === "number" ? timeoutMs + 5e3 : void 0
1004
+ );
1005
+ const waitText = waitRaw.content?.[0]?.text ?? "{}";
1006
+ const wait = JSON.parse(waitText);
1007
+ const entriesRaw = await seastudio.shell.session.getEntries(sessionId, {});
1008
+ const entriesText = entriesRaw.content?.[0]?.text ?? "{}";
1009
+ const entries = JSON.parse(entriesText);
1010
+ const stdout = entries.entries.filter((e) => e.commandId === run.commandId && e.level === "stdout").map((e) => e.content).join("\n");
1011
+ return {
1012
+ exitCode: wait.exitCode,
1013
+ stdout,
1014
+ durationMs: wait.durationMs,
1015
+ timedOut: wait.timedOut
1016
+ };
1017
+ } finally {
1018
+ try {
1019
+ await seastudio.shell.session.close(sessionId);
1020
+ } catch {
1021
+ }
1022
+ }
1023
+ }
833
1024
 
834
1025
  // src/mcp/seastudio/tools-plugin.ts
835
1026
  var pluginManagementTools = [
@@ -883,37 +1074,9 @@ var pluginManagementTools = [
883
1074
  operationKind: "mutate",
884
1075
  requiresExecutionEvidence: true
885
1076
  }),
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
1077
  annotateTool({
915
1078
  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",
1079
+ 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
1080
  inputSchema: {
918
1081
  type: "object",
919
1082
  properties: {
@@ -1059,37 +1222,9 @@ var agentManagementTools = [
1059
1222
  operationKind: "mutate",
1060
1223
  requiresExecutionEvidence: true
1061
1224
  }),
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
1225
  annotateTool({
1091
1226
  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",
1227
+ 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
1228
  inputSchema: {
1094
1229
  type: "object",
1095
1230
  properties: {
@@ -1183,6 +1318,32 @@ var agentTabTools = [
1183
1318
  })
1184
1319
  ];
1185
1320
 
1321
+ // src/mcp/seastudio/tools-project.ts
1322
+ var projectTools = [
1323
+ annotateTool({
1324
+ name: "seastudio-project_list",
1325
+ 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",
1326
+ inputSchema: {
1327
+ type: "object",
1328
+ properties: {}
1329
+ }
1330
+ }, {
1331
+ operationKind: "read",
1332
+ requiresExecutionEvidence: false
1333
+ }),
1334
+ annotateTool({
1335
+ name: "seastudio-project_get_active",
1336
+ 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",
1337
+ inputSchema: {
1338
+ type: "object",
1339
+ properties: {}
1340
+ }
1341
+ }, {
1342
+ operationKind: "read",
1343
+ requiresExecutionEvidence: false
1344
+ })
1345
+ ];
1346
+
1186
1347
  // src/mcp/seastudio/notifications.ts
1187
1348
  var SeastudioRequests = {
1188
1349
  /** 请求打开文件 -> 主程序发布 FILE_OPEN_REQUESTED */
@@ -1255,7 +1416,8 @@ var allTools = [
1255
1416
  ...pluginManagementTools,
1256
1417
  ...agentManagementTools,
1257
1418
  ...pluginTabTools,
1258
- ...agentTabTools
1419
+ ...agentTabTools,
1420
+ ...projectTools
1259
1421
  ];
1260
1422
  var tools = allTools;
1261
1423
 
@@ -1273,12 +1435,17 @@ exports.fileDownloadEvidenceOutputSchema = fileDownloadEvidenceOutputSchema;
1273
1435
  exports.fileTools = fileTools;
1274
1436
  exports.pluginManagementTools = pluginManagementTools;
1275
1437
  exports.pluginTabTools = pluginTabTools;
1438
+ exports.projectTools = projectTools;
1276
1439
  exports.request = request;
1277
1440
  exports.rootedPathEvidenceOutputSchema = rootedPathEvidenceOutputSchema;
1278
1441
  exports.rootedWriteEvidenceOutputSchema = rootedWriteEvidenceOutputSchema;
1442
+ exports.runOneShotShellCommand = runOneShotShellCommand;
1279
1443
  exports.seaCloudTools = seaCloudTools;
1280
1444
  exports.seastudio = seastudio;
1281
- exports.shellCommandEvidenceOutputSchema = shellCommandEvidenceOutputSchema;
1445
+ exports.shellSessionCloseEvidenceOutputSchema = shellSessionCloseEvidenceOutputSchema;
1446
+ exports.shellSessionOpenEvidenceOutputSchema = shellSessionOpenEvidenceOutputSchema;
1447
+ exports.shellSessionRunEvidenceOutputSchema = shellSessionRunEvidenceOutputSchema;
1448
+ exports.shellSessionSignalEvidenceOutputSchema = shellSessionSignalEvidenceOutputSchema;
1282
1449
  exports.shellSessionSnapshotEvidenceOutputSchema = shellSessionSnapshotEvidenceOutputSchema;
1283
1450
  exports.shellTools = shellTools;
1284
1451
  exports.tools = tools;