@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.
- package/README.md +8 -3
- package/dist/{chunk-UIRFMS2U.cjs → chunk-55KNKQUO.cjs} +4 -4
- package/dist/{chunk-M5UESV5E.cjs → chunk-EGCXEVBD.cjs} +55 -55
- package/dist/{chunk-IAAA5JF6.js → chunk-FNA3TFHQ.js} +55 -55
- package/dist/{chunk-LMANS2IQ.js → chunk-GKR5RYBV.js} +1 -1
- package/dist/index.cjs +23 -23
- package/dist/index.js +2 -2
- package/dist/mcp/index.cjs +23 -23
- package/dist/mcp/index.js +2 -2
- package/dist/mcp/seastudio/index.cjs +36 -36
- package/dist/mcp/seastudio/index.d.cts +61 -57
- package/dist/mcp/seastudio/index.d.ts +61 -57
- package/dist/mcp/seastudio/index.js +1 -1
- package/package.json +1 -1
|
@@ -336,50 +336,54 @@ interface SeastudioShellOneShotResult {
|
|
|
336
336
|
durationMs: number;
|
|
337
337
|
timedOut: boolean;
|
|
338
338
|
}
|
|
339
|
-
type
|
|
340
|
-
interface
|
|
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
|
|
345
|
+
interface SeastudioBrowserRuntimeTab {
|
|
346
346
|
id: string;
|
|
347
347
|
title: string;
|
|
348
348
|
url: string | null;
|
|
349
|
-
status:
|
|
349
|
+
status: SeastudioBrowserRuntimeStatus;
|
|
350
350
|
errorMessage: string | null;
|
|
351
351
|
canGoBack: boolean;
|
|
352
352
|
canGoForward: boolean;
|
|
353
|
-
certificateError?:
|
|
353
|
+
certificateError?: SeastudioBrowserRuntimeCertificateError | null;
|
|
354
354
|
ownerInstanceId?: string;
|
|
355
355
|
}
|
|
356
|
-
interface
|
|
357
|
-
|
|
356
|
+
interface SeastudioBrowserRuntimeState {
|
|
357
|
+
browserRuntimeSessionId: string;
|
|
358
358
|
label?: string;
|
|
359
|
-
|
|
359
|
+
storagePartitionKey: string;
|
|
360
360
|
homepage: string;
|
|
361
|
-
tabs:
|
|
361
|
+
tabs: SeastudioBrowserRuntimeTab[];
|
|
362
362
|
activeTabId: string | null;
|
|
363
363
|
}
|
|
364
|
-
interface
|
|
364
|
+
interface SeastudioBrowserRuntimeSession extends SeastudioBrowserRuntimeState {
|
|
365
365
|
createdAt: number;
|
|
366
366
|
updatedAt: number;
|
|
367
367
|
}
|
|
368
|
-
interface
|
|
368
|
+
interface SeastudioBrowserRuntimeSessionOpenOptions {
|
|
369
369
|
label?: string;
|
|
370
|
-
|
|
370
|
+
storagePartitionKey?: string;
|
|
371
371
|
homepage?: string;
|
|
372
372
|
}
|
|
373
|
-
interface
|
|
373
|
+
interface SeastudioBrowserViewportRect {
|
|
374
374
|
x: number;
|
|
375
375
|
y: number;
|
|
376
376
|
width: number;
|
|
377
377
|
height: number;
|
|
378
378
|
}
|
|
379
|
-
interface
|
|
380
|
-
|
|
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
|
-
|
|
486
|
-
open: (options?:
|
|
489
|
+
runtimeSession: {
|
|
490
|
+
open: (options?: SeastudioBrowserRuntimeSessionOpenOptions) => Promise<SeastudioBrowserRuntimeSession>;
|
|
487
491
|
list: () => Promise<{
|
|
488
|
-
sessions:
|
|
492
|
+
sessions: SeastudioBrowserRuntimeSession[];
|
|
489
493
|
}>;
|
|
490
|
-
get: (
|
|
491
|
-
close: (
|
|
492
|
-
|
|
494
|
+
get: (browserRuntimeSessionId?: string) => Promise<SeastudioBrowserRuntimeSession>;
|
|
495
|
+
close: (browserRuntimeSessionId?: string) => Promise<{
|
|
496
|
+
browserRuntimeSessionId: string;
|
|
493
497
|
closed: boolean;
|
|
494
498
|
}>;
|
|
495
499
|
};
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
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: (
|
|
509
|
-
|
|
506
|
+
close: (browserRuntimeSessionId: string, tabId: string) => Promise<{
|
|
507
|
+
browserRuntimeSessionId: string;
|
|
510
508
|
closedTabId: string;
|
|
511
509
|
activeTabId: string | null;
|
|
512
510
|
}>;
|
|
513
|
-
activate: (
|
|
514
|
-
|
|
511
|
+
activate: (browserRuntimeSessionId: string, tabId: string) => Promise<{
|
|
512
|
+
browserRuntimeSessionId: string;
|
|
515
513
|
activeTabId: string;
|
|
516
514
|
}>;
|
|
517
|
-
navigate: (
|
|
518
|
-
|
|
515
|
+
navigate: (browserRuntimeSessionId: string, tabId: string, url: string) => Promise<{
|
|
516
|
+
browserRuntimeSessionId: string;
|
|
519
517
|
tabId: string;
|
|
520
518
|
url: string;
|
|
521
519
|
}>;
|
|
522
|
-
goBack: (
|
|
520
|
+
goBack: (browserRuntimeSessionId: string, tabId: string) => Promise<{
|
|
523
521
|
ok: boolean;
|
|
524
522
|
}>;
|
|
525
|
-
goForward: (
|
|
523
|
+
goForward: (browserRuntimeSessionId: string, tabId: string) => Promise<{
|
|
526
524
|
ok: boolean;
|
|
527
525
|
}>;
|
|
528
|
-
reload: (
|
|
526
|
+
reload: (browserRuntimeSessionId: string, tabId: string) => Promise<{
|
|
529
527
|
ok: boolean;
|
|
530
528
|
}>;
|
|
531
|
-
stop: (
|
|
529
|
+
stop: (browserRuntimeSessionId: string, tabId: string) => Promise<{
|
|
532
530
|
ok: boolean;
|
|
533
531
|
}>;
|
|
534
532
|
getOrCreateForInstance: (ownerInstanceId: string, url?: string) => Promise<{
|
|
535
|
-
|
|
536
|
-
tab:
|
|
533
|
+
browserRuntimeSessionId: string;
|
|
534
|
+
tab: SeastudioBrowserRuntimeTab;
|
|
537
535
|
activeTabId: string;
|
|
538
536
|
created: boolean;
|
|
539
537
|
}>;
|
|
540
538
|
};
|
|
541
539
|
viewport: {
|
|
542
|
-
bind: (
|
|
540
|
+
bind: (rect: SeastudioBrowserViewportRect, options?: SeastudioBrowserRuntimeViewportBindOptions) => Promise<SeastudioBrowserRuntimeViewportBinding>;
|
|
543
541
|
};
|
|
544
542
|
runtime: {
|
|
545
|
-
|
|
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: (
|
|
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
|
|
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
|
-
/**
|
|
685
|
-
readonly
|
|
686
|
-
/**
|
|
687
|
-
readonly
|
|
688
|
-
/**
|
|
689
|
-
readonly
|
|
690
|
-
/**
|
|
691
|
-
readonly
|
|
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,
|
|
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 {
|
|
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';
|