@seastudio/sdk 3.5.1 → 3.7.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.
@@ -1,5 +1,5 @@
1
- import { g as MCPTool, h as MCPToolAnnotations, j as MCPToolInputSchema } from '../types-BZaBjaZh.js';
2
- export { F as FileItem, a as FileNode, J as JSONRPCError, b as JSONRPCMessage, c as JSONRPCNotification, d as JSONRPCRequest, e as JSONRPCResponse, M as MCPMessageEnvelope, f as MCPMethod, i as MCPToolCallRequest, k as MCPToolResult, N as NotificationHandler, P as PluginMCPManifest, l as PluginMCPModuleExports, m as PublishParams, S as SubscribeParams, n as createNotification, o as createRequest, p as createResponse, q as isMCPMessage, r as isNotification } from '../types-BZaBjaZh.js';
1
+ import { g as MCPTool, h as MCPToolAnnotations, j as MCPToolInputSchema } from '../types-D7xY0bt6.js';
2
+ export { F as FileItem, a as FileNode, J as JSONRPCError, b as JSONRPCMessage, c as JSONRPCNotification, d as JSONRPCRequest, e as JSONRPCResponse, M as MCPMessageEnvelope, f as MCPMethod, i as MCPToolCallRequest, k as MCPToolResult, N as NotificationHandler, P as PluginMCPManifest, l as PluginMCPModuleExports, m as PublishParams, S as SubscribeParams, n as createNotification, o as createRequest, p as createResponse, q as isMCPMessage, r as isNotification } from '../types-D7xY0bt6.js';
3
3
  export { MCPClient, MCPClientOptions, MCPRequestOptions, MCPServer, MCPToolCallOptions, MCPToolHandler, MCPTransport, NormalizeMCPToolInputSchemaOptions, PostMessageTransport, PostMessageTransportOptions, callHostTool, callHostToolText, createMCPClient, createMCPServer, getDefaultClient, getDefaultServer, getDefaultTransport, normalizeMCPTool, normalizeMCPToolInputSchema, normalizeMCPToolObjectSchema, setDefaultClient, setDefaultTransport, startDefaultServer } from './core/index.js';
4
4
  export { FileModifiedParams, FileOpenRequestedParams, FileSavedParams, FileSendRequestedParams, FilesChangedParams, RootsChangedParams, SeastudioDragDropParams, SeastudioDragEnterParams, SeastudioDragFileData, SeastudioDragRootId, SeastudioDragStartParams, SeastudioFileDownloadOptions, SeastudioFileTreeOptions, SeastudioNotifications, SeastudioRequests, TextSendRequestedParams, agentManagementTools, agentTabTools, fileTools, pluginManagementTools, pluginTabTools, seaCloudTools, seastudio, allTools as seastudioAllTools, tools as seastudioTools, shellTools } from './seastudio/index.js';
5
5
 
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-5OM34MI7.js';
2
- export { SeastudioNotifications, SeastudioRequests, agentManagementTools, agentTabTools, fileTools, pluginManagementTools, pluginTabTools, seaCloudTools, seastudio, allTools as seastudioAllTools, tools as seastudioTools, shellTools } from '../chunk-MFZWPGTX.js';
1
+ export { MCP_PACKAGES, getMCPPackageIdForTool, getMCPPackages, getMCPToolPackageIndex, getToolsForLLM, listAllTools, listAvailableTools, listAvailableToolsForLLM, loadPlugin, mcpToolToOpenAI } from '../chunk-2DFXLVWC.js';
2
+ export { SeastudioNotifications, SeastudioRequests, agentManagementTools, agentTabTools, fileTools, pluginManagementTools, pluginTabTools, seaCloudTools, seastudio, allTools as seastudioAllTools, tools as seastudioTools, shellTools } from '../chunk-GZRP7JKO.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 chunkK4A2JSWD_cjs = require('../../chunk-K4A2JSWD.cjs');
3
+ var chunkHAFMJ47Q_cjs = require('../../chunk-HAFMJ47Q.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 chunkK4A2JSWD_cjs.SeastudioNotifications; }
10
+ get: function () { return chunkHAFMJ47Q_cjs.SeastudioNotifications; }
11
11
  });
