extract_workflow.schema.json 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251
  1. {
  2. "$schema": "http://json-schema.org/draft-07/schema#",
  3. "title": "extract_workflow_output_v6",
  4. "type": "object",
  5. "required": ["skip", "skip_reason", "workflow", "capability"],
  6. "properties": {
  7. "skip": {
  8. "type": "boolean"
  9. },
  10. "skip_reason": {
  11. "type": "string"
  12. },
  13. "workflow": {
  14. "anyOf": [
  15. {
  16. "type": "null"
  17. },
  18. {
  19. "type": "object",
  20. "required": ["steps"],
  21. "properties": {
  22. "workflow_id": {
  23. "type": ["string", "null"]
  24. },
  25. "steps": {
  26. "type": "array",
  27. "minItems": 1,
  28. "items": {
  29. "type": "object",
  30. "required": ["step_id", "order", "phase"],
  31. "properties": {
  32. "step_id": {
  33. "type": "string",
  34. "pattern": "^s[0-9]+$"
  35. },
  36. "order": {
  37. "type": "integer",
  38. "minimum": 1
  39. },
  40. "phase": {
  41. "type": "string",
  42. "enum": ["非制作", "预处理", "生成", "编辑"]
  43. }
  44. }
  45. }
  46. }
  47. }
  48. }
  49. ]
  50. },
  51. "capability": {
  52. "type": "array",
  53. "items": {
  54. "type": "object",
  55. "required": [
  56. "capability_id",
  57. "action",
  58. "inputs",
  59. "outputs",
  60. "body",
  61. "effects",
  62. "control_target",
  63. "artifact_type",
  64. "tools",
  65. "apply_to_draft",
  66. "workflow_step_ref",
  67. "is_alternative_to"
  68. ],
  69. "properties": {
  70. "capability_id": {
  71. "type": "string",
  72. "pattern": "^c_(s[0-9]+_[0-9]+|standalone_[0-9]+)$"
  73. },
  74. "action": {
  75. "type": "object",
  76. "required": ["description", "reasoning"],
  77. "properties": {
  78. "description": {
  79. "type": "string",
  80. "minLength": 1
  81. },
  82. "reasoning": {
  83. "type": "string",
  84. "minLength": 1
  85. }
  86. }
  87. },
  88. "inputs": {
  89. "type": "array",
  90. "items": {
  91. "type": "object",
  92. "required": ["modality", "description", "relation"],
  93. "properties": {
  94. "modality": {
  95. "type": "string",
  96. "enum": [
  97. "文本",
  98. "图片",
  99. "视频",
  100. "音频",
  101. "特征点",
  102. "参数",
  103. "模型",
  104. "向量"
  105. ]
  106. },
  107. "description": {
  108. "type": "string",
  109. "minLength": 1
  110. },
  111. "relation": {
  112. "type": "string",
  113. "pattern": "^\\[(来源|去向)\\..+\\]$"
  114. }
  115. }
  116. }
  117. },
  118. "outputs": {
  119. "type": "array",
  120. "items": {
  121. "type": "object",
  122. "required": ["modality", "description", "relation"],
  123. "properties": {
  124. "modality": {
  125. "type": "string",
  126. "enum": [
  127. "文本",
  128. "图片",
  129. "视频",
  130. "音频",
  131. "特征点",
  132. "参数",
  133. "模型",
  134. "向量"
  135. ]
  136. },
  137. "description": {
  138. "type": "string",
  139. "minLength": 1
  140. },
  141. "relation": {
  142. "type": "string",
  143. "pattern": "^\\[(来源|去向)\\..+\\]$"
  144. }
  145. }
  146. }
  147. },
  148. "body": {
  149. "type": ["string", "null"]
  150. },
  151. "effects": {
  152. "type": "array",
  153. "minItems": 1,
  154. "items": {
  155. "type": "object",
  156. "required": [
  157. "statement",
  158. "criteria",
  159. "judge_method",
  160. "negative_examples"
  161. ],
  162. "properties": {
  163. "statement": {
  164. "type": "string",
  165. "pattern": "^实现"
  166. },
  167. "criteria": {
  168. "type": "string",
  169. "minLength": 1
  170. },
  171. "judge_method": {
  172. "type": "string",
  173. "enum": ["llm", "vlm", "rule", "human"]
  174. },
  175. "negative_examples": {
  176. "type": "array",
  177. "items": {
  178. "type": "string",
  179. "minLength": 1
  180. },
  181. "default": []
  182. }
  183. }
  184. }
  185. },
  186. "control_target": {
  187. "type": "array",
  188. "items": {
  189. "type": "string",
  190. "minLength": 1
  191. }
  192. },
  193. "artifact_type": {
  194. "type": ["string", "null"]
  195. },
  196. "tools": {
  197. "type": "array",
  198. "items": {
  199. "type": "string"
  200. }
  201. },
  202. "apply_to_draft": {
  203. "type": "object",
  204. "required": ["实质", "形式"],
  205. "properties": {
  206. "实质": {
  207. "type": "array",
  208. "items": {
  209. "type": "string"
  210. }
  211. },
  212. "形式": {
  213. "type": "array",
  214. "items": {
  215. "type": "string"
  216. }
  217. }
  218. }
  219. },
  220. "workflow_step_ref": {
  221. "anyOf": [
  222. {
  223. "type": "null"
  224. },
  225. {
  226. "type": "object",
  227. "required": ["workflow_id", "step_id"],
  228. "properties": {
  229. "workflow_id": {
  230. "type": ["string", "null"]
  231. },
  232. "step_id": {
  233. "type": "string",
  234. "pattern": "^s[0-9]+$"
  235. }
  236. }
  237. }
  238. ]
  239. },
  240. "is_alternative_to": {
  241. "type": "array",
  242. "items": {
  243. "type": "string",
  244. "pattern": "^c_(s[0-9]+_[0-9]+|standalone_[0-9]+)$"
  245. }
  246. }
  247. }
  248. }
  249. }
  250. }
  251. }