@seastudio/sdk 3.2.5 → 3.3.1
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-2SQFLDTT.cjs} +4 -4
- package/dist/{chunk-YTHD4PO5.js → chunk-BUC7WN5U.js} +1 -1
- package/dist/{chunk-3UVF6MLO.js → chunk-IZRKT6NQ.js} +332 -170
- package/dist/{chunk-7LQXYJPQ.cjs → chunk-UXBJODKS.cjs} +337 -170
- 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 +118 -27
- package/dist/mcp/seastudio/index.d.ts +118 -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;
|
|
@@ -69,6 +82,11 @@ interface SeastudioFileReadOptions {
|
|
|
69
82
|
interface SeastudioFileListOptions {
|
|
70
83
|
rootId?: SeastudioFilesystemRootId;
|
|
71
84
|
}
|
|
85
|
+
interface SeastudioFileTreeOptions {
|
|
86
|
+
rootId?: SeastudioFilesystemRootId;
|
|
87
|
+
maxDepth?: number;
|
|
88
|
+
maxEntries?: number;
|
|
89
|
+
}
|
|
72
90
|
interface SeastudioFileTreeOptions {
|
|
73
91
|
rootId?: SeastudioFilesystemRootId;
|
|
74
92
|
depth?: number;
|
|
@@ -103,33 +121,83 @@ interface SeastudioBatchFlattenPreviewOptions {
|
|
|
103
121
|
}
|
|
104
122
|
interface SeastudioBatchFlattenCopyOptions extends SeastudioFileTransferOptions {
|
|
105
123
|
}
|
|
106
|
-
type
|
|
107
|
-
|
|
124
|
+
type SeastudioShellKind = 'bash' | 'pwsh' | 'cmd' | 'sh';
|
|
125
|
+
type SeastudioShellEntryLevel = 'command' | 'stdout' | 'meta' | 'exit';
|
|
126
|
+
interface SeastudioShellEntry {
|
|
108
127
|
id: number;
|
|
109
|
-
level:
|
|
128
|
+
level: SeastudioShellEntryLevel;
|
|
110
129
|
content: string;
|
|
111
130
|
createdAt: number;
|
|
131
|
+
commandId?: string;
|
|
112
132
|
}
|
|
113
|
-
interface
|
|
114
|
-
|
|
133
|
+
interface SeastudioShellSession {
|
|
134
|
+
sessionId: string;
|
|
135
|
+
shell: SeastudioShellKind;
|
|
115
136
|
cwd: string | null;
|
|
116
|
-
|
|
117
|
-
|
|
137
|
+
pid: number;
|
|
138
|
+
alive: boolean;
|
|
139
|
+
openedAt: number;
|
|
140
|
+
label?: string;
|
|
141
|
+
pluginId?: string;
|
|
142
|
+
projectId?: string;
|
|
143
|
+
agentInstanceId?: string;
|
|
144
|
+
pendingCommandId: string | null;
|
|
145
|
+
lastCommandId: string | null;
|
|
118
146
|
lastExitCode: number | null;
|
|
119
147
|
lastDurationMs: number | null;
|
|
120
|
-
lastCommandAt: number | null;
|
|
121
|
-
historyCount: number;
|
|
122
148
|
entryCount: number;
|
|
149
|
+
droppedCount: number;
|
|
150
|
+
}
|
|
151
|
+
interface SeastudioShellOpenOptions {
|
|
152
|
+
shell?: 'auto' | SeastudioShellKind;
|
|
153
|
+
cwd?: string;
|
|
154
|
+
env?: Record<string, string>;
|
|
155
|
+
label?: string;
|
|
156
|
+
cols?: number;
|
|
157
|
+
rows?: number;
|
|
158
|
+
}
|
|
159
|
+
interface SeastudioShellRunOptions {
|
|
160
|
+
timeoutMs?: number;
|
|
161
|
+
}
|
|
162
|
+
interface SeastudioShellRunResult {
|
|
163
|
+
sessionId: string;
|
|
164
|
+
commandId: string;
|
|
165
|
+
startedAt: number;
|
|
166
|
+
running: boolean;
|
|
123
167
|
}
|
|
124
|
-
interface
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
168
|
+
interface SeastudioShellWaitResult {
|
|
169
|
+
commandId: string;
|
|
170
|
+
exitCode: number | null;
|
|
171
|
+
durationMs: number;
|
|
172
|
+
finished: boolean;
|
|
173
|
+
timedOut: boolean;
|
|
174
|
+
}
|
|
175
|
+
interface SeastudioShellGetEntriesOptions {
|
|
176
|
+
sinceId?: number;
|
|
177
|
+
limit?: number;
|
|
178
|
+
}
|
|
179
|
+
interface SeastudioShellGetEntriesResult {
|
|
180
|
+
entries: SeastudioShellEntry[];
|
|
181
|
+
nextSinceId: number;
|
|
182
|
+
totalEntries: number;
|
|
183
|
+
droppedCount: number;
|
|
184
|
+
}
|
|
185
|
+
interface SeastudioShellSignalResult {
|
|
186
|
+
sessionId: string;
|
|
187
|
+
signal: 'INT' | 'TERM' | 'KILL';
|
|
188
|
+
ok: boolean;
|
|
189
|
+
deliveredAt: number;
|
|
190
|
+
}
|
|
191
|
+
interface SeastudioShellCloseResult {
|
|
192
|
+
sessionId: string;
|
|
193
|
+
closed: boolean;
|
|
194
|
+
exitCode: number | null;
|
|
195
|
+
}
|
|
196
|
+
interface SeastudioShellOneShotResult {
|
|
197
|
+
exitCode: number | null;
|
|
128
198
|
stdout: string;
|
|
129
|
-
stderr: string;
|
|
130
|
-
error: string | null;
|
|
131
199
|
durationMs: number;
|
|
132
|
-
|
|
200
|
+
timedOut: boolean;
|
|
133
201
|
}
|
|
134
202
|
declare function callTool(name: string, args?: Record<string, unknown>): Promise<MCPToolResult>;
|
|
135
203
|
declare function request<T = unknown>(method: string, params?: Record<string, unknown>): Promise<T>;
|
|
@@ -140,11 +208,16 @@ declare const seastudio: {
|
|
|
140
208
|
roots: SeastudioFilesystemRoot[];
|
|
141
209
|
}>;
|
|
142
210
|
};
|
|
211
|
+
project: {
|
|
212
|
+
list: () => Promise<MCPToolResult>;
|
|
213
|
+
getActive: () => Promise<MCPToolResult>;
|
|
214
|
+
};
|
|
143
215
|
file: {
|
|
144
216
|
getSelected: () => Promise<MCPToolResult>;
|
|
145
217
|
read: (path: string, options?: SeastudioFileReadOptions) => Promise<MCPToolResult>;
|
|
146
218
|
write: (path: string, content: string, options?: SeastudioSinglePathOptions) => Promise<MCPToolResult>;
|
|
147
219
|
list: (path?: string, options?: SeastudioFileListOptions) => Promise<MCPToolResult>;
|
|
220
|
+
tree: (path?: string, options?: SeastudioFileTreeOptions) => Promise<MCPToolResult>;
|
|
148
221
|
delete: (path: string, options?: SeastudioSinglePathOptions) => Promise<MCPToolResult>;
|
|
149
222
|
mkdir: (path: string, options?: SeastudioSinglePathOptions) => Promise<MCPToolResult>;
|
|
150
223
|
exists: (path: string, options?: SeastudioSinglePathOptions) => Promise<MCPToolResult>;
|
|
@@ -168,17 +241,27 @@ declare const seastudio: {
|
|
|
168
241
|
readBinary: (path: string, options?: SeastudioSinglePathOptions) => Promise<MCPToolResult>;
|
|
169
242
|
};
|
|
170
243
|
shell: {
|
|
171
|
-
execute: (command: string, cwd?: string, timeout?: number) => Promise<MCPToolResult>;
|
|
172
244
|
session: {
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
245
|
+
open: (options?: SeastudioShellOpenOptions) => Promise<MCPToolResult>;
|
|
246
|
+
list: () => Promise<MCPToolResult>;
|
|
247
|
+
get: (sessionId: string) => Promise<MCPToolResult>;
|
|
248
|
+
run: (sessionId: string, command: string, options?: SeastudioShellRunOptions) => Promise<MCPToolResult>;
|
|
249
|
+
wait: (sessionId: string, commandId: string, timeoutMs?: number) => Promise<MCPToolResult>;
|
|
250
|
+
getEntries: (sessionId: string, options?: SeastudioShellGetEntriesOptions) => Promise<MCPToolResult>;
|
|
251
|
+
signal: (sessionId: string, signal: "INT" | "TERM" | "KILL", commandId?: string) => Promise<MCPToolResult>;
|
|
252
|
+
clearEntries: (sessionId: string) => Promise<MCPToolResult>;
|
|
253
|
+
close: (sessionId: string, force?: boolean) => Promise<MCPToolResult>;
|
|
179
254
|
};
|
|
180
255
|
};
|
|
181
256
|
};
|
|
257
|
+
/**
|
|
258
|
+
* One-shot helper: open a transient session, run command, wait, close.
|
|
259
|
+
* Returns aggregated stdout/exit info. Useful for short, non-interactive commands
|
|
260
|
+
* (e.g. `git status`). For long-running tasks use `seastudio.shell.session` directly.
|
|
261
|
+
*/
|
|
262
|
+
declare function runOneShotShellCommand(command: string, options?: SeastudioShellOpenOptions & {
|
|
263
|
+
timeoutMs?: number;
|
|
264
|
+
}): Promise<SeastudioShellOneShotResult>;
|
|
182
265
|
|
|
183
266
|
/**
|
|
184
267
|
* Plugin MCP Tools
|
|
@@ -198,6 +281,14 @@ declare const pluginTabTools: MCPTool[];
|
|
|
198
281
|
declare const agentManagementTools: MCPTool[];
|
|
199
282
|
declare const agentTabTools: MCPTool[];
|
|
200
283
|
|
|
284
|
+
/**
|
|
285
|
+
* Project MCP Tools
|
|
286
|
+
*
|
|
287
|
+
* 项目枚举与寻址:让 agent 能列出所有项目并按需跨项目操作。
|
|
288
|
+
*/
|
|
289
|
+
|
|
290
|
+
declare const projectTools: MCPTool[];
|
|
291
|
+
|
|
201
292
|
/**
|
|
202
293
|
* SeaStudio MCP Notifications
|
|
203
294
|
*
|
|
@@ -526,4 +617,4 @@ interface SessionDeleteRequestedParams {
|
|
|
526
617
|
declare const allTools: MCPTool[];
|
|
527
618
|
declare const tools: MCPTool[];
|
|
528
619
|
|
|
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
|
|
620
|
+
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-IZRKT6NQ.js';
|
|
2
2
|
import '../../chunk-TJ3CGHWJ.js';
|