12
12
  Object.defineProperty(exports, "SeastudioRequests", {
13
13
  enumerable: true,
14
- get: function () { return chunkK4A2JSWD_cjs.SeastudioRequests; }
14
+ get: function () { return chunkHAFMJ47Q_cjs.SeastudioRequests; }
15
15
  });
16
16
  Object.defineProperty(exports, "agentManagementTools", {
17
17
  enumerable: true,
18
- get: function () { return chunkK4A2JSWD_cjs.agentManagementTools; }
18
+ get: function () { return chunkHAFMJ47Q_cjs.agentManagementTools; }
19
19
  });
20
20
  Object.defineProperty(exports, "agentTabTools", {
21
21
  enumerable: true,
22
- get: function () { return chunkK4A2JSWD_cjs.agentTabTools; }
22
+ get: function () { return chunkHAFMJ47Q_cjs.agentTabTools; }
23
23
  });
24
24
  Object.defineProperty(exports, "allTools", {
25
25
  enumerable: true,
26
- get: function () { return chunkK4A2JSWD_cjs.allTools; }
26
+ get: function () { return chunkHAFMJ47Q_cjs.allTools; }
27
27
  });
28
28
  Object.defineProperty(exports, "annotateTool", {
29
29
  enumerable: true,
30
- get: function () { return chunkK4A2JSWD_cjs.annotateTool; }
30
+ get: function () { return chunkHAFMJ47Q_cjs.annotateTool; }
31
31
  });
32
32
  Object.defineProperty(exports, "batchFlattenCopyEvidenceOutputSchema", {
33
33
  enumerable: true,
34
- get: function () { return chunkK4A2JSWD_cjs.batchFlattenCopyEvidenceOutputSchema; }
34
+ get: function () { return chunkHAFMJ47Q_cjs.batchFlattenCopyEvidenceOutputSchema; }
35
+ });
36
+ Object.defineProperty(exports, "browserRuntimeTools", {
37
+ enumerable: true,
38
+ get: function () { return chunkHAFMJ47Q_cjs.browserRuntimeTools; }
35
39
  });
36
40
  Object.defineProperty(exports, "callTool", {
37
41
  enumerable: true,
38
- get: function () { return chunkK4A2JSWD_cjs.callTool; }
42
+ get: function () { return chunkHAFMJ47Q_cjs.callTool; }
39
43
  });
40
44
  Object.defineProperty(exports, "callToolText", {
41
45
  enumerable: true,
42
- get: function () { return chunkK4A2JSWD_cjs.callToolText; }
46
+ get: function () { return chunkHAFMJ47Q_cjs.callToolText; }
43
47
  });
44
48
  Object.defineProperty(exports, "dualPathEvidenceOutputSchema", {
45
49
  enumerable: true,
46
- get: function () { return chunkK4A2JSWD_cjs.dualPathEvidenceOutputSchema; }
50
+ get: function () { return chunkHAFMJ47Q_cjs.dualPathEvidenceOutputSchema; }
47
51
  });
48
52
  Object.defineProperty(exports, "fileDownloadEvidenceOutputSchema", {
49
53
  enumerable: true,
50
- get: function () { return chunkK4A2JSWD_cjs.fileDownloadEvidenceOutputSchema; }
54
+ get: function () { return chunkHAFMJ47Q_cjs.fileDownloadEvidenceOutputSchema; }
51
55
  });
52
56
  Object.defineProperty(exports, "fileTools", {
53
57
  enumerable: true,
54
- get: function () { return chunkK4A2JSWD_cjs.fileTools; }
58
+ get: function () { return chunkHAFMJ47Q_cjs.fileTools; }
55
59
  });
56
60
  Object.defineProperty(exports, "fileUrlEvidenceOutputSchema", {
57
61
  enumerable: true,
58
- get: function () { return chunkK4A2JSWD_cjs.fileUrlEvidenceOutputSchema; }
62
+ get: function () { return chunkHAFMJ47Q_cjs.fileUrlEvidenceOutputSchema; }
59
63
  });
