@seastudio/sdk 4.0.16 → 5.0.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.
@@ -130,14 +130,6 @@ declare const gitTools: MCPTool[];
130
130
 
131
131
  declare const shellTools: MCPTool[];
132
132
 
133
- /**
134
- * AIGC MCP Tools
135
- *
136
- * SeaCloud 多模态生成能力。
137
- */
138
-
139
- declare const seaCloudTools: MCPTool[];
140
-
141
133
  /**
142
134
  * SeaStudio MCP Client Helpers
143
135
  *
@@ -344,50 +336,54 @@ interface SeastudioShellOneShotResult {
344
336
  durationMs: number;
345
337
  timedOut: boolean;
346
338
  }
347
- type SeastudioBrowserStatus = 'idle' | 'loading' | 'ready' | 'error';
348
- interface SeastudioBrowserCertificateError {
339
+ type SeastudioBrowserRuntimeStatus = 'idle' | 'loading' | 'ready' | 'error';
340
+ interface SeastudioBrowserRuntimeCertificateError {
349
341
  requestId: string;
350
342
  url: string;
351
343
  error: string;
352
344
  }
353
- interface SeastudioBrowserTab {
345
+ interface SeastudioBrowserRuntimeTab {
354
346
  id: string;
355
347
  title: string;
356
348
  url: string | null;
357
- status: SeastudioBrowserStatus;
349
+ status: SeastudioBrowserRuntimeStatus;
358
350
  errorMessage: string | null;
359
351
  canGoBack: boolean;
360
352
  canGoForward: boolean;
361
- certificateError?: SeastudioBrowserCertificateError | null;
353
+ certificateError?: SeastudioBrowserRuntimeCertificateError | null;
362
354
  ownerInstanceId?: string;
363
355
  }
364
- interface SeastudioBrowserState {
365
- browserSessionId: string;
356
+ interface SeastudioBrowserRuntimeState {
357
+ browserRuntimeSessionId: string;
366
358
  label?: string;
367
- partitionKey: string;
359
+ storagePartitionKey: string;
368
360
  homepage: string;
369
- tabs: SeastudioBrowserTab[];
361
+ tabs: SeastudioBrowserRuntimeTab[];
370
362
  activeTabId: string | null;
371
363
  }
372
- interface SeastudioBrowserSession extends SeastudioBrowserState {
364
+ interface SeastudioBrowserRuntimeSession extends SeastudioBrowserRuntimeState {
373
365
  createdAt: number;
374
366
  updatedAt: number;
375
367
  }
376
- interface SeastudioBrowserSessionOpenOptions {
368
+ interface SeastudioBrowserRuntimeSessionOpenOptions {
377
369
  label?: string;
378
- partitionKey?: string;
370
+ storagePartitionKey?: string;
379
371
  homepage?: string;
380
372
  }
381
- interface SeastudioBrowserRect {
373
+ interface SeastudioBrowserViewportRect {
382
374
  x: number;
383
375
  y: number;
384
376
  width: number;
385
377
  height: number;
386
378
  }
387
- interface SeastudioBrowserViewportBinding {
388
- browserSessionId: string;
379
+ interface SeastudioBrowserRuntimeViewportBinding {
380
+ browserRuntimeSessionId: string;
381
+ ownerInstanceId?: string;
382
+ rect: SeastudioBrowserViewportRect;
383
+ }
384
+ interface SeastudioBrowserRuntimeViewportBindOptions {
385
+ browserRuntimeSessionId?: string;
389
386
  ownerInstanceId?: string;
390
- rect: SeastudioBrowserRect;
391
387
  }
392
388
  declare function callTool(name: string, args?: Record<string, unknown>): Promise<MCPToolResult>;
393
389
  declare function request<T = unknown>(method: string, params?: Record<string, unknown>): Promise<T>;
@@ -490,72 +486,72 @@ declare const seastudio: {
490
486
  };
491
487
  };
492
488
  browser: {
493
- session: {
494
- open: (options?: SeastudioBrowserSessionOpenOptions) => Promise<SeastudioBrowserSession>;
489
+ runtimeSession: {
490
+ open: (options?: SeastudioBrowserRuntimeSessionOpenOptions) => Promise<SeastudioBrowserRuntimeSession>;
495
491
  list: () => Promise<{
496
- sessions: SeastudioBrowserSession[];
492
+ sessions: SeastudioBrowserRuntimeSession[];
497
493
  }>;
498
- get: (browserSessionId?: string) => Promise<SeastudioBrowserSession>;
499
- close: (browserSessionId?: string) => Promise<{
500
- browserSessionId: string;
494
+ get: (browserRuntimeSessionId?: string) => Promise<SeastudioBrowserRuntimeSession>;
495
+ close: (browserRuntimeSessionId?: string) => Promise<{
496
+ browserRuntimeSessionId: string;
501
497
  closed: boolean;
502
498
  }>;
503
499
  };
504
- show: (url: string) => Promise<{
505
- url: string;
506
- browserSessionId: string;
507
- instanceId?: string;
508
- tab?: SeastudioBrowserTab;
509
- }>;
510
- tab: {
511
- create: (browserSessionId?: string, url?: string, ownerInstanceId?: string) => Promise<{
512
- browserSessionId: string;
513
- tab: SeastudioBrowserTab;
500
+ runtimeTab: {
501
+ create: (browserRuntimeSessionId?: string, url?: string, ownerInstanceId?: string) => Promise<{
502
+ browserRuntimeSessionId: string;
503
+ tab: SeastudioBrowserRuntimeTab;
514
504
  activeTabId: string;
515
505
  }>;
516
- close: (browserSessionId: string, tabId: string) => Promise<{
517
- browserSessionId: string;
506
+ close: (browserRuntimeSessionId: string, tabId: string) => Promise<{
507
+ browserRuntimeSessionId: string;
518
508
  closedTabId: string;
519
509
  activeTabId: string | null;
520
510
  }>;
521
- activate: (browserSessionId: string, tabId: string) => Promise<{
522
- browserSessionId: string;
511
+ activate: (browserRuntimeSessionId: string, tabId: string) => Promise<{
512
+ browserRuntimeSessionId: string;
523
513
  activeTabId: string;
524
514
  }>;
525
- navigate: (browserSessionId: string, tabId: string, url: string) => Promise<{
526
- browserSessionId: string;
515
+ navigate: (browserRuntimeSessionId: string, tabId: string, url: string) => Promise<{
516
+ browserRuntimeSessionId: string;
527
517
  tabId: string;
528
518
  url: string;
529
519
  }>;
530
- goBack: (browserSessionId: string, tabId: string) => Promise<{
520
+ goBack: (browserRuntimeSessionId: string, tabId: string) => Promise<{
531
521
  ok: boolean;
532
522
  }>;
533
- goForward: (browserSessionId: string, tabId: string) => Promise<{
523
+ goForward: (browserRuntimeSessionId: string, tabId: string) => Promise<{
534
524
  ok: boolean;
535
525
  }>;
536
- reload: (browserSessionId: string, tabId: string) => Promise<{
526
+ reload: (browserRuntimeSessionId: string, tabId: string) => Promise<{
537
527
  ok: boolean;
538
528
  }>;
539
- stop: (browserSessionId: string, tabId: string) => Promise<{
529
+ stop: (browserRuntimeSessionId: string, tabId: string) => Promise<{
540
530
  ok: boolean;
541
531
  }>;
542
532
  getOrCreateForInstance: (ownerInstanceId: string, url?: string) => Promise<{
543
- browserSessionId: string;
544
- tab: SeastudioBrowserTab;
533
+ browserRuntimeSessionId: string;
534
+ tab: SeastudioBrowserRuntimeTab;
545
535
  activeTabId: string;
546
536
  created: boolean;
547
537
  }>;
548
538
  };
549
539
  viewport: {
550
- bind: (browserSessionId: string | undefined, rect: SeastudioBrowserRect, ownerInstanceId?: string) => Promise<SeastudioBrowserViewportBinding>;
540
+ bind: (rect: SeastudioBrowserViewportRect, options?: SeastudioBrowserRuntimeViewportBindOptions) => Promise<SeastudioBrowserRuntimeViewportBinding>;
551
541
  };
552
542
  runtime: {
553
- evaluate: <T = unknown>(browserSessionId: string, tabId: string, script: string, timeoutMs?: number) => Promise<{
543
+ show: (url: string) => Promise<{
544
+ url: string;
545
+ browserRuntimeSessionId: string;
546
+ instanceId?: string;
547
+ tab?: SeastudioBrowserRuntimeTab;
548
+ }>;
549
+ evaluate: <T = unknown>(browserRuntimeSessionId: string, tabId: string, script: string, timeoutMs?: number) => Promise<{
554
550
  result: T;
555
551
  }>;
556
552
  };
557
553
  certificate: {
558
- respond: (browserSessionId: string, requestId: string, allow: boolean) => Promise<{
554
+ respond: (browserRuntimeSessionId: string, requestId: string, allow: boolean) => Promise<{
559
555
  ok: boolean;
560
556
  }>;
561
557
  };
@@ -604,7 +600,7 @@ declare const projectTools: MCPTool[];
604
600
 
605
601
  declare const skillTools: MCPTool[];
606
602
 
607
- declare const SINGLETON_BROWSER_SESSION_ID = "browser-session-default";
603
+ declare const SINGLETON_BROWSER_RUNTIME_SESSION_ID = "browser-runtime-session-default";
608
604
  declare const browserRuntimeTools: MCPTool[];
609
605
 
610
606
  /**
@@ -689,14 +685,14 @@ declare const SeastudioNotifications: {
689
685
  readonly PROPOSAL_FEEDBACK: "seastudio:proposal-feedback";
690
686
  /** 插件实例请求更新宿主 plugin tab 标题 */
