agent_analysis_handoff_index.schema.json 8.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455
  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. "member_count": {
  143. "type": "object",
  144. "additionalProperties": false,
  145. "required": [
  146. "indexed_files",
  147. "zip_file_entries",
  148. "self_reference_control_files",
  149. "note"
  150. ],
  151. "properties": {
  152. "indexed_files": {
  153. "type": "integer",
  154. "minimum": 0
  155. },
  156. "zip_file_entries": {
  157. "type": "integer",
  158. "minimum": 0
  159. },
  160. "self_reference_control_files": {
  161. "type": "array",
  162. "items": {
  163. "type": "string"
  164. }
  165. },
  166. "note": {
  167. "type": "string"
  168. }
  169. }
  170. },
  171. "size_budget": {
  172. "type": "object",
  173. "additionalProperties": true,
  174. "required": [
  175. "schema",
  176. "members"
  177. ],
  178. "properties": {
  179. "schema": {
  180. "type": "string"
  181. },
  182. "total_bytes_basis": {
  183. "type": "integer",
  184. "minimum": 0
  185. },
  186. "threshold_bytes": {
  187. "type": "integer",
  188. "minimum": 0
  189. },
  190. "threshold_share": {
  191. "type": "number"
  192. },
  193. "members": {
  194. "type": "array",
  195. "items": {
  196. "type": "object"
  197. }
  198. }
  199. }
  200. },
  201. "max_zip_bytes": {
  202. "type": "integer",
  203. "minimum": 1
  204. },
  205. "target_zip_bytes": {
  206. "type": "integer",
  207. "minimum": 1
  208. },
  209. "sources": {
  210. "type": "array",
  211. "items": {
  212. "type": "object",
  213. "required": [
  214. "id",
  215. "status"
  216. ],
  217. "properties": {
  218. "id": {
  219. "type": "string"
  220. },
  221. "status": {
  222. "enum": [
  223. "pass",
  224. "warning"
  225. ]
  226. }
  227. },
  228. "additionalProperties": true
  229. }
  230. },
  231. "git": {
  232. "type": "array",
  233. "items": {
  234. "type": "object"
  235. }
  236. },
  237. "warnings": {
  238. "type": "array",
  239. "items": {
  240. "type": "object"
  241. }
  242. },
  243. "excluded": {
  244. "type": "array",
  245. "items": {
  246. "$ref": "#/$defs/excluded"
  247. }
  248. },
  249. "volumes": {
  250. "type": "array",
  251. "minItems": 1,
  252. "items": {
  253. "$ref": "#/$defs/volume"
  254. }
  255. },
  256. "files": {
  257. "type": "array",
  258. "items": {
  259. "$ref": "#/$defs/file"
  260. }
  261. },
  262. "large_files": {
  263. "type": "array",
  264. "items": {
  265. "$ref": "#/$defs/large_file"
  266. }
  267. }
  268. },
  269. "$defs": {
  270. "sha256": {
  271. "type": "string",
  272. "pattern": "^[0-9a-f]{64}$"
  273. },
  274. "excluded": {
  275. "type": "object",
  276. "additionalProperties": false,
  277. "required": [
  278. "path",
  279. "rule"
  280. ],
  281. "properties": {
  282. "path": {
  283. "type": "string"
  284. },
  285. "rule": {
  286. "type": "string"
  287. }
  288. }
  289. },
  290. "volume": {
  291. "type": "object",
  292. "additionalProperties": false,
  293. "required": [
  294. "file",
  295. "volume_number",
  296. "volume_count",
  297. "categories",
  298. "file_count",
  299. "uncompressed_bytes",
  300. "compressed_bytes",
  301. "sha256"
  302. ],
  303. "properties": {
  304. "file": {
  305. "type": "string"
  306. },
  307. "volume_number": {
  308. "type": "integer",
  309. "minimum": 1
  310. },
  311. "volume_count": {
  312. "type": "integer",
  313. "minimum": 1
  314. },
  315. "categories": {
  316. "type": "array",
  317. "items": {
  318. "type": "string"
  319. }
  320. },
  321. "file_count": {
  322. "type": "integer",
  323. "minimum": 0
  324. },
  325. "uncompressed_bytes": {
  326. "type": "integer",
  327. "minimum": 0
  328. },
  329. "compressed_bytes": {
  330. "type": "integer",
  331. "minimum": 1
  332. },
  333. "sha256": {
  334. "$ref": "#/$defs/sha256"
  335. }
  336. }
  337. },
  338. "file": {
  339. "type": "object",
  340. "additionalProperties": false,
  341. "required": [
  342. "path",
  343. "archive_path",
  344. "category",
  345. "source_id",
  346. "original_path",
  347. "size",
  348. "sha256",
  349. "volume"
  350. ],
  351. "properties": {
  352. "path": {
  353. "type": "string"
  354. },
  355. "archive_path": {
  356. "type": "string"
  357. },
  358. "category": {
  359. "type": "string"
  360. },
  361. "source_id": {
  362. "type": "string"
  363. },
  364. "original_path": {
  365. "type": "string"
  366. },
  367. "size": {
  368. "type": "integer",
  369. "minimum": 0
  370. },
  371. "sha256": {
  372. "$ref": "#/$defs/sha256"
  373. },
  374. "volume": {
  375. "type": "string"
  376. }
  377. }
  378. },
  379. "chunk": {
  380. "type": "object",
  381. "additionalProperties": false,
  382. "required": [
  383. "number",
  384. "path",
  385. "archive_path",
  386. "size",
  387. "sha256",
  388. "volume"
  389. ],
  390. "properties": {
  391. "number": {
  392. "type": "integer",
  393. "minimum": 1
  394. },
  395. "path": {
  396. "type": "string"
  397. },
  398. "archive_path": {
  399. "type": "string"
  400. },
  401. "size": {
  402. "type": "integer",
  403. "minimum": 1
  404. },
  405. "sha256": {
  406. "$ref": "#/$defs/sha256"
  407. },
  408. "volume": {
  409. "type": "string"
  410. }
  411. }
  412. },
  413. "large_file": {
  414. "type": "object",
  415. "additionalProperties": false,
  416. "required": [
  417. "path",
  418. "category",
  419. "source_id",
  420. "original_path",
  421. "size",
  422. "sha256",
  423. "chunks"
  424. ],
  425. "properties": {
  426. "path": {
  427. "type": "string"
  428. },
  429. "category": {
  430. "type": "string"
  431. },
  432. "source_id": {
  433. "type": "string"
  434. },
  435. "original_path": {
  436. "type": "string"
  437. },
  438. "size": {
  439. "type": "integer",
  440. "minimum": 1
  441. },
  442. "sha256": {
  443. "$ref": "#/$defs/sha256"
  444. },
  445. "chunks": {
  446. "type": "array",
  447. "minItems": 2,
  448. "items": {
  449. "$ref": "#/$defs/chunk"
  450. }
  451. }
  452. }
  453. }
  454. }
  455. }