apply_to_grounding_agent.schema.json 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147
  1. {
  2. "$schema": "http://json-schema.org/draft-07/schema#",
  3. "title": "apply_to_grounding_agent_output",
  4. "description": "Grounding agent 单 capability 输出 JSON 结构。Python 端解析后会把 matched 直接写入 capability.apply_to,suggested_additions 写入 capability.suggest_apply_to。",
  5. "type": "object",
  6. "required": [
  7. "matched",
  8. "suggested_additions"
  9. ],
  10. "additionalProperties": false,
  11. "properties": {
  12. "matched": {
  13. "type": "array",
  14. "description": "与分类库匹配上的节点。可包含实质和形式两种类型,用 category_type 区分。",
  15. "items": {
  16. "type": "object",
  17. "required": [
  18. "category_path",
  19. "category_type",
  20. "action",
  21. "ability_type",
  22. "matched_elements",
  23. "structured_content"
  24. ],
  25. "additionalProperties": false,
  26. "properties": {
  27. "category_path": {
  28. "type": "string",
  29. "minLength": 1,
  30. "description": "匹配到的节点路径(最多 6 层,前 6 层 L6)"
  31. },
  32. "category_type": {
  33. "type": "string",
  34. "enum": ["实质", "形式"],
  35. "description": "节点类型:实质或形式"
  36. },
  37. "action": {
  38. "type": "string",
  39. "minLength": 1,
  40. "description": "对该节点内容的操作要求(包含动词,如「提示词设定」「套用模板」「生成视频」)"
  41. },
  42. "ability_type": {
  43. "type": "string",
  44. "minLength": 1,
  45. "description": "能力类型(如 prompt、操作步骤、参数配置、模板套用、参考素材)"
  46. },
  47. "matched_elements": {
  48. "type": "array",
  49. "description": "命中的元素列表(每项含名称)",
  50. "items": {
  51. "type": "object",
  52. "required": ["名称"],
  53. "additionalProperties": false,
  54. "properties": {
  55. "名称": {
  56. "type": "string",
  57. "minLength": 1
  58. }
  59. }
  60. }
  61. },
  62. "structured_content": {
  63. "type": "array",
  64. "description": "与该节点相关的描述内容(可含排除项)",
  65. "items": {
  66. "type": "string"
  67. }
  68. }
  69. }
  70. }
  71. },
  72. "suggested_additions": {
  73. "type": "array",
  74. "description": "建议新增的节点。按规则只新增实质,不新增形式 — 所以 category_type 必为「实质」。",
  75. "items": {
  76. "type": "object",
  77. "required": [
  78. "category_type",
  79. "parent_path",
  80. "suggested_level",
  81. "reason",
  82. "action",
  83. "ability_type",
  84. "suggested_categories",
  85. "structured_content"
  86. ],
  87. "additionalProperties": false,
  88. "properties": {
  89. "category_type": {
  90. "type": "string",
  91. "enum": ["实质"],
  92. "description": "新增建议只针对实质(硬约束)"
  93. },
  94. "parent_path": {
  95. "type": "string",
  96. "description": "库中已存在的最深父级路径,若从 L1 开始则为空字符串"
  97. },
  98. "suggested_level": {
  99. "type": "string",
  100. "enum": ["L1", "L2", "L3", "L4", "L5", "L6"],
  101. "description": "建议新增的层级"
  102. },
  103. "reason": {
  104. "type": "string",
  105. "minLength": 1,
  106. "description": "缺失原因(一句话)"
  107. },
  108. "action": {
  109. "type": "string",
  110. "minLength": 1,
  111. "description": "对该节点内容的操作要求"
  112. },
  113. "ability_type": {
  114. "type": "string",
  115. "minLength": 1,
  116. "description": "能力类型"
  117. },
  118. "suggested_categories": {
  119. "type": "array",
  120. "minItems": 1,
  121. "items": {
  122. "type": "object",
  123. "required": ["category_name", "category_description"],
  124. "additionalProperties": false,
  125. "properties": {
  126. "category_name": {
  127. "type": "string",
  128. "minLength": 1
  129. },
  130. "category_description": {
  131. "type": "string",
  132. "minLength": 1
  133. }
  134. }
  135. }
  136. },
  137. "structured_content": {
  138. "type": "array",
  139. "items": {
  140. "type": "string"
  141. }
  142. }
  143. }
  144. }
  145. }
  146. }
  147. }