agent_analysis_handoff_index.schema.json 11 KB

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