60
64
  Object.defineProperty(exports, "pluginManagementTools", {
61
65
  enumerable: true,
62
- get: function () { return chunkK4A2JSWD_cjs.pluginManagementTools; }
66
+ get: function () { return chunkHAFMJ47Q_cjs.pluginManagementTools; }
63
67
  });
64
68
  Object.defineProperty(exports, "pluginTabTools", {
65
69
  enumerable: true,
66
- get: function () { return chunkK4A2JSWD_cjs.pluginTabTools; }
70
+ get: function () { return chunkHAFMJ47Q_cjs.pluginTabTools; }
67
71
  });
68
72
  Object.defineProperty(exports, "projectTools", {
69
73
  enumerable: true,
70
- get: function () { return chunkK4A2JSWD_cjs.projectTools; }
74
+ get: function () { return chunkHAFMJ47Q_cjs.projectTools; }
71
75
  });
72
76
  Object.defineProperty(exports, "request", {
73
77
  enumerable: true,
74
- get: function () { return chunkK4A2JSWD_cjs.request; }
78
+ get: function () { return chunkHAFMJ47Q_cjs.request; }
75
79
  });
76
80
  Object.defineProperty(exports, "rootedPathEvidenceOutputSchema", {
77
81
  enumerable: true,
78
- get: function () { return chunkK4A2JSWD_cjs.rootedPathEvidenceOutputSchema; }
82
+ get: function () { return chunkHAFMJ47Q_cjs.rootedPathEvidenceOutputSchema; }
79
83
  });
80
84
  Object.defineProperty(exports, "rootedWriteEvidenceOutputSchema", {
81
85
  enumerable: true,
82
- get: function () { return chunkK4A2JSWD_cjs.rootedWriteEvidenceOutputSchema; }
86
+ get: function () { return chunkHAFMJ47Q_cjs.rootedWriteEvidenceOutputSchema; }
83
87
  });
84
88
  Object.defineProperty(exports, "runOneShotShellCommand", {
85
89
  enumerable: true,
86
- get: function () { return chunkK4A2JSWD_cjs.runOneShotShellCommand; }
90
+ get: function () { return chunkHAFMJ47Q_cjs.runOneShotShellCommand; }
87
91
  });
88
92
  Object.defineProperty(exports, "seaCloudTools", {
89
93
  enumerable: true,
90
- get: function () { return chunkK4A2JSWD_cjs.seaCloudTools; }
94
+ get: function () { return chunkHAFMJ47Q_cjs.seaCloudTools; }
91
95
  });
92
96
  Object.defineProperty(exports, "seastudio", {
93
97
  enumerable: true,
94
- get: function () { return chunkK4A2JSWD_cjs.seastudio; }
98
+ get: function () { return chunkHAFMJ47Q_cjs.seastudio; }
95
99
  });
96
100
  Object.defineProperty(exports, "shellSessionCloseEvidenceOutputSchema", {
97
101
  enumerable: true,
98
- get: function () { return chunkK4A2JSWD_cjs.shellSessionCloseEvidenceOutputSchema; }
102
+ get: function () { return chunkHAFMJ47Q_cjs.shellSessionCloseEvidenceOutputSchema; }
99
103
  });
100
104
  Object.defineProperty(exports, "shellSessionOpenEvidenceOutputSchema", {
101
105
  enumerable: true,
102
- get: function () { return chunkK4A2JSWD_cjs.shellSessionOpenEvidenceOutputSchema; }
106
+ get: function () { return chunkHAFMJ47Q_cjs.shellSessionOpenEvidenceOutputSchema; }
103
107
  });
104
108
  Object.defineProperty(exports, "shellSessionRunEvidenceOutputSchema", {
105
109
  enumerable: true,
106
- get: function () { return chunkK4A2JSWD_cjs.shellSessionRunEvidenceOutputSchema; }
110
+ get: function () { return chunkHAFMJ47Q_cjs.shellSessionRunEvidenceOutputSchema; }
107
111
  });
