extract_workflow.schema.json 6.6 KB

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