agent_analysis_handoff_index.schema.json 7.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371
  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. "profile": {
  46. "type": "string"
  47. },
  48. "delivery_policy": {
  49. "type": "string"
  50. },
  51. "content_dedup": {
  52. "type": "array",
  53. "items": {
  54. "type": "object",
  55. "additionalProperties": false,
  56. "required": [
  57. "sha256",
  58. "size",
  59. "physical_path",
  60. "logical_paths",
  61. "reason"
  62. ],
  63. "properties": {
  64. "sha256": {
  65. "$ref": "#/$defs/sha256"
  66. },
  67. "size": {
  68. "type": "integer",
  69. "minimum": 0
  70. },
  71. "physical_path": {
  72. "type": "string"
  73. },
  74. "logical_paths": {
  75. "type": "array",
  76. "items": {
  77. "type": "string"
  78. }
  79. },
  80. "reason": {
  81. "type": "string"
  82. }
  83. }
  84. }
  85. },
  86. "derived_evidence": {
  87. "type": "array",
  88. "items": {
  89. "type": "object",
  90. "additionalProperties": false,
  91. "required": [
  92. "path",
  93. "asset",
  94. "role",
  95. "authority",
  96. "note"
  97. ],
  98. "properties": {
  99. "path": {
  100. "type": "string"
  101. },
  102. "asset": {
  103. "type": "string"
  104. },
  105. "role": {
  106. "type": "string"
  107. },
  108. "authority": {
  109. "type": "string"
  110. },
  111. "note": {
  112. "type": "string"
  113. }
  114. }
  115. }
  116. },
  117. "max_zip_bytes": {
  118. "type": "integer",
  119. "minimum": 1
  120. },
  121. "target_zip_bytes": {
  122. "type": "integer",
  123. "minimum": 1
  124. },
  125. "sources": {
  126. "type": "array",
  127. "items": {
  128. "type": "object",
  129. "required": [
  130. "id",
  131. "status"
  132. ],
  133. "properties": {
  134. "id": {
  135. "type": "string"
  136. },
  137. "status": {
  138. "enum": [
  139. "pass",
  140. "warning"
  141. ]
  142. }
  143. },
  144. "additionalProperties": true
  145. }
  146. },
  147. "git": {
  148. "type": "array",
  149. "items": {
  150. "type": "object"
  151. }
  152. },
  153. "warnings": {
  154. "type": "array",
  155. "items": {
  156. "type": "object"
  157. }
  158. },
  159. "excluded": {
  160. "type": "array",
  161. "items": {
  162. "$ref": "#/$defs/excluded"
  163. }
  164. },
  165. "volumes": {
  166. "type": "array",
  167. "minItems": 1,
  168. "items": {
  169. "$ref": "#/$defs/volume"
  170. }
  171. },
  172. "files": {
  173. "type": "array",
  174. "items": {
  175. "$ref": "#/$defs/file"
  176. }
  177. },
  178. "large_files": {
  179. "type": "array",
  180. "items": {
  181. "$ref": "#/$defs/large_file"
  182. }
  183. }
  184. },
  185. "$defs": {
  186. "sha256": {
  187. "type": "string",
  188. "pattern": "^[0-9a-f]{64}$"
  189. },
  190. "excluded": {
  191. "type": "object",
  192. "additionalProperties": false,
  193. "required": [
  194. "path",
  195. "rule"
  196. ],
  197. "properties": {
  198. "path": {
  199. "type": "string"
  200. },
  201. "rule": {
  202. "type": "string"
  203. }
  204. }
  205. },
  206. "volume": {
  207. "type": "object",
  208. "additionalProperties": false,
  209. "required": [
  210. "file",
  211. "volume_number",
  212. "volume_count",
  213. "categories",
  214. "file_count",
  215. "uncompressed_bytes",
  216. "compressed_bytes",
  217. "sha256"
  218. ],
  219. "properties": {
  220. "file": {
  221. "type": "string"
  222. },
  223. "volume_number": {
  224. "type": "integer",
  225. "minimum": 1
  226. },
  227. "volume_count": {
  228. "type": "integer",
  229. "minimum": 1
  230. },
  231. "categories": {
  232. "type": "array",
  233. "items": {
  234. "type": "string"
  235. }
  236. },
  237. "file_count": {
  238. "type": "integer",
  239. "minimum": 0
  240. },
  241. "uncompressed_bytes": {
  242. "type": "integer",
  243. "minimum": 0
  244. },
  245. "compressed_bytes": {
  246. "type": "integer",
  247. "minimum": 1
  248. },
  249. "sha256": {
  250. "$ref": "#/$defs/sha256"
  251. }
  252. }
  253. },
  254. "file": {
  255. "type": "object",
  256. "additionalProperties": false,
  257. "required": [
  258. "path",
  259. "archive_path",
  260. "category",
  261. "source_id",
  262. "original_path",
  263. "size",
  264. "sha256",
  265. "volume"
  266. ],
  267. "properties": {
  268. "path": {
  269. "type": "string"
  270. },
  271. "archive_path": {
  272. "type": "string"
  273. },
  274. "category": {
  275. "type": "string"
  276. },
  277. "source_id": {
  278. "type": "string"
  279. },
  280. "original_path": {
  281. "type": "string"
  282. },
  283. "size": {
  284. "type": "integer",
  285. "minimum": 0
  286. },
  287. "sha256": {
  288. "$ref": "#/$defs/sha256"
  289. },
  290. "volume": {
  291. "type": "string"
  292. }
  293. }
  294. },
  295. "chunk": {
  296. "type": "object",
  297. "additionalProperties": false,
  298. "required": [
  299. "number",
  300. "path",
  301. "archive_path",
  302. "size",
  303. "sha256",
  304. "volume"
  305. ],
  306. "properties": {
  307. "number": {
  308. "type": "integer",
  309. "minimum": 1
  310. },
  311. "path": {
  312. "type": "string"
  313. },
  314. "archive_path": {
  315. "type": "string"
  316. },
  317. "size": {
  318. "type": "integer",
  319. "minimum": 1
  320. },
  321. "sha256": {
  322. "$ref": "#/$defs/sha256"
  323. },
  324. "volume": {
  325. "type": "string"
  326. }
  327. }
  328. },
  329. "large_file": {
  330. "type": "object",
  331. "additionalProperties": false,
  332. "required": [
  333. "path",
  334. "category",
  335. "source_id",
  336. "original_path",
  337. "size",
  338. "sha256",
  339. "chunks"
  340. ],
  341. "properties": {
  342. "path": {
  343. "type": "string"
  344. },
  345. "category": {
  346. "type": "string"
  347. },
  348. "source_id": {
  349. "type": "string"
  350. },
  351. "original_path": {
  352. "type": "string"
  353. },
  354. "size": {
  355. "type": "integer",
  356. "minimum": 1
  357. },
  358. "sha256": {
  359. "$ref": "#/$defs/sha256"
  360. },
  361. "chunks": {
  362. "type": "array",
  363. "minItems": 2,
  364. "items": {
  365. "$ref": "#/$defs/chunk"
  366. }
  367. }
  368. }
  369. }
  370. }
  371. }