108
112
  Object.defineProperty(exports, "shellSessionSignalEvidenceOutputSchema", {
109
113
  enumerable: true,
110
- get: function () { return chunkK4A2JSWD_cjs.shellSessionSignalEvidenceOutputSchema; }
114
+ get: function () { return chunkHAFMJ47Q_cjs.shellSessionSignalEvidenceOutputSchema; }
111
115
  });
112
116
  Object.defineProperty(exports, "shellSessionSnapshotEvidenceOutputSchema", {
113
117
  enumerable: true,
114
- get: function () { return chunkK4A2JSWD_cjs.shellSessionSnapshotEvidenceOutputSchema; }
118
+ get: function () { return chunkHAFMJ47Q_cjs.shellSessionSnapshotEvidenceOutputSchema; }
115
119
  });
116
120
  Object.defineProperty(exports, "shellTools", {
117
121
  enumerable: true,
118
- get: function () { return chunkK4A2JSWD_cjs.shellTools; }
122
+ get: function () { return chunkHAFMJ47Q_cjs.shellTools; }
119
123
  });
120
124
  Object.defineProperty(exports, "skillTools", {
121
125
  enumerable: true,
122
- get: function () { return chunkK4A2JSWD_cjs.skillTools; }
126
+ get: function () { return chunkHAFMJ47Q_cjs.skillTools; }
123
127
  });
124
128
  Object.defineProperty(exports, "tools", {
125
129
  enumerable: true,
126
- get: function () { return chunkK4A2JSWD_cjs.tools; }
130
+ get: function () { return chunkHAFMJ47Q_cjs.tools; }
127
131
  });
@@ -1,4 +1,4 @@
1
- import { g as MCPTool, h as MCPToolAnnotations, j as MCPToolInputSchema, k as MCPToolResult } from '../../types-BZaBjaZh.cjs';
1
+ import { g as MCPTool, h as MCPToolAnnotations, j as MCPToolInputSchema, k as MCPToolResult } from '../../types-D7xY0bt6.cjs';
2
2
 
