settld 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (863) hide show
  1. package/Dockerfile +45 -0
  2. package/README.md +150 -0
  3. package/SETTLD_VERSION +1 -0
  4. package/bin/settld.js +212 -0
  5. package/conformance/README.md +14 -0
  6. package/conformance/kernel-v0/README.md +60 -0
  7. package/conformance/kernel-v0/cases.json +19 -0
  8. package/conformance/kernel-v0/run.mjs +830 -0
  9. package/conformance/v1/README.md +77 -0
  10. package/conformance/v1/bundles/closepack/nonstrict-pass-missing-sla-acceptance/attestation/bundle_head_attestation.json +1 -0
  11. package/conformance/v1/bundles/closepack/nonstrict-pass-missing-sla-acceptance/evidence/evidence_index.json +1 -0
  12. package/conformance/v1/bundles/closepack/nonstrict-pass-missing-sla-acceptance/governance/policy.json +1 -0
  13. package/conformance/v1/bundles/closepack/nonstrict-pass-missing-sla-acceptance/governance/revocations.json +1 -0
  14. package/conformance/v1/bundles/closepack/nonstrict-pass-missing-sla-acceptance/manifest.json +1 -0
  15. package/conformance/v1/bundles/closepack/nonstrict-pass-missing-sla-acceptance/payload/invoice_bundle/attestation/bundle_head_attestation.json +1 -0
  16. package/conformance/v1/bundles/closepack/nonstrict-pass-missing-sla-acceptance/payload/invoice_bundle/governance/policy.json +1 -0
  17. package/conformance/v1/bundles/closepack/nonstrict-pass-missing-sla-acceptance/payload/invoice_bundle/governance/revocations.json +1 -0
  18. package/conformance/v1/bundles/closepack/nonstrict-pass-missing-sla-acceptance/payload/invoice_bundle/invoice/invoice_claim.json +1 -0
  19. package/conformance/v1/bundles/closepack/nonstrict-pass-missing-sla-acceptance/payload/invoice_bundle/manifest.json +1 -0
  20. package/conformance/v1/bundles/closepack/nonstrict-pass-missing-sla-acceptance/payload/invoice_bundle/metering/metering_report.json +1 -0
  21. package/conformance/v1/bundles/closepack/nonstrict-pass-missing-sla-acceptance/payload/invoice_bundle/payload/job_proof_bundle/attestation/bundle_head_attestation.json +1 -0
  22. package/conformance/v1/bundles/closepack/nonstrict-pass-missing-sla-acceptance/payload/invoice_bundle/payload/job_proof_bundle/events/events.jsonl +1 -0
  23. package/conformance/v1/bundles/closepack/nonstrict-pass-missing-sla-acceptance/payload/invoice_bundle/payload/job_proof_bundle/events/payload_material.jsonl +1 -0
  24. package/conformance/v1/bundles/closepack/nonstrict-pass-missing-sla-acceptance/payload/invoice_bundle/payload/job_proof_bundle/governance/global/events/events.jsonl +1 -0
  25. package/conformance/v1/bundles/closepack/nonstrict-pass-missing-sla-acceptance/payload/invoice_bundle/payload/job_proof_bundle/governance/global/events/payload_material.jsonl +1 -0
  26. package/conformance/v1/bundles/closepack/nonstrict-pass-missing-sla-acceptance/payload/invoice_bundle/payload/job_proof_bundle/governance/global/snapshot.json +1 -0
  27. package/conformance/v1/bundles/closepack/nonstrict-pass-missing-sla-acceptance/payload/invoice_bundle/payload/job_proof_bundle/governance/policy.json +1 -0
  28. package/conformance/v1/bundles/closepack/nonstrict-pass-missing-sla-acceptance/payload/invoice_bundle/payload/job_proof_bundle/governance/revocations.json +1 -0
  29. package/conformance/v1/bundles/closepack/nonstrict-pass-missing-sla-acceptance/payload/invoice_bundle/payload/job_proof_bundle/governance/tenant/events/events.jsonl +0 -0
  30. package/conformance/v1/bundles/closepack/nonstrict-pass-missing-sla-acceptance/payload/invoice_bundle/payload/job_proof_bundle/governance/tenant/events/payload_material.jsonl +0 -0
  31. package/conformance/v1/bundles/closepack/nonstrict-pass-missing-sla-acceptance/payload/invoice_bundle/payload/job_proof_bundle/governance/tenant/snapshot.json +1 -0
  32. package/conformance/v1/bundles/closepack/nonstrict-pass-missing-sla-acceptance/payload/invoice_bundle/payload/job_proof_bundle/job/snapshot.json +1 -0
  33. package/conformance/v1/bundles/closepack/nonstrict-pass-missing-sla-acceptance/payload/invoice_bundle/payload/job_proof_bundle/keys/public_keys.json +1 -0
  34. package/conformance/v1/bundles/closepack/nonstrict-pass-missing-sla-acceptance/payload/invoice_bundle/payload/job_proof_bundle/manifest.json +1 -0
  35. package/conformance/v1/bundles/closepack/nonstrict-pass-missing-sla-acceptance/payload/invoice_bundle/payload/job_proof_bundle/verify/report.json +1 -0
  36. package/conformance/v1/bundles/closepack/nonstrict-pass-missing-sla-acceptance/payload/invoice_bundle/payload/job_proof_bundle/verify/verification_report.json +1 -0
  37. package/conformance/v1/bundles/closepack/nonstrict-pass-missing-sla-acceptance/payload/invoice_bundle/pricing/pricing_matrix.json +1 -0
  38. package/conformance/v1/bundles/closepack/nonstrict-pass-missing-sla-acceptance/payload/invoice_bundle/pricing/pricing_matrix_signatures.json +1 -0
  39. package/conformance/v1/bundles/closepack/nonstrict-pass-missing-sla-acceptance/payload/invoice_bundle/settld.json +1 -0
  40. package/conformance/v1/bundles/closepack/nonstrict-pass-missing-sla-acceptance/payload/invoice_bundle/verify/verification_report.json +1 -0
  41. package/conformance/v1/bundles/closepack/nonstrict-pass-missing-sla-acceptance/settld.json +1 -0
  42. package/conformance/v1/bundles/closepack/nonstrict-pass-missing-sla-acceptance/verify/verification_report.json +1 -0
  43. package/conformance/v1/bundles/closepack/strict-fail-embedded-invoice-fails/acceptance/acceptance_criteria.json +1 -0
  44. package/conformance/v1/bundles/closepack/strict-fail-embedded-invoice-fails/acceptance/acceptance_evaluation.json +1 -0
  45. package/conformance/v1/bundles/closepack/strict-fail-embedded-invoice-fails/attestation/bundle_head_attestation.json +1 -0
  46. package/conformance/v1/bundles/closepack/strict-fail-embedded-invoice-fails/evidence/evidence_index.json +1 -0
  47. package/conformance/v1/bundles/closepack/strict-fail-embedded-invoice-fails/governance/policy.json +1 -0
  48. package/conformance/v1/bundles/closepack/strict-fail-embedded-invoice-fails/governance/revocations.json +1 -0
  49. package/conformance/v1/bundles/closepack/strict-fail-embedded-invoice-fails/manifest.json +1 -0
  50. package/conformance/v1/bundles/closepack/strict-fail-embedded-invoice-fails/payload/invoice_bundle/attestation/bundle_head_attestation.json +1 -0
  51. package/conformance/v1/bundles/closepack/strict-fail-embedded-invoice-fails/payload/invoice_bundle/governance/policy.json +1 -0
  52. package/conformance/v1/bundles/closepack/strict-fail-embedded-invoice-fails/payload/invoice_bundle/governance/revocations.json +1 -0
  53. package/conformance/v1/bundles/closepack/strict-fail-embedded-invoice-fails/payload/invoice_bundle/invoice/invoice_claim.json +1 -0
  54. package/conformance/v1/bundles/closepack/strict-fail-embedded-invoice-fails/payload/invoice_bundle/manifest.json +1 -0
  55. package/conformance/v1/bundles/closepack/strict-fail-embedded-invoice-fails/payload/invoice_bundle/metering/metering_report.json +1 -0
  56. package/conformance/v1/bundles/closepack/strict-fail-embedded-invoice-fails/payload/invoice_bundle/payload/job_proof_bundle/attestation/bundle_head_attestation.json +1 -0
  57. package/conformance/v1/bundles/closepack/strict-fail-embedded-invoice-fails/payload/invoice_bundle/payload/job_proof_bundle/events/events.jsonl +1 -0
  58. package/conformance/v1/bundles/closepack/strict-fail-embedded-invoice-fails/payload/invoice_bundle/payload/job_proof_bundle/events/payload_material.jsonl +1 -0
  59. package/conformance/v1/bundles/closepack/strict-fail-embedded-invoice-fails/payload/invoice_bundle/payload/job_proof_bundle/governance/global/events/events.jsonl +1 -0
  60. package/conformance/v1/bundles/closepack/strict-fail-embedded-invoice-fails/payload/invoice_bundle/payload/job_proof_bundle/governance/global/events/payload_material.jsonl +1 -0
  61. package/conformance/v1/bundles/closepack/strict-fail-embedded-invoice-fails/payload/invoice_bundle/payload/job_proof_bundle/governance/global/snapshot.json +1 -0
  62. package/conformance/v1/bundles/closepack/strict-fail-embedded-invoice-fails/payload/invoice_bundle/payload/job_proof_bundle/governance/policy.json +1 -0
  63. package/conformance/v1/bundles/closepack/strict-fail-embedded-invoice-fails/payload/invoice_bundle/payload/job_proof_bundle/governance/revocations.json +1 -0
  64. package/conformance/v1/bundles/closepack/strict-fail-embedded-invoice-fails/payload/invoice_bundle/payload/job_proof_bundle/governance/tenant/events/events.jsonl +0 -0
  65. package/conformance/v1/bundles/closepack/strict-fail-embedded-invoice-fails/payload/invoice_bundle/payload/job_proof_bundle/governance/tenant/events/payload_material.jsonl +0 -0
  66. package/conformance/v1/bundles/closepack/strict-fail-embedded-invoice-fails/payload/invoice_bundle/payload/job_proof_bundle/governance/tenant/snapshot.json +1 -0
  67. package/conformance/v1/bundles/closepack/strict-fail-embedded-invoice-fails/payload/invoice_bundle/payload/job_proof_bundle/job/snapshot.json +1 -0
  68. package/conformance/v1/bundles/closepack/strict-fail-embedded-invoice-fails/payload/invoice_bundle/payload/job_proof_bundle/keys/public_keys.json +1 -0
  69. package/conformance/v1/bundles/closepack/strict-fail-embedded-invoice-fails/payload/invoice_bundle/payload/job_proof_bundle/manifest.json +1 -0
  70. package/conformance/v1/bundles/closepack/strict-fail-embedded-invoice-fails/payload/invoice_bundle/payload/job_proof_bundle/verify/report.json +1 -0
  71. package/conformance/v1/bundles/closepack/strict-fail-embedded-invoice-fails/payload/invoice_bundle/payload/job_proof_bundle/verify/verification_report.json +1 -0
  72. package/conformance/v1/bundles/closepack/strict-fail-embedded-invoice-fails/payload/invoice_bundle/pricing/pricing_matrix.json +1 -0
  73. package/conformance/v1/bundles/closepack/strict-fail-embedded-invoice-fails/payload/invoice_bundle/pricing/pricing_matrix_signatures.json +1 -0
  74. package/conformance/v1/bundles/closepack/strict-fail-embedded-invoice-fails/payload/invoice_bundle/settld.json +1 -0
  75. package/conformance/v1/bundles/closepack/strict-fail-embedded-invoice-fails/payload/invoice_bundle/verify/verification_report.json +1 -0
  76. package/conformance/v1/bundles/closepack/strict-fail-embedded-invoice-fails/settld.json +1 -0
  77. package/conformance/v1/bundles/closepack/strict-fail-embedded-invoice-fails/sla/sla_definition.json +1 -0
  78. package/conformance/v1/bundles/closepack/strict-fail-embedded-invoice-fails/sla/sla_evaluation.json +1 -0
  79. package/conformance/v1/bundles/closepack/strict-fail-embedded-invoice-fails/verify/verification_report.json +1 -0
  80. package/conformance/v1/bundles/closepack/strict-fail-evidence-index-mismatch/acceptance/acceptance_criteria.json +1 -0
  81. package/conformance/v1/bundles/closepack/strict-fail-evidence-index-mismatch/acceptance/acceptance_evaluation.json +1 -0
  82. package/conformance/v1/bundles/closepack/strict-fail-evidence-index-mismatch/attestation/bundle_head_attestation.json +1 -0
  83. package/conformance/v1/bundles/closepack/strict-fail-evidence-index-mismatch/evidence/evidence_index.json +1 -0
  84. package/conformance/v1/bundles/closepack/strict-fail-evidence-index-mismatch/governance/policy.json +1 -0
  85. package/conformance/v1/bundles/closepack/strict-fail-evidence-index-mismatch/governance/revocations.json +1 -0
  86. package/conformance/v1/bundles/closepack/strict-fail-evidence-index-mismatch/manifest.json +1 -0
  87. package/conformance/v1/bundles/closepack/strict-fail-evidence-index-mismatch/payload/invoice_bundle/attestation/bundle_head_attestation.json +1 -0
  88. package/conformance/v1/bundles/closepack/strict-fail-evidence-index-mismatch/payload/invoice_bundle/governance/policy.json +1 -0
  89. package/conformance/v1/bundles/closepack/strict-fail-evidence-index-mismatch/payload/invoice_bundle/governance/revocations.json +1 -0
  90. package/conformance/v1/bundles/closepack/strict-fail-evidence-index-mismatch/payload/invoice_bundle/invoice/invoice_claim.json +1 -0
  91. package/conformance/v1/bundles/closepack/strict-fail-evidence-index-mismatch/payload/invoice_bundle/manifest.json +1 -0
  92. package/conformance/v1/bundles/closepack/strict-fail-evidence-index-mismatch/payload/invoice_bundle/metering/metering_report.json +1 -0
  93. package/conformance/v1/bundles/closepack/strict-fail-evidence-index-mismatch/payload/invoice_bundle/payload/job_proof_bundle/attestation/bundle_head_attestation.json +1 -0
  94. package/conformance/v1/bundles/closepack/strict-fail-evidence-index-mismatch/payload/invoice_bundle/payload/job_proof_bundle/events/events.jsonl +1 -0
  95. package/conformance/v1/bundles/closepack/strict-fail-evidence-index-mismatch/payload/invoice_bundle/payload/job_proof_bundle/events/payload_material.jsonl +1 -0
  96. package/conformance/v1/bundles/closepack/strict-fail-evidence-index-mismatch/payload/invoice_bundle/payload/job_proof_bundle/governance/global/events/events.jsonl +1 -0
  97. package/conformance/v1/bundles/closepack/strict-fail-evidence-index-mismatch/payload/invoice_bundle/payload/job_proof_bundle/governance/global/events/payload_material.jsonl +1 -0
  98. package/conformance/v1/bundles/closepack/strict-fail-evidence-index-mismatch/payload/invoice_bundle/payload/job_proof_bundle/governance/global/snapshot.json +1 -0
  99. package/conformance/v1/bundles/closepack/strict-fail-evidence-index-mismatch/payload/invoice_bundle/payload/job_proof_bundle/governance/policy.json +1 -0
  100. package/conformance/v1/bundles/closepack/strict-fail-evidence-index-mismatch/payload/invoice_bundle/payload/job_proof_bundle/governance/revocations.json +1 -0
  101. package/conformance/v1/bundles/closepack/strict-fail-evidence-index-mismatch/payload/invoice_bundle/payload/job_proof_bundle/governance/tenant/events/events.jsonl +0 -0
  102. package/conformance/v1/bundles/closepack/strict-fail-evidence-index-mismatch/payload/invoice_bundle/payload/job_proof_bundle/governance/tenant/events/payload_material.jsonl +0 -0
  103. package/conformance/v1/bundles/closepack/strict-fail-evidence-index-mismatch/payload/invoice_bundle/payload/job_proof_bundle/governance/tenant/snapshot.json +1 -0
  104. package/conformance/v1/bundles/closepack/strict-fail-evidence-index-mismatch/payload/invoice_bundle/payload/job_proof_bundle/job/snapshot.json +1 -0
  105. package/conformance/v1/bundles/closepack/strict-fail-evidence-index-mismatch/payload/invoice_bundle/payload/job_proof_bundle/keys/public_keys.json +1 -0
  106. package/conformance/v1/bundles/closepack/strict-fail-evidence-index-mismatch/payload/invoice_bundle/payload/job_proof_bundle/manifest.json +1 -0
  107. package/conformance/v1/bundles/closepack/strict-fail-evidence-index-mismatch/payload/invoice_bundle/payload/job_proof_bundle/verify/report.json +1 -0
  108. package/conformance/v1/bundles/closepack/strict-fail-evidence-index-mismatch/payload/invoice_bundle/payload/job_proof_bundle/verify/verification_report.json +1 -0
  109. package/conformance/v1/bundles/closepack/strict-fail-evidence-index-mismatch/payload/invoice_bundle/pricing/pricing_matrix.json +1 -0
  110. package/conformance/v1/bundles/closepack/strict-fail-evidence-index-mismatch/payload/invoice_bundle/pricing/pricing_matrix_signatures.json +1 -0
  111. package/conformance/v1/bundles/closepack/strict-fail-evidence-index-mismatch/payload/invoice_bundle/settld.json +1 -0
  112. package/conformance/v1/bundles/closepack/strict-fail-evidence-index-mismatch/payload/invoice_bundle/verify/verification_report.json +1 -0
  113. package/conformance/v1/bundles/closepack/strict-fail-evidence-index-mismatch/settld.json +1 -0
  114. package/conformance/v1/bundles/closepack/strict-fail-evidence-index-mismatch/sla/sla_definition.json +1 -0
  115. package/conformance/v1/bundles/closepack/strict-fail-evidence-index-mismatch/sla/sla_evaluation.json +1 -0
  116. package/conformance/v1/bundles/closepack/strict-fail-evidence-index-mismatch/verify/verification_report.json +1 -0
  117. package/conformance/v1/bundles/closepack/strict-pass/acceptance/acceptance_criteria.json +1 -0
  118. package/conformance/v1/bundles/closepack/strict-pass/acceptance/acceptance_evaluation.json +1 -0
  119. package/conformance/v1/bundles/closepack/strict-pass/attestation/bundle_head_attestation.json +1 -0
  120. package/conformance/v1/bundles/closepack/strict-pass/evidence/evidence_index.json +1 -0
  121. package/conformance/v1/bundles/closepack/strict-pass/governance/policy.json +1 -0
  122. package/conformance/v1/bundles/closepack/strict-pass/governance/revocations.json +1 -0
  123. package/conformance/v1/bundles/closepack/strict-pass/manifest.json +1 -0
  124. package/conformance/v1/bundles/closepack/strict-pass/payload/invoice_bundle/attestation/bundle_head_attestation.json +1 -0
  125. package/conformance/v1/bundles/closepack/strict-pass/payload/invoice_bundle/governance/policy.json +1 -0
  126. package/conformance/v1/bundles/closepack/strict-pass/payload/invoice_bundle/governance/revocations.json +1 -0
  127. package/conformance/v1/bundles/closepack/strict-pass/payload/invoice_bundle/invoice/invoice_claim.json +1 -0
  128. package/conformance/v1/bundles/closepack/strict-pass/payload/invoice_bundle/manifest.json +1 -0
  129. package/conformance/v1/bundles/closepack/strict-pass/payload/invoice_bundle/metering/metering_report.json +1 -0
  130. package/conformance/v1/bundles/closepack/strict-pass/payload/invoice_bundle/payload/job_proof_bundle/attestation/bundle_head_attestation.json +1 -0
  131. package/conformance/v1/bundles/closepack/strict-pass/payload/invoice_bundle/payload/job_proof_bundle/events/events.jsonl +1 -0
  132. package/conformance/v1/bundles/closepack/strict-pass/payload/invoice_bundle/payload/job_proof_bundle/events/payload_material.jsonl +1 -0
  133. package/conformance/v1/bundles/closepack/strict-pass/payload/invoice_bundle/payload/job_proof_bundle/governance/global/events/events.jsonl +1 -0
  134. package/conformance/v1/bundles/closepack/strict-pass/payload/invoice_bundle/payload/job_proof_bundle/governance/global/events/payload_material.jsonl +1 -0
  135. package/conformance/v1/bundles/closepack/strict-pass/payload/invoice_bundle/payload/job_proof_bundle/governance/global/snapshot.json +1 -0
  136. package/conformance/v1/bundles/closepack/strict-pass/payload/invoice_bundle/payload/job_proof_bundle/governance/policy.json +1 -0
  137. package/conformance/v1/bundles/closepack/strict-pass/payload/invoice_bundle/payload/job_proof_bundle/governance/revocations.json +1 -0
  138. package/conformance/v1/bundles/closepack/strict-pass/payload/invoice_bundle/payload/job_proof_bundle/governance/tenant/events/events.jsonl +0 -0
  139. package/conformance/v1/bundles/closepack/strict-pass/payload/invoice_bundle/payload/job_proof_bundle/governance/tenant/events/payload_material.jsonl +0 -0
  140. package/conformance/v1/bundles/closepack/strict-pass/payload/invoice_bundle/payload/job_proof_bundle/governance/tenant/snapshot.json +1 -0
  141. package/conformance/v1/bundles/closepack/strict-pass/payload/invoice_bundle/payload/job_proof_bundle/job/snapshot.json +1 -0
  142. package/conformance/v1/bundles/closepack/strict-pass/payload/invoice_bundle/payload/job_proof_bundle/keys/public_keys.json +1 -0
  143. package/conformance/v1/bundles/closepack/strict-pass/payload/invoice_bundle/payload/job_proof_bundle/manifest.json +1 -0
  144. package/conformance/v1/bundles/closepack/strict-pass/payload/invoice_bundle/payload/job_proof_bundle/verify/report.json +1 -0
  145. package/conformance/v1/bundles/closepack/strict-pass/payload/invoice_bundle/payload/job_proof_bundle/verify/verification_report.json +1 -0
  146. package/conformance/v1/bundles/closepack/strict-pass/payload/invoice_bundle/pricing/pricing_matrix.json +1 -0
  147. package/conformance/v1/bundles/closepack/strict-pass/payload/invoice_bundle/pricing/pricing_matrix_signatures.json +1 -0
  148. package/conformance/v1/bundles/closepack/strict-pass/payload/invoice_bundle/settld.json +1 -0
  149. package/conformance/v1/bundles/closepack/strict-pass/payload/invoice_bundle/verify/verification_report.json +1 -0
  150. package/conformance/v1/bundles/closepack/strict-pass/settld.json +1 -0
  151. package/conformance/v1/bundles/closepack/strict-pass/sla/sla_definition.json +1 -0
  152. package/conformance/v1/bundles/closepack/strict-pass/sla/sla_evaluation.json +1 -0
  153. package/conformance/v1/bundles/closepack/strict-pass/verify/verification_report.json +1 -0
  154. package/conformance/v1/bundles/financepack/pass-with-tool-version-unknown-warning/attestation/bundle_head_attestation.json +1 -0
  155. package/conformance/v1/bundles/financepack/pass-with-tool-version-unknown-warning/finance/GLBatch.v1.json +1 -0
  156. package/conformance/v1/bundles/financepack/pass-with-tool-version-unknown-warning/finance/JournalCsv.v1.csv +2 -0
  157. package/conformance/v1/bundles/financepack/pass-with-tool-version-unknown-warning/finance/JournalCsv.v1.json +1 -0
  158. package/conformance/v1/bundles/financepack/pass-with-tool-version-unknown-warning/finance/reconcile.json +1 -0
  159. package/conformance/v1/bundles/financepack/pass-with-tool-version-unknown-warning/governance/policy.json +1 -0
  160. package/conformance/v1/bundles/financepack/pass-with-tool-version-unknown-warning/governance/revocations.json +1 -0
  161. package/conformance/v1/bundles/financepack/pass-with-tool-version-unknown-warning/manifest.json +1 -0
  162. package/conformance/v1/bundles/financepack/pass-with-tool-version-unknown-warning/month/attestation/bundle_head_attestation.json +1 -0
  163. package/conformance/v1/bundles/financepack/pass-with-tool-version-unknown-warning/month/events/events.jsonl +1 -0
  164. package/conformance/v1/bundles/financepack/pass-with-tool-version-unknown-warning/month/events/payload_material.jsonl +1 -0
  165. package/conformance/v1/bundles/financepack/pass-with-tool-version-unknown-warning/month/governance/global/events/events.jsonl +1 -0
  166. package/conformance/v1/bundles/financepack/pass-with-tool-version-unknown-warning/month/governance/global/events/payload_material.jsonl +1 -0
  167. package/conformance/v1/bundles/financepack/pass-with-tool-version-unknown-warning/month/governance/global/snapshot.json +1 -0
  168. package/conformance/v1/bundles/financepack/pass-with-tool-version-unknown-warning/month/governance/policy.json +1 -0
  169. package/conformance/v1/bundles/financepack/pass-with-tool-version-unknown-warning/month/governance/revocations.json +1 -0
  170. package/conformance/v1/bundles/financepack/pass-with-tool-version-unknown-warning/month/governance/tenant/events/events.jsonl +0 -0
  171. package/conformance/v1/bundles/financepack/pass-with-tool-version-unknown-warning/month/governance/tenant/events/payload_material.jsonl +0 -0
  172. package/conformance/v1/bundles/financepack/pass-with-tool-version-unknown-warning/month/governance/tenant/snapshot.json +1 -0
  173. package/conformance/v1/bundles/financepack/pass-with-tool-version-unknown-warning/month/keys/public_keys.json +1 -0
  174. package/conformance/v1/bundles/financepack/pass-with-tool-version-unknown-warning/month/manifest.json +1 -0
  175. package/conformance/v1/bundles/financepack/pass-with-tool-version-unknown-warning/month/verify/report.json +1 -0
  176. package/conformance/v1/bundles/financepack/pass-with-tool-version-unknown-warning/month/verify/verification_report.json +1 -0
  177. package/conformance/v1/bundles/financepack/pass-with-tool-version-unknown-warning/settld.json +1 -0
  178. package/conformance/v1/bundles/financepack/pass-with-tool-version-unknown-warning/verify/verification_report.json +1 -0
  179. package/conformance/v1/bundles/financepack/strict-fail-manifest-tamper/attestation/bundle_head_attestation.json +1 -0
  180. package/conformance/v1/bundles/financepack/strict-fail-manifest-tamper/finance/GLBatch.v1.json +1 -0
  181. package/conformance/v1/bundles/financepack/strict-fail-manifest-tamper/finance/JournalCsv.v1.csv +2 -0
  182. package/conformance/v1/bundles/financepack/strict-fail-manifest-tamper/finance/JournalCsv.v1.json +1 -0
  183. package/conformance/v1/bundles/financepack/strict-fail-manifest-tamper/finance/reconcile.json +2 -0
  184. package/conformance/v1/bundles/financepack/strict-fail-manifest-tamper/governance/policy.json +1 -0
  185. package/conformance/v1/bundles/financepack/strict-fail-manifest-tamper/governance/revocations.json +1 -0
  186. package/conformance/v1/bundles/financepack/strict-fail-manifest-tamper/manifest.json +1 -0
  187. package/conformance/v1/bundles/financepack/strict-fail-manifest-tamper/month/attestation/bundle_head_attestation.json +1 -0
  188. package/conformance/v1/bundles/financepack/strict-fail-manifest-tamper/month/events/events.jsonl +1 -0
  189. package/conformance/v1/bundles/financepack/strict-fail-manifest-tamper/month/events/payload_material.jsonl +1 -0
  190. package/conformance/v1/bundles/financepack/strict-fail-manifest-tamper/month/governance/global/events/events.jsonl +1 -0
  191. package/conformance/v1/bundles/financepack/strict-fail-manifest-tamper/month/governance/global/events/payload_material.jsonl +1 -0
  192. package/conformance/v1/bundles/financepack/strict-fail-manifest-tamper/month/governance/global/snapshot.json +1 -0
  193. package/conformance/v1/bundles/financepack/strict-fail-manifest-tamper/month/governance/policy.json +1 -0
  194. package/conformance/v1/bundles/financepack/strict-fail-manifest-tamper/month/governance/revocations.json +1 -0
  195. package/conformance/v1/bundles/financepack/strict-fail-manifest-tamper/month/governance/tenant/events/events.jsonl +0 -0
  196. package/conformance/v1/bundles/financepack/strict-fail-manifest-tamper/month/governance/tenant/events/payload_material.jsonl +0 -0
  197. package/conformance/v1/bundles/financepack/strict-fail-manifest-tamper/month/governance/tenant/snapshot.json +1 -0
  198. package/conformance/v1/bundles/financepack/strict-fail-manifest-tamper/month/keys/public_keys.json +1 -0
  199. package/conformance/v1/bundles/financepack/strict-fail-manifest-tamper/month/manifest.json +1 -0
  200. package/conformance/v1/bundles/financepack/strict-fail-manifest-tamper/month/verify/report.json +1 -0
  201. package/conformance/v1/bundles/financepack/strict-fail-manifest-tamper/month/verify/verification_report.json +1 -0
  202. package/conformance/v1/bundles/financepack/strict-fail-manifest-tamper/settld.json +1 -0
  203. package/conformance/v1/bundles/financepack/strict-fail-manifest-tamper/verify/verification_report.json +1 -0
  204. package/conformance/v1/bundles/financepack/strict-fail-missing-verification-report/attestation/bundle_head_attestation.json +1 -0
  205. package/conformance/v1/bundles/financepack/strict-fail-missing-verification-report/finance/GLBatch.v1.json +1 -0
  206. package/conformance/v1/bundles/financepack/strict-fail-missing-verification-report/finance/JournalCsv.v1.csv +2 -0
  207. package/conformance/v1/bundles/financepack/strict-fail-missing-verification-report/finance/JournalCsv.v1.json +1 -0
  208. package/conformance/v1/bundles/financepack/strict-fail-missing-verification-report/finance/reconcile.json +1 -0
  209. package/conformance/v1/bundles/financepack/strict-fail-missing-verification-report/governance/policy.json +1 -0
  210. package/conformance/v1/bundles/financepack/strict-fail-missing-verification-report/governance/revocations.json +1 -0
  211. package/conformance/v1/bundles/financepack/strict-fail-missing-verification-report/manifest.json +1 -0
  212. package/conformance/v1/bundles/financepack/strict-fail-missing-verification-report/month/attestation/bundle_head_attestation.json +1 -0
  213. package/conformance/v1/bundles/financepack/strict-fail-missing-verification-report/month/events/events.jsonl +1 -0
  214. package/conformance/v1/bundles/financepack/strict-fail-missing-verification-report/month/events/payload_material.jsonl +1 -0
  215. package/conformance/v1/bundles/financepack/strict-fail-missing-verification-report/month/governance/global/events/events.jsonl +1 -0
  216. package/conformance/v1/bundles/financepack/strict-fail-missing-verification-report/month/governance/global/events/payload_material.jsonl +1 -0
  217. package/conformance/v1/bundles/financepack/strict-fail-missing-verification-report/month/governance/global/snapshot.json +1 -0
  218. package/conformance/v1/bundles/financepack/strict-fail-missing-verification-report/month/governance/policy.json +1 -0
  219. package/conformance/v1/bundles/financepack/strict-fail-missing-verification-report/month/governance/revocations.json +1 -0
  220. package/conformance/v1/bundles/financepack/strict-fail-missing-verification-report/month/governance/tenant/events/events.jsonl +0 -0
  221. package/conformance/v1/bundles/financepack/strict-fail-missing-verification-report/month/governance/tenant/events/payload_material.jsonl +0 -0
  222. package/conformance/v1/bundles/financepack/strict-fail-missing-verification-report/month/governance/tenant/snapshot.json +1 -0
  223. package/conformance/v1/bundles/financepack/strict-fail-missing-verification-report/month/keys/public_keys.json +1 -0
  224. package/conformance/v1/bundles/financepack/strict-fail-missing-verification-report/month/manifest.json +1 -0
  225. package/conformance/v1/bundles/financepack/strict-fail-missing-verification-report/month/verify/report.json +1 -0
  226. package/conformance/v1/bundles/financepack/strict-fail-missing-verification-report/month/verify/verification_report.json +1 -0
  227. package/conformance/v1/bundles/financepack/strict-fail-missing-verification-report/settld.json +1 -0
  228. package/conformance/v1/bundles/financepack/strict-pass/attestation/bundle_head_attestation.json +1 -0
  229. package/conformance/v1/bundles/financepack/strict-pass/finance/GLBatch.v1.json +1 -0
  230. package/conformance/v1/bundles/financepack/strict-pass/finance/JournalCsv.v1.csv +2 -0
  231. package/conformance/v1/bundles/financepack/strict-pass/finance/JournalCsv.v1.json +1 -0
  232. package/conformance/v1/bundles/financepack/strict-pass/finance/reconcile.json +1 -0
  233. package/conformance/v1/bundles/financepack/strict-pass/governance/policy.json +1 -0
  234. package/conformance/v1/bundles/financepack/strict-pass/governance/revocations.json +1 -0
  235. package/conformance/v1/bundles/financepack/strict-pass/manifest.json +1 -0
  236. package/conformance/v1/bundles/financepack/strict-pass/month/attestation/bundle_head_attestation.json +1 -0
  237. package/conformance/v1/bundles/financepack/strict-pass/month/events/events.jsonl +1 -0
  238. package/conformance/v1/bundles/financepack/strict-pass/month/events/payload_material.jsonl +1 -0
  239. package/conformance/v1/bundles/financepack/strict-pass/month/governance/global/events/events.jsonl +1 -0
  240. package/conformance/v1/bundles/financepack/strict-pass/month/governance/global/events/payload_material.jsonl +1 -0
  241. package/conformance/v1/bundles/financepack/strict-pass/month/governance/global/snapshot.json +1 -0
  242. package/conformance/v1/bundles/financepack/strict-pass/month/governance/policy.json +1 -0
  243. package/conformance/v1/bundles/financepack/strict-pass/month/governance/revocations.json +1 -0
  244. package/conformance/v1/bundles/financepack/strict-pass/month/governance/tenant/events/events.jsonl +0 -0
  245. package/conformance/v1/bundles/financepack/strict-pass/month/governance/tenant/events/payload_material.jsonl +0 -0
  246. package/conformance/v1/bundles/financepack/strict-pass/month/governance/tenant/snapshot.json +1 -0
  247. package/conformance/v1/bundles/financepack/strict-pass/month/keys/public_keys.json +1 -0
  248. package/conformance/v1/bundles/financepack/strict-pass/month/manifest.json +1 -0
  249. package/conformance/v1/bundles/financepack/strict-pass/month/verify/report.json +1 -0
  250. package/conformance/v1/bundles/financepack/strict-pass/month/verify/verification_report.json +1 -0
  251. package/conformance/v1/bundles/financepack/strict-pass/settld.json +1 -0
  252. package/conformance/v1/bundles/financepack/strict-pass/verify/verification_report.json +1 -0
  253. package/conformance/v1/bundles/invoicebundle/nonstrict-pass-missing-verification-report/attestation/bundle_head_attestation.json +1 -0
  254. package/conformance/v1/bundles/invoicebundle/nonstrict-pass-missing-verification-report/governance/policy.json +1 -0
  255. package/conformance/v1/bundles/invoicebundle/nonstrict-pass-missing-verification-report/governance/revocations.json +1 -0
  256. package/conformance/v1/bundles/invoicebundle/nonstrict-pass-missing-verification-report/invoice/invoice_claim.json +1 -0
  257. package/conformance/v1/bundles/invoicebundle/nonstrict-pass-missing-verification-report/manifest.json +1 -0
  258. package/conformance/v1/bundles/invoicebundle/nonstrict-pass-missing-verification-report/metering/metering_report.json +1 -0
  259. package/conformance/v1/bundles/invoicebundle/nonstrict-pass-missing-verification-report/payload/job_proof_bundle/attestation/bundle_head_attestation.json +1 -0
  260. package/conformance/v1/bundles/invoicebundle/nonstrict-pass-missing-verification-report/payload/job_proof_bundle/events/events.jsonl +1 -0
  261. package/conformance/v1/bundles/invoicebundle/nonstrict-pass-missing-verification-report/payload/job_proof_bundle/events/payload_material.jsonl +1 -0
  262. package/conformance/v1/bundles/invoicebundle/nonstrict-pass-missing-verification-report/payload/job_proof_bundle/governance/global/events/events.jsonl +1 -0
  263. package/conformance/v1/bundles/invoicebundle/nonstrict-pass-missing-verification-report/payload/job_proof_bundle/governance/global/events/payload_material.jsonl +1 -0
  264. package/conformance/v1/bundles/invoicebundle/nonstrict-pass-missing-verification-report/payload/job_proof_bundle/governance/global/snapshot.json +1 -0
  265. package/conformance/v1/bundles/invoicebundle/nonstrict-pass-missing-verification-report/payload/job_proof_bundle/governance/policy.json +1 -0
  266. package/conformance/v1/bundles/invoicebundle/nonstrict-pass-missing-verification-report/payload/job_proof_bundle/governance/revocations.json +1 -0
  267. package/conformance/v1/bundles/invoicebundle/nonstrict-pass-missing-verification-report/payload/job_proof_bundle/governance/tenant/events/events.jsonl +0 -0
  268. package/conformance/v1/bundles/invoicebundle/nonstrict-pass-missing-verification-report/payload/job_proof_bundle/governance/tenant/events/payload_material.jsonl +0 -0
  269. package/conformance/v1/bundles/invoicebundle/nonstrict-pass-missing-verification-report/payload/job_proof_bundle/governance/tenant/snapshot.json +1 -0
  270. package/conformance/v1/bundles/invoicebundle/nonstrict-pass-missing-verification-report/payload/job_proof_bundle/job/snapshot.json +1 -0
  271. package/conformance/v1/bundles/invoicebundle/nonstrict-pass-missing-verification-report/payload/job_proof_bundle/keys/public_keys.json +1 -0
  272. package/conformance/v1/bundles/invoicebundle/nonstrict-pass-missing-verification-report/payload/job_proof_bundle/manifest.json +1 -0
  273. package/conformance/v1/bundles/invoicebundle/nonstrict-pass-missing-verification-report/payload/job_proof_bundle/verify/report.json +1 -0
  274. package/conformance/v1/bundles/invoicebundle/nonstrict-pass-missing-verification-report/payload/job_proof_bundle/verify/verification_report.json +1 -0
  275. package/conformance/v1/bundles/invoicebundle/nonstrict-pass-missing-verification-report/pricing/pricing_matrix.json +1 -0
  276. package/conformance/v1/bundles/invoicebundle/nonstrict-pass-missing-verification-report/pricing/pricing_matrix_signatures.json +1 -0
  277. package/conformance/v1/bundles/invoicebundle/nonstrict-pass-missing-verification-report/settld.json +1 -0
  278. package/conformance/v1/bundles/invoicebundle/nonstrict-pass-unsigned-pricing-matrix-warning/attestation/bundle_head_attestation.json +1 -0
  279. package/conformance/v1/bundles/invoicebundle/nonstrict-pass-unsigned-pricing-matrix-warning/governance/policy.json +1 -0
  280. package/conformance/v1/bundles/invoicebundle/nonstrict-pass-unsigned-pricing-matrix-warning/governance/revocations.json +1 -0
  281. package/conformance/v1/bundles/invoicebundle/nonstrict-pass-unsigned-pricing-matrix-warning/invoice/invoice_claim.json +1 -0
  282. package/conformance/v1/bundles/invoicebundle/nonstrict-pass-unsigned-pricing-matrix-warning/manifest.json +1 -0
  283. package/conformance/v1/bundles/invoicebundle/nonstrict-pass-unsigned-pricing-matrix-warning/metering/metering_report.json +1 -0
  284. package/conformance/v1/bundles/invoicebundle/nonstrict-pass-unsigned-pricing-matrix-warning/payload/job_proof_bundle/attestation/bundle_head_attestation.json +1 -0
  285. package/conformance/v1/bundles/invoicebundle/nonstrict-pass-unsigned-pricing-matrix-warning/payload/job_proof_bundle/events/events.jsonl +1 -0
  286. package/conformance/v1/bundles/invoicebundle/nonstrict-pass-unsigned-pricing-matrix-warning/payload/job_proof_bundle/events/payload_material.jsonl +1 -0
  287. package/conformance/v1/bundles/invoicebundle/nonstrict-pass-unsigned-pricing-matrix-warning/payload/job_proof_bundle/governance/global/events/events.jsonl +1 -0
  288. package/conformance/v1/bundles/invoicebundle/nonstrict-pass-unsigned-pricing-matrix-warning/payload/job_proof_bundle/governance/global/events/payload_material.jsonl +1 -0
  289. package/conformance/v1/bundles/invoicebundle/nonstrict-pass-unsigned-pricing-matrix-warning/payload/job_proof_bundle/governance/global/snapshot.json +1 -0
  290. package/conformance/v1/bundles/invoicebundle/nonstrict-pass-unsigned-pricing-matrix-warning/payload/job_proof_bundle/governance/policy.json +1 -0
  291. package/conformance/v1/bundles/invoicebundle/nonstrict-pass-unsigned-pricing-matrix-warning/payload/job_proof_bundle/governance/revocations.json +1 -0
  292. package/conformance/v1/bundles/invoicebundle/nonstrict-pass-unsigned-pricing-matrix-warning/payload/job_proof_bundle/governance/tenant/events/events.jsonl +0 -0
  293. package/conformance/v1/bundles/invoicebundle/nonstrict-pass-unsigned-pricing-matrix-warning/payload/job_proof_bundle/governance/tenant/events/payload_material.jsonl +0 -0
  294. package/conformance/v1/bundles/invoicebundle/nonstrict-pass-unsigned-pricing-matrix-warning/payload/job_proof_bundle/governance/tenant/snapshot.json +1 -0
  295. package/conformance/v1/bundles/invoicebundle/nonstrict-pass-unsigned-pricing-matrix-warning/payload/job_proof_bundle/job/snapshot.json +1 -0
  296. package/conformance/v1/bundles/invoicebundle/nonstrict-pass-unsigned-pricing-matrix-warning/payload/job_proof_bundle/keys/public_keys.json +1 -0
  297. package/conformance/v1/bundles/invoicebundle/nonstrict-pass-unsigned-pricing-matrix-warning/payload/job_proof_bundle/manifest.json +1 -0
  298. package/conformance/v1/bundles/invoicebundle/nonstrict-pass-unsigned-pricing-matrix-warning/payload/job_proof_bundle/verify/report.json +1 -0
  299. package/conformance/v1/bundles/invoicebundle/nonstrict-pass-unsigned-pricing-matrix-warning/payload/job_proof_bundle/verify/verification_report.json +1 -0
  300. package/conformance/v1/bundles/invoicebundle/nonstrict-pass-unsigned-pricing-matrix-warning/pricing/pricing_matrix.json +1 -0
  301. package/conformance/v1/bundles/invoicebundle/nonstrict-pass-unsigned-pricing-matrix-warning/settld.json +1 -0
  302. package/conformance/v1/bundles/invoicebundle/nonstrict-pass-unsigned-pricing-matrix-warning/verify/verification_report.json +1 -0
  303. package/conformance/v1/bundles/invoicebundle/strict-fail-evidence-sha-mismatch/attestation/bundle_head_attestation.json +1 -0
  304. package/conformance/v1/bundles/invoicebundle/strict-fail-evidence-sha-mismatch/governance/policy.json +1 -0
  305. package/conformance/v1/bundles/invoicebundle/strict-fail-evidence-sha-mismatch/governance/revocations.json +1 -0
  306. package/conformance/v1/bundles/invoicebundle/strict-fail-evidence-sha-mismatch/invoice/invoice_claim.json +1 -0
  307. package/conformance/v1/bundles/invoicebundle/strict-fail-evidence-sha-mismatch/manifest.json +1 -0
  308. package/conformance/v1/bundles/invoicebundle/strict-fail-evidence-sha-mismatch/metering/metering_report.json +1 -0
  309. package/conformance/v1/bundles/invoicebundle/strict-fail-evidence-sha-mismatch/payload/job_proof_bundle/attestation/bundle_head_attestation.json +1 -0
  310. package/conformance/v1/bundles/invoicebundle/strict-fail-evidence-sha-mismatch/payload/job_proof_bundle/events/events.jsonl +1 -0
  311. package/conformance/v1/bundles/invoicebundle/strict-fail-evidence-sha-mismatch/payload/job_proof_bundle/events/payload_material.jsonl +1 -0
  312. package/conformance/v1/bundles/invoicebundle/strict-fail-evidence-sha-mismatch/payload/job_proof_bundle/governance/global/events/events.jsonl +1 -0
  313. package/conformance/v1/bundles/invoicebundle/strict-fail-evidence-sha-mismatch/payload/job_proof_bundle/governance/global/events/payload_material.jsonl +1 -0
  314. package/conformance/v1/bundles/invoicebundle/strict-fail-evidence-sha-mismatch/payload/job_proof_bundle/governance/global/snapshot.json +1 -0
  315. package/conformance/v1/bundles/invoicebundle/strict-fail-evidence-sha-mismatch/payload/job_proof_bundle/governance/policy.json +1 -0
  316. package/conformance/v1/bundles/invoicebundle/strict-fail-evidence-sha-mismatch/payload/job_proof_bundle/governance/revocations.json +1 -0
  317. package/conformance/v1/bundles/invoicebundle/strict-fail-evidence-sha-mismatch/payload/job_proof_bundle/governance/tenant/events/events.jsonl +0 -0
  318. package/conformance/v1/bundles/invoicebundle/strict-fail-evidence-sha-mismatch/payload/job_proof_bundle/governance/tenant/events/payload_material.jsonl +0 -0
  319. package/conformance/v1/bundles/invoicebundle/strict-fail-evidence-sha-mismatch/payload/job_proof_bundle/governance/tenant/snapshot.json +1 -0
  320. package/conformance/v1/bundles/invoicebundle/strict-fail-evidence-sha-mismatch/payload/job_proof_bundle/job/snapshot.json +1 -0
  321. package/conformance/v1/bundles/invoicebundle/strict-fail-evidence-sha-mismatch/payload/job_proof_bundle/keys/public_keys.json +1 -0
  322. package/conformance/v1/bundles/invoicebundle/strict-fail-evidence-sha-mismatch/payload/job_proof_bundle/manifest.json +1 -0
  323. package/conformance/v1/bundles/invoicebundle/strict-fail-evidence-sha-mismatch/payload/job_proof_bundle/verify/report.json +1 -0
  324. package/conformance/v1/bundles/invoicebundle/strict-fail-evidence-sha-mismatch/payload/job_proof_bundle/verify/verification_report.json +1 -0
  325. package/conformance/v1/bundles/invoicebundle/strict-fail-evidence-sha-mismatch/pricing/pricing_matrix.json +1 -0
  326. package/conformance/v1/bundles/invoicebundle/strict-fail-evidence-sha-mismatch/pricing/pricing_matrix_signatures.json +1 -0
  327. package/conformance/v1/bundles/invoicebundle/strict-fail-evidence-sha-mismatch/settld.json +1 -0
  328. package/conformance/v1/bundles/invoicebundle/strict-fail-evidence-sha-mismatch/verify/verification_report.json +1 -0
  329. package/conformance/v1/bundles/invoicebundle/strict-fail-invalid-pricing-matrix-signature/attestation/bundle_head_attestation.json +1 -0
  330. package/conformance/v1/bundles/invoicebundle/strict-fail-invalid-pricing-matrix-signature/governance/policy.json +1 -0
  331. package/conformance/v1/bundles/invoicebundle/strict-fail-invalid-pricing-matrix-signature/governance/revocations.json +1 -0
  332. package/conformance/v1/bundles/invoicebundle/strict-fail-invalid-pricing-matrix-signature/invoice/invoice_claim.json +1 -0
  333. package/conformance/v1/bundles/invoicebundle/strict-fail-invalid-pricing-matrix-signature/manifest.json +1 -0
  334. package/conformance/v1/bundles/invoicebundle/strict-fail-invalid-pricing-matrix-signature/metering/metering_report.json +1 -0
  335. package/conformance/v1/bundles/invoicebundle/strict-fail-invalid-pricing-matrix-signature/payload/job_proof_bundle/attestation/bundle_head_attestation.json +1 -0
  336. package/conformance/v1/bundles/invoicebundle/strict-fail-invalid-pricing-matrix-signature/payload/job_proof_bundle/events/events.jsonl +1 -0
  337. package/conformance/v1/bundles/invoicebundle/strict-fail-invalid-pricing-matrix-signature/payload/job_proof_bundle/events/payload_material.jsonl +1 -0
  338. package/conformance/v1/bundles/invoicebundle/strict-fail-invalid-pricing-matrix-signature/payload/job_proof_bundle/governance/global/events/events.jsonl +1 -0
  339. package/conformance/v1/bundles/invoicebundle/strict-fail-invalid-pricing-matrix-signature/payload/job_proof_bundle/governance/global/events/payload_material.jsonl +1 -0
  340. package/conformance/v1/bundles/invoicebundle/strict-fail-invalid-pricing-matrix-signature/payload/job_proof_bundle/governance/global/snapshot.json +1 -0
  341. package/conformance/v1/bundles/invoicebundle/strict-fail-invalid-pricing-matrix-signature/payload/job_proof_bundle/governance/policy.json +1 -0
  342. package/conformance/v1/bundles/invoicebundle/strict-fail-invalid-pricing-matrix-signature/payload/job_proof_bundle/governance/revocations.json +1 -0
  343. package/conformance/v1/bundles/invoicebundle/strict-fail-invalid-pricing-matrix-signature/payload/job_proof_bundle/governance/tenant/events/events.jsonl +0 -0
  344. package/conformance/v1/bundles/invoicebundle/strict-fail-invalid-pricing-matrix-signature/payload/job_proof_bundle/governance/tenant/events/payload_material.jsonl +0 -0
  345. package/conformance/v1/bundles/invoicebundle/strict-fail-invalid-pricing-matrix-signature/payload/job_proof_bundle/governance/tenant/snapshot.json +1 -0
  346. package/conformance/v1/bundles/invoicebundle/strict-fail-invalid-pricing-matrix-signature/payload/job_proof_bundle/job/snapshot.json +1 -0
  347. package/conformance/v1/bundles/invoicebundle/strict-fail-invalid-pricing-matrix-signature/payload/job_proof_bundle/keys/public_keys.json +1 -0
  348. package/conformance/v1/bundles/invoicebundle/strict-fail-invalid-pricing-matrix-signature/payload/job_proof_bundle/manifest.json +1 -0
  349. package/conformance/v1/bundles/invoicebundle/strict-fail-invalid-pricing-matrix-signature/payload/job_proof_bundle/verify/report.json +1 -0
  350. package/conformance/v1/bundles/invoicebundle/strict-fail-invalid-pricing-matrix-signature/payload/job_proof_bundle/verify/verification_report.json +1 -0
  351. package/conformance/v1/bundles/invoicebundle/strict-fail-invalid-pricing-matrix-signature/pricing/pricing_matrix.json +1 -0
  352. package/conformance/v1/bundles/invoicebundle/strict-fail-invalid-pricing-matrix-signature/pricing/pricing_matrix_signatures.json +1 -0
  353. package/conformance/v1/bundles/invoicebundle/strict-fail-invalid-pricing-matrix-signature/settld.json +1 -0
  354. package/conformance/v1/bundles/invoicebundle/strict-fail-invalid-pricing-matrix-signature/verify/verification_report.json +1 -0
  355. package/conformance/v1/bundles/invoicebundle/strict-fail-invoice-total-mismatch/attestation/bundle_head_attestation.json +1 -0
  356. package/conformance/v1/bundles/invoicebundle/strict-fail-invoice-total-mismatch/governance/policy.json +1 -0
  357. package/conformance/v1/bundles/invoicebundle/strict-fail-invoice-total-mismatch/governance/revocations.json +1 -0
  358. package/conformance/v1/bundles/invoicebundle/strict-fail-invoice-total-mismatch/invoice/invoice_claim.json +1 -0
  359. package/conformance/v1/bundles/invoicebundle/strict-fail-invoice-total-mismatch/manifest.json +1 -0
  360. package/conformance/v1/bundles/invoicebundle/strict-fail-invoice-total-mismatch/metering/metering_report.json +1 -0
  361. package/conformance/v1/bundles/invoicebundle/strict-fail-invoice-total-mismatch/payload/job_proof_bundle/attestation/bundle_head_attestation.json +1 -0
  362. package/conformance/v1/bundles/invoicebundle/strict-fail-invoice-total-mismatch/payload/job_proof_bundle/events/events.jsonl +1 -0
  363. package/conformance/v1/bundles/invoicebundle/strict-fail-invoice-total-mismatch/payload/job_proof_bundle/events/payload_material.jsonl +1 -0
  364. package/conformance/v1/bundles/invoicebundle/strict-fail-invoice-total-mismatch/payload/job_proof_bundle/governance/global/events/events.jsonl +1 -0
  365. package/conformance/v1/bundles/invoicebundle/strict-fail-invoice-total-mismatch/payload/job_proof_bundle/governance/global/events/payload_material.jsonl +1 -0
  366. package/conformance/v1/bundles/invoicebundle/strict-fail-invoice-total-mismatch/payload/job_proof_bundle/governance/global/snapshot.json +1 -0
  367. package/conformance/v1/bundles/invoicebundle/strict-fail-invoice-total-mismatch/payload/job_proof_bundle/governance/policy.json +1 -0
  368. package/conformance/v1/bundles/invoicebundle/strict-fail-invoice-total-mismatch/payload/job_proof_bundle/governance/revocations.json +1 -0
  369. package/conformance/v1/bundles/invoicebundle/strict-fail-invoice-total-mismatch/payload/job_proof_bundle/governance/tenant/events/events.jsonl +0 -0
  370. package/conformance/v1/bundles/invoicebundle/strict-fail-invoice-total-mismatch/payload/job_proof_bundle/governance/tenant/events/payload_material.jsonl +0 -0
  371. package/conformance/v1/bundles/invoicebundle/strict-fail-invoice-total-mismatch/payload/job_proof_bundle/governance/tenant/snapshot.json +1 -0
  372. package/conformance/v1/bundles/invoicebundle/strict-fail-invoice-total-mismatch/payload/job_proof_bundle/job/snapshot.json +1 -0
  373. package/conformance/v1/bundles/invoicebundle/strict-fail-invoice-total-mismatch/payload/job_proof_bundle/keys/public_keys.json +1 -0
  374. package/conformance/v1/bundles/invoicebundle/strict-fail-invoice-total-mismatch/payload/job_proof_bundle/manifest.json +1 -0
  375. package/conformance/v1/bundles/invoicebundle/strict-fail-invoice-total-mismatch/payload/job_proof_bundle/verify/report.json +1 -0
  376. package/conformance/v1/bundles/invoicebundle/strict-fail-invoice-total-mismatch/payload/job_proof_bundle/verify/verification_report.json +1 -0
  377. package/conformance/v1/bundles/invoicebundle/strict-fail-invoice-total-mismatch/pricing/pricing_matrix.json +1 -0
  378. package/conformance/v1/bundles/invoicebundle/strict-fail-invoice-total-mismatch/pricing/pricing_matrix_signatures.json +1 -0
  379. package/conformance/v1/bundles/invoicebundle/strict-fail-invoice-total-mismatch/settld.json +1 -0
  380. package/conformance/v1/bundles/invoicebundle/strict-fail-invoice-total-mismatch/verify/verification_report.json +1 -0
  381. package/conformance/v1/bundles/invoicebundle/strict-fail-missing-pricing-matrix-signature/attestation/bundle_head_attestation.json +1 -0
  382. package/conformance/v1/bundles/invoicebundle/strict-fail-missing-pricing-matrix-signature/governance/policy.json +1 -0
  383. package/conformance/v1/bundles/invoicebundle/strict-fail-missing-pricing-matrix-signature/governance/revocations.json +1 -0
  384. package/conformance/v1/bundles/invoicebundle/strict-fail-missing-pricing-matrix-signature/invoice/invoice_claim.json +1 -0
  385. package/conformance/v1/bundles/invoicebundle/strict-fail-missing-pricing-matrix-signature/manifest.json +1 -0
  386. package/conformance/v1/bundles/invoicebundle/strict-fail-missing-pricing-matrix-signature/metering/metering_report.json +1 -0
  387. package/conformance/v1/bundles/invoicebundle/strict-fail-missing-pricing-matrix-signature/payload/job_proof_bundle/attestation/bundle_head_attestation.json +1 -0
  388. package/conformance/v1/bundles/invoicebundle/strict-fail-missing-pricing-matrix-signature/payload/job_proof_bundle/events/events.jsonl +1 -0
  389. package/conformance/v1/bundles/invoicebundle/strict-fail-missing-pricing-matrix-signature/payload/job_proof_bundle/events/payload_material.jsonl +1 -0
  390. package/conformance/v1/bundles/invoicebundle/strict-fail-missing-pricing-matrix-signature/payload/job_proof_bundle/governance/global/events/events.jsonl +1 -0
  391. package/conformance/v1/bundles/invoicebundle/strict-fail-missing-pricing-matrix-signature/payload/job_proof_bundle/governance/global/events/payload_material.jsonl +1 -0
  392. package/conformance/v1/bundles/invoicebundle/strict-fail-missing-pricing-matrix-signature/payload/job_proof_bundle/governance/global/snapshot.json +1 -0
  393. package/conformance/v1/bundles/invoicebundle/strict-fail-missing-pricing-matrix-signature/payload/job_proof_bundle/governance/policy.json +1 -0
  394. package/conformance/v1/bundles/invoicebundle/strict-fail-missing-pricing-matrix-signature/payload/job_proof_bundle/governance/revocations.json +1 -0
  395. package/conformance/v1/bundles/invoicebundle/strict-fail-missing-pricing-matrix-signature/payload/job_proof_bundle/governance/tenant/events/events.jsonl +0 -0
  396. package/conformance/v1/bundles/invoicebundle/strict-fail-missing-pricing-matrix-signature/payload/job_proof_bundle/governance/tenant/events/payload_material.jsonl +0 -0
  397. package/conformance/v1/bundles/invoicebundle/strict-fail-missing-pricing-matrix-signature/payload/job_proof_bundle/governance/tenant/snapshot.json +1 -0
  398. package/conformance/v1/bundles/invoicebundle/strict-fail-missing-pricing-matrix-signature/payload/job_proof_bundle/job/snapshot.json +1 -0
  399. package/conformance/v1/bundles/invoicebundle/strict-fail-missing-pricing-matrix-signature/payload/job_proof_bundle/keys/public_keys.json +1 -0
  400. package/conformance/v1/bundles/invoicebundle/strict-fail-missing-pricing-matrix-signature/payload/job_proof_bundle/manifest.json +1 -0
  401. package/conformance/v1/bundles/invoicebundle/strict-fail-missing-pricing-matrix-signature/payload/job_proof_bundle/verify/report.json +1 -0
  402. package/conformance/v1/bundles/invoicebundle/strict-fail-missing-pricing-matrix-signature/payload/job_proof_bundle/verify/verification_report.json +1 -0
  403. package/conformance/v1/bundles/invoicebundle/strict-fail-missing-pricing-matrix-signature/pricing/pricing_matrix.json +1 -0
  404. package/conformance/v1/bundles/invoicebundle/strict-fail-missing-pricing-matrix-signature/settld.json +1 -0
  405. package/conformance/v1/bundles/invoicebundle/strict-fail-missing-pricing-matrix-signature/verify/verification_report.json +1 -0
  406. package/conformance/v1/bundles/invoicebundle/strict-fail-missing-verification-report/attestation/bundle_head_attestation.json +1 -0
  407. package/conformance/v1/bundles/invoicebundle/strict-fail-missing-verification-report/governance/policy.json +1 -0
  408. package/conformance/v1/bundles/invoicebundle/strict-fail-missing-verification-report/governance/revocations.json +1 -0
  409. package/conformance/v1/bundles/invoicebundle/strict-fail-missing-verification-report/invoice/invoice_claim.json +1 -0
  410. package/conformance/v1/bundles/invoicebundle/strict-fail-missing-verification-report/manifest.json +1 -0
  411. package/conformance/v1/bundles/invoicebundle/strict-fail-missing-verification-report/metering/metering_report.json +1 -0
  412. package/conformance/v1/bundles/invoicebundle/strict-fail-missing-verification-report/payload/job_proof_bundle/attestation/bundle_head_attestation.json +1 -0
  413. package/conformance/v1/bundles/invoicebundle/strict-fail-missing-verification-report/payload/job_proof_bundle/events/events.jsonl +1 -0
  414. package/conformance/v1/bundles/invoicebundle/strict-fail-missing-verification-report/payload/job_proof_bundle/events/payload_material.jsonl +1 -0
  415. package/conformance/v1/bundles/invoicebundle/strict-fail-missing-verification-report/payload/job_proof_bundle/governance/global/events/events.jsonl +1 -0
  416. package/conformance/v1/bundles/invoicebundle/strict-fail-missing-verification-report/payload/job_proof_bundle/governance/global/events/payload_material.jsonl +1 -0
  417. package/conformance/v1/bundles/invoicebundle/strict-fail-missing-verification-report/payload/job_proof_bundle/governance/global/snapshot.json +1 -0
  418. package/conformance/v1/bundles/invoicebundle/strict-fail-missing-verification-report/payload/job_proof_bundle/governance/policy.json +1 -0
  419. package/conformance/v1/bundles/invoicebundle/strict-fail-missing-verification-report/payload/job_proof_bundle/governance/revocations.json +1 -0
  420. package/conformance/v1/bundles/invoicebundle/strict-fail-missing-verification-report/payload/job_proof_bundle/governance/tenant/events/events.jsonl +0 -0
  421. package/conformance/v1/bundles/invoicebundle/strict-fail-missing-verification-report/payload/job_proof_bundle/governance/tenant/events/payload_material.jsonl +0 -0
  422. package/conformance/v1/bundles/invoicebundle/strict-fail-missing-verification-report/payload/job_proof_bundle/governance/tenant/snapshot.json +1 -0
  423. package/conformance/v1/bundles/invoicebundle/strict-fail-missing-verification-report/payload/job_proof_bundle/job/snapshot.json +1 -0
  424. package/conformance/v1/bundles/invoicebundle/strict-fail-missing-verification-report/payload/job_proof_bundle/keys/public_keys.json +1 -0
  425. package/conformance/v1/bundles/invoicebundle/strict-fail-missing-verification-report/payload/job_proof_bundle/manifest.json +1 -0
  426. package/conformance/v1/bundles/invoicebundle/strict-fail-missing-verification-report/payload/job_proof_bundle/verify/report.json +1 -0
  427. package/conformance/v1/bundles/invoicebundle/strict-fail-missing-verification-report/payload/job_proof_bundle/verify/verification_report.json +1 -0
  428. package/conformance/v1/bundles/invoicebundle/strict-fail-missing-verification-report/pricing/pricing_matrix.json +1 -0
  429. package/conformance/v1/bundles/invoicebundle/strict-fail-missing-verification-report/pricing/pricing_matrix_signatures.json +1 -0
  430. package/conformance/v1/bundles/invoicebundle/strict-fail-missing-verification-report/settld.json +1 -0
  431. package/conformance/v1/bundles/invoicebundle/strict-fail-pricing-code-unknown/attestation/bundle_head_attestation.json +1 -0
  432. package/conformance/v1/bundles/invoicebundle/strict-fail-pricing-code-unknown/governance/policy.json +1 -0
  433. package/conformance/v1/bundles/invoicebundle/strict-fail-pricing-code-unknown/governance/revocations.json +1 -0
  434. package/conformance/v1/bundles/invoicebundle/strict-fail-pricing-code-unknown/invoice/invoice_claim.json +1 -0
  435. package/conformance/v1/bundles/invoicebundle/strict-fail-pricing-code-unknown/manifest.json +1 -0
  436. package/conformance/v1/bundles/invoicebundle/strict-fail-pricing-code-unknown/metering/metering_report.json +1 -0
  437. package/conformance/v1/bundles/invoicebundle/strict-fail-pricing-code-unknown/payload/job_proof_bundle/attestation/bundle_head_attestation.json +1 -0
  438. package/conformance/v1/bundles/invoicebundle/strict-fail-pricing-code-unknown/payload/job_proof_bundle/events/events.jsonl +1 -0
  439. package/conformance/v1/bundles/invoicebundle/strict-fail-pricing-code-unknown/payload/job_proof_bundle/events/payload_material.jsonl +1 -0
  440. package/conformance/v1/bundles/invoicebundle/strict-fail-pricing-code-unknown/payload/job_proof_bundle/governance/global/events/events.jsonl +1 -0
  441. package/conformance/v1/bundles/invoicebundle/strict-fail-pricing-code-unknown/payload/job_proof_bundle/governance/global/events/payload_material.jsonl +1 -0
  442. package/conformance/v1/bundles/invoicebundle/strict-fail-pricing-code-unknown/payload/job_proof_bundle/governance/global/snapshot.json +1 -0
  443. package/conformance/v1/bundles/invoicebundle/strict-fail-pricing-code-unknown/payload/job_proof_bundle/governance/policy.json +1 -0
  444. package/conformance/v1/bundles/invoicebundle/strict-fail-pricing-code-unknown/payload/job_proof_bundle/governance/revocations.json +1 -0
  445. package/conformance/v1/bundles/invoicebundle/strict-fail-pricing-code-unknown/payload/job_proof_bundle/governance/tenant/events/events.jsonl +0 -0
  446. package/conformance/v1/bundles/invoicebundle/strict-fail-pricing-code-unknown/payload/job_proof_bundle/governance/tenant/events/payload_material.jsonl +0 -0
  447. package/conformance/v1/bundles/invoicebundle/strict-fail-pricing-code-unknown/payload/job_proof_bundle/governance/tenant/snapshot.json +1 -0
  448. package/conformance/v1/bundles/invoicebundle/strict-fail-pricing-code-unknown/payload/job_proof_bundle/job/snapshot.json +1 -0
  449. package/conformance/v1/bundles/invoicebundle/strict-fail-pricing-code-unknown/payload/job_proof_bundle/keys/public_keys.json +1 -0
  450. package/conformance/v1/bundles/invoicebundle/strict-fail-pricing-code-unknown/payload/job_proof_bundle/manifest.json +1 -0
  451. package/conformance/v1/bundles/invoicebundle/strict-fail-pricing-code-unknown/payload/job_proof_bundle/verify/report.json +1 -0
  452. package/conformance/v1/bundles/invoicebundle/strict-fail-pricing-code-unknown/payload/job_proof_bundle/verify/verification_report.json +1 -0
  453. package/conformance/v1/bundles/invoicebundle/strict-fail-pricing-code-unknown/pricing/pricing_matrix.json +1 -0
  454. package/conformance/v1/bundles/invoicebundle/strict-fail-pricing-code-unknown/pricing/pricing_matrix_signatures.json +1 -0
  455. package/conformance/v1/bundles/invoicebundle/strict-fail-pricing-code-unknown/settld.json +1 -0
  456. package/conformance/v1/bundles/invoicebundle/strict-fail-pricing-code-unknown/verify/verification_report.json +1 -0
  457. package/conformance/v1/bundles/invoicebundle/strict-pass/attestation/bundle_head_attestation.json +1 -0
  458. package/conformance/v1/bundles/invoicebundle/strict-pass/governance/policy.json +1 -0
  459. package/conformance/v1/bundles/invoicebundle/strict-pass/governance/revocations.json +1 -0
  460. package/conformance/v1/bundles/invoicebundle/strict-pass/invoice/invoice_claim.json +1 -0
  461. package/conformance/v1/bundles/invoicebundle/strict-pass/manifest.json +1 -0
  462. package/conformance/v1/bundles/invoicebundle/strict-pass/metering/metering_report.json +1 -0
  463. package/conformance/v1/bundles/invoicebundle/strict-pass/payload/job_proof_bundle/attestation/bundle_head_attestation.json +1 -0
  464. package/conformance/v1/bundles/invoicebundle/strict-pass/payload/job_proof_bundle/events/events.jsonl +1 -0
  465. package/conformance/v1/bundles/invoicebundle/strict-pass/payload/job_proof_bundle/events/payload_material.jsonl +1 -0
  466. package/conformance/v1/bundles/invoicebundle/strict-pass/payload/job_proof_bundle/governance/global/events/events.jsonl +1 -0
  467. package/conformance/v1/bundles/invoicebundle/strict-pass/payload/job_proof_bundle/governance/global/events/payload_material.jsonl +1 -0
  468. package/conformance/v1/bundles/invoicebundle/strict-pass/payload/job_proof_bundle/governance/global/snapshot.json +1 -0
  469. package/conformance/v1/bundles/invoicebundle/strict-pass/payload/job_proof_bundle/governance/policy.json +1 -0
  470. package/conformance/v1/bundles/invoicebundle/strict-pass/payload/job_proof_bundle/governance/revocations.json +1 -0
  471. package/conformance/v1/bundles/invoicebundle/strict-pass/payload/job_proof_bundle/governance/tenant/events/events.jsonl +0 -0
  472. package/conformance/v1/bundles/invoicebundle/strict-pass/payload/job_proof_bundle/governance/tenant/events/payload_material.jsonl +0 -0
  473. package/conformance/v1/bundles/invoicebundle/strict-pass/payload/job_proof_bundle/governance/tenant/snapshot.json +1 -0
  474. package/conformance/v1/bundles/invoicebundle/strict-pass/payload/job_proof_bundle/job/snapshot.json +1 -0
  475. package/conformance/v1/bundles/invoicebundle/strict-pass/payload/job_proof_bundle/keys/public_keys.json +1 -0
  476. package/conformance/v1/bundles/invoicebundle/strict-pass/payload/job_proof_bundle/manifest.json +1 -0
  477. package/conformance/v1/bundles/invoicebundle/strict-pass/payload/job_proof_bundle/verify/report.json +1 -0
  478. package/conformance/v1/bundles/invoicebundle/strict-pass/payload/job_proof_bundle/verify/verification_report.json +1 -0
  479. package/conformance/v1/bundles/invoicebundle/strict-pass/pricing/pricing_matrix.json +1 -0
  480. package/conformance/v1/bundles/invoicebundle/strict-pass/pricing/pricing_matrix_signatures.json +1 -0
  481. package/conformance/v1/bundles/invoicebundle/strict-pass/settld.json +1 -0
  482. package/conformance/v1/bundles/invoicebundle/strict-pass/verify/verification_report.json +1 -0
  483. package/conformance/v1/bundles/jobproof/nonstrict-pass-missing-verification-report/attestation/bundle_head_attestation.json +1 -0
  484. package/conformance/v1/bundles/jobproof/nonstrict-pass-missing-verification-report/events/events.jsonl +1 -0
  485. package/conformance/v1/bundles/jobproof/nonstrict-pass-missing-verification-report/events/payload_material.jsonl +1 -0
  486. package/conformance/v1/bundles/jobproof/nonstrict-pass-missing-verification-report/governance/global/events/events.jsonl +1 -0
  487. package/conformance/v1/bundles/jobproof/nonstrict-pass-missing-verification-report/governance/global/events/payload_material.jsonl +1 -0
  488. package/conformance/v1/bundles/jobproof/nonstrict-pass-missing-verification-report/governance/global/snapshot.json +1 -0
  489. package/conformance/v1/bundles/jobproof/nonstrict-pass-missing-verification-report/governance/policy.json +1 -0
  490. package/conformance/v1/bundles/jobproof/nonstrict-pass-missing-verification-report/governance/revocations.json +1 -0
  491. package/conformance/v1/bundles/jobproof/nonstrict-pass-missing-verification-report/governance/tenant/events/events.jsonl +0 -0
  492. package/conformance/v1/bundles/jobproof/nonstrict-pass-missing-verification-report/governance/tenant/events/payload_material.jsonl +0 -0
  493. package/conformance/v1/bundles/jobproof/nonstrict-pass-missing-verification-report/governance/tenant/snapshot.json +1 -0
  494. package/conformance/v1/bundles/jobproof/nonstrict-pass-missing-verification-report/job/snapshot.json +1 -0
  495. package/conformance/v1/bundles/jobproof/nonstrict-pass-missing-verification-report/keys/public_keys.json +1 -0
  496. package/conformance/v1/bundles/jobproof/nonstrict-pass-missing-verification-report/manifest.json +1 -0
  497. package/conformance/v1/bundles/jobproof/nonstrict-pass-missing-verification-report/verify/report.json +1 -0
  498. package/conformance/v1/bundles/jobproof/strict-fail-manifest-tamper/attestation/bundle_head_attestation.json +1 -0
  499. package/conformance/v1/bundles/jobproof/strict-fail-manifest-tamper/events/events.jsonl +1 -0
  500. package/conformance/v1/bundles/jobproof/strict-fail-manifest-tamper/events/payload_material.jsonl +1 -0
  501. package/conformance/v1/bundles/jobproof/strict-fail-manifest-tamper/governance/global/events/events.jsonl +1 -0
  502. package/conformance/v1/bundles/jobproof/strict-fail-manifest-tamper/governance/global/events/payload_material.jsonl +1 -0
  503. package/conformance/v1/bundles/jobproof/strict-fail-manifest-tamper/governance/global/snapshot.json +1 -0
  504. package/conformance/v1/bundles/jobproof/strict-fail-manifest-tamper/governance/policy.json +1 -0
  505. package/conformance/v1/bundles/jobproof/strict-fail-manifest-tamper/governance/revocations.json +1 -0
  506. package/conformance/v1/bundles/jobproof/strict-fail-manifest-tamper/governance/tenant/events/events.jsonl +0 -0
  507. package/conformance/v1/bundles/jobproof/strict-fail-manifest-tamper/governance/tenant/events/payload_material.jsonl +0 -0
  508. package/conformance/v1/bundles/jobproof/strict-fail-manifest-tamper/governance/tenant/snapshot.json +1 -0
  509. package/conformance/v1/bundles/jobproof/strict-fail-manifest-tamper/job/snapshot.json +1 -0
  510. package/conformance/v1/bundles/jobproof/strict-fail-manifest-tamper/keys/public_keys.json +1 -0
  511. package/conformance/v1/bundles/jobproof/strict-fail-manifest-tamper/manifest.json +1 -0
  512. package/conformance/v1/bundles/jobproof/strict-fail-manifest-tamper/verify/report.json +1 -0
  513. package/conformance/v1/bundles/jobproof/strict-fail-manifest-tamper/verify/verification_report.json +1 -0
  514. package/conformance/v1/bundles/jobproof/strict-fail-unauthorized-signer/attestation/bundle_head_attestation.json +1 -0
  515. package/conformance/v1/bundles/jobproof/strict-fail-unauthorized-signer/events/events.jsonl +1 -0
  516. package/conformance/v1/bundles/jobproof/strict-fail-unauthorized-signer/events/payload_material.jsonl +1 -0
  517. package/conformance/v1/bundles/jobproof/strict-fail-unauthorized-signer/governance/global/events/events.jsonl +1 -0
  518. package/conformance/v1/bundles/jobproof/strict-fail-unauthorized-signer/governance/global/events/payload_material.jsonl +1 -0
  519. package/conformance/v1/bundles/jobproof/strict-fail-unauthorized-signer/governance/global/snapshot.json +1 -0
  520. package/conformance/v1/bundles/jobproof/strict-fail-unauthorized-signer/governance/policy.json +1 -0
  521. package/conformance/v1/bundles/jobproof/strict-fail-unauthorized-signer/governance/revocations.json +1 -0
  522. package/conformance/v1/bundles/jobproof/strict-fail-unauthorized-signer/governance/tenant/events/events.jsonl +0 -0
  523. package/conformance/v1/bundles/jobproof/strict-fail-unauthorized-signer/governance/tenant/events/payload_material.jsonl +0 -0
  524. package/conformance/v1/bundles/jobproof/strict-fail-unauthorized-signer/governance/tenant/snapshot.json +1 -0
  525. package/conformance/v1/bundles/jobproof/strict-fail-unauthorized-signer/job/snapshot.json +1 -0
  526. package/conformance/v1/bundles/jobproof/strict-fail-unauthorized-signer/keys/public_keys.json +1 -0
  527. package/conformance/v1/bundles/jobproof/strict-fail-unauthorized-signer/manifest.json +1 -0
  528. package/conformance/v1/bundles/jobproof/strict-fail-unauthorized-signer/verify/report.json +1 -0
  529. package/conformance/v1/bundles/jobproof/strict-fail-unauthorized-signer/verify/verification_report.json +1 -0
  530. package/conformance/v1/bundles/jobproof/strict-pass/attestation/bundle_head_attestation.json +1 -0
  531. package/conformance/v1/bundles/jobproof/strict-pass/events/events.jsonl +1 -0
  532. package/conformance/v1/bundles/jobproof/strict-pass/events/payload_material.jsonl +1 -0
  533. package/conformance/v1/bundles/jobproof/strict-pass/governance/global/events/events.jsonl +1 -0
  534. package/conformance/v1/bundles/jobproof/strict-pass/governance/global/events/payload_material.jsonl +1 -0
  535. package/conformance/v1/bundles/jobproof/strict-pass/governance/global/snapshot.json +1 -0
  536. package/conformance/v1/bundles/jobproof/strict-pass/governance/policy.json +1 -0
  537. package/conformance/v1/bundles/jobproof/strict-pass/governance/revocations.json +1 -0
  538. package/conformance/v1/bundles/jobproof/strict-pass/governance/tenant/events/events.jsonl +0 -0
  539. package/conformance/v1/bundles/jobproof/strict-pass/governance/tenant/events/payload_material.jsonl +0 -0
  540. package/conformance/v1/bundles/jobproof/strict-pass/governance/tenant/snapshot.json +1 -0
  541. package/conformance/v1/bundles/jobproof/strict-pass/job/snapshot.json +1 -0
  542. package/conformance/v1/bundles/jobproof/strict-pass/keys/public_keys.json +1 -0
  543. package/conformance/v1/bundles/jobproof/strict-pass/manifest.json +1 -0
  544. package/conformance/v1/bundles/jobproof/strict-pass/verify/report.json +1 -0
  545. package/conformance/v1/bundles/jobproof/strict-pass/verify/verification_report.json +1 -0
  546. package/conformance/v1/bundles/monthproof/nonstrict-pass-missing-verification-report/attestation/bundle_head_attestation.json +1 -0
  547. package/conformance/v1/bundles/monthproof/nonstrict-pass-missing-verification-report/events/events.jsonl +1 -0
  548. package/conformance/v1/bundles/monthproof/nonstrict-pass-missing-verification-report/events/payload_material.jsonl +1 -0
  549. package/conformance/v1/bundles/monthproof/nonstrict-pass-missing-verification-report/governance/global/events/events.jsonl +1 -0
  550. package/conformance/v1/bundles/monthproof/nonstrict-pass-missing-verification-report/governance/global/events/payload_material.jsonl +1 -0
  551. package/conformance/v1/bundles/monthproof/nonstrict-pass-missing-verification-report/governance/global/snapshot.json +1 -0
  552. package/conformance/v1/bundles/monthproof/nonstrict-pass-missing-verification-report/governance/policy.json +1 -0
  553. package/conformance/v1/bundles/monthproof/nonstrict-pass-missing-verification-report/governance/revocations.json +1 -0
  554. package/conformance/v1/bundles/monthproof/nonstrict-pass-missing-verification-report/governance/tenant/events/events.jsonl +0 -0
  555. package/conformance/v1/bundles/monthproof/nonstrict-pass-missing-verification-report/governance/tenant/events/payload_material.jsonl +0 -0
  556. package/conformance/v1/bundles/monthproof/nonstrict-pass-missing-verification-report/governance/tenant/snapshot.json +1 -0
  557. package/conformance/v1/bundles/monthproof/nonstrict-pass-missing-verification-report/keys/public_keys.json +1 -0
  558. package/conformance/v1/bundles/monthproof/nonstrict-pass-missing-verification-report/manifest.json +1 -0
  559. package/conformance/v1/bundles/monthproof/nonstrict-pass-missing-verification-report/verify/report.json +1 -0
  560. package/conformance/v1/bundles/monthproof/strict-fail-manifest-tamper/attestation/bundle_head_attestation.json +1 -0
  561. package/conformance/v1/bundles/monthproof/strict-fail-manifest-tamper/events/events.jsonl +2 -0
  562. package/conformance/v1/bundles/monthproof/strict-fail-manifest-tamper/events/payload_material.jsonl +1 -0
  563. package/conformance/v1/bundles/monthproof/strict-fail-manifest-tamper/governance/global/events/events.jsonl +1 -0
  564. package/conformance/v1/bundles/monthproof/strict-fail-manifest-tamper/governance/global/events/payload_material.jsonl +1 -0
  565. package/conformance/v1/bundles/monthproof/strict-fail-manifest-tamper/governance/global/snapshot.json +1 -0
  566. package/conformance/v1/bundles/monthproof/strict-fail-manifest-tamper/governance/policy.json +1 -0
  567. package/conformance/v1/bundles/monthproof/strict-fail-manifest-tamper/governance/revocations.json +1 -0
  568. package/conformance/v1/bundles/monthproof/strict-fail-manifest-tamper/governance/tenant/events/events.jsonl +0 -0
  569. package/conformance/v1/bundles/monthproof/strict-fail-manifest-tamper/governance/tenant/events/payload_material.jsonl +0 -0
  570. package/conformance/v1/bundles/monthproof/strict-fail-manifest-tamper/governance/tenant/snapshot.json +1 -0
  571. package/conformance/v1/bundles/monthproof/strict-fail-manifest-tamper/keys/public_keys.json +1 -0
  572. package/conformance/v1/bundles/monthproof/strict-fail-manifest-tamper/manifest.json +1 -0
  573. package/conformance/v1/bundles/monthproof/strict-fail-manifest-tamper/verify/report.json +1 -0
  574. package/conformance/v1/bundles/monthproof/strict-fail-manifest-tamper/verify/verification_report.json +1 -0
  575. package/conformance/v1/bundles/monthproof/strict-fail-unauthorized-signer/attestation/bundle_head_attestation.json +1 -0
  576. package/conformance/v1/bundles/monthproof/strict-fail-unauthorized-signer/events/events.jsonl +1 -0
  577. package/conformance/v1/bundles/monthproof/strict-fail-unauthorized-signer/events/payload_material.jsonl +1 -0
  578. package/conformance/v1/bundles/monthproof/strict-fail-unauthorized-signer/governance/global/events/events.jsonl +1 -0
  579. package/conformance/v1/bundles/monthproof/strict-fail-unauthorized-signer/governance/global/events/payload_material.jsonl +1 -0
  580. package/conformance/v1/bundles/monthproof/strict-fail-unauthorized-signer/governance/global/snapshot.json +1 -0
  581. package/conformance/v1/bundles/monthproof/strict-fail-unauthorized-signer/governance/policy.json +1 -0
  582. package/conformance/v1/bundles/monthproof/strict-fail-unauthorized-signer/governance/revocations.json +1 -0
  583. package/conformance/v1/bundles/monthproof/strict-fail-unauthorized-signer/governance/tenant/events/events.jsonl +0 -0
  584. package/conformance/v1/bundles/monthproof/strict-fail-unauthorized-signer/governance/tenant/events/payload_material.jsonl +0 -0
  585. package/conformance/v1/bundles/monthproof/strict-fail-unauthorized-signer/governance/tenant/snapshot.json +1 -0
  586. package/conformance/v1/bundles/monthproof/strict-fail-unauthorized-signer/keys/public_keys.json +1 -0
  587. package/conformance/v1/bundles/monthproof/strict-fail-unauthorized-signer/manifest.json +1 -0
  588. package/conformance/v1/bundles/monthproof/strict-fail-unauthorized-signer/verify/report.json +1 -0
  589. package/conformance/v1/bundles/monthproof/strict-fail-unauthorized-signer/verify/verification_report.json +1 -0
  590. package/conformance/v1/bundles/monthproof/strict-pass/attestation/bundle_head_attestation.json +1 -0
  591. package/conformance/v1/bundles/monthproof/strict-pass/events/events.jsonl +1 -0
  592. package/conformance/v1/bundles/monthproof/strict-pass/events/payload_material.jsonl +1 -0
  593. package/conformance/v1/bundles/monthproof/strict-pass/governance/global/events/events.jsonl +1 -0
  594. package/conformance/v1/bundles/monthproof/strict-pass/governance/global/events/payload_material.jsonl +1 -0
  595. package/conformance/v1/bundles/monthproof/strict-pass/governance/global/snapshot.json +1 -0
  596. package/conformance/v1/bundles/monthproof/strict-pass/governance/policy.json +1 -0
  597. package/conformance/v1/bundles/monthproof/strict-pass/governance/revocations.json +1 -0
  598. package/conformance/v1/bundles/monthproof/strict-pass/governance/tenant/events/events.jsonl +0 -0
  599. package/conformance/v1/bundles/monthproof/strict-pass/governance/tenant/events/payload_material.jsonl +0 -0
  600. package/conformance/v1/bundles/monthproof/strict-pass/governance/tenant/snapshot.json +1 -0
  601. package/conformance/v1/bundles/monthproof/strict-pass/keys/public_keys.json +1 -0
  602. package/conformance/v1/bundles/monthproof/strict-pass/manifest.json +1 -0
  603. package/conformance/v1/bundles/monthproof/strict-pass/verify/report.json +1 -0
  604. package/conformance/v1/bundles/monthproof/strict-pass/verify/verification_report.json +1 -0
  605. package/conformance/v1/cases.json +381 -0
  606. package/conformance/v1/expected/closepack_nonstrict_pass_missing_sla_acceptance.json +9 -0
  607. package/conformance/v1/expected/closepack_strict_fail_embedded_invoice_fails.json +9 -0
  608. package/conformance/v1/expected/closepack_strict_fail_evidence_index_mismatch.json +9 -0
  609. package/conformance/v1/expected/closepack_strict_pass.json +9 -0
  610. package/conformance/v1/expected/financepack_strict_fail_missing_verification_report.json +9 -0
  611. package/conformance/v1/expected/financepack_strict_fail_on_warnings_tool_version_unknown.json +9 -0
  612. package/conformance/v1/expected/financepack_strict_fail_trust_roots_missing.json +9 -0
  613. package/conformance/v1/expected/financepack_strict_fail_trust_roots_wrong.json +9 -0
  614. package/conformance/v1/expected/financepack_strict_pass.json +9 -0
  615. package/conformance/v1/expected/invoicebundle_nonstrict_pass_missing_verification_report.json +9 -0
  616. package/conformance/v1/expected/invoicebundle_nonstrict_pass_unsigned_pricing_matrix_warning.json +9 -0
  617. package/conformance/v1/expected/invoicebundle_strict_fail_evidence_sha_mismatch.json +9 -0
  618. package/conformance/v1/expected/invoicebundle_strict_fail_invalid_pricing_matrix_signature.json +9 -0
  619. package/conformance/v1/expected/invoicebundle_strict_fail_invoice_total_mismatch.json +9 -0
  620. package/conformance/v1/expected/invoicebundle_strict_fail_missing_pricing_matrix_signature.json +9 -0
  621. package/conformance/v1/expected/invoicebundle_strict_fail_missing_verification_report.json +9 -0
  622. package/conformance/v1/expected/invoicebundle_strict_fail_pricing_code_unknown.json +9 -0
  623. package/conformance/v1/expected/invoicebundle_strict_pass.json +9 -0
  624. package/conformance/v1/expected/jobproof_nonstrict_pass_missing_verification_report.json +9 -0
  625. package/conformance/v1/expected/jobproof_strict_fail_manifest_tamper.json +9 -0
  626. package/conformance/v1/expected/jobproof_strict_fail_unauthorized_signer.json +9 -0
  627. package/conformance/v1/expected/jobproof_strict_pass.json +9 -0
  628. package/conformance/v1/expected/monthproof_nonstrict_pass_missing_verification_report.json +9 -0
  629. package/conformance/v1/expected/monthproof_strict_fail_manifest_tamper.json +9 -0
  630. package/conformance/v1/expected/monthproof_strict_fail_unauthorized_signer.json +9 -0
  631. package/conformance/v1/expected/monthproof_strict_pass.json +9 -0
  632. package/conformance/v1/expected/security_bundle_symlink_outside.json +9 -0
  633. package/conformance/v1/expected/security_manifest_case_collision.json +8 -0
  634. package/conformance/v1/expected/security_manifest_duplicate_paths.json +9 -0
  635. package/conformance/v1/expected/security_manifest_path_traversal.json +9 -0
  636. package/conformance/v1/lib/harness.mjs +78 -0
  637. package/conformance/v1/lib/mutations.mjs +61 -0
  638. package/conformance/v1/produce-cases.json +75 -0
  639. package/conformance/v1/producer/bad-plugin-invalid-provider.mjs +4 -0
  640. package/conformance/v1/producer/bad-plugin-no-export.mjs +3 -0
  641. package/conformance/v1/producer/fixture_keypairs.json +18 -0
  642. package/conformance/v1/producer/inmemory-signer-plugin.mjs +47 -0
  643. package/conformance/v1/producer/signer-stdio-bad-json.mjs +54 -0
  644. package/conformance/v1/producer/signer-stdio-partial-stdout-exit1.mjs +51 -0
  645. package/conformance/v1/producer/signer-stdio-stderr-only-exit1.mjs +46 -0
  646. package/conformance/v1/producer/signer-stdio-stub.mjs +134 -0
  647. package/conformance/v1/protocol-vectors/v1.json +81 -0
  648. package/conformance/v1/release-cases.json +111 -0
  649. package/conformance/v1/release-trust-quorum.json +15 -0
  650. package/conformance/v1/release-trust-revoked.json +16 -0
  651. package/conformance/v1/release-trust.json +15 -0
  652. package/conformance/v1/releases/release_fail_asset_hash_mismatch/a.tgz +1 -0
  653. package/conformance/v1/releases/release_fail_asset_hash_mismatch/b.tar.gz +1 -0
  654. package/conformance/v1/releases/release_fail_asset_hash_mismatch/release_index_v1.json +1 -0
  655. package/conformance/v1/releases/release_fail_asset_hash_mismatch/release_index_v1.sig +1 -0
  656. package/conformance/v1/releases/release_fail_missing_asset/a.tgz +1 -0
  657. package/conformance/v1/releases/release_fail_missing_asset/release_index_v1.json +1 -0
  658. package/conformance/v1/releases/release_fail_missing_asset/release_index_v1.sig +1 -0
  659. package/conformance/v1/releases/release_fail_signature_invalid/a.tgz +1 -0
  660. package/conformance/v1/releases/release_fail_signature_invalid/b.tar.gz +1 -0
  661. package/conformance/v1/releases/release_fail_signature_invalid/release_index_v1.json +1 -0
  662. package/conformance/v1/releases/release_fail_signature_invalid/release_index_v1.sig +1 -0
  663. package/conformance/v1/releases/release_pass/a.tgz +1 -0
  664. package/conformance/v1/releases/release_pass/b.tar.gz +1 -0
  665. package/conformance/v1/releases/release_pass/release_index_v1.json +1 -0
  666. package/conformance/v1/releases/release_pass/release_index_v1.sig +1 -0
  667. package/conformance/v1/run-produce.mjs +507 -0
  668. package/conformance/v1/run-release.mjs +129 -0
  669. package/conformance/v1/run.mjs +229 -0
  670. package/conformance/v1/trust.json +11 -0
  671. package/docker-compose.yml +154 -0
  672. package/package.json +98 -0
  673. package/packages/artifact-verify/src/bundle-path.js +60 -0
  674. package/packages/artifact-verify/src/canonical-json.js +48 -0
  675. package/packages/artifact-verify/src/close-pack-bundle.js +914 -0
  676. package/packages/artifact-verify/src/crypto.js +18 -0
  677. package/packages/artifact-verify/src/finance-pack-bundle.js +750 -0
  678. package/packages/artifact-verify/src/governance-policy.js +312 -0
  679. package/packages/artifact-verify/src/hash-file.js +38 -0
  680. package/packages/artifact-verify/src/index.js +100 -0
  681. package/packages/artifact-verify/src/invoice-bundle.js +865 -0
  682. package/packages/artifact-verify/src/job-proof-bundle.js +1996 -0
  683. package/packages/artifact-verify/src/map-with-concurrency.js +32 -0
  684. package/packages/artifact-verify/src/reconcile.js +135 -0
  685. package/packages/artifact-verify/src/release/release-index-lib.js +190 -0
  686. package/packages/artifact-verify/src/release/verify-release.js +187 -0
  687. package/packages/artifact-verify/src/revocation-list.js +119 -0
  688. package/packages/artifact-verify/src/safe-unzip.js +335 -0
  689. package/packages/artifact-verify/src/settlement-decision-report.js +61 -0
  690. package/packages/artifact-verify/src/timestamp-proof.js +49 -0
  691. package/packages/artifact-verify/src/tool-provenance.js +49 -0
  692. package/packages/artifact-verify/src/trust.js +54 -0
  693. package/packages/artifact-verify/src/verification-warnings.js +34 -0
  694. package/scripts/closepack/export.mjs +101 -0
  695. package/scripts/closepack/lib.mjs +1068 -0
  696. package/scripts/closepack/verify.mjs +65 -0
  697. package/scripts/init/capability.mjs +556 -0
  698. package/scripts/init/postinstall-sanity.mjs +18 -0
  699. package/services/finance-sink/README.md +37 -0
  700. package/services/finance-sink/package.json +6 -0
  701. package/services/finance-sink/src/ack-worker.js +152 -0
  702. package/services/finance-sink/src/config.js +176 -0
  703. package/services/finance-sink/src/dedupe-store.js +232 -0
  704. package/services/finance-sink/src/s3-store.js +139 -0
  705. package/services/finance-sink/src/server.js +391 -0
  706. package/services/receiver/README.md +49 -0
  707. package/services/receiver/package.json +6 -0
  708. package/services/receiver/src/ack-worker.js +166 -0
  709. package/services/receiver/src/config.js +178 -0
  710. package/services/receiver/src/dedupe-store.js +232 -0
  711. package/services/receiver/src/s3-store.js +111 -0
  712. package/services/receiver/src/server.js +304 -0
  713. package/src/agent/agent-sim.js +167 -0
  714. package/src/api/app.js +31794 -0
  715. package/src/api/http.js +124 -0
  716. package/src/api/maintenance.js +174 -0
  717. package/src/api/middleware/auth.js +105 -0
  718. package/src/api/middleware/authz.js +19 -0
  719. package/src/api/openapi.js +5684 -0
  720. package/src/api/outbox.js +93 -0
  721. package/src/api/persistence.js +628 -0
  722. package/src/api/server.js +100 -0
  723. package/src/api/store.js +2088 -0
  724. package/src/api/workers/artifacts.js +574 -0
  725. package/src/api/workers/deliveries.js +628 -0
  726. package/src/api/workers/proof.js +374 -0
  727. package/src/core/acceptance-criteria.js +78 -0
  728. package/src/core/access.js +130 -0
  729. package/src/core/agent-reputation.js +311 -0
  730. package/src/core/agent-runs.js +253 -0
  731. package/src/core/agent-wallets.js +883 -0
  732. package/src/core/allocations.js +160 -0
  733. package/src/core/artifact-verification-status.js +216 -0
  734. package/src/core/artifacts.js +938 -0
  735. package/src/core/assist.js +106 -0
  736. package/src/core/audit-export.js +68 -0
  737. package/src/core/auth.js +189 -0
  738. package/src/core/billing-plans.js +187 -0
  739. package/src/core/booking.js +268 -0
  740. package/src/core/cancellation.js +34 -0
  741. package/src/core/canonical-json.js +104 -0
  742. package/src/core/claims.js +152 -0
  743. package/src/core/close-pack-bundle.js +527 -0
  744. package/src/core/config.js +272 -0
  745. package/src/core/contract-compiler.js +68 -0
  746. package/src/core/contract-document.js +226 -0
  747. package/src/core/contract-selection.js +152 -0
  748. package/src/core/contracts.js +439 -0
  749. package/src/core/crypto.js +30 -0
  750. package/src/core/deterministic-zip.js +169 -0
  751. package/src/core/dispatch-events.js +113 -0
  752. package/src/core/dispatch.js +26 -0
  753. package/src/core/dispute-open-envelope.js +163 -0
  754. package/src/core/escrow-ledger.js +329 -0
  755. package/src/core/event-chain.js +114 -0
  756. package/src/core/event-policy.js +120 -0
  757. package/src/core/evidence-linker.js +93 -0
  758. package/src/core/evidence-store.js +286 -0
  759. package/src/core/evidence.js +119 -0
  760. package/src/core/failpoints.js +30 -0
  761. package/src/core/finance-account-map.js +59 -0
  762. package/src/core/finance-pack-bundle.js +554 -0
  763. package/src/core/funding-hold.js +185 -0
  764. package/src/core/gl-batch.js +107 -0
  765. package/src/core/governance-policy.js +174 -0
  766. package/src/core/governance.js +92 -0
  767. package/src/core/hold-exposure.js +74 -0
  768. package/src/core/idempotency.js +51 -0
  769. package/src/core/ids.js +21 -0
  770. package/src/core/incidents.js +75 -0
  771. package/src/core/insurer-reimbursements.js +58 -0
  772. package/src/core/interaction-directions.js +170 -0
  773. package/src/core/invoice-bundle.js +564 -0
  774. package/src/core/job-reducer.js +702 -0
  775. package/src/core/job-state-machine.js +266 -0
  776. package/src/core/journal-csv.js +94 -0
  777. package/src/core/ledger-postings-finance.js +31 -0
  778. package/src/core/ledger-postings.js +476 -0
  779. package/src/core/ledger.js +59 -0
  780. package/src/core/liveness.js +154 -0
  781. package/src/core/log.js +156 -0
  782. package/src/core/maintenance-locks.js +3 -0
  783. package/src/core/marketplace-kernel.js +243 -0
  784. package/src/core/metrics.js +133 -0
  785. package/src/core/money-rail-adapters.js +735 -0
  786. package/src/core/month-close-hold-policy.js +19 -0
  787. package/src/core/month-close.js +159 -0
  788. package/src/core/operator-cost.js +79 -0
  789. package/src/core/operator-coverage.js +46 -0
  790. package/src/core/operator-reducer.js +73 -0
  791. package/src/core/operators.js +52 -0
  792. package/src/core/ops-audit.js +45 -0
  793. package/src/core/party-statements.js +145 -0
  794. package/src/core/pilot-templates.js +26 -0
  795. package/src/core/policy.js +76 -0
  796. package/src/core/pricing.js +71 -0
  797. package/src/core/proof-bundle.js +1153 -0
  798. package/src/core/proof-events.js +88 -0
  799. package/src/core/proof-verifier.js +261 -0
  800. package/src/core/proof.js +46 -0
  801. package/src/core/protocol.js +105 -0
  802. package/src/core/quotas.js +32 -0
  803. package/src/core/reputation-event.js +203 -0
  804. package/src/core/rescheduling.js +51 -0
  805. package/src/core/retention.js +32 -0
  806. package/src/core/revocation-list.js +70 -0
  807. package/src/core/risk.js +383 -0
  808. package/src/core/robot-health.js +111 -0
  809. package/src/core/robot-reducer.js +198 -0
  810. package/src/core/robots.js +152 -0
  811. package/src/core/s3-presign.js +111 -0
  812. package/src/core/secrets.js +128 -0
  813. package/src/core/settlement-adjustment.js +151 -0
  814. package/src/core/settlement-kernel.js +405 -0
  815. package/src/core/settlement-policy.js +206 -0
  816. package/src/core/settlement-splits.js +46 -0
  817. package/src/core/signer-keys.js +33 -0
  818. package/src/core/skills.js +86 -0
  819. package/src/core/sla-events.js +229 -0
  820. package/src/core/sla-metering.js +169 -0
  821. package/src/core/sla-policy-templates.js +340 -0
  822. package/src/core/sla.js +29 -0
  823. package/src/core/statements.js +426 -0
  824. package/src/core/tenancy.js +55 -0
  825. package/src/core/timestamp-proof.js +36 -0
  826. package/src/core/tool-manifest.js +116 -0
  827. package/src/core/tool-provenance.js +36 -0
  828. package/src/core/url-safety.js +263 -0
  829. package/src/core/verification-warnings.js +53 -0
  830. package/src/core/zone-coverage.js +59 -0
  831. package/src/core/zones.js +8 -0
  832. package/src/core/zoneset.js +67 -0
  833. package/src/db/migrate.js +61 -0
  834. package/src/db/migrations/001_init.sql +92 -0
  835. package/src/db/migrations/002_robot_reservations.sql +23 -0
  836. package/src/db/migrations/003_idempotency_v2.sql +32 -0
  837. package/src/db/migrations/004_notifications.sql +12 -0
  838. package/src/db/migrations/005_multi_tenant.sql +106 -0
  839. package/src/db/migrations/006_contracts.sql +27 -0
  840. package/src/db/migrations/007_artifacts_deliveries_correlations.sql +53 -0
  841. package/src/db/migrations/008_delivery_ingest_hardening.sql +52 -0
  842. package/src/db/migrations/009_auth_keys.sql +21 -0
  843. package/src/db/migrations/010_signer_keys.sql +25 -0
  844. package/src/db/migrations/011_ops_audit.sql +33 -0
  845. package/src/db/migrations/012_retention.sql +16 -0
  846. package/src/db/migrations/013_perf_indexes.sql +18 -0
  847. package/src/db/migrations/014_contracts_v2.sql +68 -0
  848. package/src/db/migrations/015_parties.sql +16 -0
  849. package/src/db/migrations/016_ledger_allocations.sql +18 -0
  850. package/src/db/migrations/017_party_statements.sql +31 -0
  851. package/src/db/migrations/018_finance_account_map.sql +12 -0
  852. package/src/db/migrations/019_ledger_allocations_account_id.sql +7 -0
  853. package/src/db/migrations/020_artifacts_source_event_unique.sql +10 -0
  854. package/src/db/migrations/021_artifacts_by_job_created_at_id.sql +6 -0
  855. package/src/db/migrations/022_governance_uniqueness.sql +28 -0
  856. package/src/db/migrations/023_marketplace_tasks.sql +45 -0
  857. package/src/db/migrations/024_agent_runtime_state.sql +70 -0
  858. package/src/db/migrations/025_tenant_settlement_policies.sql +19 -0
  859. package/src/db/migrations/026_money_rails_billable_events.sql +82 -0
  860. package/src/db/migrations/027_tenant_billing_config.sql +10 -0
  861. package/src/db/migrations/028_marketplace_rfq_storage.sql +121 -0
  862. package/src/db/pg.js +123 -0
  863. package/src/db/store-pg.js +6465 -0
