@seastudio/sdk 4.0.2 → 4.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-WDWGJ5DX.cjs → chunk-7W4MTBCQ.cjs} +4 -4
- package/dist/{chunk-FM7T46Q5.js → chunk-I3XORJ4Z.js} +1 -1
- package/dist/{chunk-2W4WODYZ.cjs → chunk-PBK7SWE4.cjs} +242 -13
- package/dist/{chunk-BEYRWP23.js → chunk-YEN6XUZ2.js} +241 -14
- package/dist/index.cjs +24 -24
- package/dist/index.js +2 -2
- package/dist/mcp/index.cjs +24 -24
- package/dist/mcp/index.js +2 -2
- package/dist/mcp/seastudio/index.cjs +40 -32
- package/dist/mcp/seastudio/index.d.cts +191 -7
- package/dist/mcp/seastudio/index.d.ts +191 -7
- package/dist/mcp/seastudio/index.js +1 -1
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkPBK7SWE4_cjs = require('./chunk-PBK7SWE4.cjs');
|
|
4
4
|
var chunk3I7UM66P_cjs = require('./chunk-3I7UM66P.cjs');
|
|
5
5
|
|
|
6
6
|
// src/mcp/index.ts
|
|
@@ -11,7 +11,7 @@ async function loadPlugin(pluginName) {
|
|
|
11
11
|
throw new Error(`Unknown plugin: ${pluginName}. \u63D2\u4EF6 MCP \u4E0D\u518D\u901A\u8FC7 SDK \u9759\u6001\u5BFC\u5165\u3002`);
|
|
12
12
|
}
|
|
13
13
|
var MCP_PACKAGES = [
|
|
14
|
-
{ id: "seastudio", name: "SeaStudio", description: "\u6587\u4EF6/Shell/AIGC \u57FA\u7840\u80FD\u529B", tools:
|
|
14
|
+
{ id: "seastudio", name: "SeaStudio", description: "\u6587\u4EF6/Shell/AIGC \u57FA\u7840\u80FD\u529B", tools: chunkPBK7SWE4_cjs.allTools }
|
|
15
15
|
];
|
|
16
16
|
function mcpToolToOpenAI(tool) {
|
|
17
17
|
const normalizedTool = chunk3I7UM66P_cjs.normalizeMCPTool(tool);
|
|
@@ -29,7 +29,7 @@ function mcpToolToOpenAI(tool) {
|
|
|
29
29
|
};
|
|
30
30
|
}
|
|
31
31
|
function listAllTools() {
|
|
32
|
-
return [...
|
|
32
|
+
return [...chunkPBK7SWE4_cjs.allTools];
|
|
33
33
|
}
|
|
34
34
|
function toPackageName(source) {
|
|
35
35
|
if (source === "seastudio") {
|
|
@@ -62,7 +62,7 @@ function normalizeAvailableTool(raw) {
|
|
|
62
62
|
};
|
|
63
63
|
}
|
|
64
64
|
var MCP_TOOL_PACKAGE_INDEX = new Map(
|
|
65
|
-
|
|
65
|
+
chunkPBK7SWE4_cjs.allTools.map((tool) => [tool.name, "seastudio"])
|
|
66
66
|
);
|
|
67
67
|
function getMCPToolPackageIndex() {
|
|
68
68
|
return new Map(MCP_TOOL_PACKAGE_INDEX);
|
|
@@ -23,7 +23,9 @@ var rootedWriteEvidenceOutputSchema = {
|
|
|
23
23
|
properties: {
|
|
24
24
|
rootId: { type: "string" },
|
|
25
25
|
path: { type: "string" },
|
|
26
|
-
written: { type: "boolean" }
|
|
26
|
+
written: { type: "boolean" },
|
|
27
|
+
reviewed: { type: "boolean" },
|
|
28
|
+
proposalId: { type: "string" }
|
|
27
29
|
},
|
|
28
30
|
required: ["rootId", "path", "written"]
|
|
29
31
|
};
|
|
@@ -180,7 +182,7 @@ var fileTools = [
|
|
|
180
182
|
}),
|
|
181
183
|
annotateTool({
|
|
182
184
|
name: "seastudio-filesystem_mutate",
|
|
183
|
-
description: "\u6279\u91CF\u6267\u884C\u6587\u4EF6\u5199\u5165\u3001\u5220\u9664\u3001\u79FB\u52A8\u3001\u590D\u5236\u3001\u56DE\u6536\u7AD9\u7B49\u4F1A\u4FEE\u6539\u9879\u76EE\u7684\u64CD\u4F5C\u3002operations \u6309\u987A\u5E8F\u6267\u884C\uFF0C\u9ED8\u8BA4\u9047\u5230\u9519\u8BEF\u505C\u6B62\u3002",
|
|
185
|
+
description: "\u6279\u91CF\u6267\u884C\u6587\u4EF6\u5199\u5165\u3001\u5220\u9664\u3001\u79FB\u52A8\u3001\u590D\u5236\u3001\u56DE\u6536\u7AD9\u7B49\u4F1A\u4FEE\u6539\u9879\u76EE\u7684\u64CD\u4F5C\u3002\u9762\u5411 AI \u6539\u7801\u7684\u6587\u672C write \u9ED8\u8BA4 reviewMode=auto\uFF1A\u82E5\u76EE\u6807\u6587\u4EF6\u5DF2\u5728 Code Editor \u6253\u5F00\uFF0C\u4F1A\u5148\u843D\u76D8\u5E76\u751F\u6210 Keep/Undo proposal\uFF1BKeep \u4EC5\u786E\u8BA4\uFF0CUndo \u56DE\u6EDA\u539F\u5185\u5BB9\u3002operations \u6309\u987A\u5E8F\u6267\u884C\uFF0C\u9ED8\u8BA4\u9047\u5230\u9519\u8BEF\u505C\u6B62\u3002",
|
|
184
186
|
inputSchema: {
|
|
185
187
|
type: "object",
|
|
186
188
|
properties: {
|
|
@@ -198,6 +200,11 @@ var fileTools = [
|
|
|
198
200
|
rootId: rootIdParam,
|
|
199
201
|
path: pathParam,
|
|
200
202
|
content: { type: "string", description: "write \u7684\u6587\u672C\u5185\u5BB9\u3002" },
|
|
203
|
+
reviewMode: {
|
|
204
|
+
type: "string",
|
|
205
|
+
enum: ["auto", "direct", "proposal"],
|
|
206
|
+
description: "write \u7684\u5BA1\u6838\u6A21\u5F0F\uFF1Aauto \u9ED8\u8BA4\u5BF9\u6253\u5F00\u4E2D\u7684\u4EE3\u7801\u6587\u4EF6\u5148\u843D\u76D8\u5E76\u663E\u793A Keep/Undo proposal\uFF1Bdirect \u53EA\u76F4\u63A5\u5199\u76D8\uFF1Bproposal \u5F3A\u5236\u8981\u6C42\u663E\u793A proposal\uFF0C\u672A\u547D\u4E2D\u53EF\u5BA1\u6838\u7F16\u8F91\u5668\u65F6\u8FD4\u56DE\u9519\u8BEF\u3002"
|
|
207
|
+
},
|
|
201
208
|
base64: { type: "string", description: "writeBinary \u7684 base64 \u5185\u5BB9\u3002" },
|
|
202
209
|
newName: { type: "string", description: "rename \u7684\u65B0\u540D\u79F0\u3002" },
|
|
203
210
|
sourceRootId: rootIdParam,
|
|
@@ -254,6 +261,170 @@ var fileTools = [
|
|
|
254
261
|
})
|
|
255
262
|
];
|
|
256
263
|
|
|
264
|
+
// src/mcp/seastudio/tools/editor.ts
|
|
265
|
+
var editorTools = [
|
|
266
|
+
annotateTool({
|
|
267
|
+
name: "seastudio-editor_propose",
|
|
268
|
+
description: "\u63D0\u4EA4\u4EE3\u7801\u53D8\u66F4\u63D0\u6848\u7ED9 Code Editor\uFF0C\u4EE5 Cursor \u98CE\u683C Keep/Undo \u5185\u8054 diff \u8BA9\u7528\u6237\u5BA1\u6838\u3002Code Editor \u4F1A\u5148\u5E94\u7528 proposedContent\uFF0CKeep \u4EC5\u786E\u8BA4\uFF0CUndo \u56DE\u6EDA originalContent\u3002",
|
|
269
|
+
inputSchema: {
|
|
270
|
+
type: "object",
|
|
271
|
+
properties: {
|
|
272
|
+
proposalId: { type: "string", description: "\u63D0\u6848 ID\uFF0C\u53EF\u9009\uFF1B\u7F3A\u7701\u7531\u4E3B\u7A0B\u5E8F\u751F\u6210\u3002" },
|
|
273
|
+
title: { type: "string", description: "\u63D0\u6848\u6807\u9898\u3002" },
|
|
274
|
+
targetPluginId: { type: "string", description: "\u76EE\u6807\u63D2\u4EF6 ID\uFF0C\u9ED8\u8BA4 seastudio.codeEditor\u3002" },
|
|
275
|
+
targetInstanceId: { type: "string", description: "\u76EE\u6807 Code Editor \u5B9E\u4F8B ID\u3002" },
|
|
276
|
+
openFile: { type: "boolean", description: "\u662F\u5426\u8981\u6C42\u7F16\u8F91\u5668\u6253\u5F00/\u805A\u7126\u63D0\u6848\u6587\u4EF6\uFF0C\u9ED8\u8BA4 true\u3002" },
|
|
277
|
+
origin: {
|
|
278
|
+
type: "object",
|
|
279
|
+
additionalProperties: true,
|
|
280
|
+
description: "\u63D0\u6848\u6765\u6E90\u4FE1\u606F\uFF0C\u5982 agentInstanceId\u3001threadId\u3001projectId\u3002"
|
|
281
|
+
},
|
|
282
|
+
files: {
|
|
283
|
+
type: "array",
|
|
284
|
+
description: "\u63D0\u6848\u6D89\u53CA\u7684\u6587\u4EF6\u5217\u8868\u3002",
|
|
285
|
+
items: {
|
|
286
|
+
type: "object",
|
|
287
|
+
properties: {
|
|
288
|
+
path: { type: "string" },
|
|
289
|
+
rootId: { type: "string" },
|
|
290
|
+
originalContent: { type: "string" },
|
|
291
|
+
proposedContent: { type: "string" },
|
|
292
|
+
hunks: {
|
|
293
|
+
type: "array",
|
|
294
|
+
items: {
|
|
295
|
+
type: "object",
|
|
296
|
+
properties: {
|
|
297
|
+
id: { type: "string" },
|
|
298
|
+
filePath: { type: "string" },
|
|
299
|
+
rootId: { type: "string" },
|
|
300
|
+
startLine: { type: "number" },
|
|
301
|
+
endLine: { type: "number" },
|
|
302
|
+
originalContent: { type: "string" },
|
|
303
|
+
proposedContent: { type: "string" }
|
|
304
|
+
},
|
|
305
|
+
required: ["id", "startLine", "endLine", "originalContent", "proposedContent"]
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
},
|
|
309
|
+
required: ["path", "originalContent", "proposedContent"]
|
|
310
|
+
}
|
|
311
|
+
}
|
|
312
|
+
},
|
|
313
|
+
required: ["title", "files"]
|
|
314
|
+
}
|
|
315
|
+
}, {
|
|
316
|
+
operationKind: "mutate",
|
|
317
|
+
requiresExecutionEvidence: true,
|
|
318
|
+
rawDomain: "editor"
|
|
319
|
+
}, {
|
|
320
|
+
type: "object",
|
|
321
|
+
properties: {
|
|
322
|
+
proposalId: { type: "string" },
|
|
323
|
+
delivered: { type: "boolean" },
|
|
324
|
+
targetPluginId: { type: "string" },
|
|
325
|
+
targetInstanceId: { type: "string" }
|
|
326
|
+
},
|
|
327
|
+
required: ["proposalId", "delivered"]
|
|
328
|
+
}),
|
|
329
|
+
annotateTool({
|
|
330
|
+
name: "seastudio-editor_proposal",
|
|
331
|
+
description: "\u7BA1\u7406 Code Editor \u7684\u6301\u4E45 Keep/Undo \u4EE3\u7801\u63D0\u6848\u3002\u652F\u6301 list\u3001get\u3001getForFile\u3001keepAll\u3001undoAll\uFF1BAgent \u53EF\u7528 keepAll/undoAll \u4E3B\u52A8\u786E\u8BA4\u6216\u56DE\u6EDA\u63D0\u6848\u3002",
|
|
332
|
+
inputSchema: {
|
|
333
|
+
type: "object",
|
|
334
|
+
properties: {
|
|
335
|
+
action: {
|
|
336
|
+
type: "string",
|
|
337
|
+
enum: ["list", "get", "getForFile", "keepAll", "undoAll", "resolve"],
|
|
338
|
+
description: "proposal \u7BA1\u7406\u52A8\u4F5C\u3002"
|
|
339
|
+
},
|
|
340
|
+
proposalId: { type: "string", description: "\u76EE\u6807\u63D0\u6848 ID\u3002" },
|
|
341
|
+
rootId: { type: "string", description: "\u9879\u76EE\u6839 ID\u3002" },
|
|
342
|
+
path: { type: "string", description: "\u76F8\u5BF9 rootId \u7684\u6587\u4EF6\u8DEF\u5F84\u3002" },
|
|
343
|
+
decision: {
|
|
344
|
+
type: "string",
|
|
345
|
+
enum: ["keep", "undo"],
|
|
346
|
+
description: "resolve \u52A8\u4F5C\u7684\u51B3\u7B56\u3002"
|
|
347
|
+
}
|
|
348
|
+
},
|
|
349
|
+
required: ["action"]
|
|
350
|
+
}
|
|
351
|
+
}, {
|
|
352
|
+
operationKind: "mutate",
|
|
353
|
+
requiresExecutionEvidence: true,
|
|
354
|
+
rawDomain: "editor"
|
|
355
|
+
}, {
|
|
356
|
+
type: "object",
|
|
357
|
+
properties: {
|
|
358
|
+
proposalId: { type: "string" },
|
|
359
|
+
proposals: { type: "array", items: { type: "object", additionalProperties: true } },
|
|
360
|
+
proposal: { type: "object", additionalProperties: true },
|
|
361
|
+
resolved: { type: "boolean" },
|
|
362
|
+
decision: { type: "string" }
|
|
363
|
+
}
|
|
364
|
+
})
|
|
365
|
+
];
|
|
366
|
+
|
|
367
|
+
// src/mcp/seastudio/tools/git.ts
|
|
368
|
+
var gitTools = [
|
|
369
|
+
annotateTool({
|
|
370
|
+
name: "seastudio-git_read",
|
|
371
|
+
description: "Read git repository state for the current project. Actions: status, diff, show, lineChanges, probe.",
|
|
372
|
+
inputSchema: {
|
|
373
|
+
type: "object",
|
|
374
|
+
properties: {
|
|
375
|
+
action: {
|
|
376
|
+
type: "string",
|
|
377
|
+
enum: ["status", "diff", "show", "lineChanges", "probe"],
|
|
378
|
+
description: "status: porcelain file list; diff: unified diff text; show: file at ref; lineChanges: editor gutter ranges; probe: runtime availability."
|
|
379
|
+
},
|
|
380
|
+
path: { type: "string", description: "Repo-relative file path (required for diff/show/lineChanges)." },
|
|
381
|
+
scope: {
|
|
382
|
+
type: "string",
|
|
383
|
+
enum: ["staged", "unstaged", "all"],
|
|
384
|
+
description: "diff scope (default all)."
|
|
385
|
+
},
|
|
386
|
+
ref: {
|
|
387
|
+
type: "string",
|
|
388
|
+
enum: ["HEAD", "INDEX"],
|
|
389
|
+
description: "show ref (default HEAD)."
|
|
390
|
+
},
|
|
391
|
+
rootId: { type: "string", description: "Filesystem root id (default workspace)." }
|
|
392
|
+
},
|
|
393
|
+
required: ["action"]
|
|
394
|
+
}
|
|
395
|
+
}, {
|
|
396
|
+
operationKind: "read",
|
|
397
|
+
requiresExecutionEvidence: false,
|
|
398
|
+
rawDomain: "git"
|
|
399
|
+
}),
|
|
400
|
+
annotateTool({
|
|
401
|
+
name: "seastudio-git_mutate",
|
|
402
|
+
description: "Mutate git state: init, stage, unstage, discard, commit, stageAll, unstageAll.",
|
|
403
|
+
inputSchema: {
|
|
404
|
+
type: "object",
|
|
405
|
+
properties: {
|
|
406
|
+
action: {
|
|
407
|
+
type: "string",
|
|
408
|
+
enum: ["init", "stage", "unstage", "discard", "commit", "stageAll", "unstageAll"]
|
|
409
|
+
},
|
|
410
|
+
path: { type: "string", description: "Repo-relative path for stage/unstage/discard." },
|
|
411
|
+
paths: {
|
|
412
|
+
type: "array",
|
|
413
|
+
items: { type: "string" },
|
|
414
|
+
description: "Multiple paths for stage/unstage/discard."
|
|
415
|
+
},
|
|
416
|
+
message: { type: "string", description: "Commit message (required for commit)." },
|
|
417
|
+
rootId: { type: "string", description: "Filesystem root id (default workspace)." }
|
|
418
|
+
},
|
|
419
|
+
required: ["action"]
|
|
420
|
+
}
|
|
421
|
+
}, {
|
|
422
|
+
operationKind: "mutate",
|
|
423
|
+
requiresExecutionEvidence: true,
|
|
424
|
+
rawDomain: "git"
|
|
425
|
+
})
|
|
426
|
+
];
|
|
427
|
+
|
|
257
428
|
// src/mcp/seastudio/tools/shell.ts
|
|
258
429
|
var shellActionParam = {
|
|
259
430
|
type: "string",
|
|
@@ -397,8 +568,14 @@ function joinWorkspacePath(dir, name) {
|
|
|
397
568
|
function callFilesystemRead(action, args = {}) {
|
|
398
569
|
return callTool("seastudio-filesystem_read", { action, ...args });
|
|
399
570
|
}
|
|
400
|
-
function callFilesystemMutate(op, args = {}) {
|
|
401
|
-
return callTool("seastudio-filesystem_mutate", {
|
|
571
|
+
function callFilesystemMutate(op, args = {}, options) {
|
|
572
|
+
return callTool("seastudio-filesystem_mutate", {
|
|
573
|
+
operations: [{
|
|
574
|
+
op,
|
|
575
|
+
...args,
|
|
576
|
+
...options?.reviewMode ? { reviewMode: options.reviewMode } : {}
|
|
577
|
+
}]
|
|
578
|
+
});
|
|
402
579
|
}
|
|
403
580
|
function callFilesystemTransfer(action, args = {}) {
|
|
404
581
|
return callTool("seastudio-filesystem_transfer", { action, ...args });
|
|
@@ -409,6 +586,12 @@ function callShellSessionRead(action, args = {}) {
|
|
|
409
586
|
function callShellSessionControl(action, args = {}) {
|
|
410
587
|
return callTool("seastudio-shell_session_control", { action, ...args });
|
|
411
588
|
}
|
|
589
|
+
function callGitRead(action, args = {}) {
|
|
590
|
+
return callTool("seastudio-git_read", { action, ...args });
|
|
591
|
+
}
|
|
592
|
+
function callGitMutate(action, args = {}) {
|
|
593
|
+
return callTool("seastudio-git_mutate", { action, ...args });
|
|
594
|
+
}
|
|
412
595
|
var seastudio = {
|
|
413
596
|
roots: {
|
|
414
597
|
list: () => request("roots/list")
|
|
@@ -426,7 +609,11 @@ var seastudio = {
|
|
|
426
609
|
...typeof options?.offset === "number" ? { offset: options.offset } : {},
|
|
427
610
|
...typeof options?.limit === "number" ? { limit: options.limit } : {}
|
|
428
611
|
}),
|
|
429
|
-
write: (path, content, options) => callFilesystemMutate(
|
|
612
|
+
write: (path, content, options) => callFilesystemMutate(
|
|
613
|
+
"write",
|
|
614
|
+
{ rootId: options?.rootId ?? "workspace", path, content },
|
|
615
|
+
{ reviewMode: options?.reviewMode }
|
|
616
|
+
),
|
|
430
617
|
list: (path = "", options) => callFilesystemRead("list", {
|
|
431
618
|
rootId: options?.rootId ?? "workspace",
|
|
432
619
|
path
|
|
@@ -525,6 +712,32 @@ var seastudio = {
|
|
|
525
712
|
writeBinary: (path, base64, options) => callFilesystemMutate("writeBinary", { rootId: options?.rootId ?? "workspace", path, base64 }),
|
|
526
713
|
readBinary: (path, options) => callFilesystemRead("readBinary", { rootId: options?.rootId ?? "workspace", path })
|
|
527
714
|
},
|
|
715
|
+
git: {
|
|
716
|
+
probe: () => callGitRead("probe"),
|
|
717
|
+
status: (options) => callGitRead("status", { rootId: options?.rootId ?? "workspace" }),
|
|
718
|
+
diff: (path, options) => callGitRead("diff", {
|
|
719
|
+
path,
|
|
720
|
+
rootId: options?.rootId ?? "workspace",
|
|
721
|
+
...options?.scope ? { scope: options.scope } : {}
|
|
722
|
+
}),
|
|
723
|
+
show: (path, options) => callGitRead("show", {
|
|
724
|
+
path,
|
|
725
|
+
rootId: options?.rootId ?? "workspace",
|
|
726
|
+
...options?.ref ? { ref: options.ref } : {}
|
|
727
|
+
}),
|
|
728
|
+
lineChanges: (path, options) => callGitRead("lineChanges", { path, rootId: options?.rootId ?? "workspace" }),
|
|
729
|
+
init: (options) => callGitMutate("init", { rootId: options?.rootId ?? "workspace" }),
|
|
730
|
+
stage: (path, options) => callGitMutate("stage", { path, rootId: options?.rootId ?? "workspace" }),
|
|
731
|
+
stageAll: (options) => callGitMutate("stageAll", { rootId: options?.rootId ?? "workspace" }),
|
|
732
|
+
unstage: (path, options) => callGitMutate("unstage", { path, rootId: options?.rootId ?? "workspace" }),
|
|
733
|
+
unstageAll: (options) => callGitMutate("unstageAll", { rootId: options?.rootId ?? "workspace" }),
|
|
734
|
+
discard: (path, options) => callGitMutate("discard", { path, rootId: options?.rootId ?? "workspace" }),
|
|
735
|
+
commit: (message, options) => callGitMutate("commit", { message, rootId: options?.rootId ?? "workspace" })
|
|
736
|
+
},
|
|
737
|
+
editor: {
|
|
738
|
+
propose: (options) => callTool("seastudio-editor_propose", options),
|
|
739
|
+
proposal: (options) => callTool("seastudio-editor_proposal", options)
|
|
740
|
+
},
|
|
528
741
|
shell: {
|
|
529
742
|
session: {
|
|
530
743
|
open: (options = {}) => callShellSessionControl("open", { ...options }),
|
|
@@ -789,7 +1002,7 @@ var skillTools = [
|
|
|
789
1002
|
|
|
790
1003
|
// src/mcp/seastudio/tools/browser.ts
|
|
791
1004
|
var browserSessionIdParam = {
|
|
792
|
-
browserSessionId: { type: "string", description: "Browser session ID\u3002get/close/tab/runtime \u52A8\u4F5C\u9700\u8981\u3002" }
|
|
1005
|
+
browserSessionId: { type: "string", description: "Browser session ID\u3002get/close/tab/runtime \u52A8\u4F5C\u9700\u8981\u3002\u8981\u628A\u7F51\u9875\u753B\u9762\u663E\u793A\u5230 Browser \u63D2\u4EF6\u4E2D\uFF0C\u4E5F\u9700\u8981\u628A\u8FD9\u4E2A ID \u4F20\u7ED9 browser \u63D2\u4EF6\u7684 MCP \u5DE5\u5177\u3002" }
|
|
793
1006
|
};
|
|
794
1007
|
var tabIdParam = {
|
|
795
1008
|
tabId: { type: "string", description: "Browser tab ID\u3002close/activate/navigate/goBack/goForward/reload/stop \u9700\u8981\u3002" }
|
|
@@ -797,17 +1010,17 @@ var tabIdParam = {
|
|
|
797
1010
|
var browserRuntimeTools = [
|
|
798
1011
|
annotateTool({
|
|
799
1012
|
name: "seastudio-browser_session",
|
|
800
|
-
description: "\u521B\u5EFA\u3001\u5217\u51FA\u3001\u8BFB\u53D6\u6216\u5173\u95ED Browser Session\u3002\u4F7F\u7528 action \u9009\u62E9 open\u3001list\u3001get \u6216 close\u3002",
|
|
1013
|
+
description: "\u521B\u5EFA\u3001\u5217\u51FA\u3001\u8BFB\u53D6\u6216\u5173\u95ED Browser Session\u3002\u4F7F\u7528 action \u9009\u62E9 open\u3001list\u3001get \u6216 close\u3002\u6CE8\u610F\uFF1A\u672C\u5DE5\u5177\u53EA\u7BA1\u7406\u4F1A\u8BDD\u6570\u636E\u548C tab\uFF0C\u4E0D\u4F1A\u81EA\u52A8\u628A\u7F51\u9875\u753B\u9762\u663E\u793A\u5230 UI\uFF1B\u5982\u679C\u7528\u6237\u9700\u8981\u201C\u6253\u5F00\u6D4F\u89C8\u5668/\u663E\u793A\u7F51\u9875/\u8BA9\u6211\u770B\u5230\u9875\u9762\u201D\uFF0C\u5E94\u5148\u6253\u5F00 Browser \u63D2\u4EF6\u6807\u7B7E\u9875\uFF08seastudio.browser\uFF09\uFF0C\u518D\u8C03\u7528\u8BE5\u63D2\u4EF6\u7684 MCP \u5DE5\u5177\u628A browserSessionId \u4EA4\u7ED9\u63D2\u4EF6\u5B9E\u4F8B\u663E\u793A\u3002",
|
|
801
1014
|
inputSchema: {
|
|
802
1015
|
type: "object",
|
|
803
1016
|
properties: {
|
|
804
1017
|
action: {
|
|
805
1018
|
type: "string",
|
|
806
1019
|
enum: ["open", "list", "get", "close"],
|
|
807
|
-
description: "Browser Session \u52A8\u4F5C\u3002get/close \u9700\u8981 browserSessionId\u3002"
|
|
1020
|
+
description: "Browser Session \u52A8\u4F5C\u3002get/close \u9700\u8981 browserSessionId\u3002open \u8FD4\u56DE\u7684 browserSessionId \u53EF\u7EE7\u7EED\u7528\u4E8E tab \u64CD\u4F5C\uFF1B\u82E5\u8981\u663E\u793A\u7F51\u9875\u753B\u9762\uFF0C\u8FD8\u8981\u4F20\u7ED9 Browser \u63D2\u4EF6 MCP\u3002"
|
|
808
1021
|
},
|
|
809
1022
|
...browserSessionIdParam,
|
|
810
|
-
label: { type: "string", description: "open \u7684\u53EF\u9009 session \u663E\u793A\u540D\u79F0\u3002" },
|
|
1023
|
+
label: { type: "string", description: "open \u7684\u53EF\u9009 session \u663E\u793A\u540D\u79F0\u3002\u5EFA\u8BAE\u4F7F\u7528\u80FD\u8BF4\u660E\u7528\u9014\u7684\u540D\u79F0\uFF0CBrowser \u63D2\u4EF6\u63A5\u7BA1\u5DF2\u6709 session \u65F6\u4F1A\u663E\u793A\u5BF9\u5E94\u4F1A\u8BDD\u3002" },
|
|
811
1024
|
partitionKey: { type: "string", description: "open \u7684\u53EF\u9009\u7F51\u7AD9\u6570\u636E\u5206\u533A key\uFF1B\u76F8\u540C key \u5171\u4EAB cookie/localStorage\u3002" },
|
|
812
1025
|
homepage: { type: "string", description: "open \u7684\u53EF\u9009\u9ED8\u8BA4\u9996\u9875\u3002" }
|
|
813
1026
|
},
|
|
@@ -820,14 +1033,14 @@ var browserRuntimeTools = [
|
|
|
820
1033
|
}),
|
|
821
1034
|
annotateTool({
|
|
822
1035
|
name: "seastudio-browser_tab",
|
|
823
|
-
description: "\u7BA1\u7406 Browser Session \u4E2D\u7684 tab\uFF0C\u5305\u62EC\u521B\u5EFA\u3001\u5BFC\u822A\u3001\u6FC0\u6D3B\u548C\u52A0\u8F7D\u63A7\u5236\u3002\u4F7F\u7528 action \u9009\u62E9 create\u3001close\u3001activate\u3001navigate\u3001goBack\u3001goForward\u3001reload \u6216 stop\u3002",
|
|
1036
|
+
description: "\u7BA1\u7406 Browser Session \u4E2D\u7684 tab\uFF0C\u5305\u62EC\u521B\u5EFA\u3001\u5BFC\u822A\u3001\u6FC0\u6D3B\u548C\u52A0\u8F7D\u63A7\u5236\u3002\u4F7F\u7528 action \u9009\u62E9 create\u3001close\u3001activate\u3001navigate\u3001goBack\u3001goForward\u3001reload \u6216 stop\u3002\u6CE8\u610F\uFF1Atab \u64CD\u4F5C\u53EA\u6539\u53D8\u6D4F\u89C8\u5668\u4F1A\u8BDD\u72B6\u6001\uFF1B\u82E5\u7528\u6237\u9700\u8981\u770B\u5230\u7F51\u9875\u5185\u5BB9\uFF0C\u9700\u8981\u540C\u65F6\u628A browserSessionId \u4EA4\u7ED9 Browser \u63D2\u4EF6 MCP \u5DE5\u5177\u5728\u63D2\u4EF6 viewport \u4E2D\u663E\u793A\u3002",
|
|
824
1037
|
inputSchema: {
|
|
825
1038
|
type: "object",
|
|
826
1039
|
properties: {
|
|
827
1040
|
action: {
|
|
828
1041
|
type: "string",
|
|
829
1042
|
enum: ["create", "close", "activate", "navigate", "goBack", "goForward", "reload", "stop"],
|
|
830
|
-
description: "Browser tab \u52A8\u4F5C\u3002\u6240\u6709\u52A8\u4F5C\u9700\u8981 browserSessionId\uFF1B\u9664 create \u5916\u901A\u5E38\u9700\u8981 tabId\uFF1Bnavigate \u8FD8\u9700\u8981 url\u3002"
|
|
1043
|
+
description: "Browser tab \u52A8\u4F5C\u3002\u6240\u6709\u52A8\u4F5C\u9700\u8981 browserSessionId\uFF1B\u9664 create \u5916\u901A\u5E38\u9700\u8981 tabId\uFF1Bnavigate \u8FD8\u9700\u8981 url\u3002create/navigate \u540E\u5982\u9700\u5C55\u793A\u9875\u9762\uFF0C\u5E94\u8C03\u7528 Browser \u63D2\u4EF6 MCP \u63A5\u7BA1\u540C\u4E00\u4E2A browserSessionId\u3002"
|
|
831
1044
|
},
|
|
832
1045
|
...browserSessionIdParam,
|
|
833
1046
|
...tabIdParam,
|
|
@@ -842,7 +1055,7 @@ var browserRuntimeTools = [
|
|
|
842
1055
|
}),
|
|
843
1056
|
annotateTool({
|
|
844
1057
|
name: "seastudio-browser_runtime",
|
|
845
|
-
description: "\u5904\u7406 Browser runtime \u4E0E UI viewport\u3001\u8BC1\u4E66\u9519\u8BEF\u76F8\u5173\u7684\u5BBF\u4E3B\u4EA4\u4E92\u3002\u4F7F\u7528 action \u9009\u62E9 bindViewport \u6216 respondCertificate\u3002",
|
|
1058
|
+
description: "\u5904\u7406 Browser runtime \u4E0E UI viewport\u3001\u8BC1\u4E66\u9519\u8BEF\u76F8\u5173\u7684\u5BBF\u4E3B\u4EA4\u4E92\u3002\u4F7F\u7528 action \u9009\u62E9 bindViewport \u6216 respondCertificate\u3002\u901A\u5E38\u7531 Browser \u63D2\u4EF6\u524D\u7AEF\u81EA\u52A8\u8C03\u7528\uFF1B\u5916\u90E8 agent \u60F3\u8BA9\u7528\u6237\u770B\u5230\u9875\u9762\u65F6\uFF0C\u4E0D\u5E94\u76F4\u63A5\u731C rect\uFF0C\u800C\u5E94\u6253\u5F00 Browser \u63D2\u4EF6\u5E76\u8C03\u7528\u63D2\u4EF6 MCP \u5DE5\u5177\u63A5\u7BA1 browserSessionId\u3002",
|
|
846
1059
|
inputSchema: {
|
|
847
1060
|
type: "object",
|
|
848
1061
|
properties: {
|
|
@@ -885,11 +1098,23 @@ var SeastudioRequests = {
|
|
|
885
1098
|
/** 请求标记文件已保存 -> 主程序发布 FILE_SAVED */
|
|
886
1099
|
FILE_SAVED: "request:file_saved",
|
|
887
1100
|
/** 请求发送文本给 Agent -> 主程序发布 TEXT_SEND_REQUESTED */
|
|
888
|
-
TEXT_SEND: "request:text_send"
|
|
1101
|
+
TEXT_SEND: "request:text_send",
|
|
1102
|
+
/** 请求在 Code Editor 中打开 Git diff 视图 */
|
|
1103
|
+
GIT_OPEN_DIFF: "request:git_open_diff",
|
|
1104
|
+
/** 请求提交代码变更提案 -> 主程序发布 PROPOSAL_REQUESTED */
|
|
1105
|
+
PROPOSAL_SUBMIT: "request:proposal_submit"
|
|
889
1106
|
};
|
|
890
1107
|
var SeastudioNotifications = {
|
|
891
1108
|
/** 文件系统变化通知(fs.watch 触发) */
|
|
892
1109
|
FILES_CHANGED: "files:changed",
|
|
1110
|
+
/** Git 仓库状态变化(mutate 或 files:changed 后刷新) */
|
|
1111
|
+
GIT_CHANGED: "git:changed",
|
|
1112
|
+
/** Git diff 打开请求(主程序转发到 Code Editor) */
|
|
1113
|
+
GIT_OPEN_DIFF_REQUESTED: "seastudio:git-open_diff_requested",
|
|
1114
|
+
/** 代码变更提案请求(主程序转发到 Code Editor) */
|
|
1115
|
+
PROPOSAL_REQUESTED: "seastudio:proposal-requested",
|
|
1116
|
+
/** 代码变更提案状态变化 */
|
|
1117
|
+
PROPOSAL_CHANGED: "seastudio:proposal-changed",
|
|
893
1118
|
/** 文件或目录被重命名/移动 */
|
|
894
1119
|
FILE_RENAMED: "file:renamed",
|
|
895
1120
|
/** 文件或目录被删除/移入回收站 */
|
|
@@ -959,6 +1184,8 @@ var SeastudioNotifications = {
|
|
|
959
1184
|
// src/mcp/seastudio/index.ts
|
|
960
1185
|
var allTools = [
|
|
961
1186
|
...fileTools,
|
|
1187
|
+
...editorTools,
|
|
1188
|
+
...gitTools,
|
|
962
1189
|
...shellTools,
|
|
963
1190
|
...seaCloudTools,
|
|
964
1191
|
...pluginManagementTools,
|
|
@@ -982,9 +1209,11 @@ exports.browserRuntimeTools = browserRuntimeTools;
|
|
|
982
1209
|
exports.callTool = callTool;
|
|
983
1210
|
exports.callToolText = callToolText;
|
|
984
1211
|
exports.dualPathEvidenceOutputSchema = dualPathEvidenceOutputSchema;
|
|
1212
|
+
exports.editorTools = editorTools;
|
|
985
1213
|
exports.fileDownloadEvidenceOutputSchema = fileDownloadEvidenceOutputSchema;
|
|
986
1214
|
exports.fileTools = fileTools;
|
|
987
1215
|
exports.fileUrlEvidenceOutputSchema = fileUrlEvidenceOutputSchema;
|
|
1216
|
+
exports.gitTools = gitTools;
|
|
988
1217
|
exports.pluginManagementTools = pluginManagementTools;
|
|
989
1218
|
exports.pluginTabTools = pluginTabTools;
|
|
990
1219
|
exports.projectTools = projectTools;
|