3
3
  /**
4
4
  * File MCP Tools
@@ -200,6 +200,50 @@ 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
+ browserSessionId: string;
221
+ label?: string;
222
+ partitionKey: string;
223
+ homepage: string;
224
+ tabs: SeastudioBrowserTab[];
225
+ activeTabId: string | null;
226
+ }
227
+ interface SeastudioBrowserSession extends SeastudioBrowserState {
228
+ createdAt: number;
229
+ updatedAt: number;
230
+ }
231
+ interface SeastudioBrowserSessionOpenOptions {
232
+ label?: string;
233
+ partitionKey?: string;
234
+ homepage?: string;
235
+ }
236
+ interface SeastudioBrowserRect {
237
+ x: number;
238
+ y: number;
239
+ width: number;
240
+ height: number;
241
+ }
242
+ interface SeastudioBrowserViewportBinding {
243
+ browserSessionId: string;
244
+ ownerInstanceId?: string;
245
+ rect: SeastudioBrowserRect;
246
+ }
203
247
  declare function callTool(name: string, args?: Record<string, unknown>): Promise<MCPToolResult>;
204
248
  declare function request<T = unknown>(method: string, params?: Record<string, unknown>): Promise<T>;
205
249
  declare function callToolText(name: string, args?: Record<string, unknown>): Promise<string>;
@@ -254,6 +298,60 @@ declare const seastudio: {
254
298
  close: (sessionId: string, force?: boolean) => Promise<MCPToolResult>;
255
299
  };
256
300
  };
301
+ browser: {
302
+ session: {
303
+ open: (options?: SeastudioBrowserSessionOpenOptions) => Promise<SeastudioBrowserSession>;
304
+ list: () => Promise<{
305
+ sessions: SeastudioBrowserSession[];
306
+ }>;
307
+ get: (browserSessionId: string) => Promise<SeastudioBrowserSession>;
308
+ close: (browserSessionId: string) => Promise<{
309
+ browserSessionId: string;
310
+ closed: boolean;
311
+ }>;
312
+ };
313
+ tab: {
314
+ create: (browserSessionId: string, url?: string) => Promise<{
315
+ browserSessionId: string;
316
+ tab: SeastudioBrowserTab;
317
+ activeTabId: string;
318
+ }>;
319
+ close: (browserSessionId: string, tabId: string) => Promise<{
320
+ browserSessionId: string;
321
+ closedTabId: string;
322
+ activeTabId: string | null;
323
+ }>;
324
+ activate: (browserSessionId: string, tabId: string) => Promise<{
325
+ browserSessionId: string;
326
+ activeTabId: string;
327
+ }>;
328
+ navigate: (browserSessionId: string, tabId: string, url: string) => Promise<{
329
+ browserSessionId: string;
330
+ tabId: string;
331
+ url: string;
332
+ }>;
333
+ goBack: (browserSessionId: string, tabId: string) => Promise<{
334
+ ok: boolean;
335
+ }>;
336
+ goForward: (browserSessionId: string, tabId: string) => Promise<{
337
+ ok: boolean;
338
+ }>;
339
+ reload: (browserSessionId: string, tabId: string) => Promise<{
340
+ ok: boolean;
341
+ }>;
342
+ stop: (browserSessionId: string, tabId: string) => Promise<{
343
+ ok: boolean;
344
+ }>;
345
+ };
346
+ viewport: {
347
+ bind: (browserSessionId: string, rect: SeastudioBrowserRect, ownerInstanceId?: string) => Promise<SeastudioBrowserViewportBinding>;
348
+ };
349
+ certificate: {
350
+ respond: (browserSessionId: string, requestId: string, allow: boolean) => Promise<{
351
+ ok: boolean;
352
+ }>;
353
+ };
354
+ };
257
355
  };
258
356
  /**
259
357
  * One-shot helper: open a transient session, run command, wait, close.
@@ -302,6 +400,8 @@ declare const projectTools: MCPTool[];
302
400
 
303
401
  declare const skillTools: MCPTool[];
304
402
 
403
+ declare const browserRuntimeTools: MCPTool[];
404
+
305
405
  /**
306
406
  * SeaStudio MCP Notifications
307
407
  *
@@ -384,6 +484,14 @@ declare const SeastudioNotifications: {
384
484
  readonly PROPOSAL_FEEDBACK: "seastudio:proposal-feedback";
385
485
  /** 插件实例请求更新宿主 plugin tab 标题 */
386
486
  readonly PLUGIN_TAB_TITLE_CHANGED: "plugin:tab-title_changed";