691
687
  readonly PLUGIN_TAB_TITLE_CHANGED: "plugin:tab-title_changed";
692
- /** Browser Session 状态变化 */
693
- readonly BROWSER_SESSION_CHANGED: "browser:session_changed";
694
- /** Browser Session 关闭 */
695
- readonly BROWSER_SESSION_CLOSED: "browser:session_closed";
696
- /** Browser Session 证书错误,需要客户端 UI 决策 */
697
- readonly BROWSER_CERTIFICATE_ERROR: "browser:certificate_error";
698
- /** Browser Session 收到网页新标签请求 */
699
- readonly BROWSER_NEW_TAB_REQUESTED: "browser:new_tab_requested";
688
+ /** BrowserRuntimeSession 状态变化 */
689
+ readonly BROWSER_RUNTIME_SESSION_CHANGED: "browser-runtime:session_changed";
690
+ /** BrowserRuntimeSession 关闭 */
691
+ readonly BROWSER_RUNTIME_SESSION_CLOSED: "browser-runtime:session_closed";
692
+ /** BrowserRuntimeSession 证书错误,需要客户端 UI 决策 */
693
+ readonly BROWSER_RUNTIME_CERTIFICATE_ERROR: "browser-runtime:certificate_error";
694
+ /** BrowserRuntimeSession 收到网页新标签请求 */
695
+ readonly BROWSER_RUNTIME_NEW_TAB_REQUESTED: "browser-runtime:new_tab_requested";
700
696
  /**
701
697
  * Agent 对话 session:新建。消息历史仍由 Agent 前端持有,宿主仅同步列表用于侧栏。
702
698
  * 通常由 Agent 通过 notifications/publish 发出;其他订阅者(含 host-ui)可据此更新 UI。
@@ -1106,4 +1102,4 @@ interface HostAppVisibilityParams {
1106
1102
  declare const allTools: MCPTool[];
1107
1103
  declare const tools: MCPTool[];
1108
1104
 
1109
- 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 ProposalChangedParams, type ProposalFeedbackFileSummary, type ProposalFeedbackHunk, type ProposalFeedbackOrigin, type ProposalFeedbackParams, type ProposalRecord, type ProposalRequestedFile, type ProposalRequestedHunk, type ProposalRequestedParams, type ProposalStatus, type RootsChangedParams, SINGLETON_BROWSER_SESSION_ID, 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 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, browserRuntimeTools, callTool, callToolText, dualPathEvidenceOutputSchema, editorTools, fileDownloadEvidenceOutputSchema, fileSaveAsEvidenceOutputSchema, fileTools, fileUrlEvidenceOutputSchema, gitTools, pluginManagementTools, pluginTabTools, projectTools, request, rootedPathEvidenceOutputSchema, rootedWriteEvidenceOutputSchema, runOneShotShellCommand, seaCloudTools, seastudio, shellSessionCloseEvidenceOutputSchema, shellSessionOpenEvidenceOutputSchema, shellSessionRunEvidenceOutputSchema, shellSessionSignalEvidenceOutputSchema, shellSessionSnapshotEvidenceOutputSchema, shellTools, skillTools, tools };
1105
+ 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 ProposalChangedParams, type ProposalFeedbackFileSummary, type ProposalFeedbackHunk, type ProposalFeedbackOrigin, type ProposalFeedbackParams, type ProposalRecord, type ProposalRequestedFile, type ProposalRequestedHunk, type ProposalRequestedParams, type ProposalStatus, type RootsChangedParams, SINGLETON_BROWSER_RUNTIME_SESSION_ID, type SeastudioBatchFlattenCopyOptions, type SeastudioBatchFlattenPreviewOptions, type SeastudioBrowserRuntimeCertificateError, type SeastudioBrowserRuntimeSession, type SeastudioBrowserRuntimeSessionOpenOptions, type SeastudioBrowserRuntimeState, type SeastudioBrowserRuntimeStatus, type SeastudioBrowserRuntimeTab, type SeastudioBrowserRuntimeViewportBindOptions, type SeastudioBrowserRuntimeViewportBinding, 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, browserRuntimeTools, 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 };
@@ -130,14 +130,6 @@ declare const gitTools: MCPTool[];
130
130
 
131
131
  declare const shellTools: MCPTool[];
132
132
 
133
- /**
134
- * AIGC MCP Tools
135
- *
136
- * SeaCloud 多模态生成能力。
137
- */
138
-
139
- declare const seaCloudTools: MCPTool[];
140
-
141
133
  /**
142
134
  * SeaStudio MCP Client Helpers
143
135
  *
@@ -344,50 +336,54 @@ interface SeastudioShellOneShotResult {
344
336
  durationMs: number;
345
337
  timedOut: boolean;
346
338
  }
347
- type SeastudioBrowserStatus = 'idle' | 'loading' | 'ready' | 'error';
348
- interface SeastudioBrowserCertificateError {
339
+ type SeastudioBrowserRuntimeStatus = 'idle' | 'loading' | 'ready' | 'error';
340
+ interface SeastudioBrowserRuntimeCertificateError {
349
341
  requestId: string;
350
342
  url: string;
351
343
  error: string;
352
344
  }
353
- interface SeastudioBrowserTab {
345
+ interface SeastudioBrowserRuntimeTab {
354
346
  id: string;
355
347
  title: string;
356
348
  url: string | null;
357
- status: SeastudioBrowserStatus;
349
+ status: SeastudioBrowserRuntimeStatus;
358
350
  errorMessage: string | null;
359
351
  canGoBack: boolean;
360
352
  canGoForward: boolean;
361
- certificateError?: SeastudioBrowserCertificateError | null;
353
+ certificateError?: SeastudioBrowserRuntimeCertificateError | null;
362
354
  ownerInstanceId?: string;
363
355
  }
364
- interface SeastudioBrowserState {
365
- browserSessionId: string;
356
+ interface SeastudioBrowserRuntimeState {
357
+ browserRuntimeSessionId: string;
366
358
  label?: string;
367
- partitionKey: string;
359
+ storagePartitionKey: string;
368
360
  homepage: string;
369
- tabs: SeastudioBrowserTab[];
361
+ tabs: SeastudioBrowserRuntimeTab[];
370
362
  activeTabId: string | null;
371
363
  }
372
- interface SeastudioBrowserSession extends SeastudioBrowserState {
364
+ interface SeastudioBrowserRuntimeSession extends SeastudioBrowserRuntimeState {
373
365
  createdAt: number;
374
366
  updatedAt: number;
375
367
  }
376
- interface SeastudioBrowserSessionOpenOptions {
368
+ interface SeastudioBrowserRuntimeSessionOpenOptions {
377
369
  label?: string;
378
- partitionKey?: string;
370
+ storagePartitionKey?: string;
379
371
  homepage?: string;
380
372
  }
381
- interface SeastudioBrowserRect {
373
+ interface SeastudioBrowserViewportRect {
382
374
  x: number;
383
375
  y: number;
384
376
  width: number;
385
377
  height: number;
386
378
  }
387
- interface SeastudioBrowserViewportBinding {
388
- browserSessionId: string;
379
+ interface SeastudioBrowserRuntimeViewportBinding {
380
+ browserRuntimeSessionId: string;
381
+ ownerInstanceId?: string;
382
+ rect: SeastudioBrowserViewportRect;
383
+ }
384
+ interface SeastudioBrowserRuntimeViewportBindOptions {
385
+ browserRuntimeSessionId?: string;
389
386
  ownerInstanceId?: string;
390
- rect: SeastudioBrowserRect;
391
387
  }
392
388
  declare function callTool(name: string, args?: Record<string, unknown>): Promise<MCPToolResult>;
393
389
  declare function request<T = unknown>(method: string, params?: Record<string, unknown>): Promise<T>;
@@ -490,72 +486,72 @@ declare const seastudio: {
490
486
  };
491
487
  };
492
488
  browser: {
493
- session: {
494
- open: (options?: SeastudioBrowserSessionOpenOptions) => Promise<SeastudioBrowserSession>;
489
+ runtimeSession: {
490
+ open: (options?: SeastudioBrowserRuntimeSessionOpenOptions) => Promise<SeastudioBrowserRuntimeSession>;
495
491
  list: () => Promise<{
496
- sessions: SeastudioBrowserSession[];
492
+ sessions: SeastudioBrowserRuntimeSession[];
497
493
  }>;
498
- get: (browserSessionId?: string) => Promise<SeastudioBrowserSession>;
499
- close: (browserSessionId?: string) => Promise<{
500
- browserSessionId: string;
494
+ get: (browserRuntimeSessionId?: string) => Promise<SeastudioBrowserRuntimeSession>;
495
+ close: (browserRuntimeSessionId?: string) => Promise<{
496
+ browserRuntimeSessionId: string;
501
497
  closed: boolean;
502
498
  }>;
503
499
  };
504
- show: (url: string) => Promise<{
505
- url: string;
506
- browserSessionId: string;
507
- instanceId?: string;
508
- tab?: SeastudioBrowserTab;
509
- }>;
510
- tab: {
511
- create: (browserSessionId?: string, url?: string, ownerInstanceId?: string) => Promise<{
512
- browserSessionId: string;
513
- tab: SeastudioBrowserTab;
500
+ runtimeTab: {
501
+ create: (browserRuntimeSessionId?: string, url?: string, ownerInstanceId?: string) => Promise<{
502
+ browserRuntimeSessionId: string;
503
+ tab: SeastudioBrowserRuntimeTab;
514
504
  activeTabId: string;
515
505
  }>;
516
- close: (browserSessionId: string, tabId: string) => Promise<{
517
- browserSessionId: string;
506
+ close: (browserRuntimeSessionId: string, tabId: string) => Promise<{
507
+ browserRuntimeSessionId: string;
518
508
  closedTabId: string;
519
509
  activeTabId: string | null;
520
510
  }>;
521
- activate: (browserSessionId: string, tabId: string) => Promise<{
522
- browserSessionId: string;
511
+ activate: (browserRuntimeSessionId: string, tabId: string) => Promise<{
512
+ browserRuntimeSessionId: string;
523
513
  activeTabId: string;
524
514
  }>;
525
- navigate: (browserSessionId: string, tabId: string, url: string) => Promise<{
526
- browserSessionId: string;
515
+ navigate: (browserRuntimeSessionId: string, tabId: string, url: string) => Promise<{
516
+ browserRuntimeSessionId: string;
527
517
  tabId: string;
528
518
  url: string;
529
519
  }>;
530
- goBack: (browserSessionId: string, tabId: string) => Promise<{
520
+ goBack: (browserRuntimeSessionId: string, tabId: string) => Promise<{
531
521
  ok: boolean;
532
522
  }>;
533
- goForward: (browserSessionId: string, tabId: string) => Promise<{
523
+ goForward: (browserRuntimeSessionId: string, tabId: string) => Promise<{
534
524
  ok: boolean;
535
525
  }>;
536
- reload: (browserSessionId: string, tabId: string) => Promise<{
526
+ reload: (browserRuntimeSessionId: string, tabId: string) => Promise<{
537
527
  ok: boolean;
538
528
  }>;
539
- stop: (browserSessionId: string, tabId: string) => Promise<{
529
+ stop: (browserRuntimeSessionId: string, tabId: string) => Promise<{
540
530
  ok: boolean;
541
531
  }>;
542
532
  getOrCreateForInstance: (ownerInstanceId: string, url?: string) => Promise<{
543
- browserSessionId: string;
544
- tab: SeastudioBrowserTab;
533
+ browserRuntimeSessionId: string;
534
+ tab: SeastudioBrowserRuntimeTab;
545
535
  activeTabId: string;
546
536
  created: boolean;
547
537
  }>;
548
538
  };
549
539
  viewport: {
550
- bind: (browserSessionId: string | undefined, rect: SeastudioBrowserRect, ownerInstanceId?: string) => Promise<SeastudioBrowserViewportBinding>;
540
+ bind: (rect: SeastudioBrowserViewportRect, options?: SeastudioBrowserRuntimeViewportBindOptions) => Promise<SeastudioBrowserRuntimeViewportBinding>;
551
541
  };
552
542
  runtime: {
553
- evaluate: <T = unknown>(browserSessionId: string, tabId: string, script: string, timeoutMs?: number) => Promise<{
543
+ show: (url: string) => Promise<{
544
+ url: string;
545
+ browserRuntimeSessionId: string;
546
+ instanceId?: string;
547
+ tab?: SeastudioBrowserRuntimeTab;
548
+ }>;
549
+ evaluate: <T = unknown>(browserRuntimeSessionId: string, tabId: string, script: string, timeoutMs?: number) => Promise<{
554
550
  result: T;
555
551
  }>;
556
552
  };
557
553
  certificate: {
558
- respond: (browserSessionId: string, requestId: string, allow: boolean) => Promise<{
554
+ respond: (browserRuntimeSessionId: string, requestId: string, allow: boolean) => Promise<{
559
555
  ok: boolean;
560
556
  }>;
561
557
  };
@@ -604,7 +600,7 @@ declare const projectTools: MCPTool[];
604
600
 
605
601
  declare const skillTools: MCPTool[];
606
602
 
607
- declare const SINGLETON_BROWSER_SESSION_ID = "browser-session-default";
603
+ declare const SINGLETON_BROWSER_RUNTIME_SESSION_ID = "browser-runtime-session-default";
608
604
  declare const browserRuntimeTools: MCPTool[];
609
605
 
610
606
  /**
@@ -689,14 +685,14 @@ declare const SeastudioNotifications: {
689
685
  readonly PROPOSAL_FEEDBACK: "seastudio:proposal-feedback";
690
686
  /** 插件实例请求更新宿主 plugin tab 标题 */
