agent_analysis_handoff_index.schema.json 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299
  1. {
  2. "$schema": "https://json-schema.org/draft/2020-12/schema",
  3. "$id": "https://local.invalid/schemas/agent_analysis_handoff_index.schema.json",
  4. "title": "CPLD agent analysis handoff index",
  5. "type": "object",
  6. "additionalProperties": false,
  7. "required": [
  8. "schema",
  9. "run_id",
  10. "created_at_utc",
  11. "package_name",
  12. "status",
  13. "max_zip_bytes",
  14. "target_zip_bytes",
  15. "sources",
  16. "git",
  17. "warnings",
  18. "excluded",
  19. "volumes",
  20. "files",
  21. "large_files"
  22. ],
  23. "properties": {
  24. "schema": {
  25. "const": "cpld-agent-analysis-index-v1"
  26. },
  27. "run_id": {
  28. "type": "string",
  29. "pattern": "^[0-9a-f]{32}$"
  30. },
  31. "created_at_utc": {
  32. "type": "string",
  33. "format": "date-time"
  34. },
  35. "package_name": {
  36. "type": "string",
  37. "minLength": 1
  38. },
  39. "status": {
  40. "enum": [
  41. "pass",
  42. "pass_with_warnings"
  43. ]
  44. },
  45. "max_zip_bytes": {
  46. "type": "integer",
  47. "minimum": 1
  48. },
  49. "target_zip_bytes": {
  50. "type": "integer",
  51. "minimum": 1
  52. },
  53. "sources": {
  54. "type": "array",
  55. "items": {
  56. "type": "object",
  57. "required": [
  58. "id",
  59. "status"
  60. ],
  61. "properties": {
  62. "id": {
  63. "type": "string"
  64. },
  65. "status": {
  66. "enum": [
  67. "pass",
  68. "warning"
  69. ]
  70. }
  71. },
  72. "additionalProperties": true
  73. }
  74. },
  75. "git": {
  76. "type": "array",
  77. "items": {
  78. "type": "object"
  79. }
  80. },
  81. "warnings": {
  82. "type": "array",
  83. "items": {
  84. "type": "object"
  85. }
  86. },
  87. "excluded": {
  88. "type": "array",
  89. "items": {
  90. "$ref": "#/$defs/excluded"
  91. }
  92. },
  93. "volumes": {
  94. "type": "array",
  95. "minItems": 1,
  96. "items": {
  97. "$ref": "#/$defs/volume"
  98. }
  99. },
  100. "files": {
  101. "type": "array",
  102. "items": {
  103. "$ref": "#/$defs/file"
  104. }
  105. },
  106. "large_files": {
  107. "type": "array",
  108. "items": {
  109. "$ref": "#/$defs/large_file"
  110. }
  111. }
  112. },
  113. "$defs": {
  114. "sha256": {
  115. "type": "string",
  116. "pattern": "^[0-9a-f]{64}$"
  117. },
  118. "excluded": {
  119. "type": "object",
  120. "additionalProperties": false,
  121. "required": [
  122. "path",
  123. "rule"
  124. ],
  125. "properties": {
  126. "path": {
  127. "type": "string"
  128. },
  129. "rule": {
  130. "type": "string"
  131. }
  132. }
  133. },
  134. "volume": {
  135. "type": "object",
  136. "additionalProperties": false,
  137. "required": [
  138. "file",
  139. "volume_number",
  140. "volume_count",
  141. "categories",
  142. "file_count",
  143. "uncompressed_bytes",
  144. "compressed_bytes",
  145. "sha256"
  146. ],
  147. "properties": {
  148. "file": {
  149. "type": "string"
  150. },
  151. "volume_number": {
  152. "type": "integer",
  153. "minimum": 1
  154. },
  155. "volume_count": {
  156. "type": "integer",
  157. "minimum": 1
  158. },
  159. "categories": {
  160. "type": "array",
  161. "items": {
  162. "type": "string"
  163. }
  164. },
  165. "file_count": {
  166. "type": "integer",
  167. "minimum": 0
  168. },
  169. "uncompressed_bytes": {
  170. "type": "integer",
  171. "minimum": 0
  172. },
  173. "compressed_bytes": {
  174. "type": "integer",
  175. "minimum": 1
  176. },
  177. "sha256": {
  178. "$ref": "#/$defs/sha256"
  179. }
  180. }
  181. },
  182. "file": {
  183. "type": "object",
  184. "additionalProperties": false,
  185. "required": [
  186. "path",
  187. "archive_path",
  188. "category",
  189. "source_id",
  190. "original_path",
  191. "size",
  192. "sha256",
  193. "volume"
  194. ],
  195. "properties": {
  196. "path": {
  197. "type": "string"
  198. },
  199. "archive_path": {
  200. "type": "string"
  201. },
  202. "category": {
  203. "type": "string"
  204. },
  205. "source_id": {
  206. "type": "string"
  207. },
  208. "original_path": {
  209. "type": "string"
  210. },
  211. "size": {
  212. "type": "integer",
  213. "minimum": 0
  214. },
  215. "sha256": {
  216. "$ref": "#/$defs/sha256"
  217. },
  218. "volume": {
  219. "type": "string"
  220. }
  221. }
  222. },
  223. "chunk": {
  224. "type": "object",
  225. "additionalProperties": false,
  226. "required": [
  227. "number",
  228. "path",
  229. "archive_path",
  230. "size",
  231. "sha256",
  232. "volume"
  233. ],
  234. "properties": {
  235. "number": {
  236. "type": "integer",
  237. "minimum": 1
  238. },
  239. "path": {
  240. "type": "string"
  241. },
  242. "archive_path": {
  243. "type": "string"
  244. },
  245. "size": {
  246. "type": "integer",
  247. "minimum": 1
  248. },
  249. "sha256": {
  250. "$ref": "#/$defs/sha256"
  251. },
  252. "volume": {
  253. "type": "string"
  254. }
  255. }
  256. },
  257. "large_file": {
  258. "type": "object",
  259. "additionalProperties": false,
  260. "required": [
  261. "path",
  262. "category",
  263. "source_id",
  264. "original_path",
  265. "size",
  266. "sha256",
  267. "chunks"
  268. ],
  269. "properties": {
  270. "path": {
  271. "type": "string"
  272. },
  273. "category": {
  274. "type": "string"
  275. },
  276. "source_id": {
  277. "type": "string"
  278. },
  279. "original_path": {
  280. "type": "string"
  281. },
  282. "size": {
  283. "type": "integer",
  284. "minimum": 1
  285. },
  286. "sha256": {
  287. "$ref": "#/$defs/sha256"
  288. },
  289. "chunks": {
  290. "type": "array",
  291. "minItems": 2,
  292. "items": {
  293. "$ref": "#/$defs/chunk"
  294. }
  295. }
  296. }
  297. }
  298. }
  299. }