@seastudio/sdk 5.1.0 → 5.2.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.
@@ -336,53 +336,51 @@ interface SeastudioShellOneShotResult {
336
336
  durationMs: number;
337
337
  timedOut: boolean;
338
338
  }
339
- type SeastudioWebviewRuntimeStatus = 'idle' | 'loading' | 'ready' | 'error';
340
- interface SeastudioWebviewRuntimeCertificateError {
339
+ type SeastudioBrowserStatus = 'idle' | 'loading' | 'ready' | 'error';
340
+ interface SeastudioBrowserCertificateError {
341
341
  requestId: string;
342
342
  url: string;
343
343
  error: string;
344
344
  }
345
- interface SeastudioWebviewRuntimeTab {
345
+ interface SeastudioBrowserTab {
346
346
  id: string;
347
347
  title: string;
348
348
  url: string | null;
349
- status: SeastudioWebviewRuntimeStatus;
349
+ status: SeastudioBrowserStatus;
350
350
  errorMessage: string | null;
351
351
  canGoBack: boolean;
352
352
  canGoForward: boolean;
353
- certificateError?: SeastudioWebviewRuntimeCertificateError | null;
353
+ certificateError?: SeastudioBrowserCertificateError | null;
354
354
  ownerInstanceId?: string;
355
355
  }
356
- interface SeastudioWebviewRuntimeState {
357
- webviewRuntimeId: string;
356
+ interface SeastudioBrowserState {
357
+ browserId: string;
358
358
  label?: string;
359
359
  storagePartitionKey: string;
360
360
  homepage: string;
361
- tabs: SeastudioWebviewRuntimeTab[];
361
+ tabs: SeastudioBrowserTab[];
362
362
  activeTabId: string | null;
363
- }
364
- interface SeastudioWebviewRuntime extends SeastudioWebviewRuntimeState {
365
363
  createdAt: number;
366
364
  updatedAt: number;
367
365
  }
368
- interface SeastudioWebviewRuntimeOpenOptions {
366
+ interface SeastudioBrowserOpenOptions {
369
367
  label?: string;
370
368
  storagePartitionKey?: string;
371
369
  homepage?: string;
372
370
  }
373
- interface SeastudioWebviewViewportRect {
371
+ interface SeastudioBrowserViewportRect {
374
372
  x: number;
375
373
  y: number;
376
374
  width: number;
377
375
  height: number;
378
376
  }
379
- interface SeastudioWebviewRuntimeViewportBinding {
380
- webviewRuntimeId: string;
377
+ interface SeastudioBrowserViewportBinding {
378
+ browserId: string;
381
379
  ownerInstanceId?: string;
382
- rect: SeastudioWebviewViewportRect;
380
+ rect: SeastudioBrowserViewportRect;
383
381
  }
384
- interface SeastudioWebviewRuntimeViewportBindOptions {
385
- webviewRuntimeId?: string;
382
+ interface SeastudioBrowserViewportBindOptions {
383
+ browserId?: string;
386
384
  ownerInstanceId?: string;
387
385
  }
388
386
  declare function callTool(name: string, args?: Record<string, unknown>): Promise<MCPToolResult>;
@@ -485,71 +483,69 @@ declare const seastudio: {
485
483
  close: (sessionId: string, force?: boolean) => Promise<MCPToolResult>;
486
484
  };
487
485
  };
488
- webview: {
489
- runtime: {
490
- open: (options?: SeastudioWebviewRuntimeOpenOptions) => Promise<SeastudioWebviewRuntime>;
491
- list: () => Promise<{
492
- runtimes: SeastudioWebviewRuntime[];
493
- }>;
494
- get: (webviewRuntimeId?: string) => Promise<SeastudioWebviewRuntime>;
495
- close: (webviewRuntimeId?: string) => Promise<{
496
- webviewRuntimeId: string;
497
- closed: boolean;
498
- }>;
499
- show: (url: string) => Promise<{
500
- url: string;
501
- webviewRuntimeId: string;
502
- instanceId?: string;
503
- tab?: SeastudioWebviewRuntimeTab;
504
- }>;
505
- evaluate: <T = unknown>(webviewRuntimeId: string, tabId: string, script: string, timeoutMs?: number) => Promise<{
506
- result: T;
507
- }>;
508
- };
486
+ browser: {
487
+ open: (options?: SeastudioBrowserOpenOptions) => Promise<SeastudioBrowserState>;
488
+ list: () => Promise<{
489
+ browsers: SeastudioBrowserState[];
490
+ }>;
491
+ get: (browserId?: string) => Promise<SeastudioBrowserState>;
492
+ close: (browserId?: string) => Promise<{
493
+ browserId: string;
494
+ closed: boolean;
495
+ }>;
496
+ show: (url: string) => Promise<{
497
+ url: string;
498
+ browserId: string;
499
+ instanceId?: string;
500
+ tab?: SeastudioBrowserTab;
501
+ }>;
502
+ evaluate: <T = unknown>(browserId: string, tabId: string, script: string, timeoutMs?: number) => Promise<{
503
+ result: T;
504
+ }>;
509
505
  tab: {
510
- create: (webviewRuntimeId?: string, url?: string, ownerInstanceId?: string) => Promise<{
511
- webviewRuntimeId: string;
512
- tab: SeastudioWebviewRuntimeTab;
506
+ create: (browserId?: string, url?: string, ownerInstanceId?: string) => Promise<{
507
+ browserId: string;
508
+ tab: SeastudioBrowserTab;
513
509
  activeTabId: string;
514
510
  }>;
515
- close: (webviewRuntimeId: string, tabId: string) => Promise<{
516
- webviewRuntimeId: string;
511
+ close: (browserId: string, tabId: string) => Promise<{
512
+ browserId: string;
517
513
  closedTabId: string;
518
514
  activeTabId: string | null;
519
515
  }>;
520
- activate: (webviewRuntimeId: string, tabId: string) => Promise<{
521
- webviewRuntimeId: string;
516
+ activate: (browserId: string, tabId: string) => Promise<{
517
+ browserId: string;
522
518
  activeTabId: string;
523
519
  }>;
524
- navigate: (webviewRuntimeId: string, tabId: string, url: string) => Promise<{
525
- webviewRuntimeId: string;
520
+ navigate: (browserId: string, tabId: string, url: string) => Promise<{
521
+ browserId: string;
526
522
  tabId: string;
527
523
  url: string;
528
524
  }>;
529
- goBack: (webviewRuntimeId: string, tabId: string) => Promise<{
525
+ goBack: (browserId: string, tabId: string) => Promise<{
530
526
  ok: boolean;
531
527
  }>;
532
- goForward: (webviewRuntimeId: string, tabId: string) => Promise<{
528
+ goForward: (browserId: string, tabId: string) => Promise<{
533
529
  ok: boolean;
534
530
  }>;
535
- reload: (webviewRuntimeId: string, tabId: string) => Promise<{
531
+ reload: (browserId: string, tabId: string) => Promise<{
536
532
  ok: boolean;
537
533
  }>;
538
- stop: (webviewRuntimeId: string, tabId: string) => Promise<{
534
+ stop: (browserId: string, tabId: string) => Promise<{
539
535
  ok: boolean;
540
536
  }>;
541
537
  getOrCreateForInstance: (ownerInstanceId: string, url?: string) => Promise<{
542
- webviewRuntimeId: string;
543
- tab: SeastudioWebviewRuntimeTab;
538
+ browserId: string;
539
+ tab: SeastudioBrowserTab;
544
540
  activeTabId: string;
545
541
  created: boolean;
546
542
  }>;
547
543
  };
548
544
  viewport: {
549
- bind: (rect: SeastudioWebviewViewportRect, options?: SeastudioWebviewRuntimeViewportBindOptions) => Promise<SeastudioWebviewRuntimeViewportBinding>;
545
+ bind: (rect: SeastudioBrowserViewportRect, options?: SeastudioBrowserViewportBindOptions) => Promise<SeastudioBrowserViewportBinding>;
550
546
  };
551
547
  certificate: {
552
- respond: (webviewRuntimeId: string, requestId: string, allow: boolean) => Promise<{
548
+ respond: (browserId: string, requestId: string, allow: boolean) => Promise<{
553
549
  ok: boolean;
554
550
  }>;
555
551
  };
@@ -598,8 +594,8 @@ declare const projectTools: MCPTool[];
598
594
 
599
595
  declare const skillTools: MCPTool[];
600
596
 
601
- declare const SINGLETON_WEBVIEW_RUNTIME_ID = "webview-runtime-default";
602
- declare const webviewRuntimeTools: MCPTool[];
597
+ declare const SINGLETON_BROWSER_ID = "browser-default";
598
+ declare const browserTools: MCPTool[];
603
599
 
604
600
  /**
605
601
  * 插件发送给主程序的请求主题
@@ -683,14 +679,14 @@ declare const SeastudioNotifications: {
683
679
  readonly PROPOSAL_FEEDBACK: "seastudio:proposal-feedback";
684
680
  /** 插件实例请求更新宿主 plugin tab 标题 */
685
681
  readonly PLUGIN_TAB_TITLE_CHANGED: "plugin:tab-title_changed";
686
- /** WebviewRuntime 状态变化 */
687
- readonly WEBVIEW_RUNTIME_STATE_CHANGED: "webview-runtime:state_changed";
688
- /** WebviewRuntime 关闭 */
689
- readonly WEBVIEW_RUNTIME_CLOSED: "webview-runtime:closed";
690
- /** WebviewRuntime 证书错误,需要客户端 UI 决策 */
691
- readonly WEBVIEW_RUNTIME_CERTIFICATE_ERROR: "webview-runtime:certificate_error";
692
- /** WebviewRuntime 收到网页新标签请求 */
693
- readonly WEBVIEW_RUNTIME_NEW_TAB_REQUESTED: "webview-runtime:new_tab_requested";
682
+ /** Browser 状态变化 */
683
+ readonly BROWSER_STATE_CHANGED: "browser:state_changed";
684
+ /** Browser 关闭 */
685
+ readonly BROWSER_CLOSED: "browser:closed";
686
+ /** Browser 证书错误,需要客户端 UI 决策 */
687
+ readonly BROWSER_CERTIFICATE_ERROR: "browser:certificate_error";
688
+ /** Browser 收到网页新标签请求 */
689
+ readonly BROWSER_NEW_TAB_REQUESTED: "browser:new_tab_requested";
694
690
  /**
695
691
  * Agent 对话 session:新建。消息历史仍由 Agent 前端持有,宿主仅同步列表用于侧栏。
696
692
  * 通常由 Agent 通过 notifications/publish 发出;其他订阅者(含 host-ui)可据此更新 UI。
@@ -1137,4 +1133,4 @@ interface HostAppVisibilityParams {
1137
1133
  declare const allTools: MCPTool[];
1138
1134
  declare const tools: MCPTool[];
1139
1135
 
1140
- export { type AgentInstanceSessionSnapshot, type AuthSessionChangedParams, type AuthSessionStatus, type AuthSessionUser, type FileDeletedParams, type FileKeepRequestedParams, type FileModifiedParams, type FileOpenRequestedParams, type FileRenamedParams, type FileSavedParams, type FileSelectedParams, type FileSendRequestedParams, type FileTransferRequestedParams, type FilesChangedParams, type GitBranchInfo, type GitBranchesResult, type GitChangeKind, type GitChangedParams, type GitCommitRef, type GitCommitRefType, type GitFileChange, type GitLineChange, type GitLineChangeKind, type GitLogCommit, type GitLogResult, type GitOpenDiffRequestedParams, type GitStatusResult, type GitSummary, type HostAppVisibilityParams, type PluginTabTitleChangedParams, type PluginToolCallCaller, type PluginToolCallEnvelope, type PluginToolCallError, type PluginToolCallTarget, type PluginToolResultEnvelope, type ProposalChangedParams, type ProposalFeedbackFileSummary, type ProposalFeedbackHunk, type ProposalFeedbackOrigin, type ProposalFeedbackParams, type ProposalRecord, type ProposalRequestedFile, type ProposalRequestedHunk, type ProposalRequestedParams, type ProposalStatus, type RootsChangedParams, SINGLETON_WEBVIEW_RUNTIME_ID, type SeastudioBatchFlattenCopyOptions, type SeastudioBatchFlattenPreviewOptions, type SeastudioDragDropParams, type SeastudioDragEnterParams, type SeastudioDragFileData, type SeastudioDragRootId, type SeastudioDragStartParams, type SeastudioEditorProposalAction, type SeastudioEditorProposalOptions, type SeastudioEditorProposeOptions, type SeastudioFileDownloadOptions, type SeastudioFileInfo, type SeastudioFileInfoOptions, type SeastudioFileListOptions, type SeastudioFileReadOptions, type SeastudioFileSaveAsOptions, type SeastudioFileSearchMatch, type SeastudioFileSearchOptions, type SeastudioFileTransferOptions, type SeastudioFileTreeOptions, type SeastudioFileWriteOptions, type SeastudioFilesystemRoot, type SeastudioFilesystemRootId, SeastudioNotifications, type SeastudioProjectInfo, type SeastudioProposalFile, type SeastudioProposalHunk, 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 SeastudioWebviewRuntime, type SeastudioWebviewRuntimeCertificateError, type SeastudioWebviewRuntimeOpenOptions, type SeastudioWebviewRuntimeState, type SeastudioWebviewRuntimeStatus, type SeastudioWebviewRuntimeTab, type SeastudioWebviewRuntimeViewportBindOptions, type SeastudioWebviewRuntimeViewportBinding, type SeastudioWebviewViewportRect, type SeastudioWorkspacePathMode, type SeastudioWriteReviewMode, type SessionArchiveRequestedParams, type SessionCreatedParams, type SessionDeleteRequestedParams, type SessionNewRequestedParams, type SessionNotificationBase, type SessionRemovedParams, type SessionRenameRequestedParams, 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, editorTools, fileDownloadEvidenceOutputSchema, fileSaveAsEvidenceOutputSchema, fileTools, fileUrlEvidenceOutputSchema, gitTools, pluginManagementTools, pluginTabTools, projectTools, request, rootedPathEvidenceOutputSchema, rootedWriteEvidenceOutputSchema, runOneShotShellCommand, seastudio, shellSessionCloseEvidenceOutputSchema, shellSessionOpenEvidenceOutputSchema, shellSessionRunEvidenceOutputSchema, shellSessionSignalEvidenceOutputSchema, shellSessionSnapshotEvidenceOutputSchema, shellTools, skillTools, tools, webviewRuntimeTools };
1136
+ export { type AgentInstanceSessionSnapshot, type AuthSessionChangedParams, type AuthSessionStatus, type AuthSessionUser, type FileDeletedParams, type FileKeepRequestedParams, type FileModifiedParams, type FileOpenRequestedParams, type FileRenamedParams, type FileSavedParams, type FileSelectedParams, type FileSendRequestedParams, type FileTransferRequestedParams, type FilesChangedParams, type GitBranchInfo, type GitBranchesResult, type GitChangeKind, type GitChangedParams, type GitCommitRef, type GitCommitRefType, type GitFileChange, type GitLineChange, type GitLineChangeKind, type GitLogCommit, type GitLogResult, type GitOpenDiffRequestedParams, type GitStatusResult, type GitSummary, type HostAppVisibilityParams, type PluginTabTitleChangedParams, type PluginToolCallCaller, type PluginToolCallEnvelope, type PluginToolCallError, type PluginToolCallTarget, type PluginToolResultEnvelope, type ProposalChangedParams, type ProposalFeedbackFileSummary, type ProposalFeedbackHunk, type ProposalFeedbackOrigin, type ProposalFeedbackParams, type ProposalRecord, type ProposalRequestedFile, type ProposalRequestedHunk, type ProposalRequestedParams, type ProposalStatus, type RootsChangedParams, SINGLETON_BROWSER_ID, type SeastudioBatchFlattenCopyOptions, type SeastudioBatchFlattenPreviewOptions, type SeastudioBrowserCertificateError, type SeastudioBrowserOpenOptions, type SeastudioBrowserState, type SeastudioBrowserStatus, type SeastudioBrowserTab, type SeastudioBrowserViewportBindOptions, type SeastudioBrowserViewportBinding, type SeastudioBrowserViewportRect, type SeastudioDragDropParams, type SeastudioDragEnterParams, type SeastudioDragFileData, type SeastudioDragRootId, type SeastudioDragStartParams, type SeastudioEditorProposalAction, type SeastudioEditorProposalOptions, type SeastudioEditorProposeOptions, type SeastudioFileDownloadOptions, type SeastudioFileInfo, type SeastudioFileInfoOptions, type SeastudioFileListOptions, type SeastudioFileReadOptions, type SeastudioFileSaveAsOptions, type SeastudioFileSearchMatch, type SeastudioFileSearchOptions, type SeastudioFileTransferOptions, type SeastudioFileTreeOptions, type SeastudioFileWriteOptions, type SeastudioFilesystemRoot, type SeastudioFilesystemRootId, SeastudioNotifications, type SeastudioProjectInfo, type SeastudioProposalFile, type SeastudioProposalHunk, 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 SeastudioWriteReviewMode, type SessionArchiveRequestedParams, type SessionCreatedParams, type SessionDeleteRequestedParams, type SessionNewRequestedParams, type SessionNotificationBase, type SessionRemovedParams, type SessionRenameRequestedParams, 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, browserTools, callTool, callToolText, dualPathEvidenceOutputSchema, editorTools, fileDownloadEvidenceOutputSchema, fileSaveAsEvidenceOutputSchema, fileTools, fileUrlEvidenceOutputSchema, gitTools, pluginManagementTools, pluginTabTools, projectTools, request, rootedPathEvidenceOutputSchema, rootedWriteEvidenceOutputSchema, runOneShotShellCommand, seastudio, shellSessionCloseEvidenceOutputSchema, shellSessionOpenEvidenceOutputSchema, shellSessionRunEvidenceOutputSchema, shellSessionSignalEvidenceOutputSchema, shellSessionSnapshotEvidenceOutputSchema, shellTools, skillTools, tools };
@@ -336,53 +336,51 @@ interface SeastudioShellOneShotResult {
336
336
  durationMs: number;
337
337
  timedOut: boolean;
338
338
  }
339
- type SeastudioWebviewRuntimeStatus = 'idle' | 'loading' | 'ready' | 'error';
340
- interface SeastudioWebviewRuntimeCertificateError {
339
+ type SeastudioBrowserStatus = 'idle' | 'loading' | 'ready' | 'error';
340
+ interface SeastudioBrowserCertificateError {
341
341
  requestId: string;
342
342
  url: string;
343
343
  error: string;
344
344
  }
345
- interface SeastudioWebviewRuntimeTab {
345
+ interface SeastudioBrowserTab {
346
346
  id: string;
347
347
  title: string;
348
348
  url: string | null;
349
- status: SeastudioWebviewRuntimeStatus;
349
+ status: SeastudioBrowserStatus;
350
350
  errorMessage: string | null;
351
351
  canGoBack: boolean;
352
352
  canGoForward: boolean;
353
- certificateError?: SeastudioWebviewRuntimeCertificateError | null;
353
+ certificateError?: SeastudioBrowserCertificateError | null;
354
354
  ownerInstanceId?: string;
355
355
  }
356
- interface SeastudioWebviewRuntimeState {
357
- webviewRuntimeId: string;
356
+ interface SeastudioBrowserState {
357
+ browserId: string;
358
358
  label?: string;
359
359
  storagePartitionKey: string;
360
360
  homepage: string;
361
- tabs: SeastudioWebviewRuntimeTab[];
361
+ tabs: SeastudioBrowserTab[];
362
362
  activeTabId: string | null;
363
- }
364
- interface SeastudioWebviewRuntime extends SeastudioWebviewRuntimeState {
365
363
  createdAt: number;
366
364
  updatedAt: number;
367
365
  }
368
- interface SeastudioWebviewRuntimeOpenOptions {
366
+ interface SeastudioBrowserOpenOptions {
369
367
  label?: string;
370
368
  storagePartitionKey?: string;
371
369
  homepage?: string;
372
370
  }
373
- interface SeastudioWebviewViewportRect {
371
+ interface SeastudioBrowserViewportRect {
374
372
  x: number;
375
373
  y: number;
376
374
  width: number;
377
375
  height: number;
378
376
  }
379
- interface SeastudioWebviewRuntimeViewportBinding {
380
- webviewRuntimeId: string;
377
+ interface SeastudioBrowserViewportBinding {
378
+ browserId: string;
381
379
  ownerInstanceId?: string;
382
- rect: SeastudioWebviewViewportRect;
380
+ rect: SeastudioBrowserViewportRect;
383
381
  }
384
- interface SeastudioWebviewRuntimeViewportBindOptions {
385
- webviewRuntimeId?: string;
382
+ interface SeastudioBrowserViewportBindOptions {
383
+ browserId?: string;
386
384
  ownerInstanceId?: string;
387
385
  }
388
386
  declare function callTool(name: string, args?: Record<string, unknown>): Promise<MCPToolResult>;
@@ -485,71 +483,69 @@ declare const seastudio: {
485
483
  close: (sessionId: string, force?: boolean) => Promise<MCPToolResult>;
486
484
  };
487
485
  };
488
- webview: {
489
- runtime: {
490
- open: (options?: SeastudioWebviewRuntimeOpenOptions) => Promise<SeastudioWebviewRuntime>;
491
- list: () => Promise<{
492
- runtimes: SeastudioWebviewRuntime[];
493
- }>;
494
- get: (webviewRuntimeId?: string) => Promise<SeastudioWebviewRuntime>;
495
- close: (webviewRuntimeId?: string) => Promise<{
496
- webviewRuntimeId: string;
497
- closed: boolean;
498
- }>;
499
- show: (url: string) => Promise<{
500
- url: string;
501
- webviewRuntimeId: string;
502
- instanceId?: string;
503
- tab?: SeastudioWebviewRuntimeTab;
504
- }>;
505
- evaluate: <T = unknown>(webviewRuntimeId: string, tabId: string, script: string, timeoutMs?: number) => Promise<{
506
- result: T;
507
- }>;
508
- };
486
+ browser: {
487
+ open: (options?: SeastudioBrowserOpenOptions) => Promise<SeastudioBrowserState>;
488
+ list: () => Promise<{
489
+ browsers: SeastudioBrowserState[];
490
+ }>;
491
+ get: (browserId?: string) => Promise<SeastudioBrowserState>;
492
+ close: (browserId?: string) => Promise<{
493
+ browserId: string;
494
+ closed: boolean;
495
+ }>;
496
+ show: (url: string) => Promise<{
497
+ url: string;
498
+ browserId: string;
499
+ instanceId?: string;
500
+ tab?: SeastudioBrowserTab;
501
+ }>;
502
+ evaluate: <T = unknown>(browserId: string, tabId: string, script: string, timeoutMs?: number) => Promise<{
503
+ result: T;
504
+ }>;
509
505
  tab: {
510
- create: (webviewRuntimeId?: string, url?: string, ownerInstanceId?: string) => Promise<{
511
- webviewRuntimeId: string;
512
- tab: SeastudioWebviewRuntimeTab;
506
+ create: (browserId?: string, url?: string, ownerInstanceId?: string) => Promise<{
507
+ browserId: string;
508
+ tab: SeastudioBrowserTab;
513
509
  activeTabId: string;
514
510
  }>;
515
- close: (webviewRuntimeId: string, tabId: string) => Promise<{
516
- webviewRuntimeId: string;
511
+ close: (browserId: string, tabId: string) => Promise<{
512
+ browserId: string;
517
513
  closedTabId: string;
518
514
  activeTabId: string | null;
519
515
  }>;
520
- activate: (webviewRuntimeId: string, tabId: string) => Promise<{
521
- webviewRuntimeId: string;
516
+ activate: (browserId: string, tabId: string) => Promise<{
517
+ browserId: string;
522
518
  activeTabId: string;
523
519
  }>;
524
- navigate: (webviewRuntimeId: string, tabId: string, url: string) => Promise<{
525
- webviewRuntimeId: string;
520
+ navigate: (browserId: string, tabId: string, url: string) => Promise<{
521
+ browserId: string;
526
522
  tabId: string;
527
523
  url: string;
528
524
  }>;
529
- goBack: (webviewRuntimeId: string, tabId: string) => Promise<{
525
+ goBack: (browserId: string, tabId: string) => Promise<{
530
526
  ok: boolean;
531
527
  }>;
532
- goForward: (webviewRuntimeId: string, tabId: string) => Promise<{
528
+ goForward: (browserId: string, tabId: string) => Promise<{
533
529
  ok: boolean;
534
530
  }>;
535
- reload: (webviewRuntimeId: string, tabId: string) => Promise<{
531
+ reload: (browserId: string, tabId: string) => Promise<{
536
532
  ok: boolean;
537
533
  }>;
538
- stop: (webviewRuntimeId: string, tabId: string) => Promise<{
534
+ stop: (browserId: string, tabId: string) => Promise<{
539
535
  ok: boolean;
540
536
  }>;
541
537
  getOrCreateForInstance: (ownerInstanceId: string, url?: string) => Promise<{
542
- webviewRuntimeId: string;
543
- tab: SeastudioWebviewRuntimeTab;
538
+ browserId: string;
539
+ tab: SeastudioBrowserTab;
544
540
  activeTabId: string;
545
541
  created: boolean;
546
542
  }>;
547
543
  };
548
544
  viewport: {
549
- bind: (rect: SeastudioWebviewViewportRect, options?: SeastudioWebviewRuntimeViewportBindOptions) => Promise<SeastudioWebviewRuntimeViewportBinding>;
545
+ bind: (rect: SeastudioBrowserViewportRect, options?: SeastudioBrowserViewportBindOptions) => Promise<SeastudioBrowserViewportBinding>;
550
546
  };
551
547
  certificate: {
552
- respond: (webviewRuntimeId: string, requestId: string, allow: boolean) => Promise<{
548
+ respond: (browserId: string, requestId: string, allow: boolean) => Promise<{
553
549
  ok: boolean;
554
550
  }>;
555
551
  };
@@ -598,8 +594,8 @@ declare const projectTools: MCPTool[];
598
594
 
599
595
  declare const skillTools: MCPTool[];
600
596
 
601
- declare const SINGLETON_WEBVIEW_RUNTIME_ID = "webview-runtime-default";
602
- declare const webviewRuntimeTools: MCPTool[];
597
+ declare const SINGLETON_BROWSER_ID = "browser-default";
598
+ declare const browserTools: MCPTool[];
603
599
 
604
600
  /**
605
601
  * 插件发送给主程序的请求主题
@@ -683,14 +679,14 @@ declare const SeastudioNotifications: {
683
679
  readonly PROPOSAL_FEEDBACK: "seastudio:proposal-feedback";
684
680
  /** 插件实例请求更新宿主 plugin tab 标题 */
685
681
  readonly PLUGIN_TAB_TITLE_CHANGED: "plugin:tab-title_changed";
686
- /** WebviewRuntime 状态变化 */
687
- readonly WEBVIEW_RUNTIME_STATE_CHANGED: "webview-runtime:state_changed";
688
- /** WebviewRuntime 关闭 */
689
- readonly WEBVIEW_RUNTIME_CLOSED: "webview-runtime:closed";
690
- /** WebviewRuntime 证书错误,需要客户端 UI 决策 */
691
- readonly WEBVIEW_RUNTIME_CERTIFICATE_ERROR: "webview-runtime:certificate_error";
692
- /** WebviewRuntime 收到网页新标签请求 */
693
- readonly WEBVIEW_RUNTIME_NEW_TAB_REQUESTED: "webview-runtime:new_tab_requested";
682
+ /** Browser 状态变化 */
683
+ readonly BROWSER_STATE_CHANGED: "browser:state_changed";
684
+ /** Browser 关闭 */
685
+ readonly BROWSER_CLOSED: "browser:closed";
686
+ /** Browser 证书错误,需要客户端 UI 决策 */
687
+ readonly BROWSER_CERTIFICATE_ERROR: "browser:certificate_error";
688
+ /** Browser 收到网页新标签请求 */
689
+ readonly BROWSER_NEW_TAB_REQUESTED: "browser:new_tab_requested";
694
690
  /**
695
691
  * Agent 对话 session:新建。消息历史仍由 Agent 前端持有,宿主仅同步列表用于侧栏。
696
692
  * 通常由 Agent 通过 notifications/publish 发出;其他订阅者(含 host-ui)可据此更新 UI。
@@ -1137,4 +1133,4 @@ interface HostAppVisibilityParams {
1137
1133
  declare const allTools: MCPTool[];
1138
1134
  declare const tools: MCPTool[];
1139
1135
 
1140
- export { type AgentInstanceSessionSnapshot, type AuthSessionChangedParams, type AuthSessionStatus, type AuthSessionUser, type FileDeletedParams, type FileKeepRequestedParams, type FileModifiedParams, type FileOpenRequestedParams, type FileRenamedParams, type FileSavedParams, type FileSelectedParams, type FileSendRequestedParams, type FileTransferRequestedParams, type FilesChangedParams, type GitBranchInfo, type GitBranchesResult, type GitChangeKind, type GitChangedParams, type GitCommitRef, type GitCommitRefType, type GitFileChange, type GitLineChange, type GitLineChangeKind, type GitLogCommit, type GitLogResult, type GitOpenDiffRequestedParams, type GitStatusResult, type GitSummary, type HostAppVisibilityParams, type PluginTabTitleChangedParams, type PluginToolCallCaller, type PluginToolCallEnvelope, type PluginToolCallError, type PluginToolCallTarget, type PluginToolResultEnvelope, type ProposalChangedParams, type ProposalFeedbackFileSummary, type ProposalFeedbackHunk, type ProposalFeedbackOrigin, type ProposalFeedbackParams, type ProposalRecord, type ProposalRequestedFile, type ProposalRequestedHunk, type ProposalRequestedParams, type ProposalStatus, type RootsChangedParams, SINGLETON_WEBVIEW_RUNTIME_ID, type SeastudioBatchFlattenCopyOptions, type SeastudioBatchFlattenPreviewOptions, type SeastudioDragDropParams, type SeastudioDragEnterParams, type SeastudioDragFileData, type SeastudioDragRootId, type SeastudioDragStartParams, type SeastudioEditorProposalAction, type SeastudioEditorProposalOptions, type SeastudioEditorProposeOptions, type SeastudioFileDownloadOptions, type SeastudioFileInfo, type SeastudioFileInfoOptions, type SeastudioFileListOptions, type SeastudioFileReadOptions, type SeastudioFileSaveAsOptions, type SeastudioFileSearchMatch, type SeastudioFileSearchOptions, type SeastudioFileTransferOptions, type SeastudioFileTreeOptions, type SeastudioFileWriteOptions, type SeastudioFilesystemRoot, type SeastudioFilesystemRootId, SeastudioNotifications, type SeastudioProjectInfo, type SeastudioProposalFile, type SeastudioProposalHunk, 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 SeastudioWebviewRuntime, type SeastudioWebviewRuntimeCertificateError, type SeastudioWebviewRuntimeOpenOptions, type SeastudioWebviewRuntimeState, type SeastudioWebviewRuntimeStatus, type SeastudioWebviewRuntimeTab, type SeastudioWebviewRuntimeViewportBindOptions, type SeastudioWebviewRuntimeViewportBinding, type SeastudioWebviewViewportRect, type SeastudioWorkspacePathMode, type SeastudioWriteReviewMode, type SessionArchiveRequestedParams, type SessionCreatedParams, type SessionDeleteRequestedParams, type SessionNewRequestedParams, type SessionNotificationBase, type SessionRemovedParams, type SessionRenameRequestedParams, 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, editorTools, fileDownloadEvidenceOutputSchema, fileSaveAsEvidenceOutputSchema, fileTools, fileUrlEvidenceOutputSchema, gitTools, pluginManagementTools, pluginTabTools, projectTools, request, rootedPathEvidenceOutputSchema, rootedWriteEvidenceOutputSchema, runOneShotShellCommand, seastudio, shellSessionCloseEvidenceOutputSchema, shellSessionOpenEvidenceOutputSchema, shellSessionRunEvidenceOutputSchema, shellSessionSignalEvidenceOutputSchema, shellSessionSnapshotEvidenceOutputSchema, shellTools, skillTools, tools, webviewRuntimeTools };
1136
+ export { type AgentInstanceSessionSnapshot, type AuthSessionChangedParams, type AuthSessionStatus, type AuthSessionUser, type FileDeletedParams, type FileKeepRequestedParams, type FileModifiedParams, type FileOpenRequestedParams, type FileRenamedParams, type FileSavedParams, type FileSelectedParams, type FileSendRequestedParams, type FileTransferRequestedParams, type FilesChangedParams, type GitBranchInfo, type GitBranchesResult, type GitChangeKind, type GitChangedParams, type GitCommitRef, type GitCommitRefType, type GitFileChange, type GitLineChange, type GitLineChangeKind, type GitLogCommit, type GitLogResult, type GitOpenDiffRequestedParams, type GitStatusResult, type GitSummary, type HostAppVisibilityParams, type PluginTabTitleChangedParams, type PluginToolCallCaller, type PluginToolCallEnvelope, type PluginToolCallError, type PluginToolCallTarget, type PluginToolResultEnvelope, type ProposalChangedParams, type ProposalFeedbackFileSummary, type ProposalFeedbackHunk, type ProposalFeedbackOrigin, type ProposalFeedbackParams, type ProposalRecord, type ProposalRequestedFile, type ProposalRequestedHunk, type ProposalRequestedParams, type ProposalStatus, type RootsChangedParams, SINGLETON_BROWSER_ID, type SeastudioBatchFlattenCopyOptions, type SeastudioBatchFlattenPreviewOptions, type SeastudioBrowserCertificateError, type SeastudioBrowserOpenOptions, type SeastudioBrowserState, type SeastudioBrowserStatus, type SeastudioBrowserTab, type SeastudioBrowserViewportBindOptions, type SeastudioBrowserViewportBinding, type SeastudioBrowserViewportRect, type SeastudioDragDropParams, type SeastudioDragEnterParams, type SeastudioDragFileData, type SeastudioDragRootId, type SeastudioDragStartParams, type SeastudioEditorProposalAction, type SeastudioEditorProposalOptions, type SeastudioEditorProposeOptions, type SeastudioFileDownloadOptions, type SeastudioFileInfo, type SeastudioFileInfoOptions, type SeastudioFileListOptions, type SeastudioFileReadOptions, type SeastudioFileSaveAsOptions, type SeastudioFileSearchMatch, type SeastudioFileSearchOptions, type SeastudioFileTransferOptions, type SeastudioFileTreeOptions, type SeastudioFileWriteOptions, type SeastudioFilesystemRoot, type SeastudioFilesystemRootId, SeastudioNotifications, type SeastudioProjectInfo, type SeastudioProposalFile, type SeastudioProposalHunk, 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 SeastudioWriteReviewMode, type SessionArchiveRequestedParams, type SessionCreatedParams, type SessionDeleteRequestedParams, type SessionNewRequestedParams, type SessionNotificationBase, type SessionRemovedParams, type SessionRenameRequestedParams, 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, browserTools, callTool, callToolText, dualPathEvidenceOutputSchema, editorTools, fileDownloadEvidenceOutputSchema, fileSaveAsEvidenceOutputSchema, fileTools, fileUrlEvidenceOutputSchema, gitTools, pluginManagementTools, pluginTabTools, projectTools, request, rootedPathEvidenceOutputSchema, rootedWriteEvidenceOutputSchema, runOneShotShellCommand, seastudio, shellSessionCloseEvidenceOutputSchema, shellSessionOpenEvidenceOutputSchema, shellSessionRunEvidenceOutputSchema, shellSessionSignalEvidenceOutputSchema, shellSessionSnapshotEvidenceOutputSchema, shellTools, skillTools, tools };
@@ -1,2 +1,2 @@
1
- export { SINGLETON_WEBVIEW_RUNTIME_ID, SeastudioNotifications, SeastudioRequests, agentManagementTools, agentTabTools, allTools, annotateTool, batchFlattenCopyEvidenceOutputSchema, callTool, callToolText, dualPathEvidenceOutputSchema, editorTools, fileDownloadEvidenceOutputSchema, fileSaveAsEvidenceOutputSchema, fileTools, fileUrlEvidenceOutputSchema, gitTools, pluginManagementTools, pluginTabTools, projectTools, request, rootedPathEvidenceOutputSchema, rootedWriteEvidenceOutputSchema, runOneShotShellCommand, seastudio, shellSessionCloseEvidenceOutputSchema, shellSessionOpenEvidenceOutputSchema, shellSessionRunEvidenceOutputSchema, shellSessionSignalEvidenceOutputSchema, shellSessionSnapshotEvidenceOutputSchema, shellTools, skillTools, tools, webviewRuntimeTools } from '../../chunk-PN3WUVKZ.js';
1
+ export { SINGLETON_BROWSER_ID, SeastudioNotifications, SeastudioRequests, agentManagementTools, agentTabTools, allTools, annotateTool, batchFlattenCopyEvidenceOutputSchema, browserTools, callTool, callToolText, dualPathEvidenceOutputSchema, editorTools, fileDownloadEvidenceOutputSchema, fileSaveAsEvidenceOutputSchema, fileTools, fileUrlEvidenceOutputSchema, gitTools, pluginManagementTools, pluginTabTools, projectTools, request, rootedPathEvidenceOutputSchema, rootedWriteEvidenceOutputSchema, runOneShotShellCommand, seastudio, shellSessionCloseEvidenceOutputSchema, shellSessionOpenEvidenceOutputSchema, shellSessionRunEvidenceOutputSchema, shellSessionSignalEvidenceOutputSchema, shellSessionSnapshotEvidenceOutputSchema, shellTools, skillTools, tools } from '../../chunk-352PJTT7.js';
2
2
  import '../../chunk-6XG5DRQW.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@seastudio/sdk",
3
- "version": "5.1.0",
3
+ "version": "5.2.0",
4
4
  "description": "SeaStudio SDK - UI 组件 + MCP 信息交换中心",
5
5
  "main": "dist/index.cjs",
6
6
  "module": "dist/index.js",