@seastudio/sdk 5.0.0 → 6.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 +2 -2
- package/dist/{chunk-TJ3CGHWJ.js → chunk-6XG5DRQW.js} +0 -9
- package/dist/{chunk-3I7UM66P.cjs → chunk-77OAWBLL.cjs} +0 -9
- package/dist/{chunk-EGCXEVBD.cjs → chunk-CHTNN2X3.cjs} +86 -84
- package/dist/{chunk-GKR5RYBV.js → chunk-ELOYCCXA.js} +2 -2
- package/dist/{chunk-FNA3TFHQ.js → chunk-PN3WUVKZ.js} +82 -80
- package/dist/{chunk-55KNKQUO.cjs → chunk-SIAVXTH5.cjs} +10 -10
- package/dist/index.cjs +45 -45
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +3 -3
- package/dist/mcp/core/index.cjs +22 -22
- package/dist/mcp/core/index.d.cts +2 -2
- package/dist/mcp/core/index.d.ts +2 -2
- package/dist/mcp/core/index.js +1 -1
- package/dist/mcp/index.cjs +45 -45
- package/dist/mcp/index.d.cts +2 -2
- package/dist/mcp/index.d.ts +2 -2
- package/dist/mcp/index.js +3 -3
- package/dist/mcp/seastudio/index.cjs +40 -40
- package/dist/mcp/seastudio/index.d.cts +99 -64
- package/dist/mcp/seastudio/index.d.ts +99 -64
- package/dist/mcp/seastudio/index.js +2 -2
- package/dist/{types-D7xY0bt6.d.cts → types-S2uWCEaN.d.cts} +1 -1
- package/dist/{types-D7xY0bt6.d.ts → types-S2uWCEaN.d.ts} +1 -1
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { g as MCPTool, h as MCPToolAnnotations, j as MCPToolInputSchema, k as MCPToolResult } from '../../types-
|
|
1
|
+
import { g as MCPTool, h as MCPToolAnnotations, j as MCPToolInputSchema, k as MCPToolResult } from '../../types-S2uWCEaN.cjs';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Git 共享类型契约
|
|
@@ -336,53 +336,53 @@ interface SeastudioShellOneShotResult {
|
|
|
336
336
|
durationMs: number;
|
|
337
337
|
timedOut: boolean;
|
|
338
338
|
}
|
|
339
|
-
type
|
|
340
|
-
interface
|
|
339
|
+
type SeastudioWebviewRuntimeStatus = 'idle' | 'loading' | 'ready' | 'error';
|
|
340
|
+
interface SeastudioWebviewRuntimeCertificateError {
|
|
341
341
|
requestId: string;
|
|
342
342
|
url: string;
|
|
343
343
|
error: string;
|
|
344
344
|
}
|
|
345
|
-
interface
|
|
345
|
+
interface SeastudioWebviewRuntimeTab {
|
|
346
346
|
id: string;
|
|
347
347
|
title: string;
|
|
348
348
|
url: string | null;
|
|
349
|
-
status:
|
|
349
|
+
status: SeastudioWebviewRuntimeStatus;
|
|
350
350
|
errorMessage: string | null;
|
|
351
351
|
canGoBack: boolean;
|
|
352
352
|
canGoForward: boolean;
|
|
353
|
-
certificateError?:
|
|
353
|
+
certificateError?: SeastudioWebviewRuntimeCertificateError | null;
|
|
354
354
|
ownerInstanceId?: string;
|
|
355
355
|
}
|
|
356
|
-
interface
|
|
357
|
-
|
|
356
|
+
interface SeastudioWebviewRuntimeState {
|
|
357
|
+
webviewRuntimeId: string;
|
|
358
358
|
label?: string;
|
|
359
359
|
storagePartitionKey: string;
|
|
360
360
|
homepage: string;
|
|
361
|
-
tabs:
|
|
361
|
+
tabs: SeastudioWebviewRuntimeTab[];
|
|
362
362
|
activeTabId: string | null;
|
|
363
363
|
}
|
|
364
|
-
interface
|
|
364
|
+
interface SeastudioWebviewRuntime extends SeastudioWebviewRuntimeState {
|
|
365
365
|
createdAt: number;
|
|
366
366
|
updatedAt: number;
|
|
367
367
|
}
|
|
368
|
-
interface
|
|
368
|
+
interface SeastudioWebviewRuntimeOpenOptions {
|
|
369
369
|
label?: string;
|
|
370
370
|
storagePartitionKey?: string;
|
|
371
371
|
homepage?: string;
|
|
372
372
|
}
|
|
373
|
-
interface
|
|
373
|
+
interface SeastudioWebviewViewportRect {
|
|
374
374
|
x: number;
|
|
375
375
|
y: number;
|
|
376
376
|
width: number;
|
|
377
377
|
height: number;
|
|
378
378
|
}
|
|
379
|
-
interface
|
|
380
|
-
|
|
379
|
+
interface SeastudioWebviewRuntimeViewportBinding {
|
|
380
|
+
webviewRuntimeId: string;
|
|
381
381
|
ownerInstanceId?: string;
|
|
382
|
-
rect:
|
|
382
|
+
rect: SeastudioWebviewViewportRect;
|
|
383
383
|
}
|
|
384
|
-
interface
|
|
385
|
-
|
|
384
|
+
interface SeastudioWebviewRuntimeViewportBindOptions {
|
|
385
|
+
webviewRuntimeId?: string;
|
|
386
386
|
ownerInstanceId?: string;
|
|
387
387
|
}
|
|
388
388
|
declare function callTool(name: string, args?: Record<string, unknown>): Promise<MCPToolResult>;
|
|
@@ -485,73 +485,71 @@ declare const seastudio: {
|
|
|
485
485
|
close: (sessionId: string, force?: boolean) => Promise<MCPToolResult>;
|
|
486
486
|
};
|
|
487
487
|
};
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
open: (options?:
|
|
488
|
+
webview: {
|
|
489
|
+
runtime: {
|
|
490
|
+
open: (options?: SeastudioWebviewRuntimeOpenOptions) => Promise<SeastudioWebviewRuntime>;
|
|
491
491
|
list: () => Promise<{
|
|
492
|
-
|
|
492
|
+
runtimes: SeastudioWebviewRuntime[];
|
|
493
493
|
}>;
|
|
494
|
-
get: (
|
|
495
|
-
close: (
|
|
496
|
-
|
|
494
|
+
get: (webviewRuntimeId?: string) => Promise<SeastudioWebviewRuntime>;
|
|
495
|
+
close: (webviewRuntimeId?: string) => Promise<{
|
|
496
|
+
webviewRuntimeId: string;
|
|
497
497
|
closed: boolean;
|
|
498
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
|
+
}>;
|
|
499
508
|
};
|
|
500
|
-
|
|
501
|
-
create: (
|
|
502
|
-
|
|
503
|
-
tab:
|
|
509
|
+
tab: {
|
|
510
|
+
create: (webviewRuntimeId?: string, url?: string, ownerInstanceId?: string) => Promise<{
|
|
511
|
+
webviewRuntimeId: string;
|
|
512
|
+
tab: SeastudioWebviewRuntimeTab;
|
|
504
513
|
activeTabId: string;
|
|
505
514
|
}>;
|
|
506
|
-
close: (
|
|
507
|
-
|
|
515
|
+
close: (webviewRuntimeId: string, tabId: string) => Promise<{
|
|
516
|
+
webviewRuntimeId: string;
|
|
508
517
|
closedTabId: string;
|
|
509
518
|
activeTabId: string | null;
|
|
510
519
|
}>;
|
|
511
|
-
activate: (
|
|
512
|
-
|
|
520
|
+
activate: (webviewRuntimeId: string, tabId: string) => Promise<{
|
|
521
|
+
webviewRuntimeId: string;
|
|
513
522
|
activeTabId: string;
|
|
514
523
|
}>;
|
|
515
|
-
navigate: (
|
|
516
|
-
|
|
524
|
+
navigate: (webviewRuntimeId: string, tabId: string, url: string) => Promise<{
|
|
525
|
+
webviewRuntimeId: string;
|
|
517
526
|
tabId: string;
|
|
518
527
|
url: string;
|
|
519
528
|
}>;
|
|
520
|
-
goBack: (
|
|
529
|
+
goBack: (webviewRuntimeId: string, tabId: string) => Promise<{
|
|
521
530
|
ok: boolean;
|
|
522
531
|
}>;
|
|
523
|
-
goForward: (
|
|
532
|
+
goForward: (webviewRuntimeId: string, tabId: string) => Promise<{
|
|
524
533
|
ok: boolean;
|
|
525
534
|
}>;
|
|
526
|
-
reload: (
|
|
535
|
+
reload: (webviewRuntimeId: string, tabId: string) => Promise<{
|
|
527
536
|
ok: boolean;
|
|
528
537
|
}>;
|
|
529
|
-
stop: (
|
|
538
|
+
stop: (webviewRuntimeId: string, tabId: string) => Promise<{
|
|
530
539
|
ok: boolean;
|
|
531
540
|
}>;
|
|
532
541
|
getOrCreateForInstance: (ownerInstanceId: string, url?: string) => Promise<{
|
|
533
|
-
|
|
534
|
-
tab:
|
|
542
|
+
webviewRuntimeId: string;
|
|
543
|
+
tab: SeastudioWebviewRuntimeTab;
|
|
535
544
|
activeTabId: string;
|
|
536
545
|
created: boolean;
|
|
537
546
|
}>;
|
|
538
547
|
};
|
|
539
548
|
viewport: {
|
|
540
|
-
bind: (rect:
|
|
541
|
-
};
|
|
542
|
-
runtime: {
|
|
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<{
|
|
550
|
-
result: T;
|
|
551
|
-
}>;
|
|
549
|
+
bind: (rect: SeastudioWebviewViewportRect, options?: SeastudioWebviewRuntimeViewportBindOptions) => Promise<SeastudioWebviewRuntimeViewportBinding>;
|
|
552
550
|
};
|
|
553
551
|
certificate: {
|
|
554
|
-
respond: (
|
|
552
|
+
respond: (webviewRuntimeId: string, requestId: string, allow: boolean) => Promise<{
|
|
555
553
|
ok: boolean;
|
|
556
554
|
}>;
|
|
557
555
|
};
|
|
@@ -600,8 +598,8 @@ declare const projectTools: MCPTool[];
|
|
|
600
598
|
|
|
601
599
|
declare const skillTools: MCPTool[];
|
|
602
600
|
|
|
603
|
-
declare const
|
|
604
|
-
declare const
|
|
601
|
+
declare const SINGLETON_WEBVIEW_RUNTIME_ID = "webview-runtime-default";
|
|
602
|
+
declare const webviewRuntimeTools: MCPTool[];
|
|
605
603
|
|
|
606
604
|
/**
|
|
607
605
|
* 插件发送给主程序的请求主题
|
|
@@ -685,14 +683,14 @@ declare const SeastudioNotifications: {
|
|
|
685
683
|
readonly PROPOSAL_FEEDBACK: "seastudio:proposal-feedback";
|
|
686
684
|
/** 插件实例请求更新宿主 plugin tab 标题 */
|
|
687
685
|
readonly PLUGIN_TAB_TITLE_CHANGED: "plugin:tab-title_changed";
|
|
688
|
-
/**
|
|
689
|
-
readonly
|
|
690
|
-
/**
|
|
691
|
-
readonly
|
|
692
|
-
/**
|
|
693
|
-
readonly
|
|
694
|
-
/**
|
|
695
|
-
readonly
|
|
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";
|
|
696
694
|
/**
|
|
697
695
|
* Agent 对话 session:新建。消息历史仍由 Agent 前端持有,宿主仅同步列表用于侧栏。
|
|
698
696
|
* 通常由 Agent 通过 notifications/publish 发出;其他订阅者(含 host-ui)可据此更新 UI。
|
|
@@ -741,6 +739,10 @@ declare const SeastudioNotifications: {
|
|
|
741
739
|
readonly HOST_APP_VISIBILITY: "host:app_visibility";
|
|
742
740
|
/** Host MCP tools/list 发生变化(例如 Seaflow bridge 动态注册工具) */
|
|
743
741
|
readonly RUNTIME_TOOLS_CHANGED: "mcp:runtime_tools_changed";
|
|
742
|
+
/** Host 精确路由到插件实例的工具调用请求 */
|
|
743
|
+
readonly PLUGIN_TOOL_CALL: "plugin:tool_call";
|
|
744
|
+
/** 插件实例返回给 Host 的工具调用结果 */
|
|
745
|
+
readonly PLUGIN_TOOL_RESULT: "plugin:tool_result";
|
|
744
746
|
/** 主程序用户登录态变化;不包含访问令牌 */
|
|
745
747
|
readonly AUTH_SESSION_CHANGED: "auth:session_changed";
|
|
746
748
|
};
|
|
@@ -814,6 +816,39 @@ interface AuthSessionChangedParams {
|
|
|
814
816
|
user: AuthSessionUser | null;
|
|
815
817
|
};
|
|
816
818
|
}
|
|
819
|
+
interface PluginToolCallCaller {
|
|
820
|
+
type: 'agent' | 'plugin' | 'host';
|
|
821
|
+
agentInstanceId?: string;
|
|
822
|
+
pluginId?: string;
|
|
823
|
+
pluginInstanceId?: string;
|
|
824
|
+
projectId?: string;
|
|
825
|
+
threadId?: string;
|
|
826
|
+
}
|
|
827
|
+
interface PluginToolCallTarget {
|
|
828
|
+
providerId: string;
|
|
829
|
+
pluginId: string;
|
|
830
|
+
pluginInstanceId: string;
|
|
831
|
+
contractHash: string;
|
|
832
|
+
}
|
|
833
|
+
interface PluginToolCallEnvelope {
|
|
834
|
+
callId: string;
|
|
835
|
+
caller: PluginToolCallCaller;
|
|
836
|
+
target: PluginToolCallTarget;
|
|
837
|
+
toolName: string;
|
|
838
|
+
arguments: Record<string, unknown>;
|
|
839
|
+
timeoutMs: number;
|
|
840
|
+
}
|
|
841
|
+
interface PluginToolCallError {
|
|
842
|
+
name?: string;
|
|
843
|
+
message: string;
|
|
844
|
+
code?: string;
|
|
845
|
+
details?: unknown;
|
|
846
|
+
}
|
|
847
|
+
interface PluginToolResultEnvelope {
|
|
848
|
+
callId: string;
|
|
849
|
+
result?: unknown;
|
|
850
|
+
error?: PluginToolCallError;
|
|
851
|
+
}
|
|
817
852
|
interface SeastudioDragFileData {
|
|
818
853
|
sourcePath: string;
|
|
819
854
|
sourceRootId?: SeastudioDragRootId;
|
|
@@ -1102,4 +1137,4 @@ interface HostAppVisibilityParams {
|
|
|
1102
1137
|
declare const allTools: MCPTool[];
|
|
1103
1138
|
declare const tools: MCPTool[];
|
|
1104
1139
|
|
|
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
|
|
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 };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { g as MCPTool, h as MCPToolAnnotations, j as MCPToolInputSchema, k as MCPToolResult } from '../../types-
|
|
1
|
+
import { g as MCPTool, h as MCPToolAnnotations, j as MCPToolInputSchema, k as MCPToolResult } from '../../types-S2uWCEaN.js';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Git 共享类型契约
|
|
@@ -336,53 +336,53 @@ interface SeastudioShellOneShotResult {
|
|
|
336
336
|
durationMs: number;
|
|
337
337
|
timedOut: boolean;
|
|
338
338
|
}
|
|
339
|
-
type
|
|
340
|
-
interface
|
|
339
|
+
type SeastudioWebviewRuntimeStatus = 'idle' | 'loading' | 'ready' | 'error';
|
|
340
|
+
interface SeastudioWebviewRuntimeCertificateError {
|
|
341
341
|
requestId: string;
|
|
342
342
|
url: string;
|
|
343
343
|
error: string;
|
|
344
344
|
}
|
|
345
|
-
interface
|
|
345
|
+
interface SeastudioWebviewRuntimeTab {
|
|
346
346
|
id: string;
|
|
347
347
|
title: string;
|
|
348
348
|
url: string | null;
|
|
349
|
-
status:
|
|
349
|
+
status: SeastudioWebviewRuntimeStatus;
|
|
350
350
|
errorMessage: string | null;
|
|
351
351
|
canGoBack: boolean;
|
|
352
352
|
canGoForward: boolean;
|
|
353
|
-
certificateError?:
|
|
353
|
+
certificateError?: SeastudioWebviewRuntimeCertificateError | null;
|
|
354
354
|
ownerInstanceId?: string;
|
|
355
355
|
}
|
|
356
|
-
interface
|
|
357
|
-
|
|
356
|
+
interface SeastudioWebviewRuntimeState {
|
|
357
|
+
webviewRuntimeId: string;
|
|
358
358
|
label?: string;
|
|
359
359
|
storagePartitionKey: string;
|
|
360
360
|
homepage: string;
|
|
361
|
-
tabs:
|
|
361
|
+
tabs: SeastudioWebviewRuntimeTab[];
|
|
362
362
|
activeTabId: string | null;
|
|
363
363
|
}
|
|
364
|
-
interface
|
|
364
|
+
interface SeastudioWebviewRuntime extends SeastudioWebviewRuntimeState {
|
|
365
365
|
createdAt: number;
|
|
366
366
|
updatedAt: number;
|
|
367
367
|
}
|
|
368
|
-
interface
|
|
368
|
+
interface SeastudioWebviewRuntimeOpenOptions {
|
|
369
369
|
label?: string;
|
|
370
370
|
storagePartitionKey?: string;
|
|
371
371
|
homepage?: string;
|
|
372
372
|
}
|
|
373
|
-
interface
|
|
373
|
+
interface SeastudioWebviewViewportRect {
|
|
374
374
|
x: number;
|
|
375
375
|
y: number;
|
|
376
376
|
width: number;
|
|
377
377
|
height: number;
|
|
378
378
|
}
|
|
379
|
-
interface
|
|
380
|
-
|
|
379
|
+
interface SeastudioWebviewRuntimeViewportBinding {
|
|
380
|
+
webviewRuntimeId: string;
|
|
381
381
|
ownerInstanceId?: string;
|
|
382
|
-
rect:
|
|
382
|
+
rect: SeastudioWebviewViewportRect;
|
|
383
383
|
}
|
|
384
|
-
interface
|
|
385
|
-
|
|
384
|
+
interface SeastudioWebviewRuntimeViewportBindOptions {
|
|
385
|
+
webviewRuntimeId?: string;
|
|
386
386
|
ownerInstanceId?: string;
|
|
387
387
|
}
|
|
388
388
|
declare function callTool(name: string, args?: Record<string, unknown>): Promise<MCPToolResult>;
|
|
@@ -485,73 +485,71 @@ declare const seastudio: {
|
|
|
485
485
|
close: (sessionId: string, force?: boolean) => Promise<MCPToolResult>;
|
|
486
486
|
};
|
|
487
487
|
};
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
open: (options?:
|
|
488
|
+
webview: {
|
|
489
|
+
runtime: {
|
|
490
|
+
open: (options?: SeastudioWebviewRuntimeOpenOptions) => Promise<SeastudioWebviewRuntime>;
|
|
491
491
|
list: () => Promise<{
|
|
492
|
-
|
|
492
|
+
runtimes: SeastudioWebviewRuntime[];
|
|
493
493
|
}>;
|
|
494
|
-
get: (
|
|
495
|
-
close: (
|
|
496
|
-
|
|
494
|
+
get: (webviewRuntimeId?: string) => Promise<SeastudioWebviewRuntime>;
|
|
495
|
+
close: (webviewRuntimeId?: string) => Promise<{
|
|
496
|
+
webviewRuntimeId: string;
|
|
497
497
|
closed: boolean;
|
|
498
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
|
+
}>;
|
|
499
508
|
};
|
|
500
|
-
|
|
501
|
-
create: (
|
|
502
|
-
|
|
503
|
-
tab:
|
|
509
|
+
tab: {
|
|
510
|
+
create: (webviewRuntimeId?: string, url?: string, ownerInstanceId?: string) => Promise<{
|
|
511
|
+
webviewRuntimeId: string;
|
|
512
|
+
tab: SeastudioWebviewRuntimeTab;
|
|
504
513
|
activeTabId: string;
|
|
505
514
|
}>;
|
|
506
|
-
close: (
|
|
507
|
-
|
|
515
|
+
close: (webviewRuntimeId: string, tabId: string) => Promise<{
|
|
516
|
+
webviewRuntimeId: string;
|
|
508
517
|
closedTabId: string;
|
|
509
518
|
activeTabId: string | null;
|
|
510
519
|
}>;
|
|
511
|
-
activate: (
|
|
512
|
-
|
|
520
|
+
activate: (webviewRuntimeId: string, tabId: string) => Promise<{
|
|
521
|
+
webviewRuntimeId: string;
|
|
513
522
|
activeTabId: string;
|
|
514
523
|
}>;
|
|
515
|
-
navigate: (
|
|
516
|
-
|
|
524
|
+
navigate: (webviewRuntimeId: string, tabId: string, url: string) => Promise<{
|
|
525
|
+
webviewRuntimeId: string;
|
|
517
526
|
tabId: string;
|
|
518
527
|
url: string;
|
|
519
528
|
}>;
|
|
520
|
-
goBack: (
|
|
529
|
+
goBack: (webviewRuntimeId: string, tabId: string) => Promise<{
|
|
521
530
|
ok: boolean;
|
|
522
531
|
}>;
|
|
523
|
-
goForward: (
|
|
532
|
+
goForward: (webviewRuntimeId: string, tabId: string) => Promise<{
|
|
524
533
|
ok: boolean;
|
|
525
534
|
}>;
|
|
526
|
-
reload: (
|
|
535
|
+
reload: (webviewRuntimeId: string, tabId: string) => Promise<{
|
|
527
536
|
ok: boolean;
|
|
528
537
|
}>;
|
|
529
|
-
stop: (
|
|
538
|
+
stop: (webviewRuntimeId: string, tabId: string) => Promise<{
|
|
530
539
|
ok: boolean;
|
|
531
540
|
}>;
|
|
532
541
|
getOrCreateForInstance: (ownerInstanceId: string, url?: string) => Promise<{
|
|
533
|
-
|
|
534
|
-
tab:
|
|
542
|
+
webviewRuntimeId: string;
|
|
543
|
+
tab: SeastudioWebviewRuntimeTab;
|
|
535
544
|
activeTabId: string;
|
|
536
545
|
created: boolean;
|
|
537
546
|
}>;
|
|
538
547
|
};
|
|
539
548
|
viewport: {
|
|
540
|
-
bind: (rect:
|
|
541
|
-
};
|
|
542
|
-
runtime: {
|
|
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<{
|
|
550
|
-
result: T;
|
|
551
|
-
}>;
|
|
549
|
+
bind: (rect: SeastudioWebviewViewportRect, options?: SeastudioWebviewRuntimeViewportBindOptions) => Promise<SeastudioWebviewRuntimeViewportBinding>;
|
|
552
550
|
};
|
|
553
551
|
certificate: {
|
|
554
|
-
respond: (
|
|
552
|
+
respond: (webviewRuntimeId: string, requestId: string, allow: boolean) => Promise<{
|
|
555
553
|
ok: boolean;
|
|
556
554
|
}>;
|
|
557
555
|
};
|
|
@@ -600,8 +598,8 @@ declare const projectTools: MCPTool[];
|
|
|
600
598
|
|
|
601
599
|
declare const skillTools: MCPTool[];
|
|
602
600
|
|
|
603
|
-
declare const
|
|
604
|
-
declare const
|
|
601
|
+
declare const SINGLETON_WEBVIEW_RUNTIME_ID = "webview-runtime-default";
|
|
602
|
+
declare const webviewRuntimeTools: MCPTool[];
|
|
605
603
|
|
|
606
604
|
/**
|
|
607
605
|
* 插件发送给主程序的请求主题
|
|
@@ -685,14 +683,14 @@ declare const SeastudioNotifications: {
|
|
|
685
683
|
readonly PROPOSAL_FEEDBACK: "seastudio:proposal-feedback";
|
|
686
684
|
/** 插件实例请求更新宿主 plugin tab 标题 */
|
|
687
685
|
readonly PLUGIN_TAB_TITLE_CHANGED: "plugin:tab-title_changed";
|
|
688
|
-
/**
|
|
689
|
-
readonly
|
|
690
|
-
/**
|
|
691
|
-
readonly
|
|
692
|
-
/**
|
|
693
|
-
readonly
|
|
694
|
-
/**
|
|
695
|
-
readonly
|
|
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";
|
|
696
694
|
/**
|
|
697
695
|
* Agent 对话 session:新建。消息历史仍由 Agent 前端持有,宿主仅同步列表用于侧栏。
|
|
698
696
|
* 通常由 Agent 通过 notifications/publish 发出;其他订阅者(含 host-ui)可据此更新 UI。
|
|
@@ -741,6 +739,10 @@ declare const SeastudioNotifications: {
|
|
|
741
739
|
readonly HOST_APP_VISIBILITY: "host:app_visibility";
|
|
742
740
|
/** Host MCP tools/list 发生变化(例如 Seaflow bridge 动态注册工具) */
|
|
743
741
|
readonly RUNTIME_TOOLS_CHANGED: "mcp:runtime_tools_changed";
|
|
742
|
+
/** Host 精确路由到插件实例的工具调用请求 */
|
|
743
|
+
readonly PLUGIN_TOOL_CALL: "plugin:tool_call";
|
|
744
|
+
/** 插件实例返回给 Host 的工具调用结果 */
|
|
745
|
+
readonly PLUGIN_TOOL_RESULT: "plugin:tool_result";
|
|
744
746
|
/** 主程序用户登录态变化;不包含访问令牌 */
|
|
745
747
|
readonly AUTH_SESSION_CHANGED: "auth:session_changed";
|
|
746
748
|
};
|
|
@@ -814,6 +816,39 @@ interface AuthSessionChangedParams {
|
|
|
814
816
|
user: AuthSessionUser | null;
|
|
815
817
|
};
|
|
816
818
|
}
|
|
819
|
+
interface PluginToolCallCaller {
|
|
820
|
+
type: 'agent' | 'plugin' | 'host';
|
|
821
|
+
agentInstanceId?: string;
|
|
822
|
+
pluginId?: string;
|
|
823
|
+
pluginInstanceId?: string;
|
|
824
|
+
projectId?: string;
|
|
825
|
+
threadId?: string;
|
|
826
|
+
}
|
|
827
|
+
interface PluginToolCallTarget {
|
|
828
|
+
providerId: string;
|
|
829
|
+
pluginId: string;
|
|
830
|
+
pluginInstanceId: string;
|
|
831
|
+
contractHash: string;
|
|
832
|
+
}
|
|
833
|
+
interface PluginToolCallEnvelope {
|
|
834
|
+
callId: string;
|
|
835
|
+
caller: PluginToolCallCaller;
|
|
836
|
+
target: PluginToolCallTarget;
|
|
837
|
+
toolName: string;
|
|
838
|
+
arguments: Record<string, unknown>;
|
|
839
|
+
timeoutMs: number;
|
|
840
|
+
}
|
|
841
|
+
interface PluginToolCallError {
|
|
842
|
+
name?: string;
|
|
843
|
+
message: string;
|
|
844
|
+
code?: string;
|
|
845
|
+
details?: unknown;
|
|
846
|
+
}
|
|
847
|
+
interface PluginToolResultEnvelope {
|
|
848
|
+
callId: string;
|
|
849
|
+
result?: unknown;
|
|
850
|
+
error?: PluginToolCallError;
|
|
851
|
+
}
|
|
817
852
|
interface SeastudioDragFileData {
|
|
818
853
|
sourcePath: string;
|
|
819
854
|
sourceRootId?: SeastudioDragRootId;
|
|
@@ -1102,4 +1137,4 @@ interface HostAppVisibilityParams {
|
|
|
1102
1137
|
declare const allTools: MCPTool[];
|
|
1103
1138
|
declare const tools: MCPTool[];
|
|
1104
1139
|
|
|
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
|
|
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 };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export {
|
|
2
|
-
import '../../chunk-
|
|
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';
|
|
2
|
+
import '../../chunk-6XG5DRQW.js';
|
|
@@ -43,7 +43,7 @@ interface MCPToolInputSchema {
|
|
|
43
43
|
interface MCPToolAnnotations {
|
|
44
44
|
operationKind?: 'read' | 'mutate' | 'system' | 'workflow';
|
|
45
45
|
requiresExecutionEvidence?: boolean;
|
|
46
|
-
rawDomain?: 'workspace' | 'filesystem' | 'editor' | 'seaflow' | 'asset' | 'git' | 'preview' | 'shell' | 'browser' | 'excel' | 'word' | 'skill' | `plugin-${string}`;
|
|
46
|
+
rawDomain?: 'workspace' | 'filesystem' | 'editor' | 'seaflow' | 'asset' | 'git' | 'preview' | 'shell' | 'browser' | 'webview' | 'excel' | 'word' | 'skill' | `plugin-${string}`;
|
|
47
47
|
hostForwarding?: {
|
|
48
48
|
timeoutMs?: number;
|
|
49
49
|
};
|
|
@@ -43,7 +43,7 @@ interface MCPToolInputSchema {
|
|
|
43
43
|
interface MCPToolAnnotations {
|
|
44
44
|
operationKind?: 'read' | 'mutate' | 'system' | 'workflow';
|
|
45
45
|
requiresExecutionEvidence?: boolean;
|
|
46
|
-
rawDomain?: 'workspace' | 'filesystem' | 'editor' | 'seaflow' | 'asset' | 'git' | 'preview' | 'shell' | 'browser' | 'excel' | 'word' | 'skill' | `plugin-${string}`;
|
|
46
|
+
rawDomain?: 'workspace' | 'filesystem' | 'editor' | 'seaflow' | 'asset' | 'git' | 'preview' | 'shell' | 'browser' | 'webview' | 'excel' | 'word' | 'skill' | `plugin-${string}`;
|
|
47
47
|
hostForwarding?: {
|
|
48
48
|
timeoutMs?: number;
|
|
49
49
|
};
|