@seastudio/sdk 3.5.1 → 3.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-5OM34MI7.js → chunk-BFJ2EFTV.js} +1 -1
- package/dist/{chunk-EKOO23S5.cjs → chunk-N4KBTMOV.cjs} +4 -4
- package/dist/{chunk-K4A2JSWD.cjs → chunk-NP6AI7I4.cjs} +197 -1
- package/dist/{chunk-MFZWPGTX.js → chunk-UFFMPHL3.js} +197 -2
- 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 +35 -31
- package/dist/mcp/seastudio/index.d.cts +82 -1
- package/dist/mcp/seastudio/index.d.ts +82 -1
- 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 chunkNP6AI7I4_cjs = require('./chunk-NP6AI7I4.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: chunkNP6AI7I4_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 [...chunkNP6AI7I4_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
|
+
chunkNP6AI7I4_cjs.allTools.map((tool) => [tool.name, "seastudio"])
|
|
66
66
|
);
|
|
67
67
|
function getMCPToolPackageIndex() {
|
|
68
68
|
return new Map(MCP_TOOL_PACKAGE_INDEX);
|
|
@@ -829,6 +829,17 @@ var seaCloudTools = [
|
|
|
829
829
|
];
|
|
830
830
|
|
|
831
831
|
// src/mcp/seastudio/client.ts
|
|
832
|
+
function parseToolResult(result) {
|
|
833
|
+
if (result.isError) {
|
|
834
|
+
const message = result.content.find((entry) => entry.type === "text")?.text ?? "MCP tool failed";
|
|
835
|
+
throw new Error(message);
|
|
836
|
+
}
|
|
837
|
+
if (result.structuredContent !== void 0) {
|
|
838
|
+
return result.structuredContent;
|
|
839
|
+
}
|
|
840
|
+
const text = result.content.find((entry) => entry.type === "text")?.text;
|
|
841
|
+
return text ? JSON.parse(text) : {};
|
|
842
|
+
}
|
|
832
843
|
async function callTool(name, args = {}) {
|
|
833
844
|
return chunk3I7UM66P_cjs.getDefaultClient().callTool(name, args);
|
|
834
845
|
}
|
|
@@ -992,6 +1003,22 @@ var seastudio = {
|
|
|
992
1003
|
clearEntries: (sessionId) => callTool("seastudio-shell_session_clear_entries", { sessionId }),
|
|
993
1004
|
close: (sessionId, force = false) => callTool("seastudio-shell_session_close", { sessionId, force })
|
|
994
1005
|
}
|
|
1006
|
+
},
|
|
1007
|
+
browser: {
|
|
1008
|
+
getState: async () => parseToolResult(await callTool("browser.getState")),
|
|
1009
|
+
createTab: async (url) => parseToolResult(await callTool("browser.createTab", { url })),
|
|
1010
|
+
closeTab: async (tabId) => parseToolResult(await callTool("browser.closeTab", { tabId })),
|
|
1011
|
+
activateTab: async (tabId) => parseToolResult(await callTool("browser.activateTab", { tabId })),
|
|
1012
|
+
navigate: async (tabId, url) => parseToolResult(await callTool("browser.navigate", { tabId, url })),
|
|
1013
|
+
goBack: async (tabId) => parseToolResult(await callTool("browser.goBack", { tabId })),
|
|
1014
|
+
goForward: async (tabId) => parseToolResult(await callTool("browser.goForward", { tabId })),
|
|
1015
|
+
reload: async (tabId) => parseToolResult(await callTool("browser.reload", { tabId })),
|
|
1016
|
+
stop: async (tabId) => parseToolResult(await callTool("browser.stop", { tabId })),
|
|
1017
|
+
setViewportRect: async (tabId, rect) => parseToolResult(await callTool("browser.setViewportRect", {
|
|
1018
|
+
...tabId ? { tabId } : {},
|
|
1019
|
+
rect
|
|
1020
|
+
})),
|
|
1021
|
+
respondToCertificateError: async (requestId, allow) => parseToolResult(await callTool("browser.respondToCertificateError", { requestId, allow }))
|
|
995
1022
|
}
|
|
996
1023
|
};
|
|
997
1024
|
async function runOneShotShellCommand(command, options = {}) {
|
|
@@ -1435,6 +1462,163 @@ var skillTools = [
|
|
|
1435
1462
|
})
|
|
1436
1463
|
];
|
|
1437
1464
|
|
|
1465
|
+
// src/mcp/seastudio/tools-browser.ts
|
|
1466
|
+
var tabIdParam = {
|
|
1467
|
+
tabId: { type: "string", description: "Browser runtime tab ID" }
|
|
1468
|
+
};
|
|
1469
|
+
var browserRuntimeTools = [
|
|
1470
|
+
annotateTool({
|
|
1471
|
+
name: "browser.getState",
|
|
1472
|
+
description: "\u8BFB\u53D6\u5F53\u524D browser runtime \u6807\u7B7E\u9875\u72B6\u6001\u3002",
|
|
1473
|
+
inputSchema: {
|
|
1474
|
+
type: "object",
|
|
1475
|
+
properties: {}
|
|
1476
|
+
}
|
|
1477
|
+
}, {
|
|
1478
|
+
operationKind: "read",
|
|
1479
|
+
requiresExecutionEvidence: false
|
|
1480
|
+
}),
|
|
1481
|
+
annotateTool({
|
|
1482
|
+
name: "browser.createTab",
|
|
1483
|
+
description: "\u5728\u5BBF\u4E3B browser runtime \u4E2D\u521B\u5EFA\u4E00\u4E2A\u771F\u5B9E webview \u6807\u7B7E\u9875\uFF0C\u53EF\u9009\u4F20\u5165\u521D\u59CB URL\u3002",
|
|
1484
|
+
inputSchema: {
|
|
1485
|
+
type: "object",
|
|
1486
|
+
properties: {
|
|
1487
|
+
url: { type: "string", description: "\u521D\u59CB URL\uFF1B\u4E3A\u7A7A\u65F6\u7531\u5BBF\u4E3B\u4F7F\u7528\u9ED8\u8BA4\u9996\u9875\u3002" }
|
|
1488
|
+
}
|
|
1489
|
+
}
|
|
1490
|
+
}, {
|
|
1491
|
+
operationKind: "mutate",
|
|
1492
|
+
requiresExecutionEvidence: false
|
|
1493
|
+
}),
|
|
1494
|
+
annotateTool({
|
|
1495
|
+
name: "browser.closeTab",
|
|
1496
|
+
description: "\u5173\u95ED browser runtime \u6807\u7B7E\u9875\u3002",
|
|
1497
|
+
inputSchema: {
|
|
1498
|
+
type: "object",
|
|
1499
|
+
properties: tabIdParam,
|
|
1500
|
+
required: ["tabId"]
|
|
1501
|
+
}
|
|
1502
|
+
}, {
|
|
1503
|
+
operationKind: "mutate",
|
|
1504
|
+
requiresExecutionEvidence: false
|
|
1505
|
+
}),
|
|
1506
|
+
annotateTool({
|
|
1507
|
+
name: "browser.activateTab",
|
|
1508
|
+
description: "\u6FC0\u6D3B browser runtime \u6807\u7B7E\u9875\u3002",
|
|
1509
|
+
inputSchema: {
|
|
1510
|
+
type: "object",
|
|
1511
|
+
properties: tabIdParam,
|
|
1512
|
+
required: ["tabId"]
|
|
1513
|
+
}
|
|
1514
|
+
}, {
|
|
1515
|
+
operationKind: "mutate",
|
|
1516
|
+
requiresExecutionEvidence: false
|
|
1517
|
+
}),
|
|
1518
|
+
annotateTool({
|
|
1519
|
+
name: "browser.navigate",
|
|
1520
|
+
description: "\u8BA9 browser runtime \u6807\u7B7E\u9875\u5BFC\u822A\u5230\u6307\u5B9A URL \u6216\u641C\u7D22\u8BCD\u3002",
|
|
1521
|
+
inputSchema: {
|
|
1522
|
+
type: "object",
|
|
1523
|
+
properties: {
|
|
1524
|
+
...tabIdParam,
|
|
1525
|
+
url: { type: "string", description: "\u76EE\u6807 URL \u6216\u641C\u7D22\u8BCD\u3002" }
|
|
1526
|
+
},
|
|
1527
|
+
required: ["tabId", "url"]
|
|
1528
|
+
}
|
|
1529
|
+
}, {
|
|
1530
|
+
operationKind: "mutate",
|
|
1531
|
+
requiresExecutionEvidence: false
|
|
1532
|
+
}),
|
|
1533
|
+
annotateTool({
|
|
1534
|
+
name: "browser.goBack",
|
|
1535
|
+
description: "\u8BA9 browser runtime \u6807\u7B7E\u9875\u540E\u9000\u3002",
|
|
1536
|
+
inputSchema: {
|
|
1537
|
+
type: "object",
|
|
1538
|
+
properties: tabIdParam,
|
|
1539
|
+
required: ["tabId"]
|
|
1540
|
+
}
|
|
1541
|
+
}, {
|
|
1542
|
+
operationKind: "mutate",
|
|
1543
|
+
requiresExecutionEvidence: false
|
|
1544
|
+
}),
|
|
1545
|
+
annotateTool({
|
|
1546
|
+
name: "browser.goForward",
|
|
1547
|
+
description: "\u8BA9 browser runtime \u6807\u7B7E\u9875\u524D\u8FDB\u3002",
|
|
1548
|
+
inputSchema: {
|
|
1549
|
+
type: "object",
|
|
1550
|
+
properties: tabIdParam,
|
|
1551
|
+
required: ["tabId"]
|
|
1552
|
+
}
|
|
1553
|
+
}, {
|
|
1554
|
+
operationKind: "mutate",
|
|
1555
|
+
requiresExecutionEvidence: false
|
|
1556
|
+
}),
|
|
1557
|
+
annotateTool({
|
|
1558
|
+
name: "browser.reload",
|
|
1559
|
+
description: "\u5237\u65B0 browser runtime \u6807\u7B7E\u9875\u3002",
|
|
1560
|
+
inputSchema: {
|
|
1561
|
+
type: "object",
|
|
1562
|
+
properties: tabIdParam,
|
|
1563
|
+
required: ["tabId"]
|
|
1564
|
+
}
|
|
1565
|
+
}, {
|
|
1566
|
+
operationKind: "mutate",
|
|
1567
|
+
requiresExecutionEvidence: false
|
|
1568
|
+
}),
|
|
1569
|
+
annotateTool({
|
|
1570
|
+
name: "browser.stop",
|
|
1571
|
+
description: "\u505C\u6B62 browser runtime \u6807\u7B7E\u9875\u52A0\u8F7D\u3002",
|
|
1572
|
+
inputSchema: {
|
|
1573
|
+
type: "object",
|
|
1574
|
+
properties: tabIdParam,
|
|
1575
|
+
required: ["tabId"]
|
|
1576
|
+
}
|
|
1577
|
+
}, {
|
|
1578
|
+
operationKind: "mutate",
|
|
1579
|
+
requiresExecutionEvidence: false
|
|
1580
|
+
}),
|
|
1581
|
+
annotateTool({
|
|
1582
|
+
name: "browser.setViewportRect",
|
|
1583
|
+
description: "\u4E0A\u62A5\u63D2\u4EF6 UI \u4E2D browser viewport \u7684\u4F4D\u7F6E\u5C3A\u5BF8\uFF0C\u8BA9\u5BBF\u4E3B\u5B9A\u4F4D\u771F\u5B9E webview\u3002",
|
|
1584
|
+
inputSchema: {
|
|
1585
|
+
type: "object",
|
|
1586
|
+
properties: {
|
|
1587
|
+
tabId: { type: "string", description: "\u5F53\u524D tab ID\uFF0C\u53EF\u4E3A\u7A7A\u3002" },
|
|
1588
|
+
rect: {
|
|
1589
|
+
type: "object",
|
|
1590
|
+
properties: {
|
|
1591
|
+
x: { type: "number" },
|
|
1592
|
+
y: { type: "number" },
|
|
1593
|
+
width: { type: "number" },
|
|
1594
|
+
height: { type: "number" }
|
|
1595
|
+
},
|
|
1596
|
+
required: ["x", "y", "width", "height"]
|
|
1597
|
+
}
|
|
1598
|
+
},
|
|
1599
|
+
required: ["rect"]
|
|
1600
|
+
}
|
|
1601
|
+
}, {
|
|
1602
|
+
operationKind: "mutate",
|
|
1603
|
+
requiresExecutionEvidence: false
|
|
1604
|
+
}),
|
|
1605
|
+
annotateTool({
|
|
1606
|
+
name: "browser.respondToCertificateError",
|
|
1607
|
+
description: "\u54CD\u5E94 browser runtime \u8BC1\u4E66\u9519\u8BEF\u51B3\u7B56\u3002",
|
|
1608
|
+
inputSchema: {
|
|
1609
|
+
type: "object",
|
|
1610
|
+
properties: {
|
|
1611
|
+
requestId: { type: "string", description: "\u8BC1\u4E66\u9519\u8BEF\u8BF7\u6C42 ID\u3002" },
|
|
1612
|
+
allow: { type: "boolean", description: "\u662F\u5426\u7EE7\u7EED\u52A0\u8F7D\u8BE5\u8BC1\u4E66\u9519\u8BEF\u9875\u9762\u3002" }
|
|
1613
|
+
},
|
|
1614
|
+
required: ["requestId", "allow"]
|
|
1615
|
+
}
|
|
1616
|
+
}, {
|
|
1617
|
+
operationKind: "mutate",
|
|
1618
|
+
requiresExecutionEvidence: false
|
|
1619
|
+
})
|
|
1620
|
+
];
|
|
1621
|
+
|
|
1438
1622
|
// src/mcp/seastudio/notifications.ts
|
|
1439
1623
|
var SeastudioRequests = {
|
|
1440
1624
|
/** 请求打开文件 -> 主程序发布 FILE_OPEN_REQUESTED */
|
|
@@ -1471,6 +1655,16 @@ var SeastudioNotifications = {
|
|
|
1471
1655
|
PROPOSAL_FEEDBACK: "seastudio:proposal-feedback",
|
|
1472
1656
|
/** 插件实例请求更新宿主 plugin tab 标题 */
|
|
1473
1657
|
PLUGIN_TAB_TITLE_CHANGED: "plugin:tab-title_changed",
|
|
1658
|
+
/** Browser runtime 标签页列表或 active tab 变化 */
|
|
1659
|
+
BROWSER_TABS_CHANGED: "browser:tabs_changed",
|
|
1660
|
+
/** Browser runtime 导航状态变化 */
|
|
1661
|
+
BROWSER_NAVIGATION_STATE_CHANGED: "browser:navigation_state_changed",
|
|
1662
|
+
/** Browser runtime 加载状态变化 */
|
|
1663
|
+
BROWSER_LOAD_STATE_CHANGED: "browser:load_state_changed",
|
|
1664
|
+
/** Browser runtime 证书错误,需要插件 UI 决策 */
|
|
1665
|
+
BROWSER_CERTIFICATE_ERROR: "browser:certificate_error",
|
|
1666
|
+
/** Browser runtime 收到网页新标签请求 */
|
|
1667
|
+
BROWSER_NEW_TAB_REQUESTED: "browser:new_tab_requested",
|
|
1474
1668
|
/**
|
|
1475
1669
|
* Agent 对话 session:新建。消息历史仍由 Agent 前端持有,宿主仅同步列表用于侧栏。
|
|
1476
1670
|
* 通常由 Agent 通过 notifications/publish 发出;其他订阅者(含 host-ui)可据此更新 UI。
|
|
@@ -1515,7 +1709,8 @@ var allTools = [
|
|
|
1515
1709
|
...pluginTabTools,
|
|
1516
1710
|
...agentTabTools,
|
|
1517
1711
|
...projectTools,
|
|
1518
|
-
...skillTools
|
|
1712
|
+
...skillTools,
|
|
1713
|
+
...browserRuntimeTools
|
|
1519
1714
|
];
|
|
1520
1715
|
var tools = allTools;
|
|
1521
1716
|
|
|
@@ -1526,6 +1721,7 @@ exports.agentTabTools = agentTabTools;
|
|
|
1526
1721
|
exports.allTools = allTools;
|
|
1527
1722
|
exports.annotateTool = annotateTool;
|
|
1528
1723
|
exports.batchFlattenCopyEvidenceOutputSchema = batchFlattenCopyEvidenceOutputSchema;
|
|
1724
|
+
exports.browserRuntimeTools = browserRuntimeTools;
|
|
1529
1725
|
exports.callTool = callTool;
|
|
1530
1726
|
exports.callToolText = callToolText;
|
|
1531
1727
|
exports.dualPathEvidenceOutputSchema = dualPathEvidenceOutputSchema;
|
|
@@ -827,6 +827,17 @@ var seaCloudTools = [
|
|
|
827
827
|
];
|
|
828
828
|
|
|
829
829
|
// src/mcp/seastudio/client.ts
|
|
830
|
+
function parseToolResult(result) {
|
|
831
|
+
if (result.isError) {
|
|
832
|
+
const message = result.content.find((entry) => entry.type === "text")?.text ?? "MCP tool failed";
|
|
833
|
+
throw new Error(message);
|
|
834
|
+
}
|
|
835
|
+
if (result.structuredContent !== void 0) {
|
|
836
|
+
return result.structuredContent;
|
|
837
|
+
}
|
|
838
|
+
const text = result.content.find((entry) => entry.type === "text")?.text;
|
|
839
|
+
return text ? JSON.parse(text) : {};
|
|
840
|
+
}
|
|
830
841
|
async function callTool(name, args = {}) {
|
|
831
842
|
return getDefaultClient().callTool(name, args);
|
|
832
843
|
}
|
|
@@ -990,6 +1001,22 @@ var seastudio = {
|
|
|
990
1001
|
clearEntries: (sessionId) => callTool("seastudio-shell_session_clear_entries", { sessionId }),
|
|
991
1002
|
close: (sessionId, force = false) => callTool("seastudio-shell_session_close", { sessionId, force })
|
|
992
1003
|
}
|
|
1004
|
+
},
|
|
1005
|
+
browser: {
|
|
1006
|
+
getState: async () => parseToolResult(await callTool("browser.getState")),
|
|
1007
|
+
createTab: async (url) => parseToolResult(await callTool("browser.createTab", { url })),
|
|
1008
|
+
closeTab: async (tabId) => parseToolResult(await callTool("browser.closeTab", { tabId })),
|
|
1009
|
+
activateTab: async (tabId) => parseToolResult(await callTool("browser.activateTab", { tabId })),
|
|
1010
|
+
navigate: async (tabId, url) => parseToolResult(await callTool("browser.navigate", { tabId, url })),
|
|
1011
|
+
goBack: async (tabId) => parseToolResult(await callTool("browser.goBack", { tabId })),
|
|
1012
|
+
goForward: async (tabId) => parseToolResult(await callTool("browser.goForward", { tabId })),
|
|
1013
|
+
reload: async (tabId) => parseToolResult(await callTool("browser.reload", { tabId })),
|
|
1014
|
+
stop: async (tabId) => parseToolResult(await callTool("browser.stop", { tabId })),
|
|
1015
|
+
setViewportRect: async (tabId, rect) => parseToolResult(await callTool("browser.setViewportRect", {
|
|
1016
|
+
...tabId ? { tabId } : {},
|
|
1017
|
+
rect
|
|
1018
|
+
})),
|
|
1019
|
+
respondToCertificateError: async (requestId, allow) => parseToolResult(await callTool("browser.respondToCertificateError", { requestId, allow }))
|
|
993
1020
|
}
|
|
994
1021
|
};
|
|
995
1022
|
async function runOneShotShellCommand(command, options = {}) {
|
|
@@ -1433,6 +1460,163 @@ var skillTools = [
|
|
|
1433
1460
|
})
|
|
1434
1461
|
];
|
|
1435
1462
|
|
|
1463
|
+
// src/mcp/seastudio/tools-browser.ts
|
|
1464
|
+
var tabIdParam = {
|
|
1465
|
+
tabId: { type: "string", description: "Browser runtime tab ID" }
|
|
1466
|
+
};
|
|
1467
|
+
var browserRuntimeTools = [
|
|
1468
|
+
annotateTool({
|
|
1469
|
+
name: "browser.getState",
|
|
1470
|
+
description: "\u8BFB\u53D6\u5F53\u524D browser runtime \u6807\u7B7E\u9875\u72B6\u6001\u3002",
|
|
1471
|
+
inputSchema: {
|
|
1472
|
+
type: "object",
|
|
1473
|
+
properties: {}
|
|
1474
|
+
}
|
|
1475
|
+
}, {
|
|
1476
|
+
operationKind: "read",
|
|
1477
|
+
requiresExecutionEvidence: false
|
|
1478
|
+
}),
|
|
1479
|
+
annotateTool({
|
|
1480
|
+
name: "browser.createTab",
|
|
1481
|
+
description: "\u5728\u5BBF\u4E3B browser runtime \u4E2D\u521B\u5EFA\u4E00\u4E2A\u771F\u5B9E webview \u6807\u7B7E\u9875\uFF0C\u53EF\u9009\u4F20\u5165\u521D\u59CB URL\u3002",
|
|
1482
|
+
inputSchema: {
|
|
1483
|
+
type: "object",
|
|
1484
|
+
properties: {
|
|
1485
|
+
url: { type: "string", description: "\u521D\u59CB URL\uFF1B\u4E3A\u7A7A\u65F6\u7531\u5BBF\u4E3B\u4F7F\u7528\u9ED8\u8BA4\u9996\u9875\u3002" }
|
|
1486
|
+
}
|
|
1487
|
+
}
|
|
1488
|
+
}, {
|
|
1489
|
+
operationKind: "mutate",
|
|
1490
|
+
requiresExecutionEvidence: false
|
|
1491
|
+
}),
|
|
1492
|
+
annotateTool({
|
|
1493
|
+
name: "browser.closeTab",
|
|
1494
|
+
description: "\u5173\u95ED browser runtime \u6807\u7B7E\u9875\u3002",
|
|
1495
|
+
inputSchema: {
|
|
1496
|
+
type: "object",
|
|
1497
|
+
properties: tabIdParam,
|
|
1498
|
+
required: ["tabId"]
|
|
1499
|
+
}
|
|
1500
|
+
}, {
|
|
1501
|
+
operationKind: "mutate",
|
|
1502
|
+
requiresExecutionEvidence: false
|
|
1503
|
+
}),
|
|
1504
|
+
annotateTool({
|
|
1505
|
+
name: "browser.activateTab",
|
|
1506
|
+
description: "\u6FC0\u6D3B browser runtime \u6807\u7B7E\u9875\u3002",
|
|
1507
|
+
inputSchema: {
|
|
1508
|
+
type: "object",
|
|
1509
|
+
properties: tabIdParam,
|
|
1510
|
+
required: ["tabId"]
|
|
1511
|
+
}
|
|
1512
|
+
}, {
|
|
1513
|
+
operationKind: "mutate",
|
|
1514
|
+
requiresExecutionEvidence: false
|
|
1515
|
+
}),
|
|
1516
|
+
annotateTool({
|
|
1517
|
+
name: "browser.navigate",
|
|
1518
|
+
description: "\u8BA9 browser runtime \u6807\u7B7E\u9875\u5BFC\u822A\u5230\u6307\u5B9A URL \u6216\u641C\u7D22\u8BCD\u3002",
|
|
1519
|
+
inputSchema: {
|
|
1520
|
+
type: "object",
|
|
1521
|
+
properties: {
|
|
1522
|
+
...tabIdParam,
|
|
1523
|
+
url: { type: "string", description: "\u76EE\u6807 URL \u6216\u641C\u7D22\u8BCD\u3002" }
|
|
1524
|
+
},
|
|
1525
|
+
required: ["tabId", "url"]
|
|
1526
|
+
}
|
|
1527
|
+
}, {
|
|
1528
|
+
operationKind: "mutate",
|
|
1529
|
+
requiresExecutionEvidence: false
|
|
1530
|
+
}),
|
|
1531
|
+
annotateTool({
|
|
1532
|
+
name: "browser.goBack",
|
|
1533
|
+
description: "\u8BA9 browser runtime \u6807\u7B7E\u9875\u540E\u9000\u3002",
|
|
1534
|
+
inputSchema: {
|
|
1535
|
+
type: "object",
|
|
1536
|
+
properties: tabIdParam,
|
|
1537
|
+
required: ["tabId"]
|
|
1538
|
+
}
|
|
1539
|
+
}, {
|
|
1540
|
+
operationKind: "mutate",
|
|
1541
|
+
requiresExecutionEvidence: false
|
|
1542
|
+
}),
|
|
1543
|
+
annotateTool({
|
|
1544
|
+
name: "browser.goForward",
|
|
1545
|
+
description: "\u8BA9 browser runtime \u6807\u7B7E\u9875\u524D\u8FDB\u3002",
|
|
1546
|
+
inputSchema: {
|
|
1547
|
+
type: "object",
|
|
1548
|
+
properties: tabIdParam,
|
|
1549
|
+
required: ["tabId"]
|
|
1550
|
+
}
|
|
1551
|
+
}, {
|
|
1552
|
+
operationKind: "mutate",
|
|
1553
|
+
requiresExecutionEvidence: false
|
|
1554
|
+
}),
|
|
1555
|
+
annotateTool({
|
|
1556
|
+
name: "browser.reload",
|
|
1557
|
+
description: "\u5237\u65B0 browser runtime \u6807\u7B7E\u9875\u3002",
|
|
1558
|
+
inputSchema: {
|
|
1559
|
+
type: "object",
|
|
1560
|
+
properties: tabIdParam,
|
|
1561
|
+
required: ["tabId"]
|
|
1562
|
+
}
|
|
1563
|
+
}, {
|
|
1564
|
+
operationKind: "mutate",
|
|
1565
|
+
requiresExecutionEvidence: false
|
|
1566
|
+
}),
|
|
1567
|
+
annotateTool({
|
|
1568
|
+
name: "browser.stop",
|
|
1569
|
+
description: "\u505C\u6B62 browser runtime \u6807\u7B7E\u9875\u52A0\u8F7D\u3002",
|
|
1570
|
+
inputSchema: {
|
|
1571
|
+
type: "object",
|
|
1572
|
+
properties: tabIdParam,
|
|
1573
|
+
required: ["tabId"]
|
|
1574
|
+
}
|
|
1575
|
+
}, {
|
|
1576
|
+
operationKind: "mutate",
|
|
1577
|
+
requiresExecutionEvidence: false
|
|
1578
|
+
}),
|
|
1579
|
+
annotateTool({
|
|
1580
|
+
name: "browser.setViewportRect",
|
|
1581
|
+
description: "\u4E0A\u62A5\u63D2\u4EF6 UI \u4E2D browser viewport \u7684\u4F4D\u7F6E\u5C3A\u5BF8\uFF0C\u8BA9\u5BBF\u4E3B\u5B9A\u4F4D\u771F\u5B9E webview\u3002",
|
|
1582
|
+
inputSchema: {
|
|
1583
|
+
type: "object",
|
|
1584
|
+
properties: {
|
|
1585
|
+
tabId: { type: "string", description: "\u5F53\u524D tab ID\uFF0C\u53EF\u4E3A\u7A7A\u3002" },
|
|
1586
|
+
rect: {
|
|
1587
|
+
type: "object",
|
|
1588
|
+
properties: {
|
|
1589
|
+
x: { type: "number" },
|
|
1590
|
+
y: { type: "number" },
|
|
1591
|
+
width: { type: "number" },
|
|
1592
|
+
height: { type: "number" }
|
|
1593
|
+
},
|
|
1594
|
+
required: ["x", "y", "width", "height"]
|
|
1595
|
+
}
|
|
1596
|
+
},
|
|
1597
|
+
required: ["rect"]
|
|
1598
|
+
}
|
|
1599
|
+
}, {
|
|
1600
|
+
operationKind: "mutate",
|
|
1601
|
+
requiresExecutionEvidence: false
|
|
1602
|
+
}),
|
|
1603
|
+
annotateTool({
|
|
1604
|
+
name: "browser.respondToCertificateError",
|
|
1605
|
+
description: "\u54CD\u5E94 browser runtime \u8BC1\u4E66\u9519\u8BEF\u51B3\u7B56\u3002",
|
|
1606
|
+
inputSchema: {
|
|
1607
|
+
type: "object",
|
|
1608
|
+
properties: {
|
|
1609
|
+
requestId: { type: "string", description: "\u8BC1\u4E66\u9519\u8BEF\u8BF7\u6C42 ID\u3002" },
|
|
1610
|
+
allow: { type: "boolean", description: "\u662F\u5426\u7EE7\u7EED\u52A0\u8F7D\u8BE5\u8BC1\u4E66\u9519\u8BEF\u9875\u9762\u3002" }
|
|
1611
|
+
},
|
|
1612
|
+
required: ["requestId", "allow"]
|
|
1613
|
+
}
|
|
1614
|
+
}, {
|
|
1615
|
+
operationKind: "mutate",
|
|
1616
|
+
requiresExecutionEvidence: false
|
|
1617
|
+
})
|
|
1618
|
+
];
|
|
1619
|
+
|
|
1436
1620
|
// src/mcp/seastudio/notifications.ts
|
|
1437
1621
|
var SeastudioRequests = {
|
|
1438
1622
|
/** 请求打开文件 -> 主程序发布 FILE_OPEN_REQUESTED */
|
|
@@ -1469,6 +1653,16 @@ var SeastudioNotifications = {
|
|
|
1469
1653
|
PROPOSAL_FEEDBACK: "seastudio:proposal-feedback",
|
|
1470
1654
|
/** 插件实例请求更新宿主 plugin tab 标题 */
|
|
1471
1655
|
PLUGIN_TAB_TITLE_CHANGED: "plugin:tab-title_changed",
|
|
1656
|
+
/** Browser runtime 标签页列表或 active tab 变化 */
|
|
1657
|
+
BROWSER_TABS_CHANGED: "browser:tabs_changed",
|
|
1658
|
+
/** Browser runtime 导航状态变化 */
|
|
1659
|
+
BROWSER_NAVIGATION_STATE_CHANGED: "browser:navigation_state_changed",
|
|
1660
|
+
/** Browser runtime 加载状态变化 */
|
|
1661
|
+
BROWSER_LOAD_STATE_CHANGED: "browser:load_state_changed",
|
|
1662
|
+
/** Browser runtime 证书错误,需要插件 UI 决策 */
|
|
1663
|
+
BROWSER_CERTIFICATE_ERROR: "browser:certificate_error",
|
|
1664
|
+
/** Browser runtime 收到网页新标签请求 */
|
|
1665
|
+
BROWSER_NEW_TAB_REQUESTED: "browser:new_tab_requested",
|
|
1472
1666
|
/**
|
|
1473
1667
|
* Agent 对话 session:新建。消息历史仍由 Agent 前端持有,宿主仅同步列表用于侧栏。
|
|
1474
1668
|
* 通常由 Agent 通过 notifications/publish 发出;其他订阅者(含 host-ui)可据此更新 UI。
|
|
@@ -1513,8 +1707,9 @@ var allTools = [
|
|
|
1513
1707
|
...pluginTabTools,
|
|
1514
1708
|
...agentTabTools,
|
|
1515
1709
|
...projectTools,
|
|
1516
|
-
...skillTools
|
|
1710
|
+
...skillTools,
|
|
1711
|
+
...browserRuntimeTools
|
|
1517
1712
|
];
|
|
1518
1713
|
var tools = allTools;
|
|
1519
1714
|
|
|
1520
|
-
export { SeastudioNotifications, SeastudioRequests, agentManagementTools, agentTabTools, allTools, annotateTool, batchFlattenCopyEvidenceOutputSchema, callTool, callToolText, dualPathEvidenceOutputSchema, fileDownloadEvidenceOutputSchema, fileTools, fileUrlEvidenceOutputSchema, pluginManagementTools, pluginTabTools, projectTools, request, rootedPathEvidenceOutputSchema, rootedWriteEvidenceOutputSchema, runOneShotShellCommand, seaCloudTools, seastudio, shellSessionCloseEvidenceOutputSchema, shellSessionOpenEvidenceOutputSchema, shellSessionRunEvidenceOutputSchema, shellSessionSignalEvidenceOutputSchema, shellSessionSnapshotEvidenceOutputSchema, shellTools, skillTools, tools };
|
|
1715
|
+
export { SeastudioNotifications, SeastudioRequests, agentManagementTools, agentTabTools, allTools, annotateTool, batchFlattenCopyEvidenceOutputSchema, browserRuntimeTools, callTool, callToolText, dualPathEvidenceOutputSchema, fileDownloadEvidenceOutputSchema, fileTools, fileUrlEvidenceOutputSchema, pluginManagementTools, pluginTabTools, projectTools, request, rootedPathEvidenceOutputSchema, rootedWriteEvidenceOutputSchema, runOneShotShellCommand, seaCloudTools, seastudio, shellSessionCloseEvidenceOutputSchema, shellSessionOpenEvidenceOutputSchema, shellSessionRunEvidenceOutputSchema, shellSessionSignalEvidenceOutputSchema, shellSessionSnapshotEvidenceOutputSchema, shellTools, skillTools, tools };
|
package/dist/index.cjs
CHANGED
|
@@ -1,51 +1,51 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkN4KBTMOV_cjs = require('./chunk-N4KBTMOV.cjs');
|
|
4
4
|
var chunkUZ6SEVW3_cjs = require('./chunk-UZ6SEVW3.cjs');
|
|
5
|
-
var
|
|
5
|
+
var chunkNP6AI7I4_cjs = require('./chunk-NP6AI7I4.cjs');
|
|
6
6
|
var chunk3I7UM66P_cjs = require('./chunk-3I7UM66P.cjs');
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
Object.defineProperty(exports, "MCP_PACKAGES", {
|
|
11
11
|
enumerable: true,
|
|
12
|
-
get: function () { return
|
|
12
|
+
get: function () { return chunkN4KBTMOV_cjs.MCP_PACKAGES; }
|
|
13
13
|
});
|
|
14
14
|
Object.defineProperty(exports, "getMCPPackageIdForTool", {
|
|
15
15
|
enumerable: true,
|
|
16
|
-
get: function () { return
|
|
16
|
+
get: function () { return chunkN4KBTMOV_cjs.getMCPPackageIdForTool; }
|
|
17
17
|
});
|
|
18
18
|
Object.defineProperty(exports, "getMCPPackages", {
|
|
19
19
|
enumerable: true,
|
|
20
|
-
get: function () { return
|
|
20
|
+
get: function () { return chunkN4KBTMOV_cjs.getMCPPackages; }
|
|
21
21
|
});
|
|
22
22
|
Object.defineProperty(exports, "getMCPToolPackageIndex", {
|
|
23
23
|
enumerable: true,
|
|
24
|
-
get: function () { return
|
|
24
|
+
get: function () { return chunkN4KBTMOV_cjs.getMCPToolPackageIndex; }
|
|
25
25
|
});
|
|
26
26
|
Object.defineProperty(exports, "getToolsForLLM", {
|
|
27
27
|
enumerable: true,
|
|
28
|
-
get: function () { return
|
|
28
|
+
get: function () { return chunkN4KBTMOV_cjs.getToolsForLLM; }
|
|
29
29
|
});
|
|
30
30
|
Object.defineProperty(exports, "listAllTools", {
|
|
31
31
|
enumerable: true,
|
|
32
|
-
get: function () { return
|
|
32
|
+
get: function () { return chunkN4KBTMOV_cjs.listAllTools; }
|
|
33
33
|
});
|
|
34
34
|
Object.defineProperty(exports, "listAvailableTools", {
|
|
35
35
|
enumerable: true,
|
|
36
|
-
get: function () { return
|
|
36
|
+
get: function () { return chunkN4KBTMOV_cjs.listAvailableTools; }
|
|
37
37
|
});
|
|
38
38
|
Object.defineProperty(exports, "listAvailableToolsForLLM", {
|
|
39
39
|
enumerable: true,
|
|
40
|
-
get: function () { return
|
|
40
|
+
get: function () { return chunkN4KBTMOV_cjs.listAvailableToolsForLLM; }
|
|
41
41
|
});
|
|
42
42
|
Object.defineProperty(exports, "loadPlugin", {
|
|
43
43
|
enumerable: true,
|
|
44
|
-
get: function () { return
|
|
44
|
+
get: function () { return chunkN4KBTMOV_cjs.loadPlugin; }
|
|
45
45
|
});
|
|
46
46
|
Object.defineProperty(exports, "mcpToolToOpenAI", {
|
|
47
47
|
enumerable: true,
|
|
48
|
-
get: function () { return
|
|
48
|
+
get: function () { return chunkN4KBTMOV_cjs.mcpToolToOpenAI; }
|
|
49
49
|
});
|
|
50
50
|
Object.defineProperty(exports, "DialogBody", {
|
|
51
51
|
enumerable: true,
|
|
@@ -101,51 +101,51 @@ Object.defineProperty(exports, "showHostContextMenu", {
|
|
|
101
101
|
});
|
|
102
102
|
Object.defineProperty(exports, "SeastudioNotifications", {
|
|
103
103
|
enumerable: true,
|
|
104
|
-
get: function () { return
|
|
104
|
+
get: function () { return chunkNP6AI7I4_cjs.SeastudioNotifications; }
|
|
105
105
|
});
|
|
106
106
|
Object.defineProperty(exports, "SeastudioRequests", {
|
|
107
107
|
enumerable: true,
|
|
108
|
-
get: function () { return
|
|
108
|
+
get: function () { return chunkNP6AI7I4_cjs.SeastudioRequests; }
|
|
109
109
|
});
|
|
110
110
|
Object.defineProperty(exports, "agentManagementTools", {
|
|
111
111
|
enumerable: true,
|
|
112
|
-
get: function () { return
|
|
112
|
+
get: function () { return chunkNP6AI7I4_cjs.agentManagementTools; }
|
|
113
113
|
});
|
|
114
114
|
Object.defineProperty(exports, "agentTabTools", {
|
|
115
115
|
enumerable: true,
|
|
116
|
-
get: function () { return
|
|
116
|
+
get: function () { return chunkNP6AI7I4_cjs.agentTabTools; }
|
|
117
117
|
});
|
|
118
118
|
Object.defineProperty(exports, "fileTools", {
|
|
119
119
|
enumerable: true,
|
|
120
|
-
get: function () { return
|
|
120
|
+
get: function () { return chunkNP6AI7I4_cjs.fileTools; }
|
|
121
121
|
});
|
|
122
122
|
Object.defineProperty(exports, "pluginManagementTools", {
|
|
123
123
|
enumerable: true,
|
|
124
|
-
get: function () { return
|
|
124
|
+
get: function () { return chunkNP6AI7I4_cjs.pluginManagementTools; }
|
|
125
125
|
});
|
|
126
126
|
Object.defineProperty(exports, "pluginTabTools", {
|
|
127
127
|
enumerable: true,
|
|
128
|
-
get: function () { return
|
|
128
|
+
get: function () { return chunkNP6AI7I4_cjs.pluginTabTools; }
|
|
129
129
|
});
|
|
130
130
|
Object.defineProperty(exports, "seaCloudTools", {
|
|
131
131
|
enumerable: true,
|
|
132
|
-
get: function () { return
|
|
132
|
+
get: function () { return chunkNP6AI7I4_cjs.seaCloudTools; }
|
|
133
133
|
});
|
|
134
134
|
Object.defineProperty(exports, "seastudio", {
|
|
135
135
|
enumerable: true,
|
|
136
|
-
get: function () { return
|
|
136
|
+
get: function () { return chunkNP6AI7I4_cjs.seastudio; }
|
|
137
137
|
});
|
|
138
138
|
Object.defineProperty(exports, "seastudioAllTools", {
|
|
139
139
|
enumerable: true,
|
|
140
|
-
get: function () { return
|
|
140
|
+
get: function () { return chunkNP6AI7I4_cjs.allTools; }
|
|
141
141
|
});
|
|
142
142
|
Object.defineProperty(exports, "seastudioTools", {
|
|
143
143
|
enumerable: true,
|
|
144
|
-
get: function () { return
|
|
144
|
+
get: function () { return chunkNP6AI7I4_cjs.tools; }
|
|
145
145
|
});
|
|
146
146
|
Object.defineProperty(exports, "shellTools", {
|
|
147
147
|
enumerable: true,
|
|
148
|
-
get: function () { return
|
|
148
|
+
get: function () { return chunkNP6AI7I4_cjs.shellTools; }
|
|
149
149
|
});
|
|
150
150
|
Object.defineProperty(exports, "MCPClient", {
|
|
151
151
|
enumerable: true,
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { MCP_PACKAGES, getMCPPackageIdForTool, getMCPPackages, getMCPToolPackageIndex, getToolsForLLM, listAllTools, listAvailableTools, listAvailableToolsForLLM, loadPlugin, mcpToolToOpenAI } from './chunk-
|
|
1
|
+
export { MCP_PACKAGES, getMCPPackageIdForTool, getMCPPackages, getMCPToolPackageIndex, getToolsForLLM, listAllTools, listAvailableTools, listAvailableToolsForLLM, loadPlugin, mcpToolToOpenAI } from './chunk-BFJ2EFTV.js';
|
|
2
2
|
export { DialogBody, DialogButton, DialogContainer, DialogFooter, DialogHeader, DialogOverlay, MenuContainer, MenuEmpty, MenuItem, MenuSeparator, Tab, cn, showHostContextMenu } from './chunk-XWORXNCU.js';
|
|
3
|
-
export { SeastudioNotifications, SeastudioRequests, agentManagementTools, agentTabTools, fileTools, pluginManagementTools, pluginTabTools, seaCloudTools, seastudio, allTools as seastudioAllTools, tools as seastudioTools, shellTools } from './chunk-
|
|
3
|
+
export { SeastudioNotifications, SeastudioRequests, agentManagementTools, agentTabTools, fileTools, pluginManagementTools, pluginTabTools, seaCloudTools, seastudio, allTools as seastudioAllTools, tools as seastudioTools, shellTools } from './chunk-UFFMPHL3.js';
|
|
4
4
|
export { MCPClient, MCPServer, PostMessageTransport, callHostTool, callHostToolText, createMCPClient, createMCPServer, createNotification, createRequest, createResponse, getDefaultClient, getDefaultServer, getDefaultTransport, isMCPMessage, isNotification, normalizeMCPTool, normalizeMCPToolInputSchema, normalizeMCPToolObjectSchema, setDefaultClient, setDefaultTransport, startDefaultServer } from './chunk-TJ3CGHWJ.js';
|
package/dist/mcp/index.cjs
CHANGED
|
@@ -1,98 +1,98 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
3
|
+
var chunkN4KBTMOV_cjs = require('../chunk-N4KBTMOV.cjs');
|
|
4
|
+
var chunkNP6AI7I4_cjs = require('../chunk-NP6AI7I4.cjs');
|
|
5
5
|
var chunk3I7UM66P_cjs = require('../chunk-3I7UM66P.cjs');
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
Object.defineProperty(exports, "MCP_PACKAGES", {
|
|
10
10
|
enumerable: true,
|
|
11
|
-
get: function () { return
|
|
11
|
+
get: function () { return chunkN4KBTMOV_cjs.MCP_PACKAGES; }
|
|
12
12
|
});
|
|
13
13
|
Object.defineProperty(exports, "getMCPPackageIdForTool", {
|
|
14
14
|
enumerable: true,
|
|
15
|
-
get: function () { return
|
|
15
|
+
get: function () { return chunkN4KBTMOV_cjs.getMCPPackageIdForTool; }
|
|
16
16
|
});
|
|
17
17
|
Object.defineProperty(exports, "getMCPPackages", {
|
|
18
18
|
enumerable: true,
|
|
19
|
-
get: function () { return
|
|
19
|
+
get: function () { return chunkN4KBTMOV_cjs.getMCPPackages; }
|
|
20
20
|
});
|
|
21
21
|
Object.defineProperty(exports, "getMCPToolPackageIndex", {
|
|
22
22
|
enumerable: true,
|
|
23
|
-
get: function () { return
|
|
23
|
+
get: function () { return chunkN4KBTMOV_cjs.getMCPToolPackageIndex; }
|
|
24
24
|
});
|
|
25
25
|
Object.defineProperty(exports, "getToolsForLLM", {
|
|
26
26
|
enumerable: true,
|
|
27
|
-
get: function () { return
|
|
27
|
+
get: function () { return chunkN4KBTMOV_cjs.getToolsForLLM; }
|
|
28
28
|
});
|
|
29
29
|
Object.defineProperty(exports, "listAllTools", {
|
|
30
30
|
enumerable: true,
|
|
31
|
-
get: function () { return
|
|
31
|
+
get: function () { return chunkN4KBTMOV_cjs.listAllTools; }
|
|
32
32
|
});
|
|
33
33
|
Object.defineProperty(exports, "listAvailableTools", {
|
|
34
34
|
enumerable: true,
|
|
35
|
-
get: function () { return
|
|
35
|
+
get: function () { return chunkN4KBTMOV_cjs.listAvailableTools; }
|
|
36
36
|
});
|
|
37
37
|
Object.defineProperty(exports, "listAvailableToolsForLLM", {
|
|
38
38
|
enumerable: true,
|
|
39
|
-
get: function () { return
|
|
39
|
+
get: function () { return chunkN4KBTMOV_cjs.listAvailableToolsForLLM; }
|
|
40
40
|
});
|
|
41
41
|
Object.defineProperty(exports, "loadPlugin", {
|
|
42
42
|
enumerable: true,
|
|
43
|
-
get: function () { return
|
|
43
|
+
get: function () { return chunkN4KBTMOV_cjs.loadPlugin; }
|
|
44
44
|
});
|
|
45
45
|
Object.defineProperty(exports, "mcpToolToOpenAI", {
|
|
46
46
|
enumerable: true,
|
|
47
|
-
get: function () { return
|
|
47
|
+
get: function () { return chunkN4KBTMOV_cjs.mcpToolToOpenAI; }
|
|
48
48
|
});
|
|
49
49
|
Object.defineProperty(exports, "SeastudioNotifications", {
|
|
50
50
|
enumerable: true,
|
|
51
|
-
get: function () { return
|
|
51
|
+
get: function () { return chunkNP6AI7I4_cjs.SeastudioNotifications; }
|
|
52
52
|
});
|
|
53
53
|
Object.defineProperty(exports, "SeastudioRequests", {
|
|
54
54
|
enumerable: true,
|
|
55
|
-
get: function () { return
|
|
55
|
+
get: function () { return chunkNP6AI7I4_cjs.SeastudioRequests; }
|
|
56
56
|
});
|
|
57
57
|
Object.defineProperty(exports, "agentManagementTools", {
|
|
58
58
|
enumerable: true,
|
|
59
|
-
get: function () { return
|
|
59
|
+
get: function () { return chunkNP6AI7I4_cjs.agentManagementTools; }
|
|
60
60
|
});
|
|
61
61
|
Object.defineProperty(exports, "agentTabTools", {
|
|
62
62
|
enumerable: true,
|
|
63
|
-
get: function () { return
|
|
63
|
+
get: function () { return chunkNP6AI7I4_cjs.agentTabTools; }
|
|
64
64
|
});
|
|
65
65
|
Object.defineProperty(exports, "fileTools", {
|
|
66
66
|
enumerable: true,
|
|
67
|
-
get: function () { return
|
|
67
|
+
get: function () { return chunkNP6AI7I4_cjs.fileTools; }
|
|
68
68
|
});
|
|
69
69
|
Object.defineProperty(exports, "pluginManagementTools", {
|
|
70
70
|
enumerable: true,
|
|
71
|
-
get: function () { return
|
|
71
|
+
get: function () { return chunkNP6AI7I4_cjs.pluginManagementTools; }
|
|
72
72
|
});
|
|
73
73
|
Object.defineProperty(exports, "pluginTabTools", {
|
|
74
74
|
enumerable: true,
|
|
75
|
-
get: function () { return
|
|
75
|
+
get: function () { return chunkNP6AI7I4_cjs.pluginTabTools; }
|
|
76
76
|
});
|
|
77
77
|
Object.defineProperty(exports, "seaCloudTools", {
|
|
78
78
|
enumerable: true,
|
|
79
|
-
get: function () { return
|
|
79
|
+
get: function () { return chunkNP6AI7I4_cjs.seaCloudTools; }
|
|
80
80
|
});
|
|
81
81
|
Object.defineProperty(exports, "seastudio", {
|
|
82
82
|
enumerable: true,
|
|
83
|
-
get: function () { return
|
|
83
|
+
get: function () { return chunkNP6AI7I4_cjs.seastudio; }
|
|
84
84
|
});
|
|
85
85
|
Object.defineProperty(exports, "seastudioAllTools", {
|
|
86
86
|
enumerable: true,
|
|
87
|
-
get: function () { return
|
|
87
|
+
get: function () { return chunkNP6AI7I4_cjs.allTools; }
|
|
88
88
|
});
|
|
89
89
|
Object.defineProperty(exports, "seastudioTools", {
|
|
90
90
|
enumerable: true,
|
|
91
|
-
get: function () { return
|
|
91
|
+
get: function () { return chunkNP6AI7I4_cjs.tools; }
|
|
92
92
|
});
|
|
93
93
|
Object.defineProperty(exports, "shellTools", {
|
|
94
94
|
enumerable: true,
|
|
95
|
-
get: function () { return
|
|
95
|
+
get: function () { return chunkNP6AI7I4_cjs.shellTools; }
|
|
96
96
|
});
|
|
97
97
|
Object.defineProperty(exports, "MCPClient", {
|
|
98
98
|
enumerable: true,
|
package/dist/mcp/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { MCP_PACKAGES, getMCPPackageIdForTool, getMCPPackages, getMCPToolPackageIndex, getToolsForLLM, listAllTools, listAvailableTools, listAvailableToolsForLLM, loadPlugin, mcpToolToOpenAI } from '../chunk-
|
|
2
|
-
export { SeastudioNotifications, SeastudioRequests, agentManagementTools, agentTabTools, fileTools, pluginManagementTools, pluginTabTools, seaCloudTools, seastudio, allTools as seastudioAllTools, tools as seastudioTools, shellTools } from '../chunk-
|
|
1
|
+
export { MCP_PACKAGES, getMCPPackageIdForTool, getMCPPackages, getMCPToolPackageIndex, getToolsForLLM, listAllTools, listAvailableTools, listAvailableToolsForLLM, loadPlugin, mcpToolToOpenAI } from '../chunk-BFJ2EFTV.js';
|
|
2
|
+
export { SeastudioNotifications, SeastudioRequests, agentManagementTools, agentTabTools, fileTools, pluginManagementTools, pluginTabTools, seaCloudTools, seastudio, allTools as seastudioAllTools, tools as seastudioTools, shellTools } from '../chunk-UFFMPHL3.js';
|
|
3
3
|
export { MCPClient, MCPServer, PostMessageTransport, callHostTool, callHostToolText, createMCPClient, createMCPServer, createNotification, createRequest, createResponse, getDefaultClient, getDefaultServer, getDefaultTransport, isMCPMessage, isNotification, normalizeMCPTool, normalizeMCPToolInputSchema, normalizeMCPToolObjectSchema, setDefaultClient, setDefaultTransport, startDefaultServer } from '../chunk-TJ3CGHWJ.js';
|
|
@@ -1,127 +1,131 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkNP6AI7I4_cjs = require('../../chunk-NP6AI7I4.cjs');
|
|
4
4
|
require('../../chunk-3I7UM66P.cjs');
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
Object.defineProperty(exports, "SeastudioNotifications", {
|
|
9
9
|
enumerable: true,
|
|
10
|
-
get: function () { return
|
|
10
|
+
get: function () { return chunkNP6AI7I4_cjs.SeastudioNotifications; }
|
|
11
11
|
});
|
|
12
12
|
Object.defineProperty(exports, "SeastudioRequests", {
|
|
13
13
|
enumerable: true,
|
|
14
|
-
get: function () { return
|
|
14
|
+
get: function () { return chunkNP6AI7I4_cjs.SeastudioRequests; }
|
|
15
15
|
});
|
|
16
16
|
Object.defineProperty(exports, "agentManagementTools", {
|
|
17
17
|
enumerable: true,
|
|
18
|
-
get: function () { return
|
|
18
|
+
get: function () { return chunkNP6AI7I4_cjs.agentManagementTools; }
|
|
19
19
|
});
|
|
20
20
|
Object.defineProperty(exports, "agentTabTools", {
|
|
21
21
|
enumerable: true,
|
|
22
|
-
get: function () { return
|
|
22
|
+
get: function () { return chunkNP6AI7I4_cjs.agentTabTools; }
|
|
23
23
|
});
|
|
24
24
|
Object.defineProperty(exports, "allTools", {
|
|
25
25
|
enumerable: true,
|
|
26
|
-
get: function () { return
|
|
26
|
+
get: function () { return chunkNP6AI7I4_cjs.allTools; }
|
|
27
27
|
});
|
|
28
28
|
Object.defineProperty(exports, "annotateTool", {
|
|
29
29
|
enumerable: true,
|
|
30
|
-
get: function () { return
|
|
30
|
+
get: function () { return chunkNP6AI7I4_cjs.annotateTool; }
|
|
31
31
|
});
|
|
32
32
|
Object.defineProperty(exports, "batchFlattenCopyEvidenceOutputSchema", {
|
|
33
33
|
enumerable: true,
|
|
34
|
-
get: function () { return
|
|
34
|
+
get: function () { return chunkNP6AI7I4_cjs.batchFlattenCopyEvidenceOutputSchema; }
|
|
35
|
+
});
|
|
36
|
+
Object.defineProperty(exports, "browserRuntimeTools", {
|
|
37
|
+
enumerable: true,
|
|
38
|
+
get: function () { return chunkNP6AI7I4_cjs.browserRuntimeTools; }
|
|
35
39
|
});
|
|
36
40
|
Object.defineProperty(exports, "callTool", {
|
|
37
41
|
enumerable: true,
|
|
38
|
-
get: function () { return
|
|
42
|
+
get: function () { return chunkNP6AI7I4_cjs.callTool; }
|
|
39
43
|
});
|
|
40
44
|
Object.defineProperty(exports, "callToolText", {
|
|
41
45
|
enumerable: true,
|
|
42
|
-
get: function () { return
|
|
46
|
+
get: function () { return chunkNP6AI7I4_cjs.callToolText; }
|
|
43
47
|
});
|
|
44
48
|
Object.defineProperty(exports, "dualPathEvidenceOutputSchema", {
|
|
45
49
|
enumerable: true,
|
|
46
|
-
get: function () { return
|
|
50
|
+
get: function () { return chunkNP6AI7I4_cjs.dualPathEvidenceOutputSchema; }
|
|
47
51
|
});
|
|
48
52
|
Object.defineProperty(exports, "fileDownloadEvidenceOutputSchema", {
|
|
49
53
|
enumerable: true,
|
|
50
|
-
get: function () { return
|
|
54
|
+
get: function () { return chunkNP6AI7I4_cjs.fileDownloadEvidenceOutputSchema; }
|
|
51
55
|
});
|
|
52
56
|
Object.defineProperty(exports, "fileTools", {
|
|
53
57
|
enumerable: true,
|
|
54
|
-
get: function () { return
|
|
58
|
+
get: function () { return chunkNP6AI7I4_cjs.fileTools; }
|
|
55
59
|
});
|
|
56
60
|
Object.defineProperty(exports, "fileUrlEvidenceOutputSchema", {
|
|
57
61
|
enumerable: true,
|
|
58
|
-
get: function () { return
|
|
62
|
+
get: function () { return chunkNP6AI7I4_cjs.fileUrlEvidenceOutputSchema; }
|
|
59
63
|
});
|
|
60
64
|
Object.defineProperty(exports, "pluginManagementTools", {
|
|
61
65
|
enumerable: true,
|
|
62
|
-
get: function () { return
|
|
66
|
+
get: function () { return chunkNP6AI7I4_cjs.pluginManagementTools; }
|
|
63
67
|
});
|
|
64
68
|
Object.defineProperty(exports, "pluginTabTools", {
|
|
65
69
|
enumerable: true,
|
|
66
|
-
get: function () { return
|
|
70
|
+
get: function () { return chunkNP6AI7I4_cjs.pluginTabTools; }
|
|
67
71
|
});
|
|
68
72
|
Object.defineProperty(exports, "projectTools", {
|
|
69
73
|
enumerable: true,
|
|
70
|
-
get: function () { return
|
|
74
|
+
get: function () { return chunkNP6AI7I4_cjs.projectTools; }
|
|
71
75
|
});
|
|
72
76
|
Object.defineProperty(exports, "request", {
|
|
73
77
|
enumerable: true,
|
|
74
|
-
get: function () { return
|
|
78
|
+
get: function () { return chunkNP6AI7I4_cjs.request; }
|
|
75
79
|
});
|
|
76
80
|
Object.defineProperty(exports, "rootedPathEvidenceOutputSchema", {
|
|
77
81
|
enumerable: true,
|
|
78
|
-
get: function () { return
|
|
82
|
+
get: function () { return chunkNP6AI7I4_cjs.rootedPathEvidenceOutputSchema; }
|
|
79
83
|
});
|
|
80
84
|
Object.defineProperty(exports, "rootedWriteEvidenceOutputSchema", {
|
|
81
85
|
enumerable: true,
|
|
82
|
-
get: function () { return
|
|
86
|
+
get: function () { return chunkNP6AI7I4_cjs.rootedWriteEvidenceOutputSchema; }
|
|
83
87
|
});
|
|
84
88
|
Object.defineProperty(exports, "runOneShotShellCommand", {
|
|
85
89
|
enumerable: true,
|
|
86
|
-
get: function () { return
|
|
90
|
+
get: function () { return chunkNP6AI7I4_cjs.runOneShotShellCommand; }
|
|
87
91
|
});
|
|
88
92
|
Object.defineProperty(exports, "seaCloudTools", {
|
|
89
93
|
enumerable: true,
|
|
90
|
-
get: function () { return
|
|
94
|
+
get: function () { return chunkNP6AI7I4_cjs.seaCloudTools; }
|
|
91
95
|
});
|
|
92
96
|
Object.defineProperty(exports, "seastudio", {
|
|
93
97
|
enumerable: true,
|
|
94
|
-
get: function () { return
|
|
98
|
+
get: function () { return chunkNP6AI7I4_cjs.seastudio; }
|
|
95
99
|
});
|
|
96
100
|
Object.defineProperty(exports, "shellSessionCloseEvidenceOutputSchema", {
|
|
97
101
|
enumerable: true,
|
|
98
|
-
get: function () { return
|
|
102
|
+
get: function () { return chunkNP6AI7I4_cjs.shellSessionCloseEvidenceOutputSchema; }
|
|
99
103
|
});
|
|
100
104
|
Object.defineProperty(exports, "shellSessionOpenEvidenceOutputSchema", {
|
|
101
105
|
enumerable: true,
|
|
102
|
-
get: function () { return
|
|
106
|
+
get: function () { return chunkNP6AI7I4_cjs.shellSessionOpenEvidenceOutputSchema; }
|
|
103
107
|
});
|
|
104
108
|
Object.defineProperty(exports, "shellSessionRunEvidenceOutputSchema", {
|
|
105
109
|
enumerable: true,
|
|
106
|
-
get: function () { return
|
|
110
|
+
get: function () { return chunkNP6AI7I4_cjs.shellSessionRunEvidenceOutputSchema; }
|
|
107
111
|
});
|
|
108
112
|
Object.defineProperty(exports, "shellSessionSignalEvidenceOutputSchema", {
|
|
109
113
|
enumerable: true,
|
|
110
|
-
get: function () { return
|
|
114
|
+
get: function () { return chunkNP6AI7I4_cjs.shellSessionSignalEvidenceOutputSchema; }
|
|
111
115
|
});
|
|
112
116
|
Object.defineProperty(exports, "shellSessionSnapshotEvidenceOutputSchema", {
|
|
113
117
|
enumerable: true,
|
|
114
|
-
get: function () { return
|
|
118
|
+
get: function () { return chunkNP6AI7I4_cjs.shellSessionSnapshotEvidenceOutputSchema; }
|
|
115
119
|
});
|
|
116
120
|
Object.defineProperty(exports, "shellTools", {
|
|
117
121
|
enumerable: true,
|
|
118
|
-
get: function () { return
|
|
122
|
+
get: function () { return chunkNP6AI7I4_cjs.shellTools; }
|
|
119
123
|
});
|
|
120
124
|
Object.defineProperty(exports, "skillTools", {
|
|
121
125
|
enumerable: true,
|
|
122
|
-
get: function () { return
|
|
126
|
+
get: function () { return chunkNP6AI7I4_cjs.skillTools; }
|
|
123
127
|
});
|
|
124
128
|
Object.defineProperty(exports, "tools", {
|
|
125
129
|
enumerable: true,
|
|
126
|
-
get: function () { return
|
|
130
|
+
get: function () { return chunkNP6AI7I4_cjs.tools; }
|
|
127
131
|
});
|
|
@@ -200,6 +200,32 @@ interface SeastudioShellOneShotResult {
|
|
|
200
200
|
durationMs: number;
|
|
201
201
|
timedOut: boolean;
|
|
202
202
|
}
|
|
203
|
+
type SeastudioBrowserStatus = 'idle' | 'loading' | 'ready' | 'error';
|
|
204
|
+
interface SeastudioBrowserCertificateError {
|
|
205
|
+
requestId: string;
|
|
206
|
+
url: string;
|
|
207
|
+
error: string;
|
|
208
|
+
}
|
|
209
|
+
interface SeastudioBrowserTab {
|
|
210
|
+
id: string;
|
|
211
|
+
title: string;
|
|
212
|
+
url: string | null;
|
|
213
|
+
status: SeastudioBrowserStatus;
|
|
214
|
+
errorMessage: string | null;
|
|
215
|
+
canGoBack: boolean;
|
|
216
|
+
canGoForward: boolean;
|
|
217
|
+
certificateError?: SeastudioBrowserCertificateError | null;
|
|
218
|
+
}
|
|
219
|
+
interface SeastudioBrowserState {
|
|
220
|
+
tabs: SeastudioBrowserTab[];
|
|
221
|
+
activeTabId: string | null;
|
|
222
|
+
}
|
|
223
|
+
interface SeastudioBrowserRect {
|
|
224
|
+
x: number;
|
|
225
|
+
y: number;
|
|
226
|
+
width: number;
|
|
227
|
+
height: number;
|
|
228
|
+
}
|
|
203
229
|
declare function callTool(name: string, args?: Record<string, unknown>): Promise<MCPToolResult>;
|
|
204
230
|
declare function request<T = unknown>(method: string, params?: Record<string, unknown>): Promise<T>;
|
|
205
231
|
declare function callToolText(name: string, args?: Record<string, unknown>): Promise<string>;
|
|
@@ -254,6 +280,42 @@ declare const seastudio: {
|
|
|
254
280
|
close: (sessionId: string, force?: boolean) => Promise<MCPToolResult>;
|
|
255
281
|
};
|
|
256
282
|
};
|
|
283
|
+
browser: {
|
|
284
|
+
getState: () => Promise<SeastudioBrowserState>;
|
|
285
|
+
createTab: (url?: string) => Promise<{
|
|
286
|
+
tab: SeastudioBrowserTab;
|
|
287
|
+
activeTabId: string;
|
|
288
|
+
}>;
|
|
289
|
+
closeTab: (tabId: string) => Promise<{
|
|
290
|
+
ok: boolean;
|
|
291
|
+
activeTabId: string | null;
|
|
292
|
+
}>;
|
|
293
|
+
activateTab: (tabId: string) => Promise<{
|
|
294
|
+
ok: boolean;
|
|
295
|
+
}>;
|
|
296
|
+
navigate: (tabId: string, url: string) => Promise<{
|
|
297
|
+
ok: boolean;
|
|
298
|
+
url: string;
|
|
299
|
+
}>;
|
|
300
|
+
goBack: (tabId: string) => Promise<{
|
|
301
|
+
ok: boolean;
|
|
302
|
+
}>;
|
|
303
|
+
goForward: (tabId: string) => Promise<{
|
|
304
|
+
ok: boolean;
|
|
305
|
+
}>;
|
|
306
|
+
reload: (tabId: string) => Promise<{
|
|
307
|
+
ok: boolean;
|
|
308
|
+
}>;
|
|
309
|
+
stop: (tabId: string) => Promise<{
|
|
310
|
+
ok: boolean;
|
|
311
|
+
}>;
|
|
312
|
+
setViewportRect: (tabId: string | null, rect: SeastudioBrowserRect) => Promise<{
|
|
313
|
+
ok: boolean;
|
|
314
|
+
}>;
|
|
315
|
+
respondToCertificateError: (requestId: string, allow: boolean) => Promise<{
|
|
316
|
+
ok: boolean;
|
|
317
|
+
}>;
|
|
318
|
+
};
|
|
257
319
|
};
|
|
258
320
|
/**
|
|
259
321
|
* One-shot helper: open a transient session, run command, wait, close.
|
|
@@ -302,6 +364,15 @@ declare const projectTools: MCPTool[];
|
|
|
302
364
|
|
|
303
365
|
declare const skillTools: MCPTool[];
|
|
304
366
|
|
|
367
|
+
/**
|
|
368
|
+
* Browser Runtime MCP Tools
|
|
369
|
+
*
|
|
370
|
+
* 这些定义描述 browser runtime bridge 支持的协议能力。
|
|
371
|
+
* 插件通过标准 MCP tools/call 调用,宿主在声明 browser runtime capability 后实现这些工具。
|
|
372
|
+
*/
|
|
373
|
+
|
|
374
|
+
declare const browserRuntimeTools: MCPTool[];
|
|
375
|
+
|
|
305
376
|
/**
|
|
306
377
|
* SeaStudio MCP Notifications
|
|
307
378
|
*
|
|
@@ -384,6 +455,16 @@ declare const SeastudioNotifications: {
|
|
|
384
455
|
readonly PROPOSAL_FEEDBACK: "seastudio:proposal-feedback";
|
|
385
456
|
/** 插件实例请求更新宿主 plugin tab 标题 */
|
|
386
457
|
readonly PLUGIN_TAB_TITLE_CHANGED: "plugin:tab-title_changed";
|
|
458
|
+
/** Browser runtime 标签页列表或 active tab 变化 */
|
|
459
|
+
readonly BROWSER_TABS_CHANGED: "browser:tabs_changed";
|
|
460
|
+
/** Browser runtime 导航状态变化 */
|
|
461
|
+
readonly BROWSER_NAVIGATION_STATE_CHANGED: "browser:navigation_state_changed";
|
|
462
|
+
/** Browser runtime 加载状态变化 */
|
|
463
|
+
readonly BROWSER_LOAD_STATE_CHANGED: "browser:load_state_changed";
|
|
464
|
+
/** Browser runtime 证书错误,需要插件 UI 决策 */
|
|
465
|
+
readonly BROWSER_CERTIFICATE_ERROR: "browser:certificate_error";
|
|
466
|
+
/** Browser runtime 收到网页新标签请求 */
|
|
467
|
+
readonly BROWSER_NEW_TAB_REQUESTED: "browser:new_tab_requested";
|
|
387
468
|
/**
|
|
388
469
|
* Agent 对话 session:新建。消息历史仍由 Agent 前端持有,宿主仅同步列表用于侧栏。
|
|
389
470
|
* 通常由 Agent 通过 notifications/publish 发出;其他订阅者(含 host-ui)可据此更新 UI。
|
|
@@ -690,4 +771,4 @@ interface SessionDeleteRequestedParams {
|
|
|
690
771
|
declare const allTools: MCPTool[];
|
|
691
772
|
declare const tools: MCPTool[];
|
|
692
773
|
|
|
693
|
-
export { type AgentInstanceSessionSnapshot, type FileDeletedParams, type FileModifiedParams, type FileOpenRequestedParams, type FileRenamedParams, type FileSavedParams, type FileSelectedParams, type FileSendRequestedParams, type FileTransferRequestedParams, type FilesChangedParams, type PluginTabTitleChangedParams, type ProposalFeedbackFileSummary, type ProposalFeedbackHunk, type ProposalFeedbackOrigin, type ProposalFeedbackParams, type RootsChangedParams, type SeastudioBatchFlattenCopyOptions, type SeastudioBatchFlattenPreviewOptions, type SeastudioDragDropParams, type SeastudioDragEnterParams, type SeastudioDragFileData, type SeastudioDragRootId, type SeastudioDragStartParams, type SeastudioFileDownloadOptions, type SeastudioFileInfo, type SeastudioFileInfoOptions, type SeastudioFileListOptions, type SeastudioFileReadOptions, type SeastudioFileSearchMatch, type SeastudioFileSearchOptions, type SeastudioFileTransferOptions, type SeastudioFileTreeOptions, type SeastudioFilesystemRoot, type SeastudioFilesystemRootId, SeastudioNotifications, type SeastudioProjectInfo, SeastudioRequests, type SeastudioRootId, type SeastudioShellCloseResult, type SeastudioShellEntry, type SeastudioShellEntryLevel, type SeastudioShellGetEntriesOptions, type SeastudioShellGetEntriesResult, type SeastudioShellKind, type SeastudioShellOneShotResult, type SeastudioShellOpenOptions, type SeastudioShellRunOptions, type SeastudioShellRunResult, type SeastudioShellSession, type SeastudioShellSignalResult, type SeastudioShellWaitResult, type SeastudioSinglePathOptions, type SeastudioWorkspacePathMode, type SessionCreatedParams, type SessionDeleteRequestedParams, type SessionNewRequestedParams, type SessionNotificationBase, type SessionRemovedParams, type SessionSelectedParams, type SessionSelectedReason, type SessionSnapshotItem, type SessionStateSnapshotParams, type SessionStatus, type SessionStatusParams, type SessionSummaryParams, type TextSendRequestedParams, type TextSendRequestedSelectionRange, type TextSendRequestedSource, agentManagementTools, agentTabTools, allTools, annotateTool, batchFlattenCopyEvidenceOutputSchema, callTool, callToolText, dualPathEvidenceOutputSchema, fileDownloadEvidenceOutputSchema, fileTools, fileUrlEvidenceOutputSchema, pluginManagementTools, pluginTabTools, projectTools, request, rootedPathEvidenceOutputSchema, rootedWriteEvidenceOutputSchema, runOneShotShellCommand, seaCloudTools, seastudio, shellSessionCloseEvidenceOutputSchema, shellSessionOpenEvidenceOutputSchema, shellSessionRunEvidenceOutputSchema, shellSessionSignalEvidenceOutputSchema, shellSessionSnapshotEvidenceOutputSchema, shellTools, skillTools, tools };
|
|
774
|
+
export { type AgentInstanceSessionSnapshot, type FileDeletedParams, type FileModifiedParams, type FileOpenRequestedParams, type FileRenamedParams, type FileSavedParams, type FileSelectedParams, type FileSendRequestedParams, type FileTransferRequestedParams, type FilesChangedParams, type PluginTabTitleChangedParams, type ProposalFeedbackFileSummary, type ProposalFeedbackHunk, type ProposalFeedbackOrigin, type ProposalFeedbackParams, type RootsChangedParams, type SeastudioBatchFlattenCopyOptions, type SeastudioBatchFlattenPreviewOptions, type SeastudioBrowserCertificateError, type SeastudioBrowserRect, type SeastudioBrowserState, type SeastudioBrowserStatus, type SeastudioBrowserTab, type SeastudioDragDropParams, type SeastudioDragEnterParams, type SeastudioDragFileData, type SeastudioDragRootId, type SeastudioDragStartParams, type SeastudioFileDownloadOptions, type SeastudioFileInfo, type SeastudioFileInfoOptions, type SeastudioFileListOptions, type SeastudioFileReadOptions, type SeastudioFileSearchMatch, type SeastudioFileSearchOptions, type SeastudioFileTransferOptions, type SeastudioFileTreeOptions, type SeastudioFilesystemRoot, type SeastudioFilesystemRootId, SeastudioNotifications, type SeastudioProjectInfo, SeastudioRequests, type SeastudioRootId, type SeastudioShellCloseResult, type SeastudioShellEntry, type SeastudioShellEntryLevel, type SeastudioShellGetEntriesOptions, type SeastudioShellGetEntriesResult, type SeastudioShellKind, type SeastudioShellOneShotResult, type SeastudioShellOpenOptions, type SeastudioShellRunOptions, type SeastudioShellRunResult, type SeastudioShellSession, type SeastudioShellSignalResult, type SeastudioShellWaitResult, type SeastudioSinglePathOptions, type SeastudioWorkspacePathMode, type SessionCreatedParams, type SessionDeleteRequestedParams, type SessionNewRequestedParams, type SessionNotificationBase, type SessionRemovedParams, type SessionSelectedParams, type SessionSelectedReason, type SessionSnapshotItem, type SessionStateSnapshotParams, type SessionStatus, type SessionStatusParams, type SessionSummaryParams, type TextSendRequestedParams, type TextSendRequestedSelectionRange, type TextSendRequestedSource, agentManagementTools, agentTabTools, allTools, annotateTool, batchFlattenCopyEvidenceOutputSchema, browserRuntimeTools, callTool, callToolText, dualPathEvidenceOutputSchema, fileDownloadEvidenceOutputSchema, fileTools, fileUrlEvidenceOutputSchema, pluginManagementTools, pluginTabTools, projectTools, request, rootedPathEvidenceOutputSchema, rootedWriteEvidenceOutputSchema, runOneShotShellCommand, seaCloudTools, seastudio, shellSessionCloseEvidenceOutputSchema, shellSessionOpenEvidenceOutputSchema, shellSessionRunEvidenceOutputSchema, shellSessionSignalEvidenceOutputSchema, shellSessionSnapshotEvidenceOutputSchema, shellTools, skillTools, tools };
|
|
@@ -200,6 +200,32 @@ interface SeastudioShellOneShotResult {
|
|
|
200
200
|
durationMs: number;
|
|
201
201
|
timedOut: boolean;
|
|
202
202
|
}
|
|
203
|
+
type SeastudioBrowserStatus = 'idle' | 'loading' | 'ready' | 'error';
|
|
204
|
+
interface SeastudioBrowserCertificateError {
|
|
205
|
+
requestId: string;
|
|
206
|
+
url: string;
|
|
207
|
+
error: string;
|
|
208
|
+
}
|
|
209
|
+
interface SeastudioBrowserTab {
|
|
210
|
+
id: string;
|
|
211
|
+
title: string;
|
|
212
|
+
url: string | null;
|
|
213
|
+
status: SeastudioBrowserStatus;
|
|
214
|
+
errorMessage: string | null;
|
|
215
|
+
canGoBack: boolean;
|
|
216
|
+
canGoForward: boolean;
|
|
217
|
+
certificateError?: SeastudioBrowserCertificateError | null;
|
|
218
|
+
}
|
|
219
|
+
interface SeastudioBrowserState {
|
|
220
|
+
tabs: SeastudioBrowserTab[];
|
|
221
|
+
activeTabId: string | null;
|
|
222
|
+
}
|
|
223
|
+
interface SeastudioBrowserRect {
|
|
224
|
+
x: number;
|
|
225
|
+
y: number;
|
|
226
|
+
width: number;
|
|
227
|
+
height: number;
|
|
228
|
+
}
|
|
203
229
|
declare function callTool(name: string, args?: Record<string, unknown>): Promise<MCPToolResult>;
|
|
204
230
|
declare function request<T = unknown>(method: string, params?: Record<string, unknown>): Promise<T>;
|
|
205
231
|
declare function callToolText(name: string, args?: Record<string, unknown>): Promise<string>;
|
|
@@ -254,6 +280,42 @@ declare const seastudio: {
|
|
|
254
280
|
close: (sessionId: string, force?: boolean) => Promise<MCPToolResult>;
|
|
255
281
|
};
|
|
256
282
|
};
|
|
283
|
+
browser: {
|
|
284
|
+
getState: () => Promise<SeastudioBrowserState>;
|
|
285
|
+
createTab: (url?: string) => Promise<{
|
|
286
|
+
tab: SeastudioBrowserTab;
|
|
287
|
+
activeTabId: string;
|
|
288
|
+
}>;
|
|
289
|
+
closeTab: (tabId: string) => Promise<{
|
|
290
|
+
ok: boolean;
|
|
291
|
+
activeTabId: string | null;
|
|
292
|
+
}>;
|
|
293
|
+
activateTab: (tabId: string) => Promise<{
|
|
294
|
+
ok: boolean;
|
|
295
|
+
}>;
|
|
296
|
+
navigate: (tabId: string, url: string) => Promise<{
|
|
297
|
+
ok: boolean;
|
|
298
|
+
url: string;
|
|
299
|
+
}>;
|
|
300
|
+
goBack: (tabId: string) => Promise<{
|
|
301
|
+
ok: boolean;
|
|
302
|
+
}>;
|
|
303
|
+
goForward: (tabId: string) => Promise<{
|
|
304
|
+
ok: boolean;
|
|
305
|
+
}>;
|
|
306
|
+
reload: (tabId: string) => Promise<{
|
|
307
|
+
ok: boolean;
|
|
308
|
+
}>;
|
|
309
|
+
stop: (tabId: string) => Promise<{
|
|
310
|
+
ok: boolean;
|
|
311
|
+
}>;
|
|
312
|
+
setViewportRect: (tabId: string | null, rect: SeastudioBrowserRect) => Promise<{
|
|
313
|
+
ok: boolean;
|
|
314
|
+
}>;
|
|
315
|
+
respondToCertificateError: (requestId: string, allow: boolean) => Promise<{
|
|
316
|
+
ok: boolean;
|
|
317
|
+
}>;
|
|
318
|
+
};
|
|
257
319
|
};
|
|
258
320
|
/**
|
|
259
321
|
* One-shot helper: open a transient session, run command, wait, close.
|
|
@@ -302,6 +364,15 @@ declare const projectTools: MCPTool[];
|
|
|
302
364
|
|
|
303
365
|
declare const skillTools: MCPTool[];
|
|
304
366
|
|
|
367
|
+
/**
|
|
368
|
+
* Browser Runtime MCP Tools
|
|
369
|
+
*
|
|
370
|
+
* 这些定义描述 browser runtime bridge 支持的协议能力。
|
|
371
|
+
* 插件通过标准 MCP tools/call 调用,宿主在声明 browser runtime capability 后实现这些工具。
|
|
372
|
+
*/
|
|
373
|
+
|
|
374
|
+
declare const browserRuntimeTools: MCPTool[];
|
|
375
|
+
|
|
305
376
|
/**
|
|
306
377
|
* SeaStudio MCP Notifications
|
|
307
378
|
*
|
|
@@ -384,6 +455,16 @@ declare const SeastudioNotifications: {
|
|
|
384
455
|
readonly PROPOSAL_FEEDBACK: "seastudio:proposal-feedback";
|
|
385
456
|
/** 插件实例请求更新宿主 plugin tab 标题 */
|
|
386
457
|
readonly PLUGIN_TAB_TITLE_CHANGED: "plugin:tab-title_changed";
|
|
458
|
+
/** Browser runtime 标签页列表或 active tab 变化 */
|
|
459
|
+
readonly BROWSER_TABS_CHANGED: "browser:tabs_changed";
|
|
460
|
+
/** Browser runtime 导航状态变化 */
|
|
461
|
+
readonly BROWSER_NAVIGATION_STATE_CHANGED: "browser:navigation_state_changed";
|
|
462
|
+
/** Browser runtime 加载状态变化 */
|
|
463
|
+
readonly BROWSER_LOAD_STATE_CHANGED: "browser:load_state_changed";
|
|
464
|
+
/** Browser runtime 证书错误,需要插件 UI 决策 */
|
|
465
|
+
readonly BROWSER_CERTIFICATE_ERROR: "browser:certificate_error";
|
|
466
|
+
/** Browser runtime 收到网页新标签请求 */
|
|
467
|
+
readonly BROWSER_NEW_TAB_REQUESTED: "browser:new_tab_requested";
|
|
387
468
|
/**
|
|
388
469
|
* Agent 对话 session:新建。消息历史仍由 Agent 前端持有,宿主仅同步列表用于侧栏。
|
|
389
470
|
* 通常由 Agent 通过 notifications/publish 发出;其他订阅者(含 host-ui)可据此更新 UI。
|
|
@@ -690,4 +771,4 @@ interface SessionDeleteRequestedParams {
|
|
|
690
771
|
declare const allTools: MCPTool[];
|
|
691
772
|
declare const tools: MCPTool[];
|
|
692
773
|
|
|
693
|
-
export { type AgentInstanceSessionSnapshot, type FileDeletedParams, type FileModifiedParams, type FileOpenRequestedParams, type FileRenamedParams, type FileSavedParams, type FileSelectedParams, type FileSendRequestedParams, type FileTransferRequestedParams, type FilesChangedParams, type PluginTabTitleChangedParams, type ProposalFeedbackFileSummary, type ProposalFeedbackHunk, type ProposalFeedbackOrigin, type ProposalFeedbackParams, type RootsChangedParams, type SeastudioBatchFlattenCopyOptions, type SeastudioBatchFlattenPreviewOptions, type SeastudioDragDropParams, type SeastudioDragEnterParams, type SeastudioDragFileData, type SeastudioDragRootId, type SeastudioDragStartParams, type SeastudioFileDownloadOptions, type SeastudioFileInfo, type SeastudioFileInfoOptions, type SeastudioFileListOptions, type SeastudioFileReadOptions, type SeastudioFileSearchMatch, type SeastudioFileSearchOptions, type SeastudioFileTransferOptions, type SeastudioFileTreeOptions, type SeastudioFilesystemRoot, type SeastudioFilesystemRootId, SeastudioNotifications, type SeastudioProjectInfo, SeastudioRequests, type SeastudioRootId, type SeastudioShellCloseResult, type SeastudioShellEntry, type SeastudioShellEntryLevel, type SeastudioShellGetEntriesOptions, type SeastudioShellGetEntriesResult, type SeastudioShellKind, type SeastudioShellOneShotResult, type SeastudioShellOpenOptions, type SeastudioShellRunOptions, type SeastudioShellRunResult, type SeastudioShellSession, type SeastudioShellSignalResult, type SeastudioShellWaitResult, type SeastudioSinglePathOptions, type SeastudioWorkspacePathMode, type SessionCreatedParams, type SessionDeleteRequestedParams, type SessionNewRequestedParams, type SessionNotificationBase, type SessionRemovedParams, type SessionSelectedParams, type SessionSelectedReason, type SessionSnapshotItem, type SessionStateSnapshotParams, type SessionStatus, type SessionStatusParams, type SessionSummaryParams, type TextSendRequestedParams, type TextSendRequestedSelectionRange, type TextSendRequestedSource, agentManagementTools, agentTabTools, allTools, annotateTool, batchFlattenCopyEvidenceOutputSchema, callTool, callToolText, dualPathEvidenceOutputSchema, fileDownloadEvidenceOutputSchema, fileTools, fileUrlEvidenceOutputSchema, pluginManagementTools, pluginTabTools, projectTools, request, rootedPathEvidenceOutputSchema, rootedWriteEvidenceOutputSchema, runOneShotShellCommand, seaCloudTools, seastudio, shellSessionCloseEvidenceOutputSchema, shellSessionOpenEvidenceOutputSchema, shellSessionRunEvidenceOutputSchema, shellSessionSignalEvidenceOutputSchema, shellSessionSnapshotEvidenceOutputSchema, shellTools, skillTools, tools };
|
|
774
|
+
export { type AgentInstanceSessionSnapshot, type FileDeletedParams, type FileModifiedParams, type FileOpenRequestedParams, type FileRenamedParams, type FileSavedParams, type FileSelectedParams, type FileSendRequestedParams, type FileTransferRequestedParams, type FilesChangedParams, type PluginTabTitleChangedParams, type ProposalFeedbackFileSummary, type ProposalFeedbackHunk, type ProposalFeedbackOrigin, type ProposalFeedbackParams, type RootsChangedParams, type SeastudioBatchFlattenCopyOptions, type SeastudioBatchFlattenPreviewOptions, type SeastudioBrowserCertificateError, type SeastudioBrowserRect, type SeastudioBrowserState, type SeastudioBrowserStatus, type SeastudioBrowserTab, type SeastudioDragDropParams, type SeastudioDragEnterParams, type SeastudioDragFileData, type SeastudioDragRootId, type SeastudioDragStartParams, type SeastudioFileDownloadOptions, type SeastudioFileInfo, type SeastudioFileInfoOptions, type SeastudioFileListOptions, type SeastudioFileReadOptions, type SeastudioFileSearchMatch, type SeastudioFileSearchOptions, type SeastudioFileTransferOptions, type SeastudioFileTreeOptions, type SeastudioFilesystemRoot, type SeastudioFilesystemRootId, SeastudioNotifications, type SeastudioProjectInfo, SeastudioRequests, type SeastudioRootId, type SeastudioShellCloseResult, type SeastudioShellEntry, type SeastudioShellEntryLevel, type SeastudioShellGetEntriesOptions, type SeastudioShellGetEntriesResult, type SeastudioShellKind, type SeastudioShellOneShotResult, type SeastudioShellOpenOptions, type SeastudioShellRunOptions, type SeastudioShellRunResult, type SeastudioShellSession, type SeastudioShellSignalResult, type SeastudioShellWaitResult, type SeastudioSinglePathOptions, type SeastudioWorkspacePathMode, type SessionCreatedParams, type SessionDeleteRequestedParams, type SessionNewRequestedParams, type SessionNotificationBase, type SessionRemovedParams, type SessionSelectedParams, type SessionSelectedReason, type SessionSnapshotItem, type SessionStateSnapshotParams, type SessionStatus, type SessionStatusParams, type SessionSummaryParams, type TextSendRequestedParams, type TextSendRequestedSelectionRange, type TextSendRequestedSource, agentManagementTools, agentTabTools, allTools, annotateTool, batchFlattenCopyEvidenceOutputSchema, browserRuntimeTools, callTool, callToolText, dualPathEvidenceOutputSchema, fileDownloadEvidenceOutputSchema, fileTools, fileUrlEvidenceOutputSchema, pluginManagementTools, pluginTabTools, projectTools, request, rootedPathEvidenceOutputSchema, rootedWriteEvidenceOutputSchema, runOneShotShellCommand, seaCloudTools, seastudio, shellSessionCloseEvidenceOutputSchema, shellSessionOpenEvidenceOutputSchema, shellSessionRunEvidenceOutputSchema, shellSessionSignalEvidenceOutputSchema, shellSessionSnapshotEvidenceOutputSchema, shellTools, skillTools, tools };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { SeastudioNotifications, SeastudioRequests, agentManagementTools, agentTabTools, allTools, annotateTool, batchFlattenCopyEvidenceOutputSchema, callTool, callToolText, dualPathEvidenceOutputSchema, fileDownloadEvidenceOutputSchema, fileTools, fileUrlEvidenceOutputSchema, pluginManagementTools, pluginTabTools, projectTools, request, rootedPathEvidenceOutputSchema, rootedWriteEvidenceOutputSchema, runOneShotShellCommand, seaCloudTools, seastudio, shellSessionCloseEvidenceOutputSchema, shellSessionOpenEvidenceOutputSchema, shellSessionRunEvidenceOutputSchema, shellSessionSignalEvidenceOutputSchema, shellSessionSnapshotEvidenceOutputSchema, shellTools, skillTools, tools } from '../../chunk-
|
|
1
|
+
export { SeastudioNotifications, SeastudioRequests, agentManagementTools, agentTabTools, allTools, annotateTool, batchFlattenCopyEvidenceOutputSchema, browserRuntimeTools, callTool, callToolText, dualPathEvidenceOutputSchema, fileDownloadEvidenceOutputSchema, fileTools, fileUrlEvidenceOutputSchema, pluginManagementTools, pluginTabTools, projectTools, request, rootedPathEvidenceOutputSchema, rootedWriteEvidenceOutputSchema, runOneShotShellCommand, seaCloudTools, seastudio, shellSessionCloseEvidenceOutputSchema, shellSessionOpenEvidenceOutputSchema, shellSessionRunEvidenceOutputSchema, shellSessionSignalEvidenceOutputSchema, shellSessionSnapshotEvidenceOutputSchema, shellTools, skillTools, tools } from '../../chunk-UFFMPHL3.js';
|
|
2
2
|
import '../../chunk-TJ3CGHWJ.js';
|