487
+ /** Browser Session 状态变化 */
488
+ readonly BROWSER_SESSION_CHANGED: "browser:session_changed";
489
+ /** Browser Session 关闭 */
490
+ readonly BROWSER_SESSION_CLOSED: "browser:session_closed";
491
+ /** Browser Session 证书错误,需要客户端 UI 决策 */
492
+ readonly BROWSER_CERTIFICATE_ERROR: "browser:certificate_error";
493
+ /** Browser Session 收到网页新标签请求 */
494
+ readonly BROWSER_NEW_TAB_REQUESTED: "browser:new_tab_requested";
387
495
  /**
388
496
  * Agent 对话 session:新建。消息历史仍由 Agent 前端持有,宿主仅同步列表用于侧栏。
389
497
  * 通常由 Agent 通过 notifications/publish 发出;其他订阅者(含 host-ui)可据此更新 UI。
@@ -690,4 +798,4 @@ interface SessionDeleteRequestedParams {
690
798
  declare const allTools: MCPTool[];
691
799
  declare const tools: MCPTool[];
692
800
 
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 };
801
+ 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 SeastudioBrowserSession, type SeastudioBrowserSessionOpenOptions, type SeastudioBrowserState, type SeastudioBrowserStatus, type SeastudioBrowserTab, type SeastudioBrowserViewportBinding, 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,4 +1,4 @@
1
- import { g as MCPTool, h as MCPToolAnnotations, j as MCPToolInputSchema, k as MCPToolResult } from '../../types-BZaBjaZh.js';
1
+ import { g as MCPTool, h as MCPToolAnnotations, j as MCPToolInputSchema, k as MCPToolResult } from '../../types-D7xY0bt6.js';
2
2
 
3
3
  /**
4
4
  * File MCP Tools
@@ -200,6 +200,50 @@ 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
+ browserSessionId: string;
221
+ label?: string;
222
+ partitionKey: string;
223
+ homepage: string;
224
+ tabs: SeastudioBrowserTab[];
225
+ activeTabId: string | null;
226
+ }
227
+ interface SeastudioBrowserSession extends SeastudioBrowserState {
228
+ createdAt: number;
229
+ updatedAt: number;
230
+ }
231
+ interface SeastudioBrowserSessionOpenOptions {
232
+ label?: string;
233
+ partitionKey?: string;
234
+ homepage?: string;
235
+ }
236
+ interface SeastudioBrowserRect {
237
+ x: number;
238
+ y: number;
239
+ width: number;
240
+ height: number;
241
+ }
242
+ interface SeastudioBrowserViewportBinding {
243
+ browserSessionId: string;
244
+ ownerInstanceId?: string;
245
+ rect: SeastudioBrowserRect;
246
+ }
203
247
  declare function callTool(name: string, args?: Record<string, unknown>): Promise<MCPToolResult>;
204
248
  declare function request<T = unknown>(method: string, params?: Record<string, unknown>): Promise<T>;
205
249
  declare function callToolText(name: string, args?: Record<string, unknown>): Promise<string>;
@@ -254,6 +298,60 @@ declare const seastudio: {
254
298
  close: (sessionId: string, force?: boolean) => Promise<MCPToolResult>;
255
299
  };
256
300
  };
301
+ browser: {
302
+ session: {
303
+ open: (options?: SeastudioBrowserSessionOpenOptions) => Promise<SeastudioBrowserSession>;
304
+ list: () => Promise<{
305
+ sessions: SeastudioBrowserSession[];
306
+ }>;
307
+ get: (browserSessionId: string) => Promise<SeastudioBrowserSession>;
308
+ close: (browserSessionId: string) => Promise<{
309
+ browserSessionId: string;
310
+ closed: boolean;
311
+ }>;
312
+ };
313
+ tab: {
314
+ create: (browserSessionId: string, url?: string) => Promise<{
315
+ browserSessionId: string;
316
+ tab: SeastudioBrowserTab;
317
+ activeTabId: string;
318
+ }>;
319
+ close: (browserSessionId: string, tabId: string) => Promise<{
320
+ browserSessionId: string;
321
+ closedTabId: string;
322
+ activeTabId: string | null;
323
+ }>;
324
+ activate: (browserSessionId: string, tabId: string) => Promise<{
325
+ browserSessionId: string;
326
+ activeTabId: string;
327
+ }>;
328
+ navigate: (browserSessionId: string, tabId: string, url: string) => Promise<{
329
+ browserSessionId: string;
330
+ tabId: string;
331
+ url: string;
332
+ }>;
333
+ goBack: (browserSessionId: string, tabId: string) => Promise<{
334
+ ok: boolean;
335
+ }>;
336
+ goForward: (browserSessionId: string, tabId: string) => Promise<{
337
+ ok: boolean;
338
+ }>;
339
+ reload: (browserSessionId: string, tabId: string) => Promise<{
340
+ ok: boolean;
341
+ }>;
342
+ stop: (browserSessionId: string, tabId: string) => Promise<{
343
+ ok: boolean;
344
+ }>;
345
+ };
346
+ viewport: {
347
+ bind: (browserSessionId: string, rect: SeastudioBrowserRect, ownerInstanceId?: string) => Promise<SeastudioBrowserViewportBinding>;
348
+ };
349
+ certificate: {
350
+ respond: (browserSessionId: string, requestId: string, allow: boolean) => Promise<{
351
+ ok: boolean;
352
+ }>;
353
+ };
354
+ };
257
355
  };
258
356
  /**
259
357
  * One-shot helper: open a transient session, run command, wait, close.
@@ -302,6 +400,8 @@ declare const projectTools: MCPTool[];
302
400
 
303
401
  declare const skillTools: MCPTool[];
304
402
 
403
+ declare const browserRuntimeTools: MCPTool[];
404
+
305
405
  /**
306
406
  * SeaStudio MCP Notifications
307
407
  *
@@ -384,6 +484,14 @@ declare const SeastudioNotifications: {
384
484
  readonly PROPOSAL_FEEDBACK: "seastudio:proposal-feedback";
385
485
  /** 插件实例请求更新宿主 plugin tab 标题 */
