@seastudio/sdk 4.0.6 → 4.0.10
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-RGBW5MI2.cjs → chunk-2L26XL3M.cjs} +8 -3
- package/dist/{chunk-JXANHQNQ.cjs → chunk-5IX36GRG.cjs} +4 -4
- package/dist/{chunk-KAEDK3UR.js → chunk-BIOX6KGR.js} +8 -3
- package/dist/{chunk-QA7XGPJX.js → chunk-FC5C47PU.js} +137 -97
- package/dist/{chunk-Y4QEHVYJ.cjs → chunk-TW754GRA.cjs} +137 -96
- package/dist/{chunk-EWNKBKGJ.js → chunk-UBPI7GGM.js} +1 -1
- package/dist/index.cjs +38 -38
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +3 -3
- package/dist/mcp/index.cjs +24 -24
- package/dist/mcp/index.d.cts +1 -1
- package/dist/mcp/index.d.ts +1 -1
- package/dist/mcp/index.js +2 -2
- package/dist/mcp/seastudio/index.cjs +38 -34
- package/dist/mcp/seastudio/index.d.cts +64 -33
- package/dist/mcp/seastudio/index.d.ts +64 -33
- package/dist/mcp/seastudio/index.js +1 -1
- package/dist/ui/index.cjs +14 -14
- package/dist/ui/index.js +1 -1
- package/package.json +1 -1
- package/src/ui/cosmos.css +2 -1
|
@@ -36,6 +36,11 @@ function Tab({
|
|
|
36
36
|
onDrop,
|
|
37
37
|
onDragEnd,
|
|
38
38
|
onDoubleClick,
|
|
39
|
+
onMouseDown: (event) => {
|
|
40
|
+
if (event.detail > 1) {
|
|
41
|
+
event.preventDefault();
|
|
42
|
+
}
|
|
43
|
+
},
|
|
39
44
|
onClick: () => {
|
|
40
45
|
if (!disabled) {
|
|
41
46
|
onClick();
|
|
@@ -58,8 +63,8 @@ function Tab({
|
|
|
58
63
|
)
|
|
59
64
|
}
|
|
60
65
|
),
|
|
61
|
-
icon && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex-shrink-0", children: icon }),
|
|
62
|
-
title && /* @__PURE__ */ jsxRuntime.jsx("span", { className: cn("truncate max-w-[120px] text-sm font-normal", titleClassName), children: title }),
|
|
66
|
+
icon && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex-shrink-0 select-none", children: icon }),
|
|
67
|
+
title && /* @__PURE__ */ jsxRuntime.jsx("span", { className: cn("truncate max-w-[120px] text-sm font-normal select-none", titleClassName), children: title }),
|
|
63
68
|
onClose && /* @__PURE__ */ jsxRuntime.jsx(
|
|
64
69
|
"button",
|
|
65
70
|
{
|
|
@@ -71,7 +76,7 @@ function Tab({
|
|
|
71
76
|
},
|
|
72
77
|
disabled,
|
|
73
78
|
className: cn(
|
|
74
|
-
"p-0.5 transition-all flex-shrink-0",
|
|
79
|
+
"p-0.5 transition-all flex-shrink-0 select-none",
|
|
75
80
|
"opacity-0 group-hover:opacity-100",
|
|
76
81
|
isActive && "opacity-60",
|
|
77
82
|
!disabled && "hover:bg-foreground/10",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkTW754GRA_cjs = require('./chunk-TW754GRA.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: chunkTW754GRA_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 [...chunkTW754GRA_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
|
+
chunkTW754GRA_cjs.allTools.map((tool) => [tool.name, "seastudio"])
|
|
66
66
|
);
|
|
67
67
|
function getMCPToolPackageIndex() {
|
|
68
68
|
return new Map(MCP_TOOL_PACKAGE_INDEX);
|
|
@@ -34,6 +34,11 @@ function Tab({
|
|
|
34
34
|
onDrop,
|
|
35
35
|
onDragEnd,
|
|
36
36
|
onDoubleClick,
|
|
37
|
+
onMouseDown: (event) => {
|
|
38
|
+
if (event.detail > 1) {
|
|
39
|
+
event.preventDefault();
|
|
40
|
+
}
|
|
41
|
+
},
|
|
37
42
|
onClick: () => {
|
|
38
43
|
if (!disabled) {
|
|
39
44
|
onClick();
|
|
@@ -56,8 +61,8 @@ function Tab({
|
|
|
56
61
|
)
|
|
57
62
|
}
|
|
58
63
|
),
|
|
59
|
-
icon && /* @__PURE__ */ jsx("span", { className: "flex-shrink-0", children: icon }),
|
|
60
|
-
title && /* @__PURE__ */ jsx("span", { className: cn("truncate max-w-[120px] text-sm font-normal", titleClassName), children: title }),
|
|
64
|
+
icon && /* @__PURE__ */ jsx("span", { className: "flex-shrink-0 select-none", children: icon }),
|
|
65
|
+
title && /* @__PURE__ */ jsx("span", { className: cn("truncate max-w-[120px] text-sm font-normal select-none", titleClassName), children: title }),
|
|
61
66
|
onClose && /* @__PURE__ */ jsx(
|
|
62
67
|
"button",
|
|
63
68
|
{
|
|
@@ -69,7 +74,7 @@ function Tab({
|
|
|
69
74
|
},
|
|
70
75
|
disabled,
|
|
71
76
|
className: cn(
|
|
72
|
-
"p-0.5 transition-all flex-shrink-0",
|
|
77
|
+
"p-0.5 transition-all flex-shrink-0 select-none",
|
|
73
78
|
"opacity-0 group-hover:opacity-100",
|
|
74
79
|
isActive && "opacity-60",
|
|
75
80
|
!disabled && "hover:bg-foreground/10",
|
|
@@ -528,6 +528,113 @@ var seaCloudTools = [
|
|
|
528
528
|
})
|
|
529
529
|
];
|
|
530
530
|
|
|
531
|
+
// src/mcp/seastudio/tools/browser.ts
|
|
532
|
+
var SINGLETON_BROWSER_SESSION_ID = "browser-session-default";
|
|
533
|
+
var browserSessionIdParam = {
|
|
534
|
+
browserSessionId: {
|
|
535
|
+
type: "string",
|
|
536
|
+
description: "Browser session ID\uFF0C\u53EF\u9009\uFF1B\u7F3A\u7701\u4E3A\u5168\u5C40\u5355\u4F8B browser-session-default\u3002"
|
|
537
|
+
}
|
|
538
|
+
};
|
|
539
|
+
var tabIdParam = {
|
|
540
|
+
tabId: { type: "string", description: "Browser tab ID\u3002close/activate/navigate/goBack/goForward/reload/stop \u9700\u8981\u3002" }
|
|
541
|
+
};
|
|
542
|
+
var browserRuntimeTools = [
|
|
543
|
+
annotateTool({
|
|
544
|
+
name: "seastudio-browser_session",
|
|
545
|
+
description: "\u8BFB\u53D6\u6216\u91CD\u7F6E\u5168\u5C40 Browser Session\uFF08\u5355\u4F8B\u5185\u6838\uFF09\u3002\u4F7F\u7528 action \u9009\u62E9 open\u3001list\u3001get \u6216 close\u3002open/get \u8FD4\u56DE\u540C\u4E00\u4E2A browserSessionId\uFF1Bclose \u4F1A\u6E05\u7A7A\u5168\u90E8 tab \u4F46\u4FDD\u7559 session \u58F3\u3002",
|
|
546
|
+
inputSchema: {
|
|
547
|
+
type: "object",
|
|
548
|
+
properties: {
|
|
549
|
+
action: {
|
|
550
|
+
type: "string",
|
|
551
|
+
enum: ["open", "list", "get", "close"],
|
|
552
|
+
description: "Browser Session \u52A8\u4F5C\u3002\u5168\u5C40\u4EC5\u4E00\u4E2A session\uFF1BbrowserSessionId \u53EF\u9009\u3002"
|
|
553
|
+
},
|
|
554
|
+
...browserSessionIdParam,
|
|
555
|
+
homepage: { type: "string", description: "open \u7684\u53EF\u9009\u9ED8\u8BA4\u9996\u9875\u3002" }
|
|
556
|
+
},
|
|
557
|
+
required: ["action"]
|
|
558
|
+
}
|
|
559
|
+
}, {
|
|
560
|
+
operationKind: "workflow",
|
|
561
|
+
requiresExecutionEvidence: false,
|
|
562
|
+
rawDomain: "browser"
|
|
563
|
+
}),
|
|
564
|
+
annotateTool({
|
|
565
|
+
name: "seastudio-browser_tab",
|
|
566
|
+
description: "\u7BA1\u7406\u5168\u5C40 Browser Session \u4E2D\u7684 tab\u3002\u4F7F\u7528 action \u9009\u62E9 create\u3001close\u3001activate\u3001navigate\u3001goBack\u3001goForward\u3001reload \u6216 stop\u3002\u6BCF\u4E2A Host Browser \u63D2\u4EF6\u5B9E\u4F8B\u901A\u5E38\u5BF9\u5E94\u4E00\u4E2A ownerInstanceId tab\u3002",
|
|
567
|
+
inputSchema: {
|
|
568
|
+
type: "object",
|
|
569
|
+
properties: {
|
|
570
|
+
action: {
|
|
571
|
+
type: "string",
|
|
572
|
+
enum: ["create", "close", "activate", "navigate", "goBack", "goForward", "reload", "stop"],
|
|
573
|
+
description: "Browser tab \u52A8\u4F5C\u3002browserSessionId \u53EF\u9009\uFF1Bcreate \u53EF\u4F20 ownerInstanceId \u7ED1\u5B9A Host \u63D2\u4EF6\u5B9E\u4F8B\u3002"
|
|
574
|
+
},
|
|
575
|
+
...browserSessionIdParam,
|
|
576
|
+
...tabIdParam,
|
|
577
|
+
url: { type: "string", description: "create \u7684\u521D\u59CB URL\uFF0C\u6216 navigate \u7684\u76EE\u6807 URL/\u641C\u7D22\u8BCD\u3002" },
|
|
578
|
+
ownerInstanceId: { type: "string", description: "create \u65F6\u7ED1\u5B9A Host Browser \u63D2\u4EF6 instanceId\u3002" }
|
|
579
|
+
},
|
|
580
|
+
required: ["action"]
|
|
581
|
+
}
|
|
582
|
+
}, {
|
|
583
|
+
operationKind: "mutate",
|
|
584
|
+
requiresExecutionEvidence: false,
|
|
585
|
+
rawDomain: "browser"
|
|
586
|
+
}),
|
|
587
|
+
annotateTool({
|
|
588
|
+
name: "seastudio-browser_runtime",
|
|
589
|
+
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\u3002",
|
|
590
|
+
inputSchema: {
|
|
591
|
+
type: "object",
|
|
592
|
+
properties: {
|
|
593
|
+
action: {
|
|
594
|
+
type: "string",
|
|
595
|
+
enum: ["bindViewport", "respondCertificate"],
|
|
596
|
+
description: "Browser runtime \u52A8\u4F5C\u3002bindViewport \u9700\u8981 rect\uFF1BrespondCertificate \u9700\u8981 requestId \u548C allow\u3002"
|
|
597
|
+
},
|
|
598
|
+
...browserSessionIdParam,
|
|
599
|
+
ownerInstanceId: { type: "string", description: "bindViewport \u7684 UI owner instance id\u3002" },
|
|
600
|
+
rect: {
|
|
601
|
+
type: "object",
|
|
602
|
+
description: "bindViewport \u7684 UI viewport \u77E9\u5F62\u3002",
|
|
603
|
+
properties: {
|
|
604
|
+
x: { type: "number" },
|
|
605
|
+
y: { type: "number" },
|
|
606
|
+
width: { type: "number" },
|
|
607
|
+
height: { type: "number" }
|
|
608
|
+
},
|
|
609
|
+
required: ["x", "y", "width", "height"]
|
|
610
|
+
},
|
|
611
|
+
requestId: { type: "string", description: "respondCertificate \u7684\u8BC1\u4E66\u9519\u8BEF\u8BF7\u6C42 ID\u3002" },
|
|
612
|
+
allow: { type: "boolean", description: "respondCertificate \u662F\u5426\u7EE7\u7EED\u52A0\u8F7D\u8BE5\u8BC1\u4E66\u9519\u8BEF\u9875\u9762\u3002" }
|
|
613
|
+
},
|
|
614
|
+
required: ["action"]
|
|
615
|
+
}
|
|
616
|
+
}, {
|
|
617
|
+
operationKind: "workflow",
|
|
618
|
+
requiresExecutionEvidence: false,
|
|
619
|
+
rawDomain: "browser"
|
|
620
|
+
}),
|
|
621
|
+
annotateTool({
|
|
622
|
+
name: "seastudio-browser_show",
|
|
623
|
+
description: "\u5728 Browser \u63D2\u4EF6\u4E2D\u663E\u793A\u6307\u5B9A URL\uFF08\u53EF\u89C6\u5316\uFF09\u3002\u4F1A\u6253\u5F00\u6216\u6FC0\u6D3B\u5BF9\u5E94 Host \u6807\u7B7E\u9875\uFF0C\u5E76\u628A\u9875\u9762\u5448\u73B0\u7ED9\u7528\u6237\u3002",
|
|
624
|
+
inputSchema: {
|
|
625
|
+
type: "object",
|
|
626
|
+
properties: {
|
|
627
|
+
url: { type: "string", description: "\u8981\u5728 Browser \u63D2\u4EF6\u4E2D\u663E\u793A\u7684 URL \u6216\u641C\u7D22\u8BCD\u3002" }
|
|
628
|
+
},
|
|
629
|
+
required: ["url"]
|
|
630
|
+
}
|
|
631
|
+
}, {
|
|
632
|
+
operationKind: "workflow",
|
|
633
|
+
requiresExecutionEvidence: false,
|
|
634
|
+
rawDomain: "browser"
|
|
635
|
+
})
|
|
636
|
+
];
|
|
637
|
+
|
|
531
638
|
// src/mcp/seastudio/client.ts
|
|
532
639
|
function parseToolResult(result) {
|
|
533
640
|
if (result.isError) {
|
|
@@ -769,14 +876,22 @@ var seastudio = {
|
|
|
769
876
|
session: {
|
|
770
877
|
open: async (options = {}) => parseToolResult(await callTool("seastudio-browser_session", { action: "open", ...options })),
|
|
771
878
|
list: async () => parseToolResult(await callTool("seastudio-browser_session", { action: "list" })),
|
|
772
|
-
get: async (browserSessionId) => parseToolResult(await callTool("seastudio-browser_session", { action: "get", browserSessionId })),
|
|
773
|
-
close: async (browserSessionId) => parseToolResult(
|
|
879
|
+
get: async (browserSessionId = SINGLETON_BROWSER_SESSION_ID) => parseToolResult(await callTool("seastudio-browser_session", { action: "get", browserSessionId })),
|
|
880
|
+
close: async (browserSessionId = SINGLETON_BROWSER_SESSION_ID) => parseToolResult(
|
|
774
881
|
await callTool("seastudio-browser_session", { action: "close", browserSessionId })
|
|
775
882
|
)
|
|
776
883
|
},
|
|
884
|
+
show: async (url) => parseToolResult(
|
|
885
|
+
await callTool("seastudio-browser_show", { url })
|
|
886
|
+
),
|
|
777
887
|
tab: {
|
|
778
|
-
create: async (browserSessionId, url) => parseToolResult(
|
|
779
|
-
await callTool("seastudio-browser_tab", {
|
|
888
|
+
create: async (browserSessionId = SINGLETON_BROWSER_SESSION_ID, url, ownerInstanceId) => parseToolResult(
|
|
889
|
+
await callTool("seastudio-browser_tab", {
|
|
890
|
+
action: "create",
|
|
891
|
+
browserSessionId,
|
|
892
|
+
...url ? { url } : {},
|
|
893
|
+
...ownerInstanceId ? { ownerInstanceId } : {}
|
|
894
|
+
})
|
|
780
895
|
),
|
|
781
896
|
close: async (browserSessionId, tabId) => parseToolResult(
|
|
782
897
|
await callTool("seastudio-browser_tab", { action: "close", browserSessionId, tabId })
|
|
@@ -790,10 +905,18 @@ var seastudio = {
|
|
|
790
905
|
goBack: async (browserSessionId, tabId) => parseToolResult(await callTool("seastudio-browser_tab", { action: "goBack", browserSessionId, tabId })),
|
|
791
906
|
goForward: async (browserSessionId, tabId) => parseToolResult(await callTool("seastudio-browser_tab", { action: "goForward", browserSessionId, tabId })),
|
|
792
907
|
reload: async (browserSessionId, tabId) => parseToolResult(await callTool("seastudio-browser_tab", { action: "reload", browserSessionId, tabId })),
|
|
793
|
-
stop: async (browserSessionId, tabId) => parseToolResult(await callTool("seastudio-browser_tab", { action: "stop", browserSessionId, tabId }))
|
|
908
|
+
stop: async (browserSessionId, tabId) => parseToolResult(await callTool("seastudio-browser_tab", { action: "stop", browserSessionId, tabId })),
|
|
909
|
+
getOrCreateForInstance: async (ownerInstanceId, url) => parseToolResult(
|
|
910
|
+
await callTool("seastudio-browser_tab", {
|
|
911
|
+
action: "create",
|
|
912
|
+
browserSessionId: SINGLETON_BROWSER_SESSION_ID,
|
|
913
|
+
ownerInstanceId,
|
|
914
|
+
...url ? { url } : {}
|
|
915
|
+
})
|
|
916
|
+
)
|
|
794
917
|
},
|
|
795
918
|
viewport: {
|
|
796
|
-
bind: async (browserSessionId, rect, ownerInstanceId) => parseToolResult(
|
|
919
|
+
bind: async (browserSessionId = SINGLETON_BROWSER_SESSION_ID, rect, ownerInstanceId) => parseToolResult(
|
|
797
920
|
await callTool("seastudio-browser_runtime", {
|
|
798
921
|
action: "bindViewport",
|
|
799
922
|
browserSessionId,
|
|
@@ -885,6 +1008,7 @@ var pluginTabTools = [
|
|
|
885
1008
|
description: "\u63D2\u4EF6\u6807\u7B7E\u9875\u52A8\u4F5C\u3002open/getStatus \u9700\u8981 pluginId\uFF1Bswitch/close \u9700\u8981 instanceId\u3002"
|
|
886
1009
|
},
|
|
887
1010
|
pluginId: { type: "string", description: "\u63D2\u4EF6 ID\u3002open\u3001getStatus \u5FC5\u586B\u3002" },
|
|
1011
|
+
url: { type: "string", description: "open Browser \u63D2\u4EF6\u65F6\u53EF\u6307\u5B9A\u521D\u59CB URL\u3002" },
|
|
888
1012
|
instanceId: { type: "string", description: "\u63D2\u4EF6\u6807\u7B7E\u9875\u5B9E\u4F8B ID\u3002switch\u3001close \u5FC5\u586B\u3002" }
|
|
889
1013
|
},
|
|
890
1014
|
required: ["action"]
|
|
@@ -998,95 +1122,6 @@ var skillTools = [
|
|
|
998
1122
|
})
|
|
999
1123
|
];
|
|
1000
1124
|
|
|
1001
|
-
// src/mcp/seastudio/tools/browser.ts
|
|
1002
|
-
var browserSessionIdParam = {
|
|
1003
|
-
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" }
|
|
1004
|
-
};
|
|
1005
|
-
var tabIdParam = {
|
|
1006
|
-
tabId: { type: "string", description: "Browser tab ID\u3002close/activate/navigate/goBack/goForward/reload/stop \u9700\u8981\u3002" }
|
|
1007
|
-
};
|
|
1008
|
-
var browserRuntimeTools = [
|
|
1009
|
-
annotateTool({
|
|
1010
|
-
name: "seastudio-browser_session",
|
|
1011
|
-
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",
|
|
1012
|
-
inputSchema: {
|
|
1013
|
-
type: "object",
|
|
1014
|
-
properties: {
|
|
1015
|
-
action: {
|
|
1016
|
-
type: "string",
|
|
1017
|
-
enum: ["open", "list", "get", "close"],
|
|
1018
|
-
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"
|
|
1019
|
-
},
|
|
1020
|
-
...browserSessionIdParam,
|
|
1021
|
-
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" },
|
|
1022
|
-
partitionKey: { type: "string", description: "open \u7684\u53EF\u9009\u7F51\u7AD9\u6570\u636E\u5206\u533A key\uFF1B\u76F8\u540C key \u5171\u4EAB cookie/localStorage\u3002" },
|
|
1023
|
-
homepage: { type: "string", description: "open \u7684\u53EF\u9009\u9ED8\u8BA4\u9996\u9875\u3002" }
|
|
1024
|
-
},
|
|
1025
|
-
required: ["action"]
|
|
1026
|
-
}
|
|
1027
|
-
}, {
|
|
1028
|
-
operationKind: "workflow",
|
|
1029
|
-
requiresExecutionEvidence: false,
|
|
1030
|
-
rawDomain: "browser"
|
|
1031
|
-
}),
|
|
1032
|
-
annotateTool({
|
|
1033
|
-
name: "seastudio-browser_tab",
|
|
1034
|
-
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",
|
|
1035
|
-
inputSchema: {
|
|
1036
|
-
type: "object",
|
|
1037
|
-
properties: {
|
|
1038
|
-
action: {
|
|
1039
|
-
type: "string",
|
|
1040
|
-
enum: ["create", "close", "activate", "navigate", "goBack", "goForward", "reload", "stop"],
|
|
1041
|
-
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"
|
|
1042
|
-
},
|
|
1043
|
-
...browserSessionIdParam,
|
|
1044
|
-
...tabIdParam,
|
|
1045
|
-
url: { type: "string", description: "create \u7684\u521D\u59CB URL\uFF0C\u6216 navigate \u7684\u76EE\u6807 URL/\u641C\u7D22\u8BCD\u3002" }
|
|
1046
|
-
},
|
|
1047
|
-
required: ["action", "browserSessionId"]
|
|
1048
|
-
}
|
|
1049
|
-
}, {
|
|
1050
|
-
operationKind: "mutate",
|
|
1051
|
-
requiresExecutionEvidence: false,
|
|
1052
|
-
rawDomain: "browser"
|
|
1053
|
-
}),
|
|
1054
|
-
annotateTool({
|
|
1055
|
-
name: "seastudio-browser_runtime",
|
|
1056
|
-
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",
|
|
1057
|
-
inputSchema: {
|
|
1058
|
-
type: "object",
|
|
1059
|
-
properties: {
|
|
1060
|
-
action: {
|
|
1061
|
-
type: "string",
|
|
1062
|
-
enum: ["bindViewport", "respondCertificate"],
|
|
1063
|
-
description: "Browser runtime \u52A8\u4F5C\u3002bindViewport \u9700\u8981 rect\uFF1BrespondCertificate \u9700\u8981 requestId \u548C allow\u3002"
|
|
1064
|
-
},
|
|
1065
|
-
...browserSessionIdParam,
|
|
1066
|
-
ownerInstanceId: { type: "string", description: "bindViewport \u7684\u53EF\u9009 UI owner instance id\u3002" },
|
|
1067
|
-
rect: {
|
|
1068
|
-
type: "object",
|
|
1069
|
-
description: "bindViewport \u7684 UI viewport \u77E9\u5F62\u3002",
|
|
1070
|
-
properties: {
|
|
1071
|
-
x: { type: "number" },
|
|
1072
|
-
y: { type: "number" },
|
|
1073
|
-
width: { type: "number" },
|
|
1074
|
-
height: { type: "number" }
|
|
1075
|
-
},
|
|
1076
|
-
required: ["x", "y", "width", "height"]
|
|
1077
|
-
},
|
|
1078
|
-
requestId: { type: "string", description: "respondCertificate \u7684\u8BC1\u4E66\u9519\u8BEF\u8BF7\u6C42 ID\u3002" },
|
|
1079
|
-
allow: { type: "boolean", description: "respondCertificate \u662F\u5426\u7EE7\u7EED\u52A0\u8F7D\u8BE5\u8BC1\u4E66\u9519\u8BEF\u9875\u9762\u3002" }
|
|
1080
|
-
},
|
|
1081
|
-
required: ["action", "browserSessionId"]
|
|
1082
|
-
}
|
|
1083
|
-
}, {
|
|
1084
|
-
operationKind: "workflow",
|
|
1085
|
-
requiresExecutionEvidence: false,
|
|
1086
|
-
rawDomain: "browser"
|
|
1087
|
-
})
|
|
1088
|
-
];
|
|
1089
|
-
|
|
1090
1125
|
// src/mcp/seastudio/notify/topics.ts
|
|
1091
1126
|
var SeastudioRequests = {
|
|
1092
1127
|
/** 请求打开文件 -> 主程序发布 FILE_OPEN_REQUESTED */
|
|
@@ -1176,7 +1211,12 @@ var SeastudioNotifications = {
|
|
|
1176
1211
|
* 宿主请求 Agent 删除/关闭某条对话会话(例如侧栏会话行「×」)。
|
|
1177
1212
|
* 通过 notifications/publish + publishTo 定向到对应 Agent 实例。
|
|
1178
1213
|
*/
|
|
1179
|
-
SESSION_DELETE_REQUESTED: "session:delete_requested"
|
|
1214
|
+
SESSION_DELETE_REQUESTED: "session:delete_requested",
|
|
1215
|
+
/**
|
|
1216
|
+
* SeaStudio 主窗口前后台变化(blur/focus)。
|
|
1217
|
+
* Agent 订阅后同步后端 host visibility,用于 session 完成 unread 策略。
|
|
1218
|
+
*/
|
|
1219
|
+
HOST_APP_VISIBILITY: "host:app_visibility"
|
|
1180
1220
|
};
|
|
1181
1221
|
|
|
1182
1222
|
// src/mcp/seastudio/index.ts
|
|
@@ -1196,4 +1236,4 @@ var allTools = [
|
|
|
1196
1236
|
];
|
|
1197
1237
|
var tools = allTools;
|
|
1198
1238
|
|
|
1199
|
-
export { SeastudioNotifications, SeastudioRequests, agentManagementTools, agentTabTools, allTools, annotateTool, batchFlattenCopyEvidenceOutputSchema, browserRuntimeTools, callTool, callToolText, dualPathEvidenceOutputSchema, editorTools, fileDownloadEvidenceOutputSchema, fileTools, fileUrlEvidenceOutputSchema, gitTools, pluginManagementTools, pluginTabTools, projectTools, request, rootedPathEvidenceOutputSchema, rootedWriteEvidenceOutputSchema, runOneShotShellCommand, seaCloudTools, seastudio, shellSessionCloseEvidenceOutputSchema, shellSessionOpenEvidenceOutputSchema, shellSessionRunEvidenceOutputSchema, shellSessionSignalEvidenceOutputSchema, shellSessionSnapshotEvidenceOutputSchema, shellTools, skillTools, tools };
|
|
1239
|
+
export { SINGLETON_BROWSER_SESSION_ID, SeastudioNotifications, SeastudioRequests, agentManagementTools, agentTabTools, allTools, annotateTool, batchFlattenCopyEvidenceOutputSchema, browserRuntimeTools, callTool, callToolText, dualPathEvidenceOutputSchema, editorTools, fileDownloadEvidenceOutputSchema, fileTools, fileUrlEvidenceOutputSchema, gitTools, pluginManagementTools, pluginTabTools, projectTools, request, rootedPathEvidenceOutputSchema, rootedWriteEvidenceOutputSchema, runOneShotShellCommand, seaCloudTools, seastudio, shellSessionCloseEvidenceOutputSchema, shellSessionOpenEvidenceOutputSchema, shellSessionRunEvidenceOutputSchema, shellSessionSignalEvidenceOutputSchema, shellSessionSnapshotEvidenceOutputSchema, shellTools, skillTools, tools };
|