@seastudio/sdk 4.0.18 → 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.
@@ -336,50 +336,54 @@ interface SeastudioShellOneShotResult {
336
336
  durationMs: number;
337
337
  timedOut: boolean;
338
338
  }
339
- type SeastudioBrowserStatus = 'idle' | 'loading' | 'ready' | 'error';
340
- interface SeastudioBrowserCertificateError {
339
+ type SeastudioBrowserRuntimeStatus = 'idle' | 'loading' | 'ready' | 'error';
340
+ interface SeastudioBrowserRuntimeCertificateError {
341
341
  requestId: string;
342
342
  url: string;
343
343
  error: string;
344
344
  }
345
- interface SeastudioBrowserTab {
345
+ interface SeastudioBrowserRuntimeTab {
346
346
  id: string;
347
347
  title: string;
348
348
  url: string | null;
349
- status: SeastudioBrowserStatus;
349
+ status: SeastudioBrowserRuntimeStatus;
350
350
  errorMessage: string | null;
351
351
  canGoBack: boolean;
352
352
  canGoForward: boolean;
353
- certificateError?: SeastudioBrowserCertificateError | null;
353
+ certificateError?: SeastudioBrowserRuntimeCertificateError | null;
354
354
  ownerInstanceId?: string;
355
355
  }
356
- interface SeastudioBrowserState {
357
- browserSessionId: string;
356
+ interface SeastudioBrowserRuntimeState {
357
+ browserRuntimeSessionId: string;
358
358
  label?: string;
359
- partitionKey: string;
359
+ storagePartitionKey: string;
360
360
  homepage: string;
361
- tabs: SeastudioBrowserTab[];
361
+ tabs: SeastudioBrowserRuntimeTab[];
362
362
  activeTabId: string | null;
363
363
  }
364
- interface SeastudioBrowserSession extends SeastudioBrowserState {
364
+ interface SeastudioBrowserRuntimeSession extends SeastudioBrowserRuntimeState {
365
365
  createdAt: number;
366
366
  updatedAt: number;
367
367
  }
368
- interface SeastudioBrowserSessionOpenOptions {
368
+ interface SeastudioBrowserRuntimeSessionOpenOptions {
369
369
  label?: string;
370
- partitionKey?: string;
370
+ storagePartitionKey?: string;
371
371
  homepage?: string;
372
372
  }
373
- interface SeastudioBrowserRect {
373
+ interface SeastudioBrowserViewportRect {
374
374
  x: number;
375
375
  y: number;
376
376
  width: number;
377
377
  height: number;
378
378
  }
379
- interface SeastudioBrowserViewportBinding {
380
- browserSessionId: string;
379
+ interface SeastudioBrowserRuntimeViewportBinding {
380
+ browserRuntimeSessionId: string;
381
+ ownerInstanceId?: string;
382
+ rect: SeastudioBrowserViewportRect;
383
+ }
384
+ interface SeastudioBrowserRuntimeViewportBindOptions {
385
+ browserRuntimeSessionId?: string;
381
386
  ownerInstanceId?: string;
382
- rect: SeastudioBrowserRect;
383
387
  }
384
388
  declare function callTool(name: string, args?: Record<string, unknown>): Promise<MCPToolResult>;
385
389
  declare function request<T = unknown>(method: string, params?: Record<string, unknown>): Promise<T>;
@@ -482,72 +486,72 @@ declare const seastudio: {
482
486
  };
483
487
  };
484
488
  browser: {
485
- session: {
486
- open: (options?: SeastudioBrowserSessionOpenOptions) => Promise<SeastudioBrowserSession>;
489
+ runtimeSession: {
490
+ open: (options?: SeastudioBrowserRuntimeSessionOpenOptions) => Promise<SeastudioBrowserRuntimeSession>;
487
491
  list: () => Promise<{
488
- sessions: SeastudioBrowserSession[];
492
+ sessions: SeastudioBrowserRuntimeSession[];
489
493
  }>;
490
- get: (browserSessionId?: string) => Promise<SeastudioBrowserSession>;
491
- close: (browserSessionId?: string) => Promise<{
492
- browserSessionId: string;
494
+ get: (browserRuntimeSessionId?: string) => Promise<SeastudioBrowserRuntimeSession>;
495
+ close: (browserRuntimeSessionId?: string) => Promise<{
496
+ browserRuntimeSessionId: string;
493
497
  closed: boolean;
494
498
  }>;
495
499
  };
496
- show: (url: string) => Promise<{
497
- url: string;
498
- browserSessionId: string;
499
- instanceId?: string;
500
- tab?: SeastudioBrowserTab;
501
- }>;
502
- tab: {
503
- create: (browserSessionId?: string, url?: string, ownerInstanceId?: string) => Promise<{
504
- browserSessionId: string;
505
- tab: SeastudioBrowserTab;
500
+ runtimeTab: {
501
+ create: (browserRuntimeSessionId?: string, url?: string, ownerInstanceId?: string) => Promise<{
502
+ browserRuntimeSessionId: string;
503
+ tab: SeastudioBrowserRuntimeTab;
506
504
  activeTabId: string;
507
505
  }>;
508
- close: (browserSessionId: string, tabId: string) => Promise<{
509
- browserSessionId: string;
506
+ close: (browserRuntimeSessionId: string, tabId: string) => Promise<{
507
+ browserRuntimeSessionId: string;
510
508
  closedTabId: string;
511
509
  activeTabId: string | null;
512
510
  }>;
513
- activate: (browserSessionId: string, tabId: string) => Promise<{
514
- browserSessionId: string;
511
+ activate: (browserRuntimeSessionId: string, tabId: string) => Promise<{
512
+ browserRuntimeSessionId: string;
515
513
  activeTabId: string;
516
514
  }>;
517
- navigate: (browserSessionId: string, tabId: string, url: string) => Promise<{
518
- browserSessionId: string;
515
+ navigate: (browserRuntimeSessionId: string, tabId: string, url: string) => Promise<{
516
+ browserRuntimeSessionId: string;
519
517
  tabId: string;
520
518
  url: string;
521
519
  }>;
522
- goBack: (browserSessionId: string, tabId: string) => Promise<{
520
+ goBack: (browserRuntimeSessionId: string, tabId: string) => Promise<{
523
521
  ok: boolean;
524
522
  }>;
525
- goForward: (browserSessionId: string, tabId: string) => Promise<{
523
+ goForward: (browserRuntimeSessionId: string, tabId: string) => Promise<{
526
524
  ok: boolean;
527
525
  }>;
528
- reload: (browserSessionId: string, tabId: string) => Promise<{
526
+ reload: (browserRuntimeSessionId: string, tabId: string) => Promise<{
529
527
  ok: boolean;
530
528
  }>;
531
- stop: (browserSessionId: string, tabId: string) => Promise<{
529
+ stop: (browserRuntimeSessionId: string, tabId: string) => Promise<{
532
530
  ok: boolean;
533
531
  }>;
534
532
  getOrCreateForInstance: (ownerInstanceId: string, url?: string) => Promise<{
535
- browserSessionId: string;
536
- tab: SeastudioBrowserTab;
533
+ browserRuntimeSessionId: string;
534
+ tab: SeastudioBrowserRuntimeTab;
537
535
  activeTabId: string;
538
536
  created: boolean;
539
537
  }>;
540
538
  };
541
539
  viewport: {
542
- bind: (browserSessionId: string | undefined, rect: SeastudioBrowserRect, ownerInstanceId?: string) => Promise<SeastudioBrowserViewportBinding>;
540
+ bind: (rect: SeastudioBrowserViewportRect, options?: SeastudioBrowserRuntimeViewportBindOptions) => Promise<SeastudioBrowserRuntimeViewportBinding>;
543
541
  };
544
542
  runtime: {
545
- 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<{
546
550
  result: T;
547
551
  }>;
548
552
  };
549
553
  certificate: {
550
- respond: (browserSessionId: string, requestId: string, allow: boolean) => Promise<{
554
+ respond: (browserRuntimeSessionId: string, requestId: string, allow: boolean) => Promise<{
551
555
  ok: boolean;
552
556
  }>;
553
557
  };
@@ -596,7 +600,7 @@ declare const projectTools: MCPTool[];
596
600
 
597
601
  declare const skillTools: MCPTool[];
598
602
 
599
- declare const SINGLETON_BROWSER_SESSION_ID = "browser-session-default";
603
+ declare const SINGLETON_BROWSER_RUNTIME_SESSION_ID = "browser-runtime-session-default";
600
604
  declare const browserRuntimeTools: MCPTool[];
601
605
 
602
606
  /**
@@ -681,14 +685,14 @@ declare const SeastudioNotifications: {
681
685
  readonly PROPOSAL_FEEDBACK: "seastudio:proposal-feedback";
682
686
  /** 插件实例请求更新宿主 plugin tab 标题 */
683
687
  readonly PLUGIN_TAB_TITLE_CHANGED: "plugin:tab-title_changed";
684
- /** Browser Session 状态变化 */
685
- readonly BROWSER_SESSION_CHANGED: "browser:session_changed";
686
- /** Browser Session 关闭 */
687
- readonly BROWSER_SESSION_CLOSED: "browser:session_closed";
688
- /** Browser Session 证书错误,需要客户端 UI 决策 */
689
- readonly BROWSER_CERTIFICATE_ERROR: "browser:certificate_error";
690
- /** Browser Session 收到网页新标签请求 */
691
- 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";
692
696
  /**
693
697
  * Agent 对话 session:新建。消息历史仍由 Agent 前端持有,宿主仅同步列表用于侧栏。
694
698
  * 通常由 Agent 通过 notifications/publish 发出;其他订阅者(含 host-ui)可据此更新 UI。
@@ -1098,4 +1102,4 @@ interface HostAppVisibilityParams {
1098
1102
  declare const allTools: MCPTool[];
1099
1103
  declare const tools: MCPTool[];
1100
1104
 
1101
- 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, 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, seastudio, shellSessionCloseEvidenceOutputSchema, shellSessionOpenEvidenceOutputSchema, shellSessionRunEvidenceOutputSchema, shellSessionSignalEvidenceOutputSchema, shellSessionSnapshotEvidenceOutputSchema, shellTools, skillTools, tools } from '../../chunk-IAAA5JF6.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.18",
3
+ "version": "5.0.0",
4
4
  "description": "SeaStudio SDK - UI 组件 + MCP 信息交换中心",
5
5
  "main": "dist/index.cjs",
6
6
  "module": "dist/index.js",