extract_workflow.schema.json 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135
  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", "fragments"],
  6. "properties": {
  7. "skip": { "type": "boolean" },
  8. "skip_reason": { "type": "string" },
  9. "workflow": {
  10. "anyOf": [
  11. { "type": "null" },
  12. {
  13. "type": "object",
  14. "required": ["steps"],
  15. "properties": {
  16. "workflow_id": { "type": ["string", "null"] },
  17. "steps": {
  18. "type": "array",
  19. "minItems": 1,
  20. "items": {
  21. "type": "object",
  22. "required": ["step_id", "order", "phase", "relation", "body"],
  23. "properties": {
  24. "step_id": { "type": "string", "pattern": "^s[0-9]+$" },
  25. "order": { "type": "integer", "minimum": 1 },
  26. "phase": {
  27. "type": "string",
  28. "enum": ["非制作", "预处理", "生成", "编辑"]
  29. },
  30. "relation": { "type": "string", "minLength": 1 },
  31. "body": { "type": ["string", "null"] }
  32. }
  33. }
  34. }
  35. }
  36. }
  37. ]
  38. },
  39. "fragments": {
  40. "type": "array",
  41. "items": {
  42. "type": "object",
  43. "required": [
  44. "fragment_id", "action", "inputs", "outputs",
  45. "body", "effects", "control_target", "artifact_type",
  46. "tools", "apply_to_draft",
  47. "workflow_step_ref", "is_alternative_to"
  48. ],
  49. "properties": {
  50. "fragment_id": { "type": "string", "minLength": 1 },
  51. "action": {
  52. "type": "object",
  53. "required": ["main_action", "mechanism"],
  54. "properties": {
  55. "main_action": { "type": "string", "minLength": 1 },
  56. "mechanism": { "type": "string", "minLength": 1 }
  57. }
  58. },
  59. "inputs": {
  60. "type": "array",
  61. "items": {
  62. "type": "object",
  63. "required": ["modality", "description", "relation"],
  64. "properties": {
  65. "modality": { "type": "string", "minLength": 1 },
  66. "description": { "type": "string", "minLength": 1 },
  67. "relation": { "type": "string", "minLength": 1 }
  68. }
  69. }
  70. },
  71. "outputs": {
  72. "type": "array",
  73. "items": {
  74. "type": "object",
  75. "required": ["modality", "description", "relation"],
  76. "properties": {
  77. "modality": { "type": "string", "minLength": 1 },
  78. "description": { "type": "string", "minLength": 1 },
  79. "relation": { "type": "string", "minLength": 1 }
  80. }
  81. }
  82. },
  83. "body": { "type": ["string", "null"] },
  84. "effects": {
  85. "type": "array",
  86. "items": {
  87. "type": "object",
  88. "required": ["statement", "criteria", "judge_method", "negative_examples"],
  89. "properties": {
  90. "statement": { "type": "string", "pattern": "^实现" },
  91. "criteria": { "type": "string", "minLength": 1 },
  92. "judge_method": { "type": "string", "enum": ["llm", "vlm", "rule", "human"] },
  93. "negative_examples": { "type": "array", "items": { "type": "string", "minLength": 1 }, "default": [] }
  94. }
  95. }
  96. },
  97. "control_target": {
  98. "type": "array",
  99. "items": { "type": "string", "minLength": 1 }
  100. },
  101. "artifact_type": { "type": ["string", "null"] },
  102. "tools": {
  103. "type": "array",
  104. "items": { "type": "string" }
  105. },
  106. "apply_to_draft": {
  107. "type": "object",
  108. "required": ["实质", "形式"],
  109. "properties": {
  110. "实质": { "type": "array", "items": { "type": "string" } },
  111. "形式": { "type": "array", "items": { "type": "string" } }
  112. }
  113. },
  114. "workflow_step_ref": {
  115. "anyOf": [
  116. { "type": "null" },
  117. {
  118. "type": "object",
  119. "required": ["step_id"],
  120. "properties": {
  121. "workflow_id": { "type": "string" },
  122. "step_id": { "type": "string", "pattern": "^s[0-9]+$" }
  123. }
  124. }
  125. ]
  126. },
  127. "is_alternative_to": {
  128. "type": "array",
  129. "items": { "type": "string" }
  130. }
  131. }
  132. }
  133. }
  134. }
  135. }