691
687
  readonly PLUGIN_TAB_TITLE_CHANGED: "plugin:tab-title_changed";
692
- /** Browser Session 状态变化 */
693
- readonly BROWSER_SESSION_CHANGED: "browser:session_changed";
694
- /** Browser Session 关闭 */
695
- readonly BROWSER_SESSION_CLOSED: "browser:session_closed";
696
- /** Browser Session 证书错误,需要客户端 UI 决策 */
697
- readonly BROWSER_CERTIFICATE_ERROR: "browser:certificate_error";
698
- /** Browser Session 收到网页新标签请求 */
699
- readonly BROWSER_NEW_TAB_REQUESTED: "browser:new_tab_requested";
688
+ /** BrowserRuntimeSession 状态变化 */
689
+ readonly BROWSER_RUNTIME_SESSION_CHANGED: "browser-runtime:session_changed";
690
+ /** BrowserRuntimeSession 关闭 */
691
+ readonly BROWSER_RUNTIME_SESSION_CLOSED: "browser-runtime:session_closed";
692
+ /** BrowserRuntimeSession 证书错误,需要客户端 UI 决策 */
693
+ readonly BROWSER_RUNTIME_CERTIFICATE_ERROR: "browser-runtime:certificate_error";
694
+ /** BrowserRuntimeSession 收到网页新标签请求 */
695
+ readonly BROWSER_RUNTIME_NEW_TAB_REQUESTED: "browser-runtime:new_tab_requested";
700
696
  /**
701
697
  * Agent 对话 session:新建。消息历史仍由 Agent 前端持有,宿主仅同步列表用于侧栏。
702
698
  * 通常由 Agent 通过 notifications/publish 发出;其他订阅者(含 host-ui)可据此更新 UI。
@@ -1106,4 +1102,4 @@ interface HostAppVisibilityParams {
1106
1102
  declare const allTools: MCPTool[];
1107
1103
  declare const tools: MCPTool[];
1108
1104
 
1109
- 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 ProposalChangedParams, type ProposalFeedbackFileSummary, type ProposalFeedbackHunk, type ProposalFeedbackOrigin, type ProposalFeedbackParams, type ProposalRecord, type ProposalRequestedFile, type ProposalRequestedHunk, type ProposalRequestedParams, type ProposalStatus, type RootsChangedParams, SINGLETON_BROWSER_SESSION_ID, 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 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, browserRuntimeTools, callTool, callToolText, dualPathEvidenceOutputSchema, editorTools, fileDownloadEvidenceOutputSchema, fileSaveAsEvidenceOutputSchema, fileTools, fileUrlEvidenceOutputSchema, gitTools, pluginManagementTools, pluginTabTools, projectTools, request, rootedPathEvidenceOutputSchema, rootedWriteEvidenceOutputSchema, runOneShotShellCommand, seaCloudTools, seastudio, shellSessionCloseEvidenceOutputSchema, shellSessionOpenEvidenceOutputSchema, shellSessionRunEvidenceOutputSchema, shellSessionSignalEvidenceOutputSchema, shellSessionSnapshotEvidenceOutputSchema, shellTools, skillTools, tools };
1105
+ 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 ProposalChangedParams, type ProposalFeedbackFileSummary, type ProposalFeedbackHunk, type ProposalFeedbackOrigin, type ProposalFeedbackParams, type ProposalRecord, type ProposalRequestedFile, type ProposalRequestedHunk, type ProposalRequestedParams, type ProposalStatus, type RootsChangedParams, SINGLETON_BROWSER_RUNTIME_SESSION_ID, type SeastudioBatchFlattenCopyOptions, type SeastudioBatchFlattenPreviewOptions, type SeastudioBrowserRuntimeCertificateError, type SeastudioBrowserRuntimeSession, type SeastudioBrowserRuntimeSessionOpenOptions, type SeastudioBrowserRuntimeState, type SeastudioBrowserRuntimeStatus, type SeastudioBrowserRuntimeTab, type SeastudioBrowserRuntimeViewportBindOptions, type SeastudioBrowserRuntimeViewportBinding, 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, browserRuntimeTools, 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_BROWSER_SESSION_ID, SeastudioNotifications, SeastudioRequests, agentManagementTools, agentTabTools, allTools, annotateTool, batchFlattenCopyEvidenceOutputSchema, browserRuntimeTools, callTool, callToolText, dualPathEvidenceOutputSchema, editorTools, fileDownloadEvidenceOutputSchema, fileSaveAsEvidenceOutputSchema, fileTools, fileUrlEvidenceOutputSchema, gitTools, pluginManagementTools, pluginTabTools, projectTools, request, rootedPathEvidenceOutputSchema, rootedWriteEvidenceOutputSchema, runOneShotShellCommand, seaCloudTools, seastudio, shellSessionCloseEvidenceOutputSchema, shellSessionOpenEvidenceOutputSchema, shellSessionRunEvidenceOutputSchema, shellSessionSignalEvidenceOutputSchema, shellSessionSnapshotEvidenceOutputSchema, shellTools, skillTools, tools } from '../../chunk-QS3WNDIH.js';
1
+ export { SINGLETON_BROWSER_RUNTIME_SESSION_ID, SeastudioNotifications, SeastudioRequests, agentManagementTools, agentTabTools, allTools, annotateTool, batchFlattenCopyEvidenceOutputSchema, browserRuntimeTools, 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-FNA3TFHQ.js';
2
2
  import '../../chunk-TJ3CGHWJ.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@seastudio/sdk",
3
- "version": "4.0.16",
3
+ "version": "5.0.0",
4
4
  "description": "SeaStudio SDK - UI 组件 + MCP 信息交换中心",
5
5
  "main": "dist/index.cjs",
6
6
  "module": "dist/index.js",