@artflo-ai/artflo-openclaw-plugin 0.0.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.
Files changed (59) hide show
  1. package/README.md +102 -0
  2. package/dist/index.js +73 -0
  3. package/dist/logs/ws-traffic-traces/2026-03-27T20-30-00-216Z+08-lifecycle-heartbeat_ping-2b637466-6c6f-6172-470c-151459021b0a.json +9 -0
  4. package/dist/logs/ws-traffic-traces/2026-03-27T20-30-00-217Z+08-lifecycle-heartbeat_ping-2d637466-6c6f-6172-410c-15145f021b0a.json +9 -0
  5. package/dist/logs/ws-traffic-traces/2026-03-27T20-30-05-727Z+08-lifecycle-heartbeat_ping-2c637466-6c6f-6172-400c-15145e021b0a.json +9 -0
  6. package/dist/logs/ws-traffic-traces/2026-03-27T20-30-30-218Z+08-lifecycle-heartbeat_ping-2b637466-6c6f-6172-470c-151459021b0a.json +9 -0
  7. package/dist/logs/ws-traffic-traces/2026-03-27T20-30-30-218Z+08-lifecycle-heartbeat_ping-2d637466-6c6f-6172-410c-15145f021b0a.json +9 -0
  8. package/dist/logs/ws-traffic-traces/2026-03-27T20-30-35-728Z+08-lifecycle-heartbeat_ping-2c637466-6c6f-6172-400c-15145e021b0a.json +9 -0
  9. package/dist/logs/ws-traffic-traces/2026-03-27T20-31-00-218Z+08-lifecycle-heartbeat_ping-2b637466-6c6f-6172-470c-151459021b0a.json +9 -0
  10. package/dist/logs/ws-traffic-traces/2026-03-27T20-31-00-219Z+08-lifecycle-heartbeat_ping-2d637466-6c6f-6172-410c-15145f021b0a.json +9 -0
  11. package/dist/logs/ws-traffic-traces/2026-03-27T20-31-05-729Z+08-lifecycle-heartbeat_ping-2c637466-6c6f-6172-400c-15145e021b0a.json +9 -0
  12. package/dist/logs/ws-traffic-traces/2026-03-27T20-31-30-220Z+08-lifecycle-heartbeat_ping-2b637466-6c6f-6172-470c-151459021b0a.json +9 -0
  13. package/dist/logs/ws-traffic-traces/2026-03-27T20-31-30-220Z+08-lifecycle-heartbeat_ping-2d637466-6c6f-6172-410c-15145f021b0a.json +9 -0
  14. package/dist/logs/ws-traffic-traces/2026-03-27T20-31-35-729Z+08-lifecycle-heartbeat_ping-2c637466-6c6f-6172-400c-15145e021b0a.json +9 -0
  15. package/dist/logs/ws-traffic-traces/2026-03-27T20-32-00-221Z+08-lifecycle-heartbeat_ping-2b637466-6c6f-6172-470c-151459021b0a.json +9 -0
  16. package/dist/logs/ws-traffic-traces/2026-03-27T20-32-00-221Z+08-lifecycle-heartbeat_ping-2d637466-6c6f-6172-410c-15145f021b0a.json +9 -0
  17. package/dist/logs/ws-traffic-traces/2026-03-27T20-32-05-730Z+08-lifecycle-heartbeat_ping-2c637466-6c6f-6172-400c-15145e021b0a.json +9 -0
  18. package/dist/logs/ws-traffic-traces/2026-03-27T20-32-30-222Z+08-lifecycle-heartbeat_ping-2b637466-6c6f-6172-470c-151459021b0a.json +9 -0
  19. package/dist/logs/ws-traffic-traces/2026-03-27T20-32-30-222Z+08-lifecycle-heartbeat_ping-2d637466-6c6f-6172-410c-15145f021b0a.json +9 -0
  20. package/dist/logs/ws-traffic-traces/2026-03-27T20-32-35-731Z+08-lifecycle-heartbeat_ping-2c637466-6c6f-6172-400c-15145e021b0a.json +9 -0
  21. package/dist/logs/ws-traffic-traces/2026-03-27T20-33-00-223Z+08-lifecycle-heartbeat_ping-2b637466-6c6f-6172-470c-151459021b0a.json +9 -0
  22. package/dist/logs/ws-traffic-traces/2026-03-27T20-33-00-223Z+08-lifecycle-heartbeat_ping-2d637466-6c6f-6172-410c-15145f021b0a.json +9 -0
  23. package/dist/logs/ws-traffic-traces/2026-03-27T20-33-05-732Z+08-lifecycle-heartbeat_ping-2c637466-6c6f-6172-400c-15145e021b0a.json +9 -0
  24. package/dist/logs/ws-traffic-traces/2026-03-27T20-33-30-223Z+08-lifecycle-heartbeat_ping-2b637466-6c6f-6172-470c-151459021b0a.json +9 -0
  25. package/dist/logs/ws-traffic-traces/2026-03-27T20-33-30-223Z+08-lifecycle-heartbeat_ping-2d637466-6c6f-6172-410c-15145f021b0a.json +9 -0
  26. package/dist/logs/ws-traffic-traces/2026-03-27T20-33-35-734Z+08-lifecycle-heartbeat_ping-2c637466-6c6f-6172-400c-15145e021b0a.json +9 -0
  27. package/dist/logs/ws-traffic-traces/2026-03-27T20-34-00-228Z+08-lifecycle-heartbeat_ping-2b637466-6c6f-6172-470c-151459021b0a.json +9 -0
  28. package/dist/logs/ws-traffic-traces/2026-03-27T20-34-00-229Z+08-lifecycle-heartbeat_ping-2d637466-6c6f-6172-410c-15145f021b0a.json +9 -0
  29. package/dist/src/config.js +57 -0
  30. package/dist/src/constants.js +35 -0
  31. package/dist/src/core/api/api-base.js +12 -0
  32. package/dist/src/core/api/upload-file.js +59 -0
  33. package/dist/src/core/canvas/canvas-session-manager.js +189 -0
  34. package/dist/src/core/canvas/canvas-websocket-client.js +453 -0
  35. package/dist/src/core/canvas/create-canvas.js +37 -0
  36. package/dist/src/core/canvas/types.js +23 -0
  37. package/dist/src/core/canvas/ws-trace.js +42 -0
  38. package/dist/src/core/config/fetch-client-params.js +20 -0
  39. package/dist/src/core/config/fetch-vip-info.js +30 -0
  40. package/dist/src/core/config/model-config-transformer.js +104 -0
  41. package/dist/src/core/executor/element-builders.js +216 -0
  42. package/dist/src/core/executor/execute-plan.js +1221 -0
  43. package/dist/src/core/executor/execution-trace.js +34 -0
  44. package/dist/src/core/layout/layout-service.js +366 -0
  45. package/dist/src/core/plan/analyze-plan-groups.js +71 -0
  46. package/dist/src/core/plan/types.js +1 -0
  47. package/dist/src/core/plan/validate-plan.js +159 -0
  48. package/dist/src/paths.js +16 -0
  49. package/dist/src/services/canvas-session-registry.js +57 -0
  50. package/dist/src/tools/register-tools.js +669 -0
  51. package/dist/src/tools/tool-trace.js +19 -0
  52. package/openclaw.plugin.json +33 -0
  53. package/package.json +42 -0
  54. package/skills/artflo-canvas/SKILL.md +118 -0
  55. package/skills/artflo-canvas/references/graph-rules.md +53 -0
  56. package/skills/artflo-canvas/references/layout-notes.md +31 -0
  57. package/skills/artflo-canvas/references/node-schema.json +948 -0
  58. package/skills/artflo-canvas/references/node-schema.md +188 -0
  59. package/skills/artflo-canvas/references/planning-guide.md +321 -0
