@seastudio/sdk 3.2.5 → 3.3.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/dist/{chunk-PX2KWRKM.cjs → chunk-2MGJLIRZ.cjs} +4 -4
- package/dist/{chunk-3UVF6MLO.js → chunk-CJ2BXMJ3.js} +307 -169
- package/dist/{chunk-7LQXYJPQ.cjs → chunk-RRDE5HQX.cjs} +312 -169
- package/dist/{chunk-YTHD4PO5.js → chunk-VFDZPHJD.js} +1 -1
- package/dist/index.cjs +24 -24
- package/dist/index.js +2 -2
- package/dist/mcp/index.cjs +24 -24
- package/dist/mcp/index.js +2 -2
- package/dist/mcp/seastudio/index.cjs +45 -25
- package/dist/mcp/seastudio/index.d.cts +112 -27
- package/dist/mcp/seastudio/index.d.ts +112 -27
- package/dist/mcp/seastudio/index.js +1 -1
- package/package.json +1 -1
|
@@ -12,14 +12,19 @@ declare const rootedWriteEvidenceOutputSchema: MCPToolInputSchema;
|
|
|
12
12
|
declare const dualPathEvidenceOutputSchema: MCPToolInputSchema;
|
|
13
13
|
declare const batchFlattenCopyEvidenceOutputSchema: MCPToolInputSchema;
|
|
14
14
|
declare const fileDownloadEvidenceOutputSchema: MCPToolInputSchema;
|
|
15
|
-
declare const shellCommandEvidenceOutputSchema: MCPToolInputSchema;
|
|
16
15
|
declare const shellSessionSnapshotEvidenceOutputSchema: MCPToolInputSchema;
|
|
16
|
+
declare const shellSessionOpenEvidenceOutputSchema: MCPToolInputSchema;
|
|
17
|
+
declare const shellSessionRunEvidenceOutputSchema: MCPToolInputSchema;
|
|
18
|
+
declare const shellSessionSignalEvidenceOutputSchema: MCPToolInputSchema;
|
|
19
|
+
declare const shellSessionCloseEvidenceOutputSchema: MCPToolInputSchema;
|
|
17
20
|
declare const fileTools: MCPTool[];
|
|
18
21
|
|
|
19
22
|
/**
|
|
20
23
|
* Shell MCP Tools
|
|
21
24
|
*
|
|
22
|
-
*
|
|
25
|
+
* 基于 PTY 的多 session 长会话工具。
|
|
26
|
+
* 全部 session 命令式 API:
|
|
27
|
+
* open / list / get / run / wait / get_entries / signal / clear_entries / close
|
|
23
28
|
*/
|
|
24
29
|
|
|
25
30
|
declare const shellTools: MCPTool[];
|
|
@@ -38,7 +43,15 @@ declare const seaCloudTools: MCPTool[];
|
|
|
38
43
|
* 供 TS/JS 代码直接调用 MCP 的便利 API
|
|
39
44
|
*/
|
|
40
45
|
|
|
41
|
-
type SeastudioFilesystemRootId = 'workspace'
|
|
46
|
+
type SeastudioFilesystemRootId = 'workspace' | `proj-${string}`;
|
|
47
|
+
interface SeastudioProjectInfo {
|
|
48
|
+
id: string;
|
|
49
|
+
name: string;
|
|
50
|
+
path: string;
|
|
51
|
+
lastActiveAt: number;
|
|
52
|
+
isActive: boolean;
|
|
53
|
+
rootId: SeastudioFilesystemRootId;
|
|
54
|
+
}
|
|
42
55
|
interface SeastudioFilesystemRoot {
|
|
43
56
|
id: SeastudioFilesystemRootId;
|
|
44
57
|
label: string;
|
|
@@ -103,33 +116,83 @@ interface SeastudioBatchFlattenPreviewOptions {
|
|
|
103
116
|
}
|
|
104
117
|
interface SeastudioBatchFlattenCopyOptions extends SeastudioFileTransferOptions {
|
|
105
118
|
}
|
|
106
|
-
type
|
|
107
|
-
|
|
119
|
+
type SeastudioShellKind = 'bash' | 'pwsh' | 'cmd' | 'sh';
|
|
120
|
+
type SeastudioShellEntryLevel = 'command' | 'stdout' | 'meta' | 'exit';
|
|
121
|
+
interface SeastudioShellEntry {
|
|
108
122
|
id: number;
|
|
109
|
-
level:
|
|
123
|
+
level: SeastudioShellEntryLevel;
|
|
110
124
|
content: string;
|
|
111
125
|
createdAt: number;
|
|
126
|
+
commandId?: string;
|
|
112
127
|
}
|
|
113
|
-
interface
|
|
114
|
-
|
|
128
|
+
interface SeastudioShellSession {
|
|
129
|
+
sessionId: string;
|
|
130
|
+
shell: SeastudioShellKind;
|
|
115
131
|
cwd: string | null;
|
|
116
|
-
|
|
117
|
-
|
|
132
|
+
pid: number;
|
|
133
|
+
alive: boolean;
|
|
134
|
+
openedAt: number;
|
|
135
|
+
label?: string;
|
|
136
|
+
pluginId?: string;
|
|
137
|
+
projectId?: string;
|
|
138
|
+
agentInstanceId?: string;
|
|
139
|
+
pendingCommandId: string | null;
|
|
140
|
+
lastCommandId: string | null;
|
|
118
141
|
lastExitCode: number | null;
|
|
119
142
|
lastDurationMs: number | null;
|
|
120
|
-
lastCommandAt: number | null;
|
|
121
|
-
historyCount: number;
|
|
122
143
|
entryCount: number;
|
|
144
|
+
droppedCount: number;
|
|
145
|
+
}
|
|
146
|
+
interface SeastudioShellOpenOptions {
|
|
147
|
+
shell?: 'auto' | SeastudioShellKind;
|
|
148
|
+
cwd?: string;
|
|
149
|
+
env?: Record<string, string>;
|
|
150
|
+
label?: string;
|
|
151
|
+
cols?: number;
|
|
152
|
+
rows?: number;
|
|
153
|
+
}
|
|
154
|
+
interface SeastudioShellRunOptions {
|
|
155
|
+
timeoutMs?: number;
|
|
156
|
+
}
|
|
157
|
+
interface SeastudioShellRunResult {
|
|
158
|
+
sessionId: string;
|
|
159
|
+
commandId: string;
|
|
160
|
+
startedAt: number;
|
|
161
|
+
running: boolean;
|
|
162
|
+
}
|
|
163
|
+
interface SeastudioShellWaitResult {
|
|
164
|
+
commandId: string;
|
|
165
|
+
exitCode: number | null;
|
|
166
|
+
durationMs: number;
|
|
167
|
+
finished: boolean;
|
|
168
|
+
timedOut: boolean;
|
|
169
|
+
}
|
|
170
|
+
interface SeastudioShellGetEntriesOptions {
|
|
171
|
+
sinceId?: number;
|
|
172
|
+
limit?: number;
|
|
173
|
+
}
|
|
174
|
+
interface SeastudioShellGetEntriesResult {
|
|
175
|
+
entries: SeastudioShellEntry[];
|
|
176
|
+
nextSinceId: number;
|
|
177
|
+
totalEntries: number;
|
|
178
|
+
droppedCount: number;
|
|
179
|
+
}
|
|
180
|
+
interface SeastudioShellSignalResult {
|
|
181
|
+
sessionId: string;
|
|
182
|
+
signal: 'INT' | 'TERM' | 'KILL';
|
|
183
|
+
ok: boolean;
|
|
184
|
+
deliveredAt: number;
|
|
185
|
+
}
|
|
186
|
+
interface SeastudioShellCloseResult {
|
|
187
|
+
sessionId: string;
|
|
188
|
+
closed: boolean;
|
|
189
|
+
exitCode: number | null;
|
|
123
190
|
}
|
|
124
|
-
interface
|
|
125
|
-
|
|
126
|
-
cwd: string;
|
|
127
|
-
exitCode: number;
|
|
191
|
+
interface SeastudioShellOneShotResult {
|
|
192
|
+
exitCode: number | null;
|
|
128
193
|
stdout: string;
|
|
129
|
-
stderr: string;
|
|
130
|
-
error: string | null;
|
|
131
194
|
durationMs: number;
|
|
132
|
-
|
|
195
|
+
timedOut: boolean;
|
|
133
196
|
}
|
|
134
197
|
declare function callTool(name: string, args?: Record<string, unknown>): Promise<MCPToolResult>;
|
|
135
198
|
declare function request<T = unknown>(method: string, params?: Record<string, unknown>): Promise<T>;
|
|
@@ -140,6 +203,10 @@ declare const seastudio: {
|
|
|
140
203
|
roots: SeastudioFilesystemRoot[];
|
|
141
204
|
}>;
|
|
142
205
|
};
|
|
206
|
+
project: {
|
|
207
|
+
list: () => Promise<MCPToolResult>;
|
|
208
|
+
getActive: () => Promise<MCPToolResult>;
|
|
209
|
+
};
|
|
143
210
|
file: {
|
|
144
211
|
getSelected: () => Promise<MCPToolResult>;
|
|
145
212
|
read: (path: string, options?: SeastudioFileReadOptions) => Promise<MCPToolResult>;
|
|
@@ -168,17 +235,27 @@ declare const seastudio: {
|
|
|
168
235
|
readBinary: (path: string, options?: SeastudioSinglePathOptions) => Promise<MCPToolResult>;
|
|
169
236
|
};
|
|
170
237
|
shell: {
|
|
171
|
-
execute: (command: string, cwd?: string, timeout?: number) => Promise<MCPToolResult>;
|
|
172
238
|
session: {
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
239
|
+
open: (options?: SeastudioShellOpenOptions) => Promise<MCPToolResult>;
|
|
240
|
+
list: () => Promise<MCPToolResult>;
|
|
241
|
+
get: (sessionId: string) => Promise<MCPToolResult>;
|
|
242
|
+
run: (sessionId: string, command: string, options?: SeastudioShellRunOptions) => Promise<MCPToolResult>;
|
|
243
|
+
wait: (sessionId: string, commandId: string, timeoutMs?: number) => Promise<MCPToolResult>;
|
|
244
|
+
getEntries: (sessionId: string, options?: SeastudioShellGetEntriesOptions) => Promise<MCPToolResult>;
|
|
245
|
+
signal: (sessionId: string, signal: "INT" | "TERM" | "KILL", commandId?: string) => Promise<MCPToolResult>;
|
|
246
|
+
clearEntries: (sessionId: string) => Promise<MCPToolResult>;
|
|
247
|
+
close: (sessionId: string, force?: boolean) => Promise<MCPToolResult>;
|
|
179
248
|
};
|
|
180
249
|
};
|
|
181
250
|
};
|
|
251
|
+
/**
|
|
252
|
+
* One-shot helper: open a transient session, run command, wait, close.
|
|
253
|
+
* Returns aggregated stdout/exit info. Useful for short, non-interactive commands
|
|
254
|
+
* (e.g. `git status`). For long-running tasks use `seastudio.shell.session` directly.
|
|
255
|
+
*/
|
|
256
|
+
declare function runOneShotShellCommand(command: string, options?: SeastudioShellOpenOptions & {
|
|
257
|
+
timeoutMs?: number;
|
|
258
|
+
}): Promise<SeastudioShellOneShotResult>;
|
|
182
259
|
|
|
183
260
|
/**
|
|
184
261
|
* Plugin MCP Tools
|
|
@@ -198,6 +275,14 @@ declare const pluginTabTools: MCPTool[];
|
|
|
198
275
|
declare const agentManagementTools: MCPTool[];
|
|
199
276
|
declare const agentTabTools: MCPTool[];
|
|
200
277
|
|
|
278
|
+
/**
|
|
279
|
+
* Project MCP Tools
|
|
280
|
+
*
|
|
281
|
+
* 项目枚举与寻址:让 agent 能列出所有项目并按需跨项目操作。
|
|
282
|
+
*/
|
|
283
|
+
|
|
284
|
+
declare const projectTools: MCPTool[];
|
|
285
|
+
|
|
201
286
|
/**
|
|
202
287
|
* SeaStudio MCP Notifications
|
|
203
288
|
*
|
|
@@ -526,4 +611,4 @@ interface SessionDeleteRequestedParams {
|
|
|
526
611
|
declare const allTools: MCPTool[];
|
|
527
612
|
declare const tools: MCPTool[];
|
|
528
613
|
|
|
529
|
-
export { type AgentInstanceSessionSnapshot, type FileDeletedParams, type FileModifiedParams, type FileOpenRequestedParams, type FileRenamedParams, type FileSavedParams, type FileSendRequestedParams, type FileTransferRequestedParams, type FilesChangedParams, type ProposalFeedbackFileSummary, type ProposalFeedbackHunk, type ProposalFeedbackOrigin, type ProposalFeedbackParams, type RootsChangedParams, type SeastudioBatchFlattenCopyOptions, type SeastudioBatchFlattenPreviewOptions, type SeastudioDragDropParams, type SeastudioDragEnterParams, type SeastudioDragFileData, type SeastudioDragRootId, type SeastudioDragStartParams, type SeastudioFileDownloadOptions, type SeastudioFileInfo, type SeastudioFileInfoOptions, type SeastudioFileListOptions, type SeastudioFileReadOptions, type SeastudioFileSearchMatch, type SeastudioFileSearchOptions, type SeastudioFileTransferOptions, type SeastudioFileTreeOptions, type SeastudioFilesystemRoot, type SeastudioFilesystemRootId, SeastudioNotifications, SeastudioRequests, type
|
|
614
|
+
export { type AgentInstanceSessionSnapshot, type FileDeletedParams, type FileModifiedParams, type FileOpenRequestedParams, type FileRenamedParams, type FileSavedParams, type FileSendRequestedParams, type FileTransferRequestedParams, type FilesChangedParams, type ProposalFeedbackFileSummary, type ProposalFeedbackHunk, type ProposalFeedbackOrigin, type ProposalFeedbackParams, type RootsChangedParams, type SeastudioBatchFlattenCopyOptions, type SeastudioBatchFlattenPreviewOptions, type SeastudioDragDropParams, type SeastudioDragEnterParams, type SeastudioDragFileData, type SeastudioDragRootId, type SeastudioDragStartParams, type SeastudioFileDownloadOptions, type SeastudioFileInfo, type SeastudioFileInfoOptions, type SeastudioFileListOptions, type SeastudioFileReadOptions, type SeastudioFileSearchMatch, type SeastudioFileSearchOptions, type SeastudioFileTransferOptions, type SeastudioFileTreeOptions, type SeastudioFilesystemRoot, type SeastudioFilesystemRootId, SeastudioNotifications, type SeastudioProjectInfo, SeastudioRequests, 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 SessionCreatedParams, type SessionDeleteRequestedParams, type SessionNewRequestedParams, type SessionNotificationBase, type SessionRemovedParams, type SessionSelectedParams, type SessionSelectedReason, type SessionSnapshotItem, type SessionStateSnapshotParams, type SessionSummaryParams, type TextSendRequestedParams, type TextSendRequestedSelectionRange, type TextSendRequestedSource, agentManagementTools, agentTabTools, allTools, annotateTool, batchFlattenCopyEvidenceOutputSchema, callTool, callToolText, dualPathEvidenceOutputSchema, fileDownloadEvidenceOutputSchema, fileTools, pluginManagementTools, pluginTabTools, projectTools, request, rootedPathEvidenceOutputSchema, rootedWriteEvidenceOutputSchema, runOneShotShellCommand, seaCloudTools, seastudio, shellSessionCloseEvidenceOutputSchema, shellSessionOpenEvidenceOutputSchema, shellSessionRunEvidenceOutputSchema, shellSessionSignalEvidenceOutputSchema, shellSessionSnapshotEvidenceOutputSchema, shellTools, tools };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { SeastudioNotifications, SeastudioRequests, agentManagementTools, agentTabTools, allTools, annotateTool, batchFlattenCopyEvidenceOutputSchema, callTool, callToolText, dualPathEvidenceOutputSchema, fileDownloadEvidenceOutputSchema, fileTools, pluginManagementTools, pluginTabTools, request, rootedPathEvidenceOutputSchema, rootedWriteEvidenceOutputSchema, seaCloudTools, seastudio,
|
|
1
|
+
export { SeastudioNotifications, SeastudioRequests, agentManagementTools, agentTabTools, allTools, annotateTool, batchFlattenCopyEvidenceOutputSchema, callTool, callToolText, dualPathEvidenceOutputSchema, fileDownloadEvidenceOutputSchema, fileTools, pluginManagementTools, pluginTabTools, projectTools, request, rootedPathEvidenceOutputSchema, rootedWriteEvidenceOutputSchema, runOneShotShellCommand, seaCloudTools, seastudio, shellSessionCloseEvidenceOutputSchema, shellSessionOpenEvidenceOutputSchema, shellSessionRunEvidenceOutputSchema, shellSessionSignalEvidenceOutputSchema, shellSessionSnapshotEvidenceOutputSchema, shellTools, tools } from '../../chunk-CJ2BXMJ3.js';
|
|
2
2
|
import '../../chunk-TJ3CGHWJ.js';
|