@@ -0,0 +1,1068 @@
1
+ import fs from "node:fs/promises";
2
+ import path from "node:path";
3
+
4
+ import { computeArtifactHash } from "../../src/core/artifacts.js";
5
+ import { canonicalJsonStringify, normalizeForCanonicalJson } from "../../src/core/canonical-json.js";
6
+ import { verifyHashHexEd25519, sha256Hex } from "../../src/core/crypto.js";
7
+ import { buildDeterministicZipStore, sha256HexBytes } from "../../src/core/deterministic-zip.js";
8
+ import {
9
+ DISPUTE_OPEN_ENVELOPE_SCHEMA_VERSION,
10
+ validateDisputeOpenEnvelopeV1
11
+ } from "../../src/core/dispute-open-envelope.js";
12
+ import { validateFundingHoldV1 } from "../../src/core/funding-hold.js";
13
+ import { validateReputationEventV1 } from "../../src/core/reputation-event.js";
14
+ import {
15
+ SETTLEMENT_ADJUSTMENT_KIND,
16
+ validateSettlementAdjustmentV1
17
+ } from "../../src/core/settlement-adjustment.js";
18
+ import { unzipToTempSafe } from "../../packages/artifact-verify/src/safe-unzip.js";
19
+
20
+ const CLOSEPACK_SCHEMA_VERSION = "KernelToolCallClosePack.v0";
21
+ const VERIFY_REPORT_SCHEMA_VERSION = "KernelToolCallClosePackVerifyReport.v0";
22
+ const FIXED_ZIP_MTIME = new Date("2000-01-01T00:00:00.000Z");
23
+
24
+ function assertNonEmptyString(value, name) {
25
+ if (typeof value !== "string" || value.trim() === "") throw new TypeError(`${name} must be a non-empty string`);
26
+ return value.trim();
27
+ }
28
+
29
+ function normalizeSha256(value, name) {
30
+ const out = assertNonEmptyString(value, name).toLowerCase();
31
+ if (!/^[0-9a-f]{64}$/.test(out)) throw new TypeError(`${name} must be a 64-hex sha256`);
32
+ return out;
33
+ }
34
+
35
+ function normalizeBaseUrl(value) {
36
+ const out = assertNonEmptyString(value, "baseUrl");
37
+ return out.replace(/\/$/, "");
38
+ }
39
+
40
+ function encodeJson(obj) {
41
+ return Buffer.from(`${JSON.stringify(obj, null, 2)}\n`, "utf8");
42
+ }
43
+
44
+ function safeFileSegment(value) {
45
+ return encodeURIComponent(String(value));
46
+ }
47
+
48
+ function addIssue(list, { code, message, severity = "error", details = null }) {
49
+ list.push({ code: String(code), severity: String(severity), message: String(message), details: details ?? null });
50
+ }
51
+
52
+ function isNotFoundError(err) {
53
+ return Number(err?.status) === 404;
54
+ }
55
+
56
+ function deterministicCaseArtifactId(arbitrationCase) {
57
+ if (!arbitrationCase || typeof arbitrationCase !== "object" || Array.isArray(arbitrationCase)) return null;
58
+ const caseId = typeof arbitrationCase.caseId === "string" && arbitrationCase.caseId.trim() !== "" ? arbitrationCase.caseId.trim() : null;
59
+ if (!caseId) return null;
60
+ const revisionRaw = Number(arbitrationCase.revision ?? 1);
61
+ const revision = Number.isSafeInteger(revisionRaw) && revisionRaw > 1 ? revisionRaw : 1;
62
+ return revision > 1 ? `arbitration_case_${caseId}_r${revision}` : `arbitration_case_${caseId}`;
63
+ }
64
+
65
+ function computeArbitrationVerdictHash(verdictArtifact) {
66
+ const core = normalizeForCanonicalJson(
67
+ {
68
+ schemaVersion: "ArbitrationVerdict.v1",
69
+ verdictId: verdictArtifact.verdictId,
70
+ caseId: verdictArtifact.caseId,
71
+ tenantId: verdictArtifact.tenantId,
72
+ runId: verdictArtifact.runId,
73
+ settlementId: verdictArtifact.settlementId,
74
+ disputeId: verdictArtifact.disputeId,
75
+ arbiterAgentId: verdictArtifact.arbiterAgentId,
76
+ outcome: verdictArtifact.outcome,
77
+ releaseRatePct: verdictArtifact.releaseRatePct,
78
+ rationale: verdictArtifact.rationale,
79
+ evidenceRefs: Array.isArray(verdictArtifact.evidenceRefs) ? verdictArtifact.evidenceRefs : [],
80
+ issuedAt: verdictArtifact.issuedAt,
81
+ appealRef: verdictArtifact.appealRef ?? null
82
+ },
83
+ { path: "$" }
84
+ );
85
+ return sha256Hex(canonicalJsonStringify(core));
86
+ }
87
+
88
+ async function requestJson({ baseUrl, tenantId, protocol, apiKey, opsToken, method, pathname, body, allowNotFound = false }) {
89
+ const url = new URL(pathname, baseUrl);
90
+ const headers = {
91
+ "content-type": "application/json",
92
+ "x-proxy-tenant-id": String(tenantId),
93
+ "x-settld-protocol": String(protocol),
94
+ "x-request-id": `closepack_${Date.now().toString(36)}_${Math.random().toString(16).slice(2, 10)}`
95
+ };
96
+ if (apiKey) headers.authorization = `Bearer ${String(apiKey)}`;
97
+ if (opsToken) headers["x-proxy-ops-token"] = String(opsToken);
98
+
99
+ const res = await fetch(url.toString(), {
100
+ method,
101
+ headers,
102
+ body: body === undefined ? undefined : JSON.stringify(body)
103
+ });
104
+ const text = await res.text();
105
+ let parsed = null;
106
+ try {
107
+ parsed = text ? JSON.parse(text) : null;
108
+ } catch {
109
+ parsed = text;
110
+ }
111
+ if (!res.ok) {
112
+ if (allowNotFound && res.status === 404) return null;
113
+ const err = new Error(
114
+ typeof parsed === "object" && parsed !== null
115
+ ? String(parsed.message ?? parsed.error ?? `HTTP ${res.status}`)
116
+ : String(parsed ?? `HTTP ${res.status}`)
117
+ );
118
+ err.status = res.status;
119
+ err.body = parsed;
120
+ throw err;
121
+ }
122
+ return parsed;
123
+ }
124
+
125
+ async function fetchArtifact({ requestContext, artifactId, issues, required = true }) {
126
+ if (!artifactId) return null;
127
+ try {
128
+ const out = await requestJson({
129
+ ...requestContext,
130
+ method: "GET",
131
+ pathname: `/artifacts/${encodeURIComponent(String(artifactId))}`
132
+ });
133
+ return out?.artifact ?? null;
134
+ } catch (err) {
135
+ if (isNotFoundError(err)) {
136
+ addIssue(issues, {
137
+ code: "CLOSEPACK_ARTIFACT_NOT_FOUND",
138
+ message: `artifact not found: ${artifactId}`,
139
+ severity: required ? "error" : "warning",
140
+ details: { artifactId }
141
+ });
142
+ return null;
143
+ }
144
+ throw err;
145
+ }
146
+ }
147
+
148
+ async function fetchAgentIdentity({ requestContext, agentId, issues, required = false }) {
149
+ if (!agentId) return null;
150
+ try {
151
+ const out = await requestJson({
152
+ ...requestContext,
153
+ method: "GET",
154
+ pathname: `/agents/${encodeURIComponent(String(agentId))}`
155
+ });
156
+ return out?.agentIdentity ?? null;
157
+ } catch (err) {
158
+ if (isNotFoundError(err)) {
159
+ addIssue(issues, {
160
+ code: "CLOSEPACK_AGENT_IDENTITY_NOT_FOUND",
161
+ message: `agent identity not found: ${agentId}`,
162
+ severity: required ? "error" : "warning",
163
+ details: { agentId }
164
+ });
165
+ return null;
166
+ }
167
+ throw err;
168
+ }
169
+ }
170
+
171
+ function makeRequestContext({ baseUrl, tenantId, protocol, apiKey, opsToken }) {
172
+ return {
173
+ baseUrl: normalizeBaseUrl(baseUrl),
174
+ tenantId: assertNonEmptyString(tenantId, "tenantId"),
175
+ protocol: assertNonEmptyString(protocol, "protocol"),
176
+ apiKey: apiKey ? String(apiKey) : null,
177
+ opsToken: opsToken ? String(opsToken) : null
178
+ };
179
+ }
180
+
181
+ function selectPrimaryCase(cases) {
182
+ const rows = Array.isArray(cases) ? [...cases] : [];
183
+ rows.sort((left, right) => {
184
+ const leftClosed = String(left?.status ?? "").toLowerCase() === "closed" ? 1 : 0;
185
+ const rightClosed = String(right?.status ?? "").toLowerCase() === "closed" ? 1 : 0;
186
+ if (leftClosed !== rightClosed) return rightClosed - leftClosed;
187
+ const leftRevision = Number(left?.revision ?? 0);
188
+ const rightRevision = Number(right?.revision ?? 0);
189
+ if (Number.isFinite(leftRevision) && Number.isFinite(rightRevision) && leftRevision !== rightRevision) return rightRevision - leftRevision;
190
+ const leftAt = Date.parse(String(left?.updatedAt ?? left?.openedAt ?? ""));
191
+ const rightAt = Date.parse(String(right?.updatedAt ?? right?.openedAt ?? ""));
192
+ if (Number.isFinite(leftAt) && Number.isFinite(rightAt) && leftAt !== rightAt) return rightAt - leftAt;
193
+ return String(left?.caseId ?? "").localeCompare(String(right?.caseId ?? ""));
194
+ });
195
+ return rows[0] ?? null;
196
+ }
197
+
198
+ function buildPublicKeyMap(identities) {
199
+ const map = new Map();
200
+ for (const identity of Array.isArray(identities) ? identities : []) {
201
+ const keys = identity?.keys;
202
+ const keyId = typeof keys?.keyId === "string" ? keys.keyId.trim() : "";
203
+ const publicKeyPem = typeof keys?.publicKeyPem === "string" ? keys.publicKeyPem.trim() : "";
204
+ if (keyId && publicKeyPem) map.set(keyId, publicKeyPem);
205
+ }
206
+ return map;
207
+ }
208
+
209
+ function appendFile(files, filepath, jsonObject) {
210
+ files.set(filepath, encodeJson(normalizeForCanonicalJson(jsonObject, { path: "$" })));
211
+ }
212
+
213
+ function extractArtifactHash(artifact) {
214
+ return typeof artifact?.artifactHash === "string" && artifact.artifactHash.trim() !== "" ? artifact.artifactHash.trim().toLowerCase() : null;
215
+ }
216
+
217
+ function computeStoredArtifactHash(artifact) {
218
+ const { artifactHash: _artifactHash, ...withoutHash } = artifact ?? {};
219
+ return computeArtifactHash(withoutHash);
220
+ }
221
+
222
+ function deterministicAdjustmentId(agreementHash) {
223
+ return `sadj_agmt_${agreementHash}_holdback`;
224
+ }
225
+
226
+ function normalizeReputationEventsForAgreement({ events, agreementHash }) {
227
+ const out = [];
228
+ for (const row of Array.isArray(events) ? events : []) {
229
+ if (!row || typeof row !== "object" || Array.isArray(row)) continue;
230
+ const src = row.sourceRef && typeof row.sourceRef === "object" && !Array.isArray(row.sourceRef) ? row.sourceRef : null;
231
+ if (!src) continue;
232
+ if (String(src.agreementHash ?? "").toLowerCase() !== String(agreementHash).toLowerCase()) continue;
233
+ out.push(row);
234
+ }
235
+ out.sort((left, right) => {
236
+ const leftMs = Date.parse(String(left?.occurredAt ?? ""));
237
+ const rightMs = Date.parse(String(right?.occurredAt ?? ""));
238
+ if (Number.isFinite(leftMs) && Number.isFinite(rightMs) && leftMs !== rightMs) return leftMs - rightMs;
239
+ return String(left?.eventId ?? "").localeCompare(String(right?.eventId ?? ""));
240
+ });
241
+ return out;
242
+ }
243
+
244
+ export async function exportToolCallClosepack({
245
+ baseUrl = "http://127.0.0.1:3000",
246
+ tenantId = "tenant_default",
247
+ protocol = "1.0",
248
+ apiKey = null,
249
+ opsToken = null,
250
+ agreementHash,
251
+ outPath
252
+ } = {}) {
253
+ const normalizedAgreementHash = normalizeSha256(agreementHash, "agreementHash");
254
+ const outputPath = path.resolve(assertNonEmptyString(outPath, "outPath"));
255
+ const requestContext = makeRequestContext({ baseUrl, tenantId, protocol, apiKey, opsToken });
256
+ const issues = [];
257
+
258
+ const holdsResponse = await requestJson({
259
+ ...requestContext,
260
+ method: "GET",
261
+ pathname: `/ops/tool-calls/holds?agreementHash=${encodeURIComponent(normalizedAgreementHash)}`
262
+ });
263
+ const holds = Array.isArray(holdsResponse?.holds) ? holdsResponse.holds : [];
264
+ if (holds.length !== 1) {
265
+ throw new Error(`expected exactly 1 hold for agreementHash; found ${holds.length}`);
266
+ }
267
+ const hold = holds[0];
268
+
269
+ const casesResponse = await requestJson({
270
+ ...requestContext,
271
+ method: "GET",
272
+ pathname: `/tool-calls/arbitration/cases?agreementHash=${encodeURIComponent(normalizedAgreementHash)}`
273
+ });
274
+ const arbitrationCases = Array.isArray(casesResponse?.cases) ? casesResponse.cases : [];
275
+ const arbitrationCase = selectPrimaryCase(arbitrationCases);
276
+
277
+ const replayEvaluate = await requestJson({
278
+ ...requestContext,
279
+ method: "GET",
280
+ pathname: `/ops/tool-calls/replay-evaluate?agreementHash=${encodeURIComponent(normalizedAgreementHash)}`
281
+ });
282
+
283
+ const adjustmentId = deterministicAdjustmentId(normalizedAgreementHash);
284
+ const adjustmentResponse = await requestJson({
285
+ ...requestContext,
286
+ method: "GET",
287
+ pathname: `/ops/settlement-adjustments/${encodeURIComponent(adjustmentId)}`,
288
+ allowNotFound: true
289
+ });
290
+ const settlementAdjustment = adjustmentResponse?.adjustment ?? null;
291
+ let reputationEvents = [];
292
+ try {
293
+ const reputationFacts = await requestJson({
294
+ ...requestContext,
295
+ method: "GET",
296
+ pathname: `/ops/reputation/facts?agentId=${encodeURIComponent(String(hold?.payeeAgentId ?? ""))}&toolId=tool_call&window=allTime&includeEvents=1`
297
+ });
298
+ reputationEvents = normalizeReputationEventsForAgreement({
299
+ events: reputationFacts?.events,
300
+ agreementHash: normalizedAgreementHash
301
+ });
302
+ } catch (err) {
303
+ addIssue(issues, {
304
+ code: "CLOSEPACK_REPUTATION_FETCH_FAILED",
305
+ severity: "warning",
306
+ message: "failed to fetch reputation facts for closepack",
307
+ details: { message: err?.message ?? String(err ?? "") }
308
+ });
309
+ reputationEvents = [];
310
+ }
311
+
312
+ const envelopeArtifactId =
313
+ arbitrationCase?.metadata && typeof arbitrationCase.metadata === "object"
314
+ ? String(arbitrationCase.metadata?.disputeOpenEnvelopeRef?.artifactId ?? "").trim() || null
315
+ : null;
316
+
317
+ const caseArtifactId = deterministicCaseArtifactId(arbitrationCase);
318
+ const verdictId =
319
+ typeof arbitrationCase?.verdictId === "string" && arbitrationCase.verdictId.trim() !== ""
320
+ ? arbitrationCase.verdictId.trim()
321
+ : null;
322
+ const verdictArtifactId =
323
+ typeof replayEvaluate?.stored?.arbitrationVerdictArtifactId === "string" && replayEvaluate.stored.arbitrationVerdictArtifactId.trim() !== ""
324
+ ? replayEvaluate.stored.arbitrationVerdictArtifactId.trim()
325
+ : verdictId
326
+ ? `arbitration_verdict_${verdictId}`
327
+ : null;
328
+
329
+ const requestedArtifactIds = [envelopeArtifactId, caseArtifactId, verdictArtifactId]
330
+ .concat(
331
+ reputationEvents
332
+ .map((event) => String(event?.sourceRef?.artifactId ?? "").trim())
333
+ .filter((id) => id !== "")
334
+ )
335
+ .filter((id) => typeof id === "string" && id.trim() !== "");
336
+ const uniqueArtifactIds = [...new Set(requestedArtifactIds)];
337
+ const artifactPairs = await Promise.all(
338
+ uniqueArtifactIds.map(async (artifactId) => ({ artifactId, artifact: await fetchArtifact({ requestContext, artifactId, issues, required: false }) }))
339
+ );
340
+ const artifacts = artifactPairs.filter((row) => row.artifact).map((row) => row.artifact);
341
+
342
+ const artifactRefs = artifactPairs.map((row) => {
343
+ const artifact = row.artifact;
344
+ const artifactHash = artifact ? extractArtifactHash(artifact) : null;
345
+ const schemaVersion = artifact ? String(artifact?.schemaVersion ?? "") : null;
346
+ return {
347
+ artifactId: row.artifactId,
348
+ schemaVersion,
349
+ artifactHash,
350
+ path: `artifacts/${safeFileSegment(row.artifactId)}.json`,
351
+ present: Boolean(artifact)
352
+ };
353
+ });
354
+
355
+ const agentIdSet = new Set([
356
+ hold?.payerAgentId,
357
+ hold?.payeeAgentId,
358
+ arbitrationCase?.claimantAgentId,
359
+ arbitrationCase?.respondentAgentId,
360
+ arbitrationCase?.arbiterAgentId
361
+ ]);
362
+
363
+ const envelopeArtifact = artifacts.find((item) => String(item?.schemaVersion ?? "") === DISPUTE_OPEN_ENVELOPE_SCHEMA_VERSION) ?? null;
364
+ const verdictArtifact = artifacts.find((item) => String(item?.schemaVersion ?? "") === "ArbitrationVerdict.v1") ?? null;
365
+ if (envelopeArtifact?.openedByAgentId) agentIdSet.add(String(envelopeArtifact.openedByAgentId));
366
+ if (verdictArtifact?.arbiterAgentId) agentIdSet.add(String(verdictArtifact.arbiterAgentId));
367
+
368
+ const agentIds = [...agentIdSet]
369
+ .filter((value) => typeof value === "string" && value.trim() !== "")
370
+ .map((value) => String(value).trim())
371
+ .sort((left, right) => left.localeCompare(right));
372
+
373
+ const identities = (
374
+ await Promise.all(agentIds.map(async (agentId) => ({ agentId, agentIdentity: await fetchAgentIdentity({ requestContext, agentId, issues }) })))
375
+ )
376
+ .filter((row) => row.agentIdentity)
377
+ .map((row) => row.agentIdentity);
378
+
379
+ const graph = [];
380
+ graph.push({ from: `agreement:${normalizedAgreementHash}`, to: `hold:${String(hold?.holdHash ?? "")}`, reason: "agreementHash" });
381
+ if (arbitrationCase?.caseId) graph.push({ from: `hold:${String(hold?.holdHash ?? "")}`, to: `case:${String(arbitrationCase.caseId)}`, reason: "holdHash" });
382
+ if (envelopeArtifact?.artifactId) {
383
+ graph.push({ from: `case:${String(arbitrationCase?.caseId ?? "")}`, to: `artifact:${String(envelopeArtifact.artifactId)}`, reason: "disputeOpenEnvelopeRef" });
384
+ }
385
+ if (verdictArtifact?.artifactId) {
386
+ graph.push({ from: `case:${String(arbitrationCase?.caseId ?? "")}`, to: `artifact:${String(verdictArtifact.artifactId)}`, reason: "verdictId" });
387
+ }
388
+ if (settlementAdjustment?.adjustmentId) {
389
+ graph.push({ from: `hold:${String(hold?.holdHash ?? "")}`, to: `adjustment:${String(settlementAdjustment.adjustmentId)}`, reason: "holdback_adjustment" });
390
+ }
391
+ for (const event of reputationEvents) {
392
+ const eventId = String(event?.eventId ?? "").trim();
393
+ if (!eventId) continue;
394
+ const sourceRef = event?.sourceRef && typeof event.sourceRef === "object" && !Array.isArray(event.sourceRef) ? event.sourceRef : null;
395
+ graph.push({ from: `agreement:${normalizedAgreementHash}`, to: `reputation:${eventId}`, reason: "reputation_event" });
396
+ if (sourceRef?.artifactId) {
397
+ graph.push({
398
+ from: `reputation:${eventId}`,
399
+ to: `artifact:${String(sourceRef.artifactId)}`,
400
+ reason: "sourceRef.artifactId"
401
+ });
402
+ }
403
+ if (sourceRef?.sourceId && String(sourceRef?.kind ?? "").toLowerCase() === "settlement_adjustment") {
404
+ graph.push({
405
+ from: `reputation:${eventId}`,
406
+ to: `adjustment:${String(sourceRef.sourceId)}`,
407
+ reason: "sourceRef.sourceId"
408
+ });
409
+ }
410
+ if (sourceRef?.holdHash) {
411
+ graph.push({
412
+ from: `reputation:${eventId}`,
413
+ to: `hold:${String(sourceRef.holdHash)}`,
414
+ reason: "sourceRef.holdHash"
415
+ });
416
+ }
417
+ }
418
+
419
+ const createdAt = new Date().toISOString();
420
+
421
+ const closepack = normalizeForCanonicalJson(
422
+ {
423
+ schemaVersion: CLOSEPACK_SCHEMA_VERSION,
424
+ closepackVersion: "v0",
425
+ createdAt,
426
+ root: {
427
+ kind: "tool_call",
428
+ agreementHash: normalizedAgreementHash,
429
+ runId: `tc_${normalizedAgreementHash}`
430
+ },
431
+ subject: {
432
+ agreementHash: normalizedAgreementHash,
433
+ receiptHash: String(hold?.receiptHash ?? ""),
434
+ holdHash: String(hold?.holdHash ?? ""),
435
+ caseId: arbitrationCase?.caseId ?? null,
436
+ adjustmentId
437
+ },
438
+ files: {
439
+ hold: "state/funding_hold.json",
440
+ arbitrationCase: arbitrationCase ? "state/arbitration_case.json" : null,
441
+ settlementAdjustment: settlementAdjustment ? "state/settlement_adjustment.json" : null,
442
+ reputationEvents: reputationEvents.length > 0 ? "state/reputation_events.json" : null,
443
+ replay: "reports/replay.json"
444
+ },
445
+ artifactRefs,
446
+ reputation: {
447
+ agentId: String(hold?.payeeAgentId ?? ""),
448
+ toolId: "tool_call",
449
+ eventCount: reputationEvents.length,
450
+ eventIds: reputationEvents.map((event) => String(event?.eventId ?? "")).filter(Boolean)
451
+ },
452
+ identityRefs: identities
453
+ .map((identity) => ({
454
+ agentId: String(identity?.agentId ?? ""),
455
+ keyId: String(identity?.keys?.keyId ?? ""),
456
+ path: `identities/${safeFileSegment(String(identity?.agentId ?? "agent"))}.json`
457
+ }))
458
+ .filter((row) => row.agentId !== "" && row.keyId !== ""),
459
+ graph,
460
+ exportIssues: issues
461
+ },
462
+ { path: "$" }
463
+ );
464
+
465
+ const files = new Map();
466
+ appendFile(files, "closepack.json", closepack);
467
+ appendFile(files, "state/funding_hold.json", hold);
468
+ if (arbitrationCase) appendFile(files, "state/arbitration_case.json", arbitrationCase);
469
+ if (settlementAdjustment) appendFile(files, "state/settlement_adjustment.json", settlementAdjustment);
470
+ if (reputationEvents.length > 0) {
471
+ appendFile(files, "state/reputation_events.json", {
472
+ schemaVersion: "KernelToolCallReputationEvents.v0",
473
+ agreementHash: normalizedAgreementHash,
474
+ agentId: String(hold?.payeeAgentId ?? ""),
475
+ toolId: "tool_call",
476
+ events: reputationEvents
477
+ });
478
+ }
479
+ appendFile(files, "reports/replay.json", replayEvaluate);
480
+
481
+ for (const row of artifactPairs) {
482
+ if (!row.artifact) continue;
483
+ appendFile(files, `artifacts/${safeFileSegment(row.artifactId)}.json`, row.artifact);
484
+ }
485
+
486
+ for (const identity of identities) {
487
+ appendFile(files, `identities/${safeFileSegment(String(identity.agentId))}.json`, identity);
488
+ }
489
+
490
+ const zipBytes = buildDeterministicZipStore({ files, mtime: FIXED_ZIP_MTIME });
491
+ await fs.mkdir(path.dirname(outputPath), { recursive: true });
492
+ await fs.writeFile(outputPath, Buffer.from(zipBytes));
493
+
494
+ return {
495
+ schemaVersion: "KernelToolCallClosePackExportResult.v0",
496
+ ok: true,
497
+ outPath: outputPath,
498
+ zipSha256: sha256HexBytes(zipBytes),
499
+ closepack,
500
+ stats: {
501
+ artifactsPresent: artifacts.length,
502
+ artifactsExpected: artifactRefs.length,
503
+ identities: identities.length,
504
+ issues: issues.length
505
+ }
506
+ };
507
+ }
508
+
509
+ async function readJsonFile(filePath) {
510
+ const raw = await fs.readFile(filePath, "utf8");
511
+ return JSON.parse(raw);
512
+ }
513
+
514
+ export async function verifyToolCallClosepackZip({ zipPath } = {}) {
515
+ const resolvedZip = path.resolve(assertNonEmptyString(zipPath, "zipPath"));
516
+ const unzip = await unzipToTempSafe({ zipPath: resolvedZip });
517
+ if (!unzip.ok) {
518
+ return {
519
+ schemaVersion: VERIFY_REPORT_SCHEMA_VERSION,
520
+ verifiedAt: new Date().toISOString(),
521
+ ok: false,
522
+ replayMatch: false,
523
+ issues: [
524
+ {
525
+ code: "CLOSEPACK_ZIP_INVALID",
526
+ severity: "error",
527
+ message: String(unzip.error ?? "zip parse failed"),
528
+ details: unzip.detail ?? null
529
+ }
530
+ ]
531
+ };
532
+ }
533
+
534
+ const tmpDir = unzip.dir;
535
+ const issues = [];
536
+ try {
537
+ const closepackPath = path.join(tmpDir, "closepack.json");
538
+ let closepack = null;
539
+ try {
540
+ closepack = await readJsonFile(closepackPath);
541
+ } catch (err) {
542
+ addIssue(issues, {
543
+ code: "CLOSEPACK_MISSING_CLOSEPACK_JSON",
544
+ message: "closepack.json is missing or invalid",
545
+ details: { message: err?.message ?? String(err ?? "") }
546
+ });
547
+ return {
548
+ schemaVersion: VERIFY_REPORT_SCHEMA_VERSION,
549
+ verifiedAt: new Date().toISOString(),
550
+ ok: false,
551
+ replayMatch: false,
552
+ issues
553
+ };
554
+ }
555
+
556
+ if (String(closepack?.schemaVersion ?? "") !== CLOSEPACK_SCHEMA_VERSION) {
557
+ addIssue(issues, {
558
+ code: "CLOSEPACK_SCHEMA_UNSUPPORTED",
559
+ message: `unsupported closepack schemaVersion: ${String(closepack?.schemaVersion ?? "")}`,
560
+ details: { expected: CLOSEPACK_SCHEMA_VERSION }
561
+ });
562
+ }
563
+
564
+ const agreementHash = (() => {
565
+ try {
566
+ return normalizeSha256(closepack?.root?.agreementHash, "closepack.root.agreementHash");
567
+ } catch (err) {
568
+ addIssue(issues, {
569
+ code: "CLOSEPACK_ROOT_INVALID",
570
+ message: "closepack.root.agreementHash is invalid",
571
+ details: { message: err?.message ?? String(err ?? "") }
572
+ });
573
+ return null;
574
+ }
575
+ })();
576
+
577
+ const holdPath = path.join(tmpDir, "state", "funding_hold.json");
578
+ let hold = null;
579
+ try {
580
+ hold = await readJsonFile(holdPath);
581
+ validateFundingHoldV1(hold);
582
+ } catch (err) {
583
+ addIssue(issues, {
584
+ code: "CLOSEPACK_HOLD_INVALID",
585
+ message: "funding hold missing or invalid",
586
+ details: { message: err?.message ?? String(err ?? "") }
587
+ });
588
+ }
589
+
590
+ const casePath = path.join(tmpDir, "state", "arbitration_case.json");
591
+ let arbitrationCase = null;
592
+ try {
593
+ arbitrationCase = await readJsonFile(casePath);
594
+ } catch {
595
+ arbitrationCase = null;
596
+ }
597
+
598
+ const adjustmentPath = path.join(tmpDir, "state", "settlement_adjustment.json");
599
+ let settlementAdjustment = null;
600
+ try {
601
+ settlementAdjustment = await readJsonFile(adjustmentPath);
602
+ validateSettlementAdjustmentV1(settlementAdjustment);
603
+ } catch {
604
+ settlementAdjustment = null;
605
+ }
606
+
607
+ const replayPath = path.join(tmpDir, "reports", "replay.json");
608
+ let replay = null;
609
+ try {
610
+ replay = await readJsonFile(replayPath);
611
+ } catch {
612
+ replay = null;
613
+ }
614
+ const reputationEventsPath = path.join(tmpDir, "state", "reputation_events.json");
615
+ let reputationEvents = [];
616
+ let reputationEnvelope = null;
617
+ try {
618
+ reputationEnvelope = await readJsonFile(reputationEventsPath);
619
+ if (Array.isArray(reputationEnvelope?.events)) reputationEvents = reputationEnvelope.events;
620
+ } catch (err) {
621
+ if (String(closepack?.files?.reputationEvents ?? "").trim() !== "") {
622
+ addIssue(issues, {
623
+ code: "CLOSEPACK_REPUTATION_EVENTS_MISSING",
624
+ message: "state/reputation_events.json is missing or invalid",
625
+ details: { message: err?.message ?? String(err ?? "") }
626
+ });
627
+ }
628
+ reputationEvents = [];
629
+ reputationEnvelope = null;
630
+ }
631
+
632
+ if (hold && agreementHash && String(hold.agreementHash ?? "").toLowerCase() !== agreementHash) {
633
+ addIssue(issues, {
634
+ code: "CLOSEPACK_BINDING_HOLD_AGREEMENT_MISMATCH",
635
+ message: "hold.agreementHash does not match closepack root agreementHash",
636
+ details: { holdAgreementHash: hold.agreementHash, agreementHash }
637
+ });
638
+ }
639
+
640
+ if (settlementAdjustment && hold) {
641
+ const expectedAdjustmentId = deterministicAdjustmentId(String(hold.agreementHash ?? "").toLowerCase());
642
+ if (String(settlementAdjustment.adjustmentId ?? "") !== expectedAdjustmentId) {
643
+ addIssue(issues, {
644
+ code: "CLOSEPACK_ADJUSTMENT_ID_NOT_DETERMINISTIC",
645
+ message: "settlement adjustment id does not match deterministic pattern",
646
+ details: { expectedAdjustmentId, actualAdjustmentId: settlementAdjustment.adjustmentId ?? null }
647
+ });
648
+ }
649
+ if (String(settlementAdjustment.holdHash ?? "").toLowerCase() !== String(hold.holdHash ?? "").toLowerCase()) {
650
+ addIssue(issues, {
651
+ code: "CLOSEPACK_BINDING_ADJUSTMENT_HOLD_MISMATCH",
652
+ message: "settlement adjustment holdHash does not match funding hold",
653
+ details: { holdHash: hold.holdHash ?? null, adjustmentHoldHash: settlementAdjustment.holdHash ?? null }
654
+ });
655
+ }
656
+ if (Number(settlementAdjustment.amountCents ?? -1) !== Number(hold.heldAmountCents ?? -2)) {
657
+ addIssue(issues, {
658
+ code: "CLOSEPACK_BINDING_ADJUSTMENT_AMOUNT_MISMATCH",
659
+ message: "settlement adjustment amountCents does not match hold heldAmountCents",
660
+ details: { adjustmentAmountCents: settlementAdjustment.amountCents ?? null, heldAmountCents: hold.heldAmountCents ?? null }
661
+ });
662
+ }
663
+ }
664
+
665
+ const identityRefs = Array.isArray(closepack?.identityRefs) ? closepack.identityRefs : [];
666
+ const identities = [];
667
+ for (const ref of identityRefs) {
668
+ const p = typeof ref?.path === "string" && ref.path.trim() !== "" ? ref.path.trim() : null;
669
+ if (!p) continue;
670
+ const fp = path.join(tmpDir, ...p.split("/"));
671
+ try {
672
+ identities.push(await readJsonFile(fp));
673
+ } catch (err) {
674
+ addIssue(issues, {
675
+ code: "CLOSEPACK_IDENTITY_REF_MISSING",
676
+ message: `identity file missing: ${p}`,
677
+ details: { message: err?.message ?? String(err ?? "") }
678
+ });
679
+ }
680
+ }
681
+ const publicKeyByKeyId = buildPublicKeyMap(identities);
682
+
683
+ const artifactRefs = Array.isArray(closepack?.artifactRefs) ? closepack.artifactRefs : [];
684
+ const artifacts = [];
685
+ for (const ref of artifactRefs) {
686
+ const artifactId = typeof ref?.artifactId === "string" ? ref.artifactId.trim() : "";
687
+ const p = typeof ref?.path === "string" && ref.path.trim() !== "" ? ref.path.trim() : null;
688
+ if (!artifactId || !p) continue;
689
+ const fp = path.join(tmpDir, ...p.split("/"));
690
+ try {
691
+ const artifact = await readJsonFile(fp);
692
+ artifacts.push(artifact);
693
+
694
+ const fileArtifactId = typeof artifact?.artifactId === "string" && artifact.artifactId.trim() !== "" ? artifact.artifactId.trim() : null;
695
+ if (fileArtifactId && fileArtifactId !== artifactId) {
696
+ addIssue(issues, {
697
+ code: "CLOSEPACK_ARTIFACT_ID_MISMATCH",
698
+ message: "artifactRef artifactId does not match artifact body",
699
+ details: { artifactIdRef: artifactId, artifactIdBody: fileArtifactId }
700
+ });
701
+ }
702
+
703
+ const refHash = typeof ref?.artifactHash === "string" && ref.artifactHash.trim() !== "" ? ref.artifactHash.trim().toLowerCase() : null;
704
+ const bodyHash = extractArtifactHash(artifact);
705
+ if (bodyHash) {
706
+ const computed = computeStoredArtifactHash(artifact);
707
+ if (computed !== bodyHash) {
708
+ addIssue(issues, {
709
+ code: "CLOSEPACK_ARTIFACT_HASH_MISMATCH",
710
+ message: "artifact hash mismatch",
711
+ details: { artifactId, expected: bodyHash, computed }
712
+ });
713
+ }
714
+ if (refHash && refHash !== bodyHash) {
715
+ addIssue(issues, {
716
+ code: "CLOSEPACK_ARTIFACT_REF_HASH_MISMATCH",
717
+ message: "artifactRef hash does not match artifact body hash",
718
+ details: { artifactId, refHash, bodyHash }
719
+ });
720
+ }
721
+ } else {
722
+ addIssue(issues, {
723
+ code: "CLOSEPACK_ARTIFACT_HASH_MISSING",
724
+ message: "artifact body is missing artifactHash",
725
+ details: { artifactId }
726
+ });
727
+ }
728
+ } catch (err) {
729
+ if (ref?.present === false) {
730
+ addIssue(issues, {
731
+ code: "CLOSEPACK_ARTIFACT_OPTIONAL_MISSING",
732
+ severity: "warning",
733
+ message: `optional artifact missing: ${artifactId}`,
734
+ details: { message: err?.message ?? String(err ?? "") }
735
+ });
736
+ } else {
737
+ addIssue(issues, {
738
+ code: "CLOSEPACK_ARTIFACT_REF_MISSING",
739
+ message: `artifact file missing: ${artifactId}`,
740
+ details: { message: err?.message ?? String(err ?? "") }
741
+ });
742
+ }
743
+ }
744
+ }
745
+
746
+ const envelopeArtifact = artifacts.find((artifact) => String(artifact?.schemaVersion ?? "") === DISPUTE_OPEN_ENVELOPE_SCHEMA_VERSION) ?? null;
747
+ if (envelopeArtifact) {
748
+ try {
749
+ validateDisputeOpenEnvelopeV1(envelopeArtifact);
750
+ } catch (err) {
751
+ addIssue(issues, {
752
+ code: "CLOSEPACK_ENVELOPE_INVALID",
753
+ message: "dispute-open envelope artifact is invalid",
754
+ details: { message: err?.message ?? String(err ?? "") }
755
+ });
756
+ }
757
+
758
+ const signerKeyId = typeof envelopeArtifact.signerKeyId === "string" ? envelopeArtifact.signerKeyId.trim() : "";
759
+ const publicKeyPem = signerKeyId ? publicKeyByKeyId.get(signerKeyId) : null;
760
+ if (!publicKeyPem) {
761
+ addIssue(issues, {
762
+ code: "CLOSEPACK_ENVELOPE_SIGNER_KEY_MISSING",
763
+ message: "missing signer public key for dispute-open envelope",
764
+ details: { signerKeyId: signerKeyId || null }
765
+ });
766
+ } else {
767
+ const valid = verifyHashHexEd25519({
768
+ hashHex: String(envelopeArtifact.envelopeHash ?? ""),
769
+ signatureBase64: String(envelopeArtifact.signature ?? ""),
770
+ publicKeyPem
771
+ });
772
+ if (!valid) {
773
+ addIssue(issues, {
774
+ code: "CLOSEPACK_ENVELOPE_SIGNATURE_INVALID",
775
+ message: "dispute-open envelope signature verification failed"
776
+ });
777
+ }
778
+ }
779
+
780
+ if (hold) {
781
+ if (String(envelopeArtifact.agreementHash ?? "").toLowerCase() !== String(hold.agreementHash ?? "").toLowerCase()) {
782
+ addIssue(issues, {
783
+ code: "CLOSEPACK_BINDING_ENVELOPE_AGREEMENT_MISMATCH",
784
+ message: "envelope agreementHash does not match hold agreementHash"
785
+ });
786
+ }
787
+ if (String(envelopeArtifact.receiptHash ?? "").toLowerCase() !== String(hold.receiptHash ?? "").toLowerCase()) {
788
+ addIssue(issues, {
789
+ code: "CLOSEPACK_BINDING_ENVELOPE_RECEIPT_MISMATCH",
790
+ message: "envelope receiptHash does not match hold receiptHash"
791
+ });
792
+ }
793
+ if (String(envelopeArtifact.holdHash ?? "").toLowerCase() !== String(hold.holdHash ?? "").toLowerCase()) {
794
+ addIssue(issues, {
795
+ code: "CLOSEPACK_BINDING_ENVELOPE_HOLD_MISMATCH",
796
+ message: "envelope holdHash does not match hold holdHash"
797
+ });
798
+ }
799
+ }
800
+ }
801
+
802
+ const verdictArtifact = artifacts.find((artifact) => String(artifact?.schemaVersion ?? "") === "ArbitrationVerdict.v1") ?? null;
803
+ if (verdictArtifact) {
804
+ const sig = verdictArtifact?.signature && typeof verdictArtifact.signature === "object" ? verdictArtifact.signature : null;
805
+ if (!sig) {
806
+ addIssue(issues, {
807
+ code: "CLOSEPACK_VERDICT_SIGNATURE_MISSING",
808
+ message: "arbitration verdict artifact signature is missing"
809
+ });
810
+ } else {
811
+ const computedVerdictHash = computeArbitrationVerdictHash(verdictArtifact);
812
+ if (String(sig.verdictHash ?? "").toLowerCase() !== computedVerdictHash.toLowerCase()) {
813
+ addIssue(issues, {
814
+ code: "CLOSEPACK_VERDICT_HASH_MISMATCH",
815
+ message: "arbitration verdict signature verdictHash does not match computed hash",
816
+ details: { expected: computedVerdictHash, actual: sig.verdictHash ?? null }
817
+ });
818
+ }
819
+ const signerKeyId = typeof sig.signerKeyId === "string" ? sig.signerKeyId.trim() : "";
820
+ const publicKeyPem = signerKeyId ? publicKeyByKeyId.get(signerKeyId) : null;
821
+ if (!publicKeyPem) {
822
+ addIssue(issues, {
823
+ code: "CLOSEPACK_VERDICT_SIGNER_KEY_MISSING",
824
+ message: "missing signer public key for arbitration verdict",
825
+ details: { signerKeyId: signerKeyId || null }
826
+ });
827
+ } else {
828
+ const valid = verifyHashHexEd25519({
829
+ hashHex: String(sig.verdictHash ?? ""),
830
+ signatureBase64: String(sig.signature ?? ""),
831
+ publicKeyPem
832
+ });
833
+ if (!valid) {
834
+ addIssue(issues, {
835
+ code: "CLOSEPACK_VERDICT_SIGNATURE_INVALID",
836
+ message: "arbitration verdict signature verification failed"
837
+ });
838
+ }
839
+ }
840
+ }
841
+
842
+ if (arbitrationCase) {
843
+ if (String(verdictArtifact.caseId ?? "") !== String(arbitrationCase.caseId ?? "")) {
844
+ addIssue(issues, {
845
+ code: "CLOSEPACK_BINDING_VERDICT_CASE_MISMATCH",
846
+ message: "verdict caseId does not match arbitration case caseId"
847
+ });
848
+ }
849
+ if (arbitrationCase?.verdictHash && String(arbitrationCase.verdictHash ?? "").toLowerCase() !== String(sig?.verdictHash ?? "").toLowerCase()) {
850
+ addIssue(issues, {
851
+ code: "CLOSEPACK_BINDING_VERDICT_HASH_MISMATCH",
852
+ message: "arbitration case verdictHash does not match verdict artifact signature hash"
853
+ });
854
+ }
855
+ }
856
+ }
857
+
858
+ if (arbitrationCase && hold) {
859
+ const meta = arbitrationCase?.metadata && typeof arbitrationCase.metadata === "object" ? arbitrationCase.metadata : null;
860
+ if (!meta || String(meta.caseType ?? "").toLowerCase() !== "tool_call") {
861
+ addIssue(issues, {
862
+ code: "CLOSEPACK_CASE_METADATA_INVALID",
863
+ message: "arbitration case metadata.caseType must be tool_call"
864
+ });
865
+ } else {
866
+ if (String(meta.agreementHash ?? "").toLowerCase() !== String(hold.agreementHash ?? "").toLowerCase()) {
867
+ addIssue(issues, {
868
+ code: "CLOSEPACK_BINDING_CASE_AGREEMENT_MISMATCH",
869
+ message: "arbitration case agreementHash does not match hold"
870
+ });
871
+ }
872
+ if (String(meta.receiptHash ?? "").toLowerCase() !== String(hold.receiptHash ?? "").toLowerCase()) {
873
+ addIssue(issues, {
874
+ code: "CLOSEPACK_BINDING_CASE_RECEIPT_MISMATCH",
875
+ message: "arbitration case receiptHash does not match hold"
876
+ });
877
+ }
878
+ if (String(meta.holdHash ?? "").toLowerCase() !== String(hold.holdHash ?? "").toLowerCase()) {
879
+ addIssue(issues, {
880
+ code: "CLOSEPACK_BINDING_CASE_HOLD_MISMATCH",
881
+ message: "arbitration case holdHash does not match hold"
882
+ });
883
+ }
884
+ }
885
+ }
886
+
887
+ if (verdictArtifact && settlementAdjustment) {
888
+ const releaseRatePct = Number(verdictArtifact.releaseRatePct);
889
+ const expectedKind =
890
+ releaseRatePct === 100
891
+ ? SETTLEMENT_ADJUSTMENT_KIND.HOLDBACK_RELEASE
892
+ : releaseRatePct === 0
893
+ ? SETTLEMENT_ADJUSTMENT_KIND.HOLDBACK_REFUND
894
+ : null;
895
+ if (expectedKind && String(settlementAdjustment.kind ?? "").toLowerCase() !== String(expectedKind)) {
896
+ addIssue(issues, {
897
+ code: "CLOSEPACK_BINDING_ADJUSTMENT_KIND_MISMATCH",
898
+ message: "settlement adjustment kind does not match verdict releaseRatePct",
899
+ details: { expectedKind, actualKind: settlementAdjustment.kind ?? null }
900
+ });
901
+ }
902
+ }
903
+
904
+ const artifactById = new Map();
905
+ const knownHashes = new Map();
906
+ function rememberHashTarget(hash, target) {
907
+ const normalized = typeof hash === "string" && /^[0-9a-f]{64}$/i.test(hash.trim()) ? hash.trim().toLowerCase() : null;
908
+ if (!normalized) return;
909
+ if (!knownHashes.has(normalized)) knownHashes.set(normalized, new Set());
910
+ knownHashes.get(normalized).add(String(target));
911
+ }
912
+ for (const artifact of artifacts) {
913
+ const artifactId = typeof artifact?.artifactId === "string" ? artifact.artifactId.trim() : "";
914
+ const artifactHash = extractArtifactHash(artifact);
915
+ if (artifactId) artifactById.set(artifactId, artifact);
916
+ if (artifactHash) rememberHashTarget(artifactHash, `artifact:${artifactId}`);
917
+ }
918
+ if (hold?.holdHash) rememberHashTarget(String(hold.holdHash), `hold:${String(hold.holdHash)}`);
919
+ if (settlementAdjustment?.adjustmentHash) {
920
+ rememberHashTarget(String(settlementAdjustment.adjustmentHash), `adjustment:${String(settlementAdjustment.adjustmentId ?? "")}`);
921
+ }
922
+
923
+ const graphRows = Array.isArray(closepack?.graph) ? closepack.graph : [];
924
+ const graphTargetsByFrom = new Map();
925
+ for (const edge of graphRows) {
926
+ const from = typeof edge?.from === "string" ? edge.from.trim() : "";
927
+ const to = typeof edge?.to === "string" ? edge.to.trim() : "";
928
+ if (!from || !to) continue;
929
+ if (!graphTargetsByFrom.has(from)) graphTargetsByFrom.set(from, new Set());
930
+ graphTargetsByFrom.get(from).add(to);
931
+ }
932
+
933
+ let reputationSourceRefsChecked = 0;
934
+ let reputationSourceRefsUnresolved = 0;
935
+ let reputationGraphEdgesMissing = 0;
936
+ for (const event of reputationEvents) {
937
+ const eventId = String(event?.eventId ?? "").trim();
938
+ if (!eventId) {
939
+ addIssue(issues, {
940
+ code: "CLOSEPACK_REPUTATION_EVENT_ID_MISSING",
941
+ message: "reputation event is missing eventId"
942
+ });
943
+ continue;
944
+ }
945
+ try {
946
+ validateReputationEventV1(event);
947
+ } catch (err) {
948
+ addIssue(issues, {
949
+ code: "CLOSEPACK_REPUTATION_EVENT_INVALID",
950
+ message: "reputation event artifact is invalid",
951
+ details: { eventId, message: err?.message ?? String(err ?? "") }
952
+ });
953
+ continue;
954
+ }
955
+ const sourceRef = event?.sourceRef && typeof event.sourceRef === "object" && !Array.isArray(event.sourceRef) ? event.sourceRef : null;
956
+ if (!sourceRef) continue;
957
+ reputationSourceRefsChecked += 1;
958
+
959
+ if (sourceRef.hash) {
960
+ const hashKey = String(sourceRef.hash).toLowerCase();
961
+ if (!knownHashes.has(hashKey)) {
962
+ reputationSourceRefsUnresolved += 1;
963
+ addIssue(issues, {
964
+ code: "CLOSEPACK_REPUTATION_SOURCE_HASH_UNRESOLVED",
965
+ message: "reputation sourceRef.hash does not resolve to a closepack artifact/hold/adjustment hash",
966
+ details: { eventId, sourceHash: sourceRef.hash }
967
+ });
968
+ }
969
+ }
970
+
971
+ const expectedTargets = [];
972
+ if (sourceRef.artifactId) {
973
+ expectedTargets.push(`artifact:${String(sourceRef.artifactId)}`);
974
+ const artifact = artifactById.get(String(sourceRef.artifactId));
975
+ if (!artifact) {
976
+ addIssue(issues, {
977
+ code: "CLOSEPACK_REPUTATION_SOURCE_ARTIFACT_MISSING",
978
+ message: "reputation sourceRef.artifactId is not present in closepack artifacts",
979
+ details: { eventId, artifactId: sourceRef.artifactId }
980
+ });
981
+ } else if (sourceRef.hash) {
982
+ const artifactHash = extractArtifactHash(artifact);
983
+ if (artifactHash && artifactHash !== String(sourceRef.hash).toLowerCase()) {
984
+ addIssue(issues, {
985
+ code: "CLOSEPACK_REPUTATION_SOURCE_ARTIFACT_HASH_MISMATCH",
986
+ message: "reputation sourceRef.hash does not match referenced artifact hash",
987
+ details: { eventId, artifactId: sourceRef.artifactId, sourceHash: sourceRef.hash, artifactHash }
988
+ });
989
+ }
990
+ }
991
+ }
992
+ if (String(sourceRef.kind ?? "").toLowerCase() === "settlement_adjustment" && sourceRef.sourceId) {
993
+ expectedTargets.push(`adjustment:${String(sourceRef.sourceId)}`);
994
+ }
995
+ if (sourceRef.holdHash) {
996
+ expectedTargets.push(`hold:${String(sourceRef.holdHash)}`);
997
+ }
998
+ if (expectedTargets.length > 0) {
999
+ const from = `reputation:${eventId}`;
1000
+ const graphTargets = graphTargetsByFrom.get(from) ?? new Set();
1001
+ const hasExpectedEdge = expectedTargets.some((target) => graphTargets.has(target));
1002
+ if (!hasExpectedEdge) {
1003
+ reputationGraphEdgesMissing += 1;
1004
+ addIssue(issues, {
1005
+ code: "CLOSEPACK_REPUTATION_GRAPH_EDGE_MISSING",
1006
+ message: "closepack graph is missing expected reputation source edge",
1007
+ details: { eventId, expectedTargets, graphTargets: [...graphTargets] }
1008
+ });
1009
+ }
1010
+ }
1011
+ }
1012
+
1013
+ let replayMatch = false;
1014
+ if (replay && typeof replay === "object") {
1015
+ replayMatch = replay?.comparisons?.chainConsistent === true;
1016
+ if (!replayMatch) {
1017
+ addIssue(issues, {
1018
+ code: "CLOSEPACK_REPLAY_MISMATCH",
1019
+ message: "replay report comparisons.chainConsistent is not true",
1020
+ details: { comparisons: replay?.comparisons ?? null, issues: replay?.issues ?? null }
1021
+ });
1022
+ }
1023
+ if (settlementAdjustment && replay?.replay?.expected?.adjustmentKind) {
1024
+ const expectedKind = String(replay.replay.expected.adjustmentKind ?? "").toLowerCase();
1025
+ if (expectedKind && String(settlementAdjustment.kind ?? "").toLowerCase() !== expectedKind) {
1026
+ addIssue(issues, {
1027
+ code: "CLOSEPACK_REPLAY_ADJUSTMENT_KIND_MISMATCH",
1028
+ message: "replay expected adjustment kind does not match settlement adjustment",
1029
+ details: { expectedKind, actualKind: settlementAdjustment.kind ?? null }
1030
+ });
1031
+ }
1032
+ }
1033
+ } else {
1034
+ addIssue(issues, {
1035
+ code: "CLOSEPACK_REPLAY_REPORT_MISSING",
1036
+ message: "reports/replay.json is missing",
1037
+ severity: "warning"
1038
+ });
1039
+ }
1040
+
1041
+ const errorCount = issues.filter((issue) => issue.severity !== "warning").length;
1042
+ return {
1043
+ schemaVersion: VERIFY_REPORT_SCHEMA_VERSION,
1044
+ verifiedAt: new Date().toISOString(),
1045
+ ok: errorCount === 0,
1046
+ replayMatch,
1047
+ sourceRefResolution: {
1048
+ ok: reputationSourceRefsUnresolved === 0 && reputationGraphEdgesMissing === 0,
1049
+ checkedEvents: reputationEvents.length,
1050
+ checkedSourceRefs: reputationSourceRefsChecked,
1051
+ unresolvedHashes: reputationSourceRefsUnresolved,
1052
+ missingGraphEdges: reputationGraphEdgesMissing
1053
+ },
1054
+ summary: {
1055
+ agreementHash: agreementHash ?? null,
1056
+ holdHash: hold?.holdHash ?? null,
1057
+ caseId: arbitrationCase?.caseId ?? null,
1058
+ adjustmentId: settlementAdjustment?.adjustmentId ?? null,
1059
+ artifacts: artifacts.length,
1060
+ identities: identities.length,
1061
+ reputationEvents: reputationEvents.length
1062
+ },
1063
+ issues
1064
+ };
1065
+ } finally {
1066
+ await fs.rm(tmpDir, { recursive: true, force: true });
1067
+ }
1068
+ }