@@ -0,0 +1,948 @@
1
+ {
2
+ "version": "1.0",
3
+ "referenceType": "artflo_canvas_node_schema",
4
+ "description": "JSON reference for planning Artflo workflows with artflo_canvas_execute_plan. Keeps the original Markdown guide and adds a machine-readable companion adapted from artflo-agent-v2 schema.json plus plugin-specific planning rules.",
5
+ "generalRules": [
6
+ "Use plan node types such as input, refine, process, selector, and batch.",
7
+ "Do not invent raw canvas numeric node types in plans.",
8
+ "For workflow creation, prefer describing the graph in nodes and edges, then use artflo_canvas_execute_plan.",
9
+ "Low-level mutation tools should not be used to handcraft a full workflow from scratch.",
10
+ "If the user has not provided enough information to produce a good workflow, do not plan yet. Ask clarifying questions first.",
11
+ "Requirement gathering must happen before execution. Do not encode user-facing follow-up questions as workflow nodes."
12
+ ],
13
+ "runtimeTypeMapping": {
14
+ "input": {
15
+ "runtimeType": 110000,
16
+ "runtimeName": "INPUT"
17
+ },
18
+ "selector": {
19
+ "runtimeType": 110006,
20
+ "runtimeName": "SELECTOR"
21
+ },
22
+ "process": {
23
+ "runtimeType": 130000,
24
+ "runtimeName": "PROCESS"
25
+ },
26
+ "refine": {
27
+ "runtimeType": 130500,
28
+ "runtimeName": "REFINE"
29
+ },
30
+ "crop": {
31
+ "runtimeType": 190000,
32
+ "runtimeName": "CROP"
33
+ }
34
+ },
35
+ "planNodeTypes": {
36
+ "input": {
37
+ "planType": "input",
38
+ "runtimeType": 110000,
39
+ "purpose": "Hold user prompt text and optional incoming media.",
40
+ "requiredFields": [
41
+ "data.prompt"
42
+ ],
43
+ "commonFields": [
44
+ "data.sources",
45
+ "data.medias",
46
+ "data.show_execute",
47
+ "data.status"
48
+ ],
49
+ "preferredSourceValues": {
50
+ "image": "Prompt-driven image and design workflows.",
51
+ "video": "Video-generation input stages."
52
+ },
53
+ "notes": [
54
+ "Input can be fed by Process, Image, Video, Result, or Selector in the runtime schema."
55
+ ],
56
+ "avoid": [
57
+ "sources: text"
58
+ ]
59
+ },
60
+ "refine": {
61
+ "planType": "refine",
62
+ "runtimeType": 130500,
63
+ "purpose": "Transform known inputs into a better downstream prompt or prompt set.",
64
+ "requiredFields": [
65
+ "data.status",
66
+ "data.show_execute"
67
+ ],
68
+ "recommendedFields": [
69
+ "data.promptCategory or data.prompt_category",
70
+ "data.customPrompt or data.custom_prompt",
71
+ "data.splitMode: 1 or data.split_mode: 1 for Auto Split",
72
+ "data.separator",
73
+ "data.current_model",
74
+ "data.multi_outputs"
75
+ ],
76
+ "defaultFields": {
77
+ "data.status": 0,
78
+ "data.executed": false,
79
+ "data.split_mode": 0,
80
+ "data.show_execute": true,
81
+ "data.multi_outputs": {
82
+ "0": {
83
+ "index": "0"
84
+ }
85
+ },
86
+ "data.current_model": "<default LLM model>",
87
+ "data.prompt_category": "<default LLM prompt category>"
88
+ },
89
+ "fieldNormalization": {
90
+ "promptCategory": "prompt_category",
91
+ "splitMode": "split_mode",
92
+ "customPrompt": "custom_prompt",
93
+ "current_model": "filled by runtime when omitted"
94
+ },
95
+ "presetGuidance": [
96
+ "preset by itself is not enough to make a valid Refine node.",
97
+ "Encode Logo Design or Poster Design through refine prompt category/custom prompt strategy that the runtime understands."
98
+ ],
99
+ "semanticGuidance": [
100
+ "Refine should not output a questionnaire, requirement checklist, or request for more user information.",
101
+ "If the agent still needs brand name, style constraints, target audience, color preferences, or other core inputs, it must ask the user before creating the workflow."
102
+ ],
103
+ "avoid": [
104
+ "only preset: Logo Design without the actual refine fields",
105
+ "omitting status and show_execute",
106
+ "using refine as a substitute for a pre-planning clarification step"
107
+ ]
108
+ },
109
+ "process": {
110
+ "planType": "process",
111
+ "runtimeType": 130000,
112
+ "purpose": "Run AI generation or transformation tasks.",
113
+ "requiredFields": [
114
+ "data.tool_type"
115
+ ],
116
+ "commonFields": [
117
+ "data.current_model",
118
+ "data.ratio",
119
+ "data.resolution",
120
+ "data.count",
121
+ "data.video_duration",
122
+ "data.output_type"
123
+ ],
124
+ "notes": [
125
+ "For generative image/video processes, use Input -> Process.",
126
+ "For image-to-video, use Input(prompt A) -> Process(image) -> Input(prompt B) -> Process(video)."
127
+ ],
128
+ "avoid": [
129
+ "relying on a direct prompt inside process when there is already an upstream input",
130
+ "adding a direct edge from image process to video process when an intermediate input exists"
131
+ ]
132
+ },
133
+ "selector": {
134
+ "planType": "selector",
135
+ "runtimeType": 110006,
136
+ "purpose": "Aggregate generated outputs for selection.",
137
+ "notes": [
138
+ "Usually does not need complex initial data.",
139
+ "Runtime fills selector medias during execution."
140
+ ]
141
+ },
142
+ "batch": {
143
+ "planType": "batch",
144
+ "purpose": "Fan out a refine result or prompt set into multiple generations.",
145
+ "requiredFields": [
146
+ "data.models",
147
+ "data.tool_type"
148
+ ],
149
+ "commonFields": [
150
+ "data.promptTemplate",
151
+ "data.params"
152
+ ],
153
+ "notes": [
154
+ "Batch output should typically connect into a selector."
155
+ ]
156
+ }
157
+ },
158
+ "connectionRules": [
159
+ "input can feed process, refine, crop, selector",
160
+ "process outputs can feed downstream input, selector, crop, or follow-up workflow branches",
161
+ "refine outputs should be expanded through downstream workflow steps, often batch or prompt-driven branches",
162
+ "selector is used to collect and route chosen outputs downstream",
163
+ "Prefer structured graph expansion over ad hoc low-level element edits"
164
+ ],
165
+ "editorConnectionActionPatterns": {
166
+ "refine": "chain-create Input -> Refine",
167
+ "image": "chain-create Input -> Process(Text2Image)",
168
+ "video": "chain-create Input -> Process(Text2Video)",
169
+ "3d": "chain-create Input3D -> Process(Image23D)",
170
+ "selector": "direct-create Selector",
171
+ "crop": "direct-create Crop",
172
+ "result": "direct-create Result",
173
+ "merger": "direct-create VideoMerger"
174
+ },
175
+ "editorOnlyNodeTypes": {
176
+ "image": 110001,
177
+ "pose": 110002,
178
+ "paint": 110003,
179
+ "video": 110004,
180
+ "result": 110005,
181
+ "video_merger": 110007,
182
+ "text": 110008,
183
+ "input_3d": 110100,
184
+ "mate": 131000,
185
+ "group": 140000,
186
+ "comment": 150000,
187
+ "emoji": 150001
188
+ },
189
+ "guardrails": [
190
+ "If the task is create this workflow, do not begin with artflo_canvas_change_elements.",
191
+ "Prefer plan-first execution through artflo_canvas_execute_plan.",
192
+ "Use low-level tools only for inspection, repair, reruns, and debugging."
193
+ ],
194
+ "nodeTypes": {
195
+ "Edge": {
196
+ "code": 100000,
197
+ "name": "连接线",
198
+ "llmDescription": "连接节点的边。关键字段: source (源节点 ID), target (目标节点 ID)",
199
+ "fields": {
200
+ "source": {
201
+ "type": "string",
202
+ "required": true
203
+ },
204
+ "target": {
205
+ "type": "string",
206
+ "required": true
207
+ },
208
+ "sourceHandle": {
209
+ "type": "string",
210
+ "required": false
211
+ },
212
+ "targetHandle": {
213
+ "type": "string",
214
+ "required": false
215
+ },
216
+ "data": {
217
+ "type": "record",
218
+ "required": false,
219
+ "default": {}
220
+ }
221
+ }
222
+ },
223
+ "Input": {
224
+ "code": 110000,
225
+ "name": "输入节点",
226
+ "llmDescription": "工作流的起点,包含用户的 prompt 和可选的参考图片。关键字段: prompt (用户输入的提示词), medias (参考图片 Record<id, {url, width, height}>)。连接规则: 可作为源节点连接到 Process 或 Refine",
227
+ "fields": {
228
+ "prompt": {
229
+ "type": "string",
230
+ "required": false
231
+ },
232
+ "medias": {
233
+ "type": "record",
234
+ "required": false
235
+ },
236
+ "sources": {
237
+ "type": "string",
238
+ "required": false
239
+ },
240
+ "source": {
241
+ "type": "string",
242
+ "required": false
243
+ },
244
+ "immutable": {
245
+ "type": "boolean",
246
+ "required": false
247
+ },
248
+ "show_execute": {
249
+ "type": "boolean",
250
+ "required": false,
251
+ "default": true
252
+ },
253
+ "show_all_content": {
254
+ "type": "boolean",
255
+ "required": false
256
+ },
257
+ "status": {
258
+ "type": "number",
259
+ "required": false
260
+ }
261
+ },
262
+ "connections": {
263
+ "canBeSource": true,
264
+ "canBeTarget": true,
265
+ "allowedSources": [
266
+ "Process",
267
+ "Image",
268
+ "Video",
269
+ "Result",
270
+ "Selector"
271
+ ],
272
+ "allowedTargets": [
273
+ "Process",
274
+ "Refine",
275
+ "Crop",
276
+ "Selector"
277
+ ]
278
+ }
279
+ },
280
+ "Image": {
281
+ "code": 110001,
282
+ "name": "图片素材",
283
+ "llmDescription": "独立的图片节点,用于在画布上直接放置图片。关键字段: url (图片 URL), name (图片名称), width/height (尺寸)。连接规则: 可连接到 Process、Selector、Crop",
284
+ "fields": {
285
+ "url": {
286
+ "type": "string",
287
+ "required": true
288
+ },
289
+ "name": {
290
+ "type": "string",
291
+ "required": false
292
+ },
293
+ "width": {
294
+ "type": "number",
295
+ "required": true
296
+ },
297
+ "height": {
298
+ "type": "number",
299
+ "required": true
300
+ },
301
+ "locale": {
302
+ "type": "boolean",
303
+ "required": false
304
+ },
305
+ "type": {
306
+ "type": "string",
307
+ "required": false
308
+ }
309
+ },
310
+ "connections": {
311
+ "canBeSource": true,
312
+ "canBeTarget": false,
313
+ "allowedTargets": [
314
+ "Process",
315
+ "Selector",
316
+ "Crop",
317
+ "Input"
318
+ ]
319
+ }
320
+ },
321
+ "Pose": {
322
+ "code": 110002,
323
+ "name": "姿势控制",
324
+ "llmDescription": "姿态节点,用于骨骼姿态控制",
325
+ "fields": {
326
+ "name": {
327
+ "type": "string",
328
+ "required": true
329
+ },
330
+ "width": {
331
+ "type": "number",
332
+ "required": true
333
+ },
334
+ "height": {
335
+ "type": "number",
336
+ "required": true
337
+ },
338
+ "ratio": {
339
+ "type": "string",
340
+ "required": true
341
+ },
342
+ "dragResultData": {
343
+ "type": "record",
344
+ "required": false
345
+ }
346
+ }
347
+ },
348
+ "Paint": {
349
+ "code": 110003,
350
+ "name": "涂鸦",
351
+ "llmDescription": "绘画节点,用于手绘输入",
352
+ "fields": {
353
+ "name": {
354
+ "type": "string",
355
+ "required": true
356
+ },
357
+ "width": {
358
+ "type": "number",
359
+ "required": true
360
+ },
361
+ "height": {
362
+ "type": "number",
363
+ "required": true
364
+ },
365
+ "ratio": {
366
+ "type": "string",
367
+ "required": true
368
+ },
369
+ "drawResultData": {
370
+ "type": "record",
371
+ "required": false
372
+ },
373
+ "color": {
374
+ "type": "string",
375
+ "required": false
376
+ }
377
+ }
378
+ },
379
+ "Video": {
380
+ "code": 110004,
381
+ "name": "视频素材",
382
+ "llmDescription": "独立的视频节点,用于在画布上直接放置视频。关键字段: url (视频 URL), name (视频名称), width/height (尺寸)。连接规则: 可连接到 Process (如视频转 GIF)",
383
+ "fields": {
384
+ "url": {
385
+ "type": "string",
386
+ "required": true
387
+ },
388
+ "name": {
389
+ "type": "string",
390
+ "required": false
391
+ },
392
+ "width": {
393
+ "type": "number",
394
+ "required": true
395
+ },
396
+ "height": {
397
+ "type": "number",
398
+ "required": true
399
+ },
400
+ "locale": {
401
+ "type": "boolean",
402
+ "required": false
403
+ },
404
+ "type": {
405
+ "type": "string",
406
+ "required": false
407
+ }
408
+ },
409
+ "connections": {
410
+ "canBeSource": true,
411
+ "canBeTarget": false,
412
+ "allowedTargets": [
413
+ "Process",
414
+ "Input"
415
+ ]
416
+ }
417
+ },
418
+ "Result": {
419
+ "code": 110005,
420
+ "name": "输出节点",
421
+ "llmDescription": "展示最终结果的节点。关键字段: url (结果媒体 URL), type (媒体类型 image 或 video), name (媒体名称), width/height (尺寸)。连接规则: 只能作为目标节点,接收 Process 的输出",
422
+ "fields": {
423
+ "type": {
424
+ "type": "string",
425
+ "required": false
426
+ },
427
+ "url": {
428
+ "type": "string",
429
+ "required": false
430
+ },
431
+ "name": {
432
+ "type": "string",
433
+ "required": false
434
+ },
435
+ "width": {
436
+ "type": "number",
437
+ "required": false
438
+ },
439
+ "height": {
440
+ "type": "number",
441
+ "required": false
442
+ },
443
+ "locale": {
444
+ "type": "boolean",
445
+ "required": false
446
+ }
447
+ },
448
+ "connections": {
449
+ "canBeSource": false,
450
+ "canBeTarget": true,
451
+ "allowedSources": [
452
+ "Process",
453
+ "Selector"
454
+ ]
455
+ }
456
+ },
457
+ "Selector": {
458
+ "code": 110006,
459
+ "name": "选择器",
460
+ "aliases": [
461
+ "选择器",
462
+ "图片选择器",
463
+ "媒体选择器",
464
+ "汇集器"
465
+ ],
466
+ "llmDescription": "媒体选择器节点,用于从多个输入中选择一个媒体进行后续处理。典型用途: 把多个 Process 节点的结果汇集到一起,让用户从多个生成结果中选择一个。关键字段: medias (收集的媒体), selectedId (当前选中的媒体 ID)",
467
+ "fields": {
468
+ "medias": {
469
+ "type": "record",
470
+ "required": false
471
+ },
472
+ "selectedId": {
473
+ "type": "string",
474
+ "required": false
475
+ }
476
+ },
477
+ "connections": {
478
+ "canBeSource": true,
479
+ "canBeTarget": true,
480
+ "allowedSources": [
481
+ "Process",
482
+ "Image",
483
+ "Result"
484
+ ],
485
+ "allowedTargets": [
486
+ "Process",
487
+ "Crop",
488
+ "Input",
489
+ "Result"
490
+ ]
491
+ }
492
+ },
493
+ "VideoMerger": {
494
+ "code": 110007,
495
+ "name": "视频合并",
496
+ "llmDescription": "视频合并节点,用于合并多个视频片段",
497
+ "fields": {
498
+ "medias": {
499
+ "type": "array",
500
+ "required": false
501
+ },
502
+ "status": {
503
+ "type": "number",
504
+ "required": false,
505
+ "default": 0
506
+ }
507
+ }
508
+ },
509
+ "Text": {
510
+ "code": 110008,
511
+ "name": "文本",
512
+ "llmDescription": "文本节点,用于在画布上添加文字",
513
+ "fields": {
514
+ "text": {
515
+ "type": "string",
516
+ "required": true
517
+ },
518
+ "font": {
519
+ "type": "string",
520
+ "required": false
521
+ },
522
+ "size": {
523
+ "type": "number",
524
+ "required": false
525
+ },
526
+ "color": {
527
+ "type": "string",
528
+ "required": false
529
+ }
530
+ }
531
+ },
532
+ "Input3D": {
533
+ "code": 110100,
534
+ "name": "3D输入",
535
+ "aliases": [
536
+ "3D Model",
537
+ "3DModel",
538
+ "3D Input"
539
+ ],
540
+ "llmDescription": "3D 输入节点,用于放置 3D 模型资源。典型用途: 作为 3D 处理工作流的起点,放置用户上传的 3D 模型。关键字段: medias (3D 模型资源), source (来源类型)。连接规则: 可连接到支持 3D 处理的 Process 节点",
541
+ "fields": {
542
+ "medias": {
543
+ "type": "record",
544
+ "required": false
545
+ },
546
+ "source": {
547
+ "type": "string",
548
+ "required": false
549
+ },
550
+ "immutable": {
551
+ "type": "boolean",
552
+ "required": false
553
+ },
554
+ "show_execute": {
555
+ "type": "boolean",
556
+ "required": false
557
+ }
558
+ },
559
+ "connections": {
560
+ "canBeSource": true,
561
+ "canBeTarget": false,
562
+ "allowedTargets": [
563
+ "Process"
564
+ ]
565
+ }
566
+ },
567
+ "Process": {
568
+ "code": 130000,
569
+ "name": "处理节点",
570
+ "llmDescription": "执行 AI 生成任务的核心节点,支持 Image、Video、3D Model、Upscale、Remove BG、GIF 等。关键字段: tool_type (工具类型 1=文生图 2=图生图 3=文生视频 4=图生视频 5=去背景 6=视频转GIF 8=图生3D 10=高清), status (状态 0=空闲 1=等待 2=处理中 3=完成 400=错误), output_type (输出类型 0=图片 1=视频 3=3D模型), count (生成数量), current_model (模型名称), ratio (输出比例如 1:1 16:9), resolution (分辨率如 1K 2K),最多仅支持生成4张图片",
571
+ "fields": {
572
+ "tool_type": {
573
+ "type": "number",
574
+ "required": true
575
+ },
576
+ "status": {
577
+ "type": "number",
578
+ "required": true,
579
+ "default": 0
580
+ },
581
+ "output_type": {
582
+ "type": "number",
583
+ "required": true
584
+ },
585
+ "count": {
586
+ "type": "number",
587
+ "required": false,
588
+ "default": 1
589
+ },
590
+ "show_execute": {
591
+ "type": "boolean",
592
+ "required": false,
593
+ "default": true
594
+ },
595
+ "current_model": {
596
+ "type": "string",
597
+ "required": false
598
+ },
599
+ "ratio": {
600
+ "type": "string",
601
+ "required": false,
602
+ "description": "输出比例如 1:1 16:9"
603
+ },
604
+ "resolution": {
605
+ "type": "string",
606
+ "required": false,
607
+ "description": "分辨率如 1K 2K"
608
+ },
609
+ "video_duration": {
610
+ "type": "number",
611
+ "required": false,
612
+ "description": "视频时长"
613
+ },
614
+ "video_sound": {
615
+ "type": "string",
616
+ "required": false,
617
+ "description": "视频音效"
618
+ },
619
+ "generate_3d_type": {
620
+ "type": "string",
621
+ "required": false
622
+ },
623
+ "generate_3d_enable": {
624
+ "type": "boolean",
625
+ "required": false
626
+ },
627
+ "medias": {
628
+ "type": "array",
629
+ "required": false
630
+ },
631
+ "depends": {
632
+ "type": "record",
633
+ "required": false
634
+ }
635
+ },
636
+ "connections": {
637
+ "canBeSource": true,
638
+ "canBeTarget": true,
639
+ "allowedSources": [
640
+ "Input",
641
+ "Process",
642
+ "Refine",
643
+ "Selector",
644
+ "Crop",
645
+ "Image",
646
+ "Video",
647
+ "Input3D"
648
+ ],
649
+ "allowedTargets": [
650
+ "Process",
651
+ "Result",
652
+ "Selector",
653
+ "Crop",
654
+ "Input",
655
+ "VideoMerger"
656
+ ]
657
+ }
658
+ },
659
+ "Refine": {
660
+ "code": 130500,
661
+ "name": "提示词优化",
662
+ "aliases": [
663
+ "Prompt Engine",
664
+ "PromptEngine"
665
+ ],
666
+ "llmDescription": "优化/扩展 Prompt 的节点,也称为 Prompt Engine。典型用途: 使用 LLM 优化用户输入的 prompt,生成更详细、更有创意的描述。关键字段 (创建时设置): custom_prompt (用户希望优化的 prompt 内容,创建时需要填入), prompt_category (prompt 类型默认 custom), split_mode (分割模式 0=默认)。注意: multi_outputs 字段是执行后的输出结果,创建时不需要设置",
667
+ "fields": {
668
+ "status": {
669
+ "type": "number",
670
+ "required": true,
671
+ "default": 0
672
+ },
673
+ "show_execute": {
674
+ "type": "boolean",
675
+ "required": true,
676
+ "default": true
677
+ },
678
+ "executed": {
679
+ "type": "boolean",
680
+ "required": false,
681
+ "default": false
682
+ },
683
+ "custom_prompt": {
684
+ "type": "string",
685
+ "required": false,
686
+ "description": "用户希望优化的 prompt 内容"
687
+ },
688
+ "prompt_category": {
689
+ "type": "string",
690
+ "required": false
691
+ },
692
+ "current_model": {
693
+ "type": "string",
694
+ "required": false
695
+ },
696
+ "separator": {
697
+ "type": "string",
698
+ "required": false,
699
+ "description": "分隔符,用于分隔多个 prompt,split_mode 为 1 时需要填入"
700
+ },
701
+ "split_mode": {
702
+ "type": "number",
703
+ "required": false,
704
+ "default": 0,
705
+ "description": "分割模式 0=默认,1=分隔符"
706
+ },
707
+ "multi_outputs": {
708
+ "type": "record",
709
+ "required": false,
710
+ "readOnly": true,
711
+ "description": "执行后的输出结果,创建时不需要设置"
712
+ },
713
+ "output_text": {
714
+ "type": "string",
715
+ "required": false,
716
+ "readOnly": true
717
+ },
718
+ "medias": {
719
+ "type": "record",
720
+ "required": false
721
+ }
722
+ },
723
+ "connections": {
724
+ "canBeSource": true,
725
+ "canBeTarget": true,
726
+ "allowedSources": [
727
+ "Input"
728
+ ],
729
+ "allowedTargets": [
730
+ "Input",
731
+ "Process"
732
+ ]
733
+ }
734
+ },
735
+ "Group": {
736
+ "code": 140000,
737
+ "name": "分组",
738
+ "llmDescription": "分组节点,用于组织画布上的节点",
739
+ "fields": {
740
+ "color": {
741
+ "type": "string",
742
+ "required": false
743
+ },
744
+ "label": {
745
+ "type": "string",
746
+ "required": false
747
+ }
748
+ }
749
+ },
750
+ "Comment": {
751
+ "code": 150000,
752
+ "name": "评论",
753
+ "llmDescription": "注释节点,用于在画布上添加备注",
754
+ "fields": {
755
+ "id": {
756
+ "type": "string",
757
+ "required": true
758
+ },
759
+ "content": {
760
+ "type": "string",
761
+ "required": true
762
+ },
763
+ "time": {
764
+ "type": "number",
765
+ "required": true
766
+ },
767
+ "color": {
768
+ "type": "string",
769
+ "required": false
770
+ }
771
+ }
772
+ },
773
+ "Emoji": {
774
+ "code": 150001,
775
+ "name": "表情",
776
+ "llmDescription": "表情节点,用于在画布上添加表情",
777
+ "fields": {
778
+ "emoji": {
779
+ "type": "string",
780
+ "required": true
781
+ },
782
+ "animation": {
783
+ "type": "string",
784
+ "required": false
785
+ }
786
+ }
787
+ },
788
+ "Crop": {
789
+ "code": 190000,
790
+ "name": "裁剪节点",
791
+ "aliases": [
792
+ "裁剪",
793
+ "裁剪节点",
794
+ "九宫格",
795
+ "切分"
796
+ ],
797
+ "llmDescription": "图片裁剪节点,支持多种裁剪模式。宽高会自动从连入的源节点获取,无需手动指定。裁剪模式 (mode): 0=比例裁剪(需设置ratio), 1=分辨率裁剪(需设置width/height), 5=自定义等分(需设置x_uniform_split和y_uniform_split)。常见场景: 九宫格用mode=5,x_uniform_split=3,y_uniform_split=3; 四宫格用mode=5,x_uniform_split=2,y_uniform_split=2",
798
+ "fields": {
799
+ "mode": {
800
+ "type": "number",
801
+ "required": false,
802
+ "description": "0=比例, 1=分辨率, 5=自定义等分"
803
+ },
804
+ "x_uniform_split": {
805
+ "type": "number",
806
+ "required": false,
807
+ "description": "水平方向切割数 (默认1)"
808
+ },
809
+ "y_uniform_split": {
810
+ "type": "number",
811
+ "required": false,
812
+ "description": "垂直方向切割数 (默认1)"
813
+ },
814
+ "ratio": {
815
+ "type": "string",
816
+ "required": false
817
+ },
818
+ "direction": {
819
+ "type": "number",
820
+ "required": false
821
+ },
822
+ "width": {
823
+ "type": "number",
824
+ "required": false
825
+ },
826
+ "height": {
827
+ "type": "number",
828
+ "required": false
829
+ },
830
+ "submit": {
831
+ "type": "record",
832
+ "required": true
833
+ },
834
+ "current": {
835
+ "type": "record",
836
+ "required": true
837
+ },
838
+ "status": {
839
+ "type": "number",
840
+ "required": true,
841
+ "default": 0
842
+ },
843
+ "show_execute": {
844
+ "type": "boolean",
845
+ "required": true,
846
+ "default": true
847
+ },
848
+ "medias": {
849
+ "type": "array",
850
+ "required": false
851
+ }
852
+ },
853
+ "connections": {
854
+ "canBeSource": true,
855
+ "canBeTarget": true,
856
+ "allowedSources": [
857
+ "Process",
858
+ "Selector",
859
+ "Image"
860
+ ],
861
+ "allowedTargets": [
862
+ "Process",
863
+ "Input",
864
+ "Result"
865
+ ]
866
+ }
867
+ }
868
+ },
869
+ "toolTypes": {
870
+ "1": {
871
+ "name": "text2image",
872
+ "llmDescription": "文生图: 根据文字描述生成图片。核心参数: Prompt(必需), 宽高比(可选如1:1,16:9)。仅询问必要的画面描述,其他参数如未指定则使用默认值",
873
+ "input": {
874
+ "prompt": true,
875
+ "image": false
876
+ },
877
+ "output": "image"
878
+ },
879
+ "2": {
880
+ "name": "image2image",
881
+ "llmDescription": "图生图: 根据参考图和描述生成新图片。核心参数: Prompt(必需), 参考图(必需)。Prompt用于指导重绘方向",
882
+ "input": {
883
+ "prompt": true,
884
+ "image": true
885
+ },
886
+ "output": "image"
887
+ },
888
+ "3": {
889
+ "name": "text2video",
890
+ "llmDescription": "文生视频: 根据文字描述生成视频。核心参数: Prompt(必需)。可选参数: 时长(如5s/10s), 宽高比。若用户未指定时长,默认生成短视频",
891
+ "input": {
892
+ "prompt": true,
893
+ "image": false
894
+ },
895
+ "output": "video"
896
+ },
897
+ "4": {
898
+ "name": "image2video",
899
+ "llmDescription": "图生视频: 将静态图片转为视频/动画。核心参数: 参考图(必需), Prompt(可选)。Prompt可辅助描述动态效果如'让水流动'",
900
+ "input": {
901
+ "prompt": false,
902
+ "image": true
903
+ },
904
+ "output": "video"
905
+ },
906
+ "5": {
907
+ "name": "removeBg",
908
+ "llmDescription": "去背景: 自动识别主体并移除背景。无需询问参数,直接处理",
909
+ "input": {
910
+ "prompt": false,
911
+ "image": true
912
+ },
913
+ "output": "image"
914
+ },
915
+ "6": {
916
+ "name": "video2gif",
917
+ "llmDescription": "视频转GIF: 将视频转换为GIF动图。无需询问用户分辨率、帧率等参数,直接使用默认设置。必须有视频输入",
918
+ "input": {
919
+ "prompt": false,
920
+ "image": true
921
+ },
922
+ "output": "image"
923
+ },
924
+ "8": {
925
+ "name": "image23d",
926
+ "llmDescription": "图生3D: 将2D图片转为3D模型。无需询问格式参数,直接生成",
927
+ "input": {
928
+ "prompt": false,
929
+ "image": true
930
+ },
931
+ "output": "3d"
932
+ },
933
+ "10": {
934
+ "name": "upscale",
935
+ "llmDescription": "高清放大: 智能提升图片分辨率。无需询问倍率,直接处理",
936
+ "input": {
937
+ "prompt": false,
938
+ "image": true
939
+ },
940
+ "output": "image"
941
+ }
942
+ },
943
+ "outputTypes": {
944
+ "image": 0,
945
+ "video": 1,
946
+ "3d": 3
947
+ }
948
+ }