386
486
  readonly PLUGIN_TAB_TITLE_CHANGED: "plugin:tab-title_changed";
487
+ /** Browser Session 状态变化 */
488
+ readonly BROWSER_SESSION_CHANGED: "browser:session_changed";
489
+ /** Browser Session 关闭 */
490
+ readonly BROWSER_SESSION_CLOSED: "browser:session_closed";
491
+ /** Browser Session 证书错误,需要客户端 UI 决策 */
492
+ readonly BROWSER_CERTIFICATE_ERROR: "browser:certificate_error";
493
+ /** Browser Session 收到网页新标签请求 */
494
+ readonly BROWSER_NEW_TAB_REQUESTED: "browser:new_tab_requested";
387
495
  /**
388
496
  * Agent 对话 session:新建。消息历史仍由 Agent 前端持有,宿主仅同步列表用于侧栏。
389
497
  * 通常由 Agent 通过 notifications/publish 发出;其他订阅者(含 host-ui)可据此更新 UI。
@@ -690,4 +798,4 @@ interface SessionDeleteRequestedParams {
690
798
  declare const allTools: MCPTool[];
691
799
  declare const tools: MCPTool[];
692
800
 
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 };
801
+ 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 SeastudioBrowserSession, type SeastudioBrowserSessionOpenOptions, type SeastudioBrowserState, type SeastudioBrowserStatus, type SeastudioBrowserTab, type SeastudioBrowserViewportBinding, 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-MFZWPGTX.js';
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-GZRP7JKO.js';
2
2
  import '../../chunk-TJ3CGHWJ.js';
@@ -43,7 +43,7 @@ interface MCPToolInputSchema {
43
43
  interface MCPToolAnnotations {
44
44
  operationKind?: 'read' | 'mutate' | 'system' | 'workflow';
45
45
  requiresExecutionEvidence?: boolean;
46
- rawDomain?: 'workspace' | 'filesystem' | 'editor' | 'seaflow' | 'asset' | 'git' | 'preview' | 'shell' | 'excel' | 'word' | 'skill' | `plugin-${string}`;
46
+ rawDomain?: 'workspace' | 'filesystem' | 'editor' | 'seaflow' | 'asset' | 'git' | 'preview' | 'shell' | 'browser' | 'excel' | 'word' | 'skill' | `plugin-${string}`;
47
47
  hostForwarding?: {
48
48
  timeoutMs?: number;
49
49
  };
@@ -43,7 +43,7 @@ interface MCPToolInputSchema {
43
43
  interface MCPToolAnnotations {
44
44
  operationKind?: 'read' | 'mutate' | 'system' | 'workflow';
45
45
  requiresExecutionEvidence?: boolean;
46
- rawDomain?: 'workspace' | 'filesystem' | 'editor' | 'seaflow' | 'asset' | 'git' | 'preview' | 'shell' | 'excel' | 'word' | 'skill' | `plugin-${string}`;
46
+ rawDomain?: 'workspace' | 'filesystem' | 'editor' | 'seaflow' | 'asset' | 'git' | 'preview' | 'shell' | 'browser' | 'excel' | 'word' | 'skill' | `plugin-${string}`;
47
47
  hostForwarding?: {
48
48
  timeoutMs?: number;
49
49
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@seastudio/sdk",
3
- "version": "3.5.1",
3
+ "version": "3.7.0",
4
4
  "description": "SeaStudio SDK - UI 组件 + MCP 信息交换中心",
5
5
  "main": "dist/index.cjs",
6
6
  "module": "dist/index.js",