agent_analysis_handoff_index.schema.json 7.6 KB

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