@seastudio/sdk 3.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 +108 -0
- package/bin/seastudio.js +3 -0
- package/dist/chunk-4ITOR5QE.js +901 -0
- package/dist/chunk-5QAINQWV.js +94 -0
- package/dist/chunk-6USQFZRH.js +291 -0
- package/dist/chunk-AGBZJGTY.cjs +1311 -0
- package/dist/chunk-ANWOL7SM.js +566 -0
- package/dist/chunk-BWG45ZWF.cjs +305 -0
- package/dist/chunk-CVF4QHS6.cjs +436 -0
- package/dist/chunk-DDVRUPMZ.js +1293 -0
- package/dist/chunk-DSOSHJH2.js +643 -0
- package/dist/chunk-FLATZQA2.js +174 -0
- package/dist/chunk-HJJTBVKQ.cjs +909 -0
- package/dist/chunk-ISI2OLPI.cjs +179 -0
- package/dist/chunk-MYURVLGP.cjs +165 -0
- package/dist/chunk-N33Y5NY7.cjs +105 -0
- package/dist/chunk-QD4KISXM.js +160 -0
- package/dist/chunk-SNGU4SHO.cjs +654 -0
- package/dist/chunk-TFOJLA2F.cjs +588 -0
- package/dist/chunk-Z7LV7DCO.js +429 -0
- package/dist/develop-tool/cli/index.cjs +1138 -0
- package/dist/develop-tool/cli/index.d.cts +1 -0
- package/dist/develop-tool/cli/index.d.ts +1 -0
- package/dist/develop-tool/cli/index.js +1127 -0
- package/dist/index.cjs +370 -0
- package/dist/index.d.cts +11 -0
- package/dist/index.d.ts +11 -0
- package/dist/index.js +9 -0
- package/dist/mcp/core/index.cjs +90 -0
- package/dist/mcp/core/index.d.cts +124 -0
- package/dist/mcp/core/index.d.ts +124 -0
- package/dist/mcp/core/index.js +1 -0
- package/dist/mcp/index.cjs +317 -0
- package/dist/mcp/index.d.cts +123 -0
- package/dist/mcp/index.d.ts +123 -0
- package/dist/mcp/index.js +8 -0
- package/dist/mcp/plugin-editor/index.cjs +47 -0
- package/dist/mcp/plugin-editor/index.d.cts +98 -0
- package/dist/mcp/plugin-editor/index.d.ts +98 -0
- package/dist/mcp/plugin-editor/index.js +2 -0
- package/dist/mcp/plugin-excel/index.cjs +31 -0
- package/dist/mcp/plugin-excel/index.d.cts +86 -0
- package/dist/mcp/plugin-excel/index.d.ts +86 -0
- package/dist/mcp/plugin-excel/index.js +2 -0
- package/dist/mcp/plugin-preview/index.cjs +23 -0
- package/dist/mcp/plugin-preview/index.d.cts +109 -0
- package/dist/mcp/plugin-preview/index.d.ts +109 -0
- package/dist/mcp/plugin-preview/index.js +2 -0
- package/dist/mcp/plugin-seaflow/index.cjs +35 -0
- package/dist/mcp/plugin-seaflow/index.d.cts +318 -0
- package/dist/mcp/plugin-seaflow/index.d.ts +318 -0
- package/dist/mcp/plugin-seaflow/index.js +2 -0
- package/dist/mcp/seastudio/index.cjs +75 -0
- package/dist/mcp/seastudio/index.d.cts +341 -0
- package/dist/mcp/seastudio/index.d.ts +341 -0
- package/dist/mcp/seastudio/index.js +2 -0
- package/dist/tools-LMW67LIY.js +2 -0
- package/dist/tools-TU7PBMDO.cjs +23 -0
- package/dist/types-Clgf5gBf.d.cts +107 -0
- package/dist/types-Clgf5gBf.d.ts +107 -0
- package/dist/ui/index.cjs +58 -0
- package/dist/ui/index.d.cts +142 -0
- package/dist/ui/index.d.ts +142 -0
- package/dist/ui/index.js +1 -0
- package/package.json +115 -0
- package/src/develop-tool/templates/plugin/README.md.tmpl +36 -0
- package/src/develop-tool/templates/plugin/frontend/index.html.tmpl +12 -0
- package/src/develop-tool/templates/plugin/frontend/package.json.tmpl +30 -0
- package/src/develop-tool/templates/plugin/frontend/postcss.config.js +6 -0
- package/src/develop-tool/templates/plugin/frontend/src/App.css +43 -0
- package/src/develop-tool/templates/plugin/frontend/src/App.tsx.tmpl +43 -0
- package/src/develop-tool/templates/plugin/frontend/src/main.tsx +10 -0
- package/src/develop-tool/templates/plugin/frontend/src/vite-env.d.ts +1 -0
- package/src/develop-tool/templates/plugin/frontend/tsconfig.json +20 -0
- package/src/develop-tool/templates/plugin/frontend/vite.config.ts +12 -0
- package/src/develop-tool/templates/plugin/seastudio.config.json.tmpl +14 -0
- package/src/ui/cosmos.css +407 -0
|
@@ -0,0 +1,901 @@
|
|
|
1
|
+
import { getDefaultClient } from './chunk-ANWOL7SM.js';
|
|
2
|
+
|
|
3
|
+
// src/mcp/plugin-seaflow/tools.ts
|
|
4
|
+
function annotateTool(tool, annotations, outputSchema) {
|
|
5
|
+
return {
|
|
6
|
+
...tool,
|
|
7
|
+
annotations,
|
|
8
|
+
...outputSchema ? { outputSchema } : {}
|
|
9
|
+
};
|
|
10
|
+
}
|
|
11
|
+
function annotateTools(tools2, getAnnotations, outputSchemas = {}) {
|
|
12
|
+
return tools2.map(
|
|
13
|
+
(tool) => annotateTool(tool, getAnnotations(tool), outputSchemas[tool.name])
|
|
14
|
+
);
|
|
15
|
+
}
|
|
16
|
+
var seaflowReadAnnotations = {
|
|
17
|
+
operationKind: "read",
|
|
18
|
+
requiresExecutionEvidence: false,
|
|
19
|
+
rawDomain: "seaflow"
|
|
20
|
+
};
|
|
21
|
+
var seaflowWorkflowAnnotations = {
|
|
22
|
+
operationKind: "workflow",
|
|
23
|
+
requiresExecutionEvidence: true,
|
|
24
|
+
rawDomain: "seaflow"
|
|
25
|
+
};
|
|
26
|
+
var seaflowLongRunningWorkflowAnnotations = {
|
|
27
|
+
...seaflowWorkflowAnnotations,
|
|
28
|
+
hostForwarding: {
|
|
29
|
+
timeoutMs: 125e3
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
var runtimeDirectiveSchema = {
|
|
33
|
+
type: "object",
|
|
34
|
+
properties: {
|
|
35
|
+
kind: {
|
|
36
|
+
type: "string",
|
|
37
|
+
enum: ["call_tool", "await_tool_result", "finalize", "fail"]
|
|
38
|
+
},
|
|
39
|
+
toolName: { type: "string" },
|
|
40
|
+
input: { type: "object", additionalProperties: true },
|
|
41
|
+
finalText: { type: "string" },
|
|
42
|
+
reason: { type: "string" },
|
|
43
|
+
code: { type: "string" }
|
|
44
|
+
}
|
|
45
|
+
};
|
|
46
|
+
var seaflowOutputSchemas = {
|
|
47
|
+
"seaflow-canvas_workflow_context_get": {
|
|
48
|
+
type: "object",
|
|
49
|
+
properties: {
|
|
50
|
+
activeWorkflowId: { type: "string" },
|
|
51
|
+
graphId: { type: "string" },
|
|
52
|
+
version: { type: "number" },
|
|
53
|
+
nodeCount: { type: "number" },
|
|
54
|
+
edgeCount: { type: "number" },
|
|
55
|
+
viewport: {
|
|
56
|
+
type: "object",
|
|
57
|
+
properties: {
|
|
58
|
+
x: { type: "number" },
|
|
59
|
+
y: { type: "number" },
|
|
60
|
+
zoom: { type: "number" }
|
|
61
|
+
}
|
|
62
|
+
},
|
|
63
|
+
autosaveStorageKey: { type: "string" },
|
|
64
|
+
target: { type: "string" },
|
|
65
|
+
updatedAt: { type: "number" }
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
"seaflow-canvas_clear_canvas": {
|
|
69
|
+
type: "object",
|
|
70
|
+
properties: {
|
|
71
|
+
accepted: { type: "boolean" },
|
|
72
|
+
graphId: { type: "string" },
|
|
73
|
+
clearedNodeCount: { type: "number" },
|
|
74
|
+
clearedEdgeCount: { type: "number" },
|
|
75
|
+
viewport: {
|
|
76
|
+
type: "object",
|
|
77
|
+
properties: {
|
|
78
|
+
x: { type: "number" },
|
|
79
|
+
y: { type: "number" },
|
|
80
|
+
zoom: { type: "number" }
|
|
81
|
+
}
|
|
82
|
+
},
|
|
83
|
+
updatedAt: { type: "number" }
|
|
84
|
+
},
|
|
85
|
+
required: ["accepted"]
|
|
86
|
+
},
|
|
87
|
+
"seaflow-canvas_batch_apply": {
|
|
88
|
+
type: "object",
|
|
89
|
+
properties: {
|
|
90
|
+
accepted: { type: "boolean" },
|
|
91
|
+
nextVersion: { type: "number" },
|
|
92
|
+
appliedCount: { type: "number" },
|
|
93
|
+
conflicts: {
|
|
94
|
+
type: "array",
|
|
95
|
+
items: {
|
|
96
|
+
type: "object",
|
|
97
|
+
properties: {
|
|
98
|
+
code: { type: "string" },
|
|
99
|
+
message: { type: "string" },
|
|
100
|
+
operationIndex: { type: "number" }
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
},
|
|
105
|
+
required: ["accepted"]
|
|
106
|
+
},
|
|
107
|
+
"seaflow-canvas_execute_node": {
|
|
108
|
+
type: "object",
|
|
109
|
+
properties: {
|
|
110
|
+
accepted: { type: "boolean" },
|
|
111
|
+
taskId: { type: "string" },
|
|
112
|
+
target: { type: "string", enum: ["seaart", "staging"] },
|
|
113
|
+
status: {
|
|
114
|
+
type: "string",
|
|
115
|
+
enum: ["accepted", "queued", "running", "completed", "failed", "error", "canceled"]
|
|
116
|
+
},
|
|
117
|
+
reason: { type: "string" },
|
|
118
|
+
runtimeDirective: runtimeDirectiveSchema
|
|
119
|
+
},
|
|
120
|
+
required: ["accepted", "taskId", "status"]
|
|
121
|
+
},
|
|
122
|
+
"seaflow-canvas_get_task_state": {
|
|
123
|
+
type: "object",
|
|
124
|
+
properties: {
|
|
125
|
+
taskId: { type: "string" },
|
|
126
|
+
target: { type: "string" },
|
|
127
|
+
status: {
|
|
128
|
+
type: "string",
|
|
129
|
+
enum: ["accepted", "queued", "running", "completed", "failed", "error", "canceled"]
|
|
130
|
+
},
|
|
131
|
+
progress: { type: "number" },
|
|
132
|
+
message: { type: "string" },
|
|
133
|
+
updatedAt: { type: "number" }
|
|
134
|
+
}
|
|
135
|
+
},
|
|
136
|
+
"seaflow-canvas_execute_graph": {
|
|
137
|
+
type: "object",
|
|
138
|
+
properties: {
|
|
139
|
+
accepted: { type: "boolean" },
|
|
140
|
+
taskId: { type: "string" },
|
|
141
|
+
target: { type: "string", enum: ["seaart", "staging"] },
|
|
142
|
+
status: {
|
|
143
|
+
type: "string",
|
|
144
|
+
enum: ["accepted", "queued", "running", "completed", "failed", "error", "canceled"]
|
|
145
|
+
},
|
|
146
|
+
terminal: { type: "boolean", description: "\u6574\u56FE\u6267\u884C\u542F\u52A8\u7ED3\u679C\u9ED8\u8BA4\u662F\u975E\u7EC8\u6001" },
|
|
147
|
+
reason: { type: "string" },
|
|
148
|
+
runtimeDirective: runtimeDirectiveSchema
|
|
149
|
+
},
|
|
150
|
+
required: ["accepted", "taskId", "status", "terminal"]
|
|
151
|
+
},
|
|
152
|
+
"seaflow-canvas_workflow_open": {
|
|
153
|
+
type: "object",
|
|
154
|
+
properties: {
|
|
155
|
+
accepted: { type: "boolean" },
|
|
156
|
+
workflowId: { type: "string" },
|
|
157
|
+
source: { type: "string", enum: ["remote", "local"] },
|
|
158
|
+
nodeCount: { type: "number" },
|
|
159
|
+
edgeCount: { type: "number" },
|
|
160
|
+
name: { type: "string" },
|
|
161
|
+
viewport: {
|
|
162
|
+
type: "object",
|
|
163
|
+
properties: {
|
|
164
|
+
x: { type: "number" },
|
|
165
|
+
y: { type: "number" },
|
|
166
|
+
zoom: { type: "number" }
|
|
167
|
+
}
|
|
168
|
+
},
|
|
169
|
+
reason: { type: "string" }
|
|
170
|
+
},
|
|
171
|
+
required: ["accepted"]
|
|
172
|
+
},
|
|
173
|
+
"seaflow-canvas_workflow_save": {
|
|
174
|
+
type: "object",
|
|
175
|
+
properties: {
|
|
176
|
+
accepted: { type: "boolean" },
|
|
177
|
+
workflowId: { type: "string" },
|
|
178
|
+
localSaved: { type: "boolean" },
|
|
179
|
+
remoteSaved: { type: "boolean" },
|
|
180
|
+
remoteError: { type: "string" },
|
|
181
|
+
nodeCount: { type: "number" },
|
|
182
|
+
edgeCount: { type: "number" },
|
|
183
|
+
viewport: {
|
|
184
|
+
type: "object",
|
|
185
|
+
properties: {
|
|
186
|
+
x: { type: "number" },
|
|
187
|
+
y: { type: "number" },
|
|
188
|
+
zoom: { type: "number" }
|
|
189
|
+
}
|
|
190
|
+
},
|
|
191
|
+
updatedAt: { type: "string" },
|
|
192
|
+
reason: { type: "string" }
|
|
193
|
+
},
|
|
194
|
+
required: ["accepted"]
|
|
195
|
+
},
|
|
196
|
+
"seaflow-canvas_cancel_task": {
|
|
197
|
+
type: "object",
|
|
198
|
+
properties: {
|
|
199
|
+
accepted: { type: "boolean" },
|
|
200
|
+
taskId: { type: "string" },
|
|
201
|
+
status: {
|
|
202
|
+
type: "string",
|
|
203
|
+
enum: ["accepted", "queued", "running", "completed", "failed", "error", "canceled"]
|
|
204
|
+
},
|
|
205
|
+
reason: { type: "string" }
|
|
206
|
+
},
|
|
207
|
+
required: ["accepted", "taskId"]
|
|
208
|
+
},
|
|
209
|
+
"seaflow-canvas_task_wait_result": {
|
|
210
|
+
type: "object",
|
|
211
|
+
properties: {
|
|
212
|
+
accepted: { type: "boolean" },
|
|
213
|
+
taskId: { type: "string" },
|
|
214
|
+
target: { type: "string", enum: ["seaart", "staging"] },
|
|
215
|
+
status: {
|
|
216
|
+
type: "string",
|
|
217
|
+
enum: ["accepted", "queued", "running", "completed", "failed", "error", "canceled"]
|
|
218
|
+
},
|
|
219
|
+
progress: { type: "number" },
|
|
220
|
+
message: { type: "string" },
|
|
221
|
+
terminal: { type: "boolean" },
|
|
222
|
+
outputs: { type: "object", additionalProperties: true },
|
|
223
|
+
result: { type: "object", additionalProperties: true },
|
|
224
|
+
summary: {
|
|
225
|
+
type: "object",
|
|
226
|
+
properties: {
|
|
227
|
+
message: { type: "string" },
|
|
228
|
+
completedNodeIds: { type: "array", items: { type: "string" } },
|
|
229
|
+
failedNodeIds: { type: "array", items: { type: "string" } },
|
|
230
|
+
completedCount: { type: "number" },
|
|
231
|
+
failedCount: { type: "number" },
|
|
232
|
+
hasTextResults: { type: "boolean" },
|
|
233
|
+
hasImageResults: { type: "boolean" },
|
|
234
|
+
textCount: { type: "number" },
|
|
235
|
+
imageCount: { type: "number" }
|
|
236
|
+
}
|
|
237
|
+
},
|
|
238
|
+
outputsByNode: {
|
|
239
|
+
type: "object",
|
|
240
|
+
additionalProperties: { type: "object", additionalProperties: true }
|
|
241
|
+
},
|
|
242
|
+
primaryArtifacts: {
|
|
243
|
+
type: "object",
|
|
244
|
+
properties: {
|
|
245
|
+
texts: { type: "array", items: { type: "string" } },
|
|
246
|
+
imageUrls: { type: "array", items: { type: "string" } }
|
|
247
|
+
}
|
|
248
|
+
},
|
|
249
|
+
completedNodeIds: { type: "array", items: { type: "string" } },
|
|
250
|
+
failedNodeIds: { type: "array", items: { type: "string" } },
|
|
251
|
+
eventsProcessed: { type: "number" },
|
|
252
|
+
updatedAt: { type: "number" },
|
|
253
|
+
nodeId: { type: "string" },
|
|
254
|
+
action: { type: "string" },
|
|
255
|
+
nextVersion: { type: "number" },
|
|
256
|
+
appliedCount: { type: "number" },
|
|
257
|
+
runtimeDirective: runtimeDirectiveSchema
|
|
258
|
+
},
|
|
259
|
+
required: ["accepted", "taskId", "status", "terminal"]
|
|
260
|
+
},
|
|
261
|
+
"seaflow-canvas_execute_node_and_wait": {
|
|
262
|
+
type: "object",
|
|
263
|
+
properties: {
|
|
264
|
+
accepted: { type: "boolean" },
|
|
265
|
+
taskId: { type: "string" },
|
|
266
|
+
target: { type: "string", enum: ["seaart", "staging"] },
|
|
267
|
+
status: {
|
|
268
|
+
type: "string",
|
|
269
|
+
enum: ["accepted", "queued", "running", "completed", "failed", "error", "canceled"]
|
|
270
|
+
},
|
|
271
|
+
terminal: { type: "boolean" },
|
|
272
|
+
nodeId: { type: "string" },
|
|
273
|
+
outputs: { type: "object", additionalProperties: true },
|
|
274
|
+
result: { type: "object", additionalProperties: true },
|
|
275
|
+
summary: { type: "object", additionalProperties: true },
|
|
276
|
+
primaryArtifacts: {
|
|
277
|
+
type: "object",
|
|
278
|
+
properties: {
|
|
279
|
+
texts: { type: "array", items: { type: "string" } },
|
|
280
|
+
imageUrls: { type: "array", items: { type: "string" } }
|
|
281
|
+
}
|
|
282
|
+
},
|
|
283
|
+
completedNodeIds: { type: "array", items: { type: "string" } },
|
|
284
|
+
failedNodeIds: { type: "array", items: { type: "string" } },
|
|
285
|
+
eventsProcessed: { type: "number" },
|
|
286
|
+
updatedAt: { type: "number" },
|
|
287
|
+
runtimeDirective: runtimeDirectiveSchema
|
|
288
|
+
},
|
|
289
|
+
required: ["accepted", "taskId", "status", "terminal", "nodeId"]
|
|
290
|
+
},
|
|
291
|
+
"seaflow-canvas_generate_image_from_prompt": {
|
|
292
|
+
type: "object",
|
|
293
|
+
properties: {
|
|
294
|
+
accepted: { type: "boolean" },
|
|
295
|
+
taskId: { type: "string" },
|
|
296
|
+
nodeId: { type: "string" },
|
|
297
|
+
action: { type: "string", enum: ["add", "update"] },
|
|
298
|
+
nextVersion: { type: "number" },
|
|
299
|
+
appliedCount: { type: "number" },
|
|
300
|
+
target: { type: "string", enum: ["seaart", "staging"] },
|
|
301
|
+
status: {
|
|
302
|
+
type: "string",
|
|
303
|
+
enum: ["accepted", "queued", "running", "completed", "failed", "error", "canceled"]
|
|
304
|
+
},
|
|
305
|
+
terminal: { type: "boolean" },
|
|
306
|
+
outputs: { type: "object", additionalProperties: true },
|
|
307
|
+
result: { type: "object", additionalProperties: true },
|
|
308
|
+
summary: { type: "object", additionalProperties: true },
|
|
309
|
+
primaryArtifacts: {
|
|
310
|
+
type: "object",
|
|
311
|
+
properties: {
|
|
312
|
+
texts: { type: "array", items: { type: "string" } },
|
|
313
|
+
imageUrls: { type: "array", items: { type: "string" } }
|
|
314
|
+
}
|
|
315
|
+
},
|
|
316
|
+
completedNodeIds: { type: "array", items: { type: "string" } },
|
|
317
|
+
failedNodeIds: { type: "array", items: { type: "string" } },
|
|
318
|
+
updatedAt: { type: "number" },
|
|
319
|
+
runtimeDirective: runtimeDirectiveSchema
|
|
320
|
+
},
|
|
321
|
+
required: ["accepted", "taskId", "status", "terminal", "nodeId"]
|
|
322
|
+
},
|
|
323
|
+
"seaflow-canvas_execution_auth_set": {
|
|
324
|
+
type: "object",
|
|
325
|
+
properties: {
|
|
326
|
+
currentTarget: { type: "string" },
|
|
327
|
+
persistMode: { type: "string", enum: ["memory", "session", "local"] },
|
|
328
|
+
authStateByTarget: { type: "object", additionalProperties: { type: "string" } },
|
|
329
|
+
hasTokenByTarget: { type: "object", additionalProperties: { type: "boolean" } },
|
|
330
|
+
updatedAt: { type: "number" }
|
|
331
|
+
},
|
|
332
|
+
required: ["currentTarget", "persistMode", "authStateByTarget", "hasTokenByTarget"]
|
|
333
|
+
},
|
|
334
|
+
"seaflow-canvas_upsert_image_node": {
|
|
335
|
+
type: "object",
|
|
336
|
+
properties: {
|
|
337
|
+
accepted: { type: "boolean" },
|
|
338
|
+
nodeId: { type: "string" },
|
|
339
|
+
action: { type: "string", enum: ["add", "update"] },
|
|
340
|
+
nextVersion: { type: "number" },
|
|
341
|
+
appliedCount: { type: "number" }
|
|
342
|
+
},
|
|
343
|
+
required: ["accepted", "nodeId", "action", "nextVersion"]
|
|
344
|
+
},
|
|
345
|
+
"seaflow-canvas_upsert_text_node": {
|
|
346
|
+
type: "object",
|
|
347
|
+
properties: {
|
|
348
|
+
accepted: { type: "boolean" },
|
|
349
|
+
nodeId: { type: "string" },
|
|
350
|
+
action: { type: "string", enum: ["add", "update"] },
|
|
351
|
+
nextVersion: { type: "number" },
|
|
352
|
+
appliedCount: { type: "number" }
|
|
353
|
+
},
|
|
354
|
+
required: ["accepted", "nodeId", "action", "nextVersion"]
|
|
355
|
+
},
|
|
356
|
+
"seaflow-canvas_connect_nodes": {
|
|
357
|
+
type: "object",
|
|
358
|
+
properties: {
|
|
359
|
+
accepted: { type: "boolean" },
|
|
360
|
+
nextVersion: { type: "number" },
|
|
361
|
+
appliedCount: { type: "number" }
|
|
362
|
+
},
|
|
363
|
+
required: ["accepted", "nextVersion", "appliedCount"]
|
|
364
|
+
}
|
|
365
|
+
};
|
|
366
|
+
var rawCanvasContextTools = [
|
|
367
|
+
{
|
|
368
|
+
name: "seaflow-canvas_get_snapshot",
|
|
369
|
+
description: "\u8BFB\u53D6\u5F53\u524D\u753B\u5E03\u56FE\u5FEB\u7167\uFF08nodes/edges/version/viewport\uFF09",
|
|
370
|
+
inputSchema: {
|
|
371
|
+
type: "object",
|
|
372
|
+
properties: {
|
|
373
|
+
graphId: { type: "string", description: "\u56FE ID\uFF08\u53EF\u9009\uFF0C\u9ED8\u8BA4\u5F53\u524D\u6FC0\u6D3B\u56FE\uFF09" }
|
|
374
|
+
}
|
|
375
|
+
}
|
|
376
|
+
},
|
|
377
|
+
{
|
|
378
|
+
name: "seaflow-canvas_workflow_context_get",
|
|
379
|
+
description: "\u83B7\u53D6\u5F53\u524D\u753B\u5E03\u5DE5\u4F5C\u6D41\u4E0A\u4E0B\u6587\uFF08activeWorkflowId/version/viewport/autosaveKey\uFF09",
|
|
380
|
+
inputSchema: {
|
|
381
|
+
type: "object",
|
|
382
|
+
properties: {}
|
|
383
|
+
}
|
|
384
|
+
},
|
|
385
|
+
{
|
|
386
|
+
name: "seaflow-canvas_list_node_types",
|
|
387
|
+
description: "\u5217\u51FA\u5F53\u524D\u753B\u5E03\u53EF\u521B\u5EFA\u8282\u70B9\u7C7B\u578B\u4E0E\u80FD\u529B\uFF0C\u5305\u542B defaults/inputSchema/outputSchema/capabilities\uFF1Bcapabilities.connections \u4F1A\u8FD4\u56DE\u63A8\u8350\u8FDE\u7EBF\u65B9\u5F0F\u4E0E\u8F93\u5165/\u8F93\u51FA\u53E3\u8BED\u4E49\u3002",
|
|
388
|
+
inputSchema: {
|
|
389
|
+
type: "object",
|
|
390
|
+
properties: {
|
|
391
|
+
includeBasic: { type: "boolean", description: "\u662F\u5426\u8FD4\u56DE basic \u8282\u70B9\uFF0C\u9ED8\u8BA4 true" },
|
|
392
|
+
includeAliases: { type: "boolean", description: "\u662F\u5426\u8FD4\u56DE alias \u6620\u5C04\uFF0C\u9ED8\u8BA4 true" },
|
|
393
|
+
includeCapabilities: { type: "boolean", description: "\u662F\u5426\u8FD4\u56DE capabilities\uFF0C\u9ED8\u8BA4 true" },
|
|
394
|
+
includeSchemas: { type: "boolean", description: "\u662F\u5426\u8FD4\u56DE inputSchema/outputSchema\uFF0C\u9ED8\u8BA4 true" },
|
|
395
|
+
executableOnly: { type: "boolean", description: "\u4EC5\u8FD4\u56DE\u53EF\u6267\u884C\u8282\u70B9\uFF08image-generation/text-multimodal\uFF09" },
|
|
396
|
+
typeIds: {
|
|
397
|
+
type: "array",
|
|
398
|
+
description: "\u4EC5\u8FD4\u56DE\u6307\u5B9A typeId \u5217\u8868",
|
|
399
|
+
items: { type: "string" }
|
|
400
|
+
}
|
|
401
|
+
}
|
|
402
|
+
}
|
|
403
|
+
},
|
|
404
|
+
{
|
|
405
|
+
name: "seaflow-canvas_node_validate",
|
|
406
|
+
description: "\u6821\u9A8C\u5355\u4E2A\u8282\u70B9\u8F93\u5165\u4E0E\u62D3\u6251\u7EA6\u675F",
|
|
407
|
+
inputSchema: {
|
|
408
|
+
type: "object",
|
|
409
|
+
properties: {
|
|
410
|
+
nodeId: { type: "string", description: "\u8282\u70B9 ID" },
|
|
411
|
+
strict: { type: "boolean", description: "\u4E25\u683C\u6A21\u5F0F\uFF08\u53EF\u9009\uFF09" }
|
|
412
|
+
},
|
|
413
|
+
required: ["nodeId"]
|
|
414
|
+
}
|
|
415
|
+
},
|
|
416
|
+
{
|
|
417
|
+
name: "seaflow-canvas_node_get_outputs",
|
|
418
|
+
description: "\u83B7\u53D6\u5355\u4E2A\u8282\u70B9\u5F53\u524D\u8F93\u51FA\u5FEB\u7167",
|
|
419
|
+
inputSchema: {
|
|
420
|
+
type: "object",
|
|
421
|
+
properties: {
|
|
422
|
+
nodeId: { type: "string", description: "\u8282\u70B9 ID" }
|
|
423
|
+
},
|
|
424
|
+
required: ["nodeId"]
|
|
425
|
+
}
|
|
426
|
+
},
|
|
427
|
+
{
|
|
428
|
+
name: "seaflow-canvas_node_get",
|
|
429
|
+
description: "\u83B7\u53D6\u8282\u70B9\u8BE6\u60C5\uFF08type/label/position/inputs/runtime/outputs/connectionHints/incomingConnections\uFF09",
|
|
430
|
+
inputSchema: {
|
|
431
|
+
type: "object",
|
|
432
|
+
properties: {
|
|
433
|
+
nodeId: { type: "string", description: "\u8282\u70B9 ID" }
|
|
434
|
+
},
|
|
435
|
+
required: ["nodeId"]
|
|
436
|
+
}
|
|
437
|
+
},
|
|
438
|
+
{
|
|
439
|
+
name: "seaflow-canvas_edge_list",
|
|
440
|
+
description: "\u5217\u51FA\u8FB9\u4FE1\u606F\uFF0C\u53EF\u6309 nodeId \u4E0E\u65B9\u5411\u8FC7\u6EE4",
|
|
441
|
+
inputSchema: {
|
|
442
|
+
type: "object",
|
|
443
|
+
properties: {
|
|
444
|
+
nodeId: { type: "string", description: "\u53EF\u9009\uFF0C\u8FC7\u6EE4\u6307\u5B9A\u8282\u70B9" },
|
|
445
|
+
direction: {
|
|
446
|
+
type: "string",
|
|
447
|
+
description: "\u8FB9\u65B9\u5411\u8FC7\u6EE4\uFF08\u53EF\u9009\uFF09",
|
|
448
|
+
enum: ["in", "out", "both"]
|
|
449
|
+
}
|
|
450
|
+
}
|
|
451
|
+
}
|
|
452
|
+
}
|
|
453
|
+
];
|
|
454
|
+
var rawCanvasExecutionTools = [
|
|
455
|
+
{
|
|
456
|
+
name: "seaflow-canvas_clear_canvas",
|
|
457
|
+
description: "\u6E05\u7A7A\u5F53\u524D\u6FC0\u6D3B\u753B\u5E03\u7684 nodes/edges\uFF0C\u5E76\u91CD\u7F6E\u672C\u5730 autosave \u5FEB\u7167",
|
|
458
|
+
inputSchema: {
|
|
459
|
+
type: "object",
|
|
460
|
+
properties: {}
|
|
461
|
+
}
|
|
462
|
+
},
|
|
463
|
+
{
|
|
464
|
+
name: "seaflow-canvas_batch_apply",
|
|
465
|
+
description: "\u4EE5\u539F\u5B50\u6279\u5904\u7406\u65B9\u5F0F\u5E94\u7528\u753B\u5E03\u53D8\u66F4\u64CD\u4F5C",
|
|
466
|
+
inputSchema: {
|
|
467
|
+
type: "object",
|
|
468
|
+
properties: {
|
|
469
|
+
requestId: { type: "string", description: "\u8BF7\u6C42 ID" },
|
|
470
|
+
idempotencyKey: { type: "string", description: "\u5E42\u7B49\u952E" },
|
|
471
|
+
baseVersion: { type: "number", description: "\u57FA\u7EBF\u7248\u672C\u53F7" },
|
|
472
|
+
operations: {
|
|
473
|
+
type: "array",
|
|
474
|
+
description: "\u6279\u91CF\u64CD\u4F5C\u5217\u8868",
|
|
475
|
+
items: {
|
|
476
|
+
type: "object",
|
|
477
|
+
required: ["opId", "type", "payload"],
|
|
478
|
+
properties: {
|
|
479
|
+
opId: { type: "string", description: "\u64CD\u4F5C ID" },
|
|
480
|
+
type: {
|
|
481
|
+
type: "string",
|
|
482
|
+
description: "\u64CD\u4F5C\u7C7B\u578B",
|
|
483
|
+
enum: ["node.add", "node.update", "node.delete", "edge.connect", "edge.disconnect"]
|
|
484
|
+
},
|
|
485
|
+
payload: {
|
|
486
|
+
oneOf: [
|
|
487
|
+
{
|
|
488
|
+
type: "object",
|
|
489
|
+
required: ["node"],
|
|
490
|
+
properties: {
|
|
491
|
+
node: { type: "object" }
|
|
492
|
+
}
|
|
493
|
+
},
|
|
494
|
+
{
|
|
495
|
+
type: "object",
|
|
496
|
+
required: ["nodeId", "patch"],
|
|
497
|
+
properties: {
|
|
498
|
+
nodeId: { type: "string" },
|
|
499
|
+
patch: { type: "object" }
|
|
500
|
+
}
|
|
501
|
+
},
|
|
502
|
+
{
|
|
503
|
+
type: "object",
|
|
504
|
+
required: ["nodeId"],
|
|
505
|
+
properties: {
|
|
506
|
+
nodeId: { type: "string" }
|
|
507
|
+
}
|
|
508
|
+
},
|
|
509
|
+
{
|
|
510
|
+
type: "object",
|
|
511
|
+
required: ["connection"],
|
|
512
|
+
properties: {
|
|
513
|
+
connection: {
|
|
514
|
+
type: "object",
|
|
515
|
+
properties: {
|
|
516
|
+
source: { type: "string", description: "\u6E90\u8282\u70B9 ID" },
|
|
517
|
+
target: { type: "string", description: "\u76EE\u6807\u8282\u70B9 ID" },
|
|
518
|
+
sourceHandle: { type: "string", description: "\u53EF\u9009\uFF1B\u6E90\u8F93\u51FA\u53E3 handleId" },
|
|
519
|
+
targetHandle: { type: "string", description: "\u53EF\u9009\uFF1B\u76EE\u6807\u8F93\u5165\u53E3 handleId" }
|
|
520
|
+
},
|
|
521
|
+
required: ["source", "target"]
|
|
522
|
+
},
|
|
523
|
+
edgeType: { type: "string" }
|
|
524
|
+
}
|
|
525
|
+
},
|
|
526
|
+
{
|
|
527
|
+
type: "object",
|
|
528
|
+
required: ["edgeId"],
|
|
529
|
+
properties: {
|
|
530
|
+
edgeId: { type: "string" }
|
|
531
|
+
}
|
|
532
|
+
}
|
|
533
|
+
]
|
|
534
|
+
}
|
|
535
|
+
}
|
|
536
|
+
}
|
|
537
|
+
}
|
|
538
|
+
},
|
|
539
|
+
required: ["requestId", "idempotencyKey", "baseVersion", "operations"]
|
|
540
|
+
}
|
|
541
|
+
},
|
|
542
|
+
{
|
|
543
|
+
name: "seaflow-canvas_execute_node",
|
|
544
|
+
description: "\u89E6\u53D1\u5355\u8282\u70B9\u6267\u884C\u5E76\u8FD4\u56DE\u4EFB\u52A1\u53E5\u67C4",
|
|
545
|
+
inputSchema: {
|
|
546
|
+
type: "object",
|
|
547
|
+
properties: {
|
|
548
|
+
nodeId: { type: "string", description: "\u8282\u70B9 ID" },
|
|
549
|
+
target: {
|
|
550
|
+
type: "string",
|
|
551
|
+
description: "\u6267\u884C\u76EE\u6807\uFF08\u53EF\u9009\uFF09",
|
|
552
|
+
enum: ["seaart", "staging"]
|
|
553
|
+
}
|
|
554
|
+
},
|
|
555
|
+
required: ["nodeId"]
|
|
556
|
+
}
|
|
557
|
+
},
|
|
558
|
+
{
|
|
559
|
+
name: "seaflow-canvas_execute_graph",
|
|
560
|
+
description: "\u89E6\u53D1\u6574\u56FE\u6267\u884C\u5E76\u8FD4\u56DE\u4EFB\u52A1\u53E5\u67C4",
|
|
561
|
+
inputSchema: {
|
|
562
|
+
type: "object",
|
|
563
|
+
properties: {
|
|
564
|
+
graphId: { type: "string", description: "\u56FE ID\uFF08\u53EF\u9009\uFF09" },
|
|
565
|
+
target: {
|
|
566
|
+
type: "string",
|
|
567
|
+
description: "\u6267\u884C\u76EE\u6807\uFF08\u53EF\u9009\uFF09",
|
|
568
|
+
enum: ["seaart", "staging"]
|
|
569
|
+
},
|
|
570
|
+
source: {
|
|
571
|
+
type: "string",
|
|
572
|
+
description: "\u5F53 graphId \u4E0D\u540C\u4E8E\u5F53\u524D\u6FC0\u6D3B\u56FE\u65F6\uFF0C\u5207\u6362\u5DE5\u4F5C\u6D41\u7684\u52A0\u8F7D\u6765\u6E90\uFF08\u53EF\u9009\uFF09",
|
|
573
|
+
enum: ["auto", "remote", "local"]
|
|
574
|
+
}
|
|
575
|
+
}
|
|
576
|
+
}
|
|
577
|
+
},
|
|
578
|
+
{
|
|
579
|
+
name: "seaflow-canvas_workflow_open",
|
|
580
|
+
description: "\u6253\u5F00\u5E76\u52A0\u8F7D\u6307\u5B9A workflow \u5230\u5F53\u524D\u753B\u5E03\uFF08\u652F\u6301 remote/local/auto\uFF09",
|
|
581
|
+
inputSchema: {
|
|
582
|
+
type: "object",
|
|
583
|
+
properties: {
|
|
584
|
+
workflowId: { type: "string", description: "\u5DE5\u4F5C\u6D41 ID" },
|
|
585
|
+
target: {
|
|
586
|
+
type: "string",
|
|
587
|
+
description: "\u6267\u884C\u76EE\u6807\uFF08\u53EF\u9009\uFF09",
|
|
588
|
+
enum: ["seaart", "staging"]
|
|
589
|
+
},
|
|
590
|
+
source: {
|
|
591
|
+
type: "string",
|
|
592
|
+
description: "\u52A0\u8F7D\u6765\u6E90\uFF08\u53EF\u9009\uFF0C\u9ED8\u8BA4 auto\uFF09",
|
|
593
|
+
enum: ["auto", "remote", "local"]
|
|
594
|
+
},
|
|
595
|
+
syncActiveGraph: { type: "boolean", description: "\u662F\u5426\u540C\u6B65\u5207\u6362 active graph\uFF08\u9ED8\u8BA4 true\uFF09" }
|
|
596
|
+
},
|
|
597
|
+
required: ["workflowId"]
|
|
598
|
+
}
|
|
599
|
+
},
|
|
600
|
+
{
|
|
601
|
+
name: "seaflow-canvas_workflow_save",
|
|
602
|
+
description: "\u5C06\u5F53\u524D\u753B\u5E03\u4FDD\u5B58\u5230\u672C\u5730\u4E0E/\u6216\u8FDC\u7AEF graphs",
|
|
603
|
+
inputSchema: {
|
|
604
|
+
type: "object",
|
|
605
|
+
properties: {
|
|
606
|
+
workflowId: { type: "string", description: "\u5DE5\u4F5C\u6D41 ID\uFF08\u53EF\u9009\uFF0C\u9ED8\u8BA4\u5F53\u524D active\uFF09" },
|
|
607
|
+
name: { type: "string", description: "\u5DE5\u4F5C\u6D41\u540D\u79F0\uFF08\u53EF\u9009\uFF09" },
|
|
608
|
+
target: {
|
|
609
|
+
type: "string",
|
|
610
|
+
description: "\u6267\u884C\u76EE\u6807\uFF08\u53EF\u9009\uFF09",
|
|
611
|
+
enum: ["seaart", "staging"]
|
|
612
|
+
},
|
|
613
|
+
persistLocal: { type: "boolean", description: "\u662F\u5426\u5199\u5165\u672C\u5730\u5FEB\u7167\uFF08\u9ED8\u8BA4 true\uFF09" },
|
|
614
|
+
persistRemote: { type: "boolean", description: "\u662F\u5426\u5199\u5165\u8FDC\u7AEF graphs\uFF08\u9ED8\u8BA4 true\uFF09" },
|
|
615
|
+
includeViewport: { type: "boolean", description: "\u662F\u5426\u4FDD\u5B58 viewport\uFF08\u9ED8\u8BA4 true\uFF09" },
|
|
616
|
+
isCanvas: { type: "boolean", description: "\u662F\u5426\u6309 canvas \u56FE\u4FDD\u5B58\uFF08\u9ED8\u8BA4 true\uFF09" },
|
|
617
|
+
versionId: { type: "string", description: "\u53EF\u9009\uFF0C\u8FDC\u7AEF\u7248\u672C\u53F7\uFF08version_id\uFF09" }
|
|
618
|
+
}
|
|
619
|
+
}
|
|
620
|
+
},
|
|
621
|
+
{
|
|
622
|
+
name: "seaflow-canvas_cancel_task",
|
|
623
|
+
description: "\u53D6\u6D88\u753B\u5E03\u4EFB\u52A1",
|
|
624
|
+
inputSchema: {
|
|
625
|
+
type: "object",
|
|
626
|
+
properties: {
|
|
627
|
+
taskId: { type: "string", description: "\u4EFB\u52A1 ID" }
|
|
628
|
+
},
|
|
629
|
+
required: ["taskId"]
|
|
630
|
+
}
|
|
631
|
+
},
|
|
632
|
+
{
|
|
633
|
+
name: "seaflow-canvas_get_task_state",
|
|
634
|
+
description: "\u83B7\u53D6\u4EFB\u52A1\u72B6\u6001\u5FEB\u7167",
|
|
635
|
+
inputSchema: {
|
|
636
|
+
type: "object",
|
|
637
|
+
properties: {
|
|
638
|
+
taskId: { type: "string", description: "\u4EFB\u52A1 ID" }
|
|
639
|
+
},
|
|
640
|
+
required: ["taskId"]
|
|
641
|
+
}
|
|
642
|
+
},
|
|
643
|
+
{
|
|
644
|
+
name: "seaflow-canvas_task_list",
|
|
645
|
+
description: "\u5217\u51FA\u4EFB\u52A1\u72B6\u6001\uFF08\u652F\u6301 status/nodeId \u8FC7\u6EE4\uFF09",
|
|
646
|
+
inputSchema: {
|
|
647
|
+
type: "object",
|
|
648
|
+
properties: {
|
|
649
|
+
status: {
|
|
650
|
+
type: "string",
|
|
651
|
+
description: "\u53EF\u9009\uFF0C\u4EFB\u52A1\u72B6\u6001\u8FC7\u6EE4",
|
|
652
|
+
enum: ["accepted", "queued", "running", "completed", "failed", "error", "canceled"]
|
|
653
|
+
},
|
|
654
|
+
nodeId: { type: "string", description: "\u53EF\u9009\uFF0C\u4EC5\u8FD4\u56DE\u6307\u5B9A nodeId \u7684\u4EFB\u52A1" }
|
|
655
|
+
}
|
|
656
|
+
}
|
|
657
|
+
},
|
|
658
|
+
{
|
|
659
|
+
name: "seaflow-canvas_task_wait_result",
|
|
660
|
+
description: "\u8F6E\u8BE2\u7B49\u5F85\u4EFB\u52A1\u7EC8\u6001\u5E76\u8FD4\u56DE\u7ED3\u679C",
|
|
661
|
+
inputSchema: {
|
|
662
|
+
type: "object",
|
|
663
|
+
properties: {
|
|
664
|
+
taskId: { type: "string", description: "\u4EFB\u52A1 ID" },
|
|
665
|
+
timeoutMs: { type: "number", description: "\u8D85\u65F6\u65F6\u95F4\uFF08\u6BEB\u79D2\uFF0C\u53EF\u9009\uFF09" },
|
|
666
|
+
pollIntervalMs: { type: "number", description: "\u8F6E\u8BE2\u95F4\u9694\uFF08\u6BEB\u79D2\uFF0C\u53EF\u9009\uFF09" },
|
|
667
|
+
includeEvents: { type: "boolean", description: "\u662F\u5426\u8FD4\u56DE\u4E8B\u4EF6\u8BA1\u6570\uFF08\u53EF\u9009\uFF09" }
|
|
668
|
+
},
|
|
669
|
+
required: ["taskId"]
|
|
670
|
+
}
|
|
671
|
+
},
|
|
672
|
+
{
|
|
673
|
+
name: "seaflow-canvas_task_reconnect",
|
|
674
|
+
description: "\u5C1D\u8BD5\u5BF9\u8FD0\u884C\u4E2D\u4EFB\u52A1\u8FDB\u884C\u72B6\u6001\u91CD\u8FDE\uFF08\u53EF\u6307\u5B9A taskId \u6216\u6309 nodeId \u6279\u91CF\uFF09",
|
|
675
|
+
inputSchema: {
|
|
676
|
+
type: "object",
|
|
677
|
+
properties: {
|
|
678
|
+
taskId: { type: "string", description: "\u4EFB\u52A1 ID\uFF08\u53EF\u9009\uFF09" },
|
|
679
|
+
nodeId: { type: "string", description: "\u8282\u70B9 ID\uFF08\u53EF\u9009\uFF0C\u6279\u91CF\u6A21\u5F0F\u8FC7\u6EE4\uFF09" },
|
|
680
|
+
target: {
|
|
681
|
+
type: "string",
|
|
682
|
+
description: "\u6267\u884C\u76EE\u6807\uFF08\u53EF\u9009\uFF09",
|
|
683
|
+
enum: ["seaart", "staging"]
|
|
684
|
+
},
|
|
685
|
+
timeoutMs: { type: "number", description: "\u5355\u4EFB\u52A1\u91CD\u8FDE\u8D85\u65F6\uFF08\u6BEB\u79D2\uFF0C\u53EF\u9009\uFF09" },
|
|
686
|
+
includeEvents: { type: "boolean", description: "\u662F\u5426\u8FD4\u56DE\u4E8B\u4EF6\u7EDF\u8BA1\uFF08\u53EF\u9009\uFF09" }
|
|
687
|
+
}
|
|
688
|
+
}
|
|
689
|
+
}
|
|
690
|
+
];
|
|
691
|
+
var rawCanvasAuthTools = [
|
|
692
|
+
{
|
|
693
|
+
name: "seaflow-canvas_execution_auth_get",
|
|
694
|
+
description: "\u8BFB\u53D6\u6267\u884C\u9274\u6743\u914D\u7F6E\u4E0E token \u72B6\u6001",
|
|
695
|
+
inputSchema: {
|
|
696
|
+
type: "object",
|
|
697
|
+
properties: {}
|
|
698
|
+
}
|
|
699
|
+
},
|
|
700
|
+
{
|
|
701
|
+
name: "seaflow-canvas_execution_auth_set",
|
|
702
|
+
description: "\u66F4\u65B0\u6267\u884C\u9274\u6743\u914D\u7F6E\uFF08target/token/persistMode\uFF09",
|
|
703
|
+
inputSchema: {
|
|
704
|
+
type: "object",
|
|
705
|
+
properties: {
|
|
706
|
+
target: {
|
|
707
|
+
type: "string",
|
|
708
|
+
description: "\u6267\u884C\u76EE\u6807",
|
|
709
|
+
enum: ["seaart", "staging"]
|
|
710
|
+
},
|
|
711
|
+
token: { type: "string", description: "\u8BBF\u95EE token\uFF08\u5FC5\u586B\uFF09" },
|
|
712
|
+
persistMode: {
|
|
713
|
+
type: "string",
|
|
714
|
+
description: "\u6301\u4E45\u5316\u7B56\u7565\uFF08\u53EF\u9009\uFF09",
|
|
715
|
+
enum: ["memory", "session", "local"]
|
|
716
|
+
}
|
|
717
|
+
},
|
|
718
|
+
required: ["target", "token"]
|
|
719
|
+
}
|
|
720
|
+
}
|
|
721
|
+
];
|
|
722
|
+
var rawCanvasExtendedTools = [
|
|
723
|
+
{
|
|
724
|
+
name: "seaflow-canvas_upsert_image_node",
|
|
725
|
+
description: "\u521B\u5EFA\u6216\u66F4\u65B0\u56FE\u7247\u751F\u6210\u8282\u70B9\uFF08\u8F93\u5165 prompt/model/resolution \u7B49\uFF09\uFF0C\u8FD4\u56DE nodeId \u4E0E nextVersion\u3002",
|
|
726
|
+
inputSchema: {
|
|
727
|
+
type: "object",
|
|
728
|
+
properties: {
|
|
729
|
+
nodeId: { type: "string", description: "\u53EF\u9009\uFF1B\u5B58\u5728\u5219\u66F4\u65B0\uFF0C\u4E0D\u5B58\u5728\u5219\u521B\u5EFA" },
|
|
730
|
+
label: { type: "string", description: "\u53EF\u9009\uFF1B\u8282\u70B9\u5C55\u793A\u540D" },
|
|
731
|
+
prompt: { type: "string", description: "\u6B63\u5411\u63D0\u793A\u8BCD" },
|
|
732
|
+
negativePrompt: { type: "string", description: "\u53EF\u9009\uFF1B\u8D1F\u5411\u63D0\u793A\u8BCD" },
|
|
733
|
+
model: { type: "string", description: "\u53EF\u9009\uFF1B\u6A21\u578B ID" },
|
|
734
|
+
mode: { type: "string", description: "\u53EF\u9009\uFF1B\u751F\u56FE\u6A21\u5F0F\uFF08\u4F8B\u5982 t2i/i2i\uFF09" },
|
|
735
|
+
resolution: { type: "string", description: "\u53EF\u9009\uFF1B\u5206\u8FA8\u7387\u6863\u4F4D" },
|
|
736
|
+
aspectRatio: { type: "string", description: "\u53EF\u9009\uFF1B\u753B\u5E45\u6BD4\u4F8B" },
|
|
737
|
+
seed: { type: "number", description: "\u53EF\u9009\uFF1B\u968F\u673A\u79CD\u5B50" },
|
|
738
|
+
nIter: { type: "number", description: "\u53EF\u9009\uFF1B\u751F\u6210\u6570\u91CF" },
|
|
739
|
+
width: { type: "number", description: "\u53EF\u9009\uFF1B\u5BBD\u5EA6\u50CF\u7D20" },
|
|
740
|
+
height: { type: "number", description: "\u53EF\u9009\uFF1B\u9AD8\u5EA6\u50CF\u7D20" }
|
|
741
|
+
},
|
|
742
|
+
required: ["prompt"]
|
|
743
|
+
}
|
|
744
|
+
},
|
|
745
|
+
{
|
|
746
|
+
name: "seaflow-canvas_upsert_text_node",
|
|
747
|
+
description: "\u521B\u5EFA\u6216\u66F4\u65B0\u6587\u672C\u591A\u6A21\u6001\u8282\u70B9\uFF08\u8F93\u5165 prompt/model/systemPrompt \u7B49\uFF09\uFF0C\u8FD4\u56DE nodeId \u4E0E nextVersion\u3002",
|
|
748
|
+
inputSchema: {
|
|
749
|
+
type: "object",
|
|
750
|
+
properties: {
|
|
751
|
+
nodeId: { type: "string", description: "\u53EF\u9009\uFF1B\u5B58\u5728\u5219\u66F4\u65B0\uFF0C\u4E0D\u5B58\u5728\u5219\u521B\u5EFA" },
|
|
752
|
+
label: { type: "string", description: "\u53EF\u9009\uFF1B\u8282\u70B9\u5C55\u793A\u540D" },
|
|
753
|
+
prompt: { type: "string", description: "\u63D0\u793A\u8BCD" },
|
|
754
|
+
model: { type: "string", description: "\u53EF\u9009\uFF1B\u6A21\u578B ID" },
|
|
755
|
+
negativePrompt: { type: "string", description: "\u53EF\u9009\uFF1B\u8D1F\u5411\u63D0\u793A\u8BCD" },
|
|
756
|
+
systemPrompt: { type: "string", description: "\u53EF\u9009\uFF1B\u7CFB\u7EDF\u63D0\u793A\u8BCD" },
|
|
757
|
+
modalMode: {
|
|
758
|
+
type: "string",
|
|
759
|
+
description: "\u53EF\u9009\uFF1Btext/image_to_text/video_to_text",
|
|
760
|
+
enum: ["text", "image_to_text", "video_to_text"]
|
|
761
|
+
},
|
|
762
|
+
maxTokens: { type: "number", description: "\u53EF\u9009\uFF1B\u6700\u5927 token \u6570" },
|
|
763
|
+
temperature: { type: "number", description: "\u53EF\u9009\uFF1B\u6E29\u5EA6\u53C2\u6570" },
|
|
764
|
+
topP: { type: "number", description: "\u53EF\u9009\uFF1Btop-p \u53C2\u6570" }
|
|
765
|
+
},
|
|
766
|
+
required: ["prompt"]
|
|
767
|
+
}
|
|
768
|
+
},
|
|
769
|
+
{
|
|
770
|
+
name: "seaflow-canvas_connect_nodes",
|
|
771
|
+
description: "\u9AD8\u5C42\u8282\u70B9\u8FDE\u7EBF\u5DE5\u5177\uFF0C\u8FDE\u63A5\u4E24\u4E2A\u8282\u70B9\u5E76\u8FD4\u56DE nextVersion\u3002",
|
|
772
|
+
inputSchema: {
|
|
773
|
+
type: "object",
|
|
774
|
+
properties: {
|
|
775
|
+
sourceNodeId: { type: "string", description: "\u6E90\u8282\u70B9 ID" },
|
|
776
|
+
targetNodeId: { type: "string", description: "\u76EE\u6807\u8282\u70B9 ID" },
|
|
777
|
+
sourceField: { type: "string", description: "\u53EF\u9009\uFF1B\u6E90\u8F93\u51FA\u8BED\u4E49\u5B57\u6BB5\uFF0C\u5982 text/urls" },
|
|
778
|
+
targetField: { type: "string", description: "\u53EF\u9009\uFF1B\u76EE\u6807\u8F93\u5165\u8BED\u4E49\u5B57\u6BB5\uFF0C\u5982 context/reference_images" },
|
|
779
|
+
sourceHandle: { type: "string", description: "\u53EF\u9009\uFF1B\u663E\u5F0F\u6307\u5B9A\u6E90 handleId" },
|
|
780
|
+
targetHandle: { type: "string", description: "\u53EF\u9009\uFF1B\u663E\u5F0F\u6307\u5B9A\u76EE\u6807 handleId" },
|
|
781
|
+
edgeType: { type: "string", description: "\u53EF\u9009\uFF1B\u8FB9\u7C7B\u578B\uFF0C\u9ED8\u8BA4 floating" }
|
|
782
|
+
},
|
|
783
|
+
required: ["sourceNodeId", "targetNodeId"]
|
|
784
|
+
}
|
|
785
|
+
},
|
|
786
|
+
{
|
|
787
|
+
name: "seaflow-canvas_execute_node_and_wait",
|
|
788
|
+
description: "\u89E6\u53D1\u8282\u70B9\u6267\u884C\u5E76\u963B\u585E\u7B49\u5F85\u7EC8\u6001\uFF0C\u8FD4\u56DE taskId/status/result\u3002",
|
|
789
|
+
inputSchema: {
|
|
790
|
+
type: "object",
|
|
791
|
+
properties: {
|
|
792
|
+
nodeId: { type: "string", description: "\u76EE\u6807\u8282\u70B9 ID" },
|
|
793
|
+
target: {
|
|
794
|
+
type: "string",
|
|
795
|
+
description: "\u53EF\u9009\uFF1B\u6267\u884C\u76EE\u6807",
|
|
796
|
+
enum: ["seaart", "staging"]
|
|
797
|
+
},
|
|
798
|
+
timeoutMs: { type: "number", description: "\u53EF\u9009\uFF1B\u7B49\u5F85\u8D85\u65F6" },
|
|
799
|
+
pollIntervalMs: { type: "number", description: "\u53EF\u9009\uFF1B\u8F6E\u8BE2\u95F4\u9694" },
|
|
800
|
+
includeEvents: { type: "boolean", description: "\u53EF\u9009\uFF1B\u8FD4\u56DE\u4E8B\u4EF6\u8BA1\u6570" }
|
|
801
|
+
},
|
|
802
|
+
required: ["nodeId"]
|
|
803
|
+
}
|
|
804
|
+
},
|
|
805
|
+
{
|
|
806
|
+
name: "seaflow-canvas_generate_image_from_prompt",
|
|
807
|
+
description: "\u6309 prompt \u5B8C\u6210\u56FE\u7247\u8282\u70B9 upsert \u5E76\u542F\u52A8\u6267\u884C\uFF0C\u8FD4\u56DE\u4EFB\u52A1\u53E5\u67C4\u4F9B\u540E\u7EED wait/result \u6536\u655B\u3002",
|
|
808
|
+
inputSchema: {
|
|
809
|
+
type: "object",
|
|
810
|
+
properties: {
|
|
811
|
+
nodeId: { type: "string", description: "\u53EF\u9009\uFF1B\u5B58\u5728\u5219\u66F4\u65B0\u5E76\u590D\u7528\u8282\u70B9" },
|
|
812
|
+
label: { type: "string", description: "\u53EF\u9009\uFF1B\u8282\u70B9\u5C55\u793A\u540D" },
|
|
813
|
+
prompt: { type: "string", description: "\u6B63\u5411\u63D0\u793A\u8BCD" },
|
|
814
|
+
negativePrompt: { type: "string", description: "\u53EF\u9009\uFF1B\u8D1F\u5411\u63D0\u793A\u8BCD" },
|
|
815
|
+
model: { type: "string", description: "\u53EF\u9009\uFF1B\u6A21\u578B ID" },
|
|
816
|
+
mode: { type: "string", description: "\u53EF\u9009\uFF1B\u751F\u56FE\u6A21\u5F0F" },
|
|
817
|
+
resolution: { type: "string", description: "\u53EF\u9009\uFF1B\u5206\u8FA8\u7387\u6863\u4F4D" },
|
|
818
|
+
aspectRatio: { type: "string", description: "\u53EF\u9009\uFF1B\u753B\u5E45\u6BD4\u4F8B" },
|
|
819
|
+
seed: { type: "number", description: "\u53EF\u9009\uFF1B\u968F\u673A\u79CD\u5B50" },
|
|
820
|
+
nIter: { type: "number", description: "\u53EF\u9009\uFF1B\u751F\u6210\u6570\u91CF" },
|
|
821
|
+
width: { type: "number", description: "\u53EF\u9009\uFF1B\u5BBD\u5EA6\u50CF\u7D20" },
|
|
822
|
+
height: { type: "number", description: "\u53EF\u9009\uFF1B\u9AD8\u5EA6\u50CF\u7D20" },
|
|
823
|
+
target: {
|
|
824
|
+
type: "string",
|
|
825
|
+
description: "\u53EF\u9009\uFF1B\u6267\u884C\u76EE\u6807",
|
|
826
|
+
enum: ["seaart", "staging"]
|
|
827
|
+
},
|
|
828
|
+
timeoutMs: { type: "number", description: "\u53EF\u9009\uFF1B\u7B49\u5F85\u8D85\u65F6" },
|
|
829
|
+
pollIntervalMs: { type: "number", description: "\u53EF\u9009\uFF1B\u8F6E\u8BE2\u95F4\u9694" }
|
|
830
|
+
},
|
|
831
|
+
required: ["prompt"]
|
|
832
|
+
}
|
|
833
|
+
}
|
|
834
|
+
];
|
|
835
|
+
var canvasContextTools = annotateTools(
|
|
836
|
+
rawCanvasContextTools,
|
|
837
|
+
() => seaflowReadAnnotations,
|
|
838
|
+
seaflowOutputSchemas
|
|
839
|
+
);
|
|
840
|
+
var canvasExecutionTools = annotateTools(
|
|
841
|
+
rawCanvasExecutionTools,
|
|
842
|
+
(tool) => tool.name === "seaflow-canvas_get_task_state" || tool.name === "seaflow-canvas_task_list" ? seaflowReadAnnotations : tool.name === "seaflow-canvas_task_reconnect" ? {
|
|
843
|
+
...seaflowLongRunningWorkflowAnnotations,
|
|
844
|
+
requiresExecutionEvidence: false
|
|
845
|
+
} : tool.name === "seaflow-canvas_task_wait_result" || tool.name === "seaflow-canvas_execute_node_and_wait" ? seaflowLongRunningWorkflowAnnotations : seaflowWorkflowAnnotations,
|
|
846
|
+
seaflowOutputSchemas
|
|
847
|
+
);
|
|
848
|
+
var canvasAuthTools = annotateTools(
|
|
849
|
+
rawCanvasAuthTools,
|
|
850
|
+
(tool) => tool.name === "seaflow-canvas_execution_auth_get" ? seaflowReadAnnotations : seaflowWorkflowAnnotations,
|
|
851
|
+
seaflowOutputSchemas
|
|
852
|
+
);
|
|
853
|
+
var canvasExtendedTools = annotateTools(
|
|
854
|
+
rawCanvasExtendedTools,
|
|
855
|
+
(tool) => tool.name === "seaflow-canvas_execute_node_and_wait" ? seaflowLongRunningWorkflowAnnotations : seaflowWorkflowAnnotations,
|
|
856
|
+
seaflowOutputSchemas
|
|
857
|
+
);
|
|
858
|
+
var tools = [
|
|
859
|
+
...canvasContextTools,
|
|
860
|
+
...canvasExecutionTools,
|
|
861
|
+
...canvasAuthTools,
|
|
862
|
+
...canvasExtendedTools
|
|
863
|
+
];
|
|
864
|
+
var allTools = [
|
|
865
|
+
...canvasContextTools,
|
|
866
|
+
...canvasExecutionTools,
|
|
867
|
+
...canvasAuthTools,
|
|
868
|
+
...canvasExtendedTools
|
|
869
|
+
];
|
|
870
|
+
async function callTool(name, args = {}) {
|
|
871
|
+
return getDefaultClient().callTool(name, args);
|
|
872
|
+
}
|
|
873
|
+
var seaflow = {
|
|
874
|
+
getSnapshot: (graphId) => callTool("seaflow-canvas_get_snapshot", { graphId }),
|
|
875
|
+
getWorkflowContext: () => callTool("seaflow-canvas_workflow_context_get", {}),
|
|
876
|
+
clearCanvas: () => callTool("seaflow-canvas_clear_canvas", {}),
|
|
877
|
+
listNodeTypes: (options) => callTool("seaflow-canvas_list_node_types", { ...options ?? {} }),
|
|
878
|
+
batchApply: (operations, options) => callTool("seaflow-canvas_batch_apply", { operations, ...options }),
|
|
879
|
+
validateNode: (nodeId, strict) => callTool("seaflow-canvas_node_validate", { nodeId, strict }),
|
|
880
|
+
getNodeOutputs: (nodeId) => callTool("seaflow-canvas_node_get_outputs", { nodeId }),
|
|
881
|
+
getNode: (nodeId) => callTool("seaflow-canvas_node_get", { nodeId }),
|
|
882
|
+
listEdges: (options) => callTool("seaflow-canvas_edge_list", { ...options }),
|
|
883
|
+
executeNode: (nodeId, target) => callTool("seaflow-canvas_execute_node", { nodeId, target }),
|
|
884
|
+
executeGraph: (graphId, target, source) => callTool("seaflow-canvas_execute_graph", { graphId, target, ...source ? { source } : {} }),
|
|
885
|
+
openWorkflow: (workflowId, options) => callTool("seaflow-canvas_workflow_open", { workflowId, ...options }),
|
|
886
|
+
saveWorkflow: (options) => callTool("seaflow-canvas_workflow_save", { ...options ?? {} }),
|
|
887
|
+
cancelTask: (taskId) => callTool("seaflow-canvas_cancel_task", { taskId }),
|
|
888
|
+
getTaskState: (taskId) => callTool("seaflow-canvas_get_task_state", { taskId }),
|
|
889
|
+
listTasks: (options) => callTool("seaflow-canvas_task_list", { ...options }),
|
|
890
|
+
waitTaskResult: (taskId, options) => callTool("seaflow-canvas_task_wait_result", { taskId, ...options }),
|
|
891
|
+
reconnectTask: (options) => callTool("seaflow-canvas_task_reconnect", { ...options ?? {} }),
|
|
892
|
+
getExecutionAuth: () => callTool("seaflow-canvas_execution_auth_get", {}),
|
|
893
|
+
setExecutionAuth: (target, token, persistMode) => callTool("seaflow-canvas_execution_auth_set", { target, token, persistMode }),
|
|
894
|
+
upsertImageNode: (input) => callTool("seaflow-canvas_upsert_image_node", input),
|
|
895
|
+
upsertTextNode: (input) => callTool("seaflow-canvas_upsert_text_node", input),
|
|
896
|
+
connectNodes: (input) => callTool("seaflow-canvas_connect_nodes", input),
|
|
897
|
+
executeNodeAndWait: (nodeId, options) => callTool("seaflow-canvas_execute_node_and_wait", { nodeId, ...options ?? {} }),
|
|
898
|
+
generateImageFromPrompt: (input) => callTool("seaflow-canvas_generate_image_from_prompt", input)
|
|
899
|
+
};
|
|
900
|
+
|
|
901
|
+
export { allTools, canvasAuthTools, canvasContextTools, canvasExecutionTools, canvasExtendedTools, seaflow, tools };
|