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.
- package/Dockerfile +45 -0
- package/README.md +150 -0
- package/SETTLD_VERSION +1 -0
- package/bin/settld.js +212 -0
- package/conformance/README.md +14 -0
- package/conformance/kernel-v0/README.md +60 -0
- package/conformance/kernel-v0/cases.json +19 -0
- package/conformance/kernel-v0/run.mjs +830 -0
- package/conformance/v1/README.md +77 -0
- package/conformance/v1/bundles/closepack/nonstrict-pass-missing-sla-acceptance/attestation/bundle_head_attestation.json +1 -0
- package/conformance/v1/bundles/closepack/nonstrict-pass-missing-sla-acceptance/evidence/evidence_index.json +1 -0
- package/conformance/v1/bundles/closepack/nonstrict-pass-missing-sla-acceptance/governance/policy.json +1 -0
- package/conformance/v1/bundles/closepack/nonstrict-pass-missing-sla-acceptance/governance/revocations.json +1 -0
- package/conformance/v1/bundles/closepack/nonstrict-pass-missing-sla-acceptance/manifest.json +1 -0
- package/conformance/v1/bundles/closepack/nonstrict-pass-missing-sla-acceptance/payload/invoice_bundle/attestation/bundle_head_attestation.json +1 -0
- package/conformance/v1/bundles/closepack/nonstrict-pass-missing-sla-acceptance/payload/invoice_bundle/governance/policy.json +1 -0
- package/conformance/v1/bundles/closepack/nonstrict-pass-missing-sla-acceptance/payload/invoice_bundle/governance/revocations.json +1 -0
- package/conformance/v1/bundles/closepack/nonstrict-pass-missing-sla-acceptance/payload/invoice_bundle/invoice/invoice_claim.json +1 -0
- package/conformance/v1/bundles/closepack/nonstrict-pass-missing-sla-acceptance/payload/invoice_bundle/manifest.json +1 -0
- package/conformance/v1/bundles/closepack/nonstrict-pass-missing-sla-acceptance/payload/invoice_bundle/metering/metering_report.json +1 -0
- package/conformance/v1/bundles/closepack/nonstrict-pass-missing-sla-acceptance/payload/invoice_bundle/payload/job_proof_bundle/attestation/bundle_head_attestation.json +1 -0
- package/conformance/v1/bundles/closepack/nonstrict-pass-missing-sla-acceptance/payload/invoice_bundle/payload/job_proof_bundle/events/events.jsonl +1 -0
- package/conformance/v1/bundles/closepack/nonstrict-pass-missing-sla-acceptance/payload/invoice_bundle/payload/job_proof_bundle/events/payload_material.jsonl +1 -0
- package/conformance/v1/bundles/closepack/nonstrict-pass-missing-sla-acceptance/payload/invoice_bundle/payload/job_proof_bundle/governance/global/events/events.jsonl +1 -0
- 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
- package/conformance/v1/bundles/closepack/nonstrict-pass-missing-sla-acceptance/payload/invoice_bundle/payload/job_proof_bundle/governance/global/snapshot.json +1 -0
- package/conformance/v1/bundles/closepack/nonstrict-pass-missing-sla-acceptance/payload/invoice_bundle/payload/job_proof_bundle/governance/policy.json +1 -0
- package/conformance/v1/bundles/closepack/nonstrict-pass-missing-sla-acceptance/payload/invoice_bundle/payload/job_proof_bundle/governance/revocations.json +1 -0
- package/conformance/v1/bundles/closepack/nonstrict-pass-missing-sla-acceptance/payload/invoice_bundle/payload/job_proof_bundle/governance/tenant/events/events.jsonl +0 -0
- 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
- package/conformance/v1/bundles/closepack/nonstrict-pass-missing-sla-acceptance/payload/invoice_bundle/payload/job_proof_bundle/governance/tenant/snapshot.json +1 -0
- package/conformance/v1/bundles/closepack/nonstrict-pass-missing-sla-acceptance/payload/invoice_bundle/payload/job_proof_bundle/job/snapshot.json +1 -0
- package/conformance/v1/bundles/closepack/nonstrict-pass-missing-sla-acceptance/payload/invoice_bundle/payload/job_proof_bundle/keys/public_keys.json +1 -0
- package/conformance/v1/bundles/closepack/nonstrict-pass-missing-sla-acceptance/payload/invoice_bundle/payload/job_proof_bundle/manifest.json +1 -0
- package/conformance/v1/bundles/closepack/nonstrict-pass-missing-sla-acceptance/payload/invoice_bundle/payload/job_proof_bundle/verify/report.json +1 -0
- package/conformance/v1/bundles/closepack/nonstrict-pass-missing-sla-acceptance/payload/invoice_bundle/payload/job_proof_bundle/verify/verification_report.json +1 -0
- package/conformance/v1/bundles/closepack/nonstrict-pass-missing-sla-acceptance/payload/invoice_bundle/pricing/pricing_matrix.json +1 -0
- package/conformance/v1/bundles/closepack/nonstrict-pass-missing-sla-acceptance/payload/invoice_bundle/pricing/pricing_matrix_signatures.json +1 -0
- package/conformance/v1/bundles/closepack/nonstrict-pass-missing-sla-acceptance/payload/invoice_bundle/settld.json +1 -0
- package/conformance/v1/bundles/closepack/nonstrict-pass-missing-sla-acceptance/payload/invoice_bundle/verify/verification_report.json +1 -0
- package/conformance/v1/bundles/closepack/nonstrict-pass-missing-sla-acceptance/settld.json +1 -0
- package/conformance/v1/bundles/closepack/nonstrict-pass-missing-sla-acceptance/verify/verification_report.json +1 -0
- package/conformance/v1/bundles/closepack/strict-fail-embedded-invoice-fails/acceptance/acceptance_criteria.json +1 -0
- package/conformance/v1/bundles/closepack/strict-fail-embedded-invoice-fails/acceptance/acceptance_evaluation.json +1 -0
- package/conformance/v1/bundles/closepack/strict-fail-embedded-invoice-fails/attestation/bundle_head_attestation.json +1 -0
- package/conformance/v1/bundles/closepack/strict-fail-embedded-invoice-fails/evidence/evidence_index.json +1 -0
- package/conformance/v1/bundles/closepack/strict-fail-embedded-invoice-fails/governance/policy.json +1 -0
- package/conformance/v1/bundles/closepack/strict-fail-embedded-invoice-fails/governance/revocations.json +1 -0
- package/conformance/v1/bundles/closepack/strict-fail-embedded-invoice-fails/manifest.json +1 -0
- package/conformance/v1/bundles/closepack/strict-fail-embedded-invoice-fails/payload/invoice_bundle/attestation/bundle_head_attestation.json +1 -0
- package/conformance/v1/bundles/closepack/strict-fail-embedded-invoice-fails/payload/invoice_bundle/governance/policy.json +1 -0
- package/conformance/v1/bundles/closepack/strict-fail-embedded-invoice-fails/payload/invoice_bundle/governance/revocations.json +1 -0
- package/conformance/v1/bundles/closepack/strict-fail-embedded-invoice-fails/payload/invoice_bundle/invoice/invoice_claim.json +1 -0
- package/conformance/v1/bundles/closepack/strict-fail-embedded-invoice-fails/payload/invoice_bundle/manifest.json +1 -0
- package/conformance/v1/bundles/closepack/strict-fail-embedded-invoice-fails/payload/invoice_bundle/metering/metering_report.json +1 -0
- package/conformance/v1/bundles/closepack/strict-fail-embedded-invoice-fails/payload/invoice_bundle/payload/job_proof_bundle/attestation/bundle_head_attestation.json +1 -0
- package/conformance/v1/bundles/closepack/strict-fail-embedded-invoice-fails/payload/invoice_bundle/payload/job_proof_bundle/events/events.jsonl +1 -0
- package/conformance/v1/bundles/closepack/strict-fail-embedded-invoice-fails/payload/invoice_bundle/payload/job_proof_bundle/events/payload_material.jsonl +1 -0
- package/conformance/v1/bundles/closepack/strict-fail-embedded-invoice-fails/payload/invoice_bundle/payload/job_proof_bundle/governance/global/events/events.jsonl +1 -0
- 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
- package/conformance/v1/bundles/closepack/strict-fail-embedded-invoice-fails/payload/invoice_bundle/payload/job_proof_bundle/governance/global/snapshot.json +1 -0
- package/conformance/v1/bundles/closepack/strict-fail-embedded-invoice-fails/payload/invoice_bundle/payload/job_proof_bundle/governance/policy.json +1 -0
- package/conformance/v1/bundles/closepack/strict-fail-embedded-invoice-fails/payload/invoice_bundle/payload/job_proof_bundle/governance/revocations.json +1 -0
- package/conformance/v1/bundles/closepack/strict-fail-embedded-invoice-fails/payload/invoice_bundle/payload/job_proof_bundle/governance/tenant/events/events.jsonl +0 -0
- 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
- package/conformance/v1/bundles/closepack/strict-fail-embedded-invoice-fails/payload/invoice_bundle/payload/job_proof_bundle/governance/tenant/snapshot.json +1 -0
- package/conformance/v1/bundles/closepack/strict-fail-embedded-invoice-fails/payload/invoice_bundle/payload/job_proof_bundle/job/snapshot.json +1 -0
- package/conformance/v1/bundles/closepack/strict-fail-embedded-invoice-fails/payload/invoice_bundle/payload/job_proof_bundle/keys/public_keys.json +1 -0
- package/conformance/v1/bundles/closepack/strict-fail-embedded-invoice-fails/payload/invoice_bundle/payload/job_proof_bundle/manifest.json +1 -0
- package/conformance/v1/bundles/closepack/strict-fail-embedded-invoice-fails/payload/invoice_bundle/payload/job_proof_bundle/verify/report.json +1 -0
- package/conformance/v1/bundles/closepack/strict-fail-embedded-invoice-fails/payload/invoice_bundle/payload/job_proof_bundle/verify/verification_report.json +1 -0
- package/conformance/v1/bundles/closepack/strict-fail-embedded-invoice-fails/payload/invoice_bundle/pricing/pricing_matrix.json +1 -0
- package/conformance/v1/bundles/closepack/strict-fail-embedded-invoice-fails/payload/invoice_bundle/pricing/pricing_matrix_signatures.json +1 -0
- package/conformance/v1/bundles/closepack/strict-fail-embedded-invoice-fails/payload/invoice_bundle/settld.json +1 -0
- package/conformance/v1/bundles/closepack/strict-fail-embedded-invoice-fails/payload/invoice_bundle/verify/verification_report.json +1 -0
- package/conformance/v1/bundles/closepack/strict-fail-embedded-invoice-fails/settld.json +1 -0
- package/conformance/v1/bundles/closepack/strict-fail-embedded-invoice-fails/sla/sla_definition.json +1 -0
- package/conformance/v1/bundles/closepack/strict-fail-embedded-invoice-fails/sla/sla_evaluation.json +1 -0
- package/conformance/v1/bundles/closepack/strict-fail-embedded-invoice-fails/verify/verification_report.json +1 -0
- package/conformance/v1/bundles/closepack/strict-fail-evidence-index-mismatch/acceptance/acceptance_criteria.json +1 -0
- package/conformance/v1/bundles/closepack/strict-fail-evidence-index-mismatch/acceptance/acceptance_evaluation.json +1 -0
- package/conformance/v1/bundles/closepack/strict-fail-evidence-index-mismatch/attestation/bundle_head_attestation.json +1 -0
- package/conformance/v1/bundles/closepack/strict-fail-evidence-index-mismatch/evidence/evidence_index.json +1 -0
- package/conformance/v1/bundles/closepack/strict-fail-evidence-index-mismatch/governance/policy.json +1 -0
- package/conformance/v1/bundles/closepack/strict-fail-evidence-index-mismatch/governance/revocations.json +1 -0
- package/conformance/v1/bundles/closepack/strict-fail-evidence-index-mismatch/manifest.json +1 -0
- package/conformance/v1/bundles/closepack/strict-fail-evidence-index-mismatch/payload/invoice_bundle/attestation/bundle_head_attestation.json +1 -0
- package/conformance/v1/bundles/closepack/strict-fail-evidence-index-mismatch/payload/invoice_bundle/governance/policy.json +1 -0
- package/conformance/v1/bundles/closepack/strict-fail-evidence-index-mismatch/payload/invoice_bundle/governance/revocations.json +1 -0
- package/conformance/v1/bundles/closepack/strict-fail-evidence-index-mismatch/payload/invoice_bundle/invoice/invoice_claim.json +1 -0
- package/conformance/v1/bundles/closepack/strict-fail-evidence-index-mismatch/payload/invoice_bundle/manifest.json +1 -0
- package/conformance/v1/bundles/closepack/strict-fail-evidence-index-mismatch/payload/invoice_bundle/metering/metering_report.json +1 -0
- package/conformance/v1/bundles/closepack/strict-fail-evidence-index-mismatch/payload/invoice_bundle/payload/job_proof_bundle/attestation/bundle_head_attestation.json +1 -0
- package/conformance/v1/bundles/closepack/strict-fail-evidence-index-mismatch/payload/invoice_bundle/payload/job_proof_bundle/events/events.jsonl +1 -0
- package/conformance/v1/bundles/closepack/strict-fail-evidence-index-mismatch/payload/invoice_bundle/payload/job_proof_bundle/events/payload_material.jsonl +1 -0
- package/conformance/v1/bundles/closepack/strict-fail-evidence-index-mismatch/payload/invoice_bundle/payload/job_proof_bundle/governance/global/events/events.jsonl +1 -0
- 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
- package/conformance/v1/bundles/closepack/strict-fail-evidence-index-mismatch/payload/invoice_bundle/payload/job_proof_bundle/governance/global/snapshot.json +1 -0
- package/conformance/v1/bundles/closepack/strict-fail-evidence-index-mismatch/payload/invoice_bundle/payload/job_proof_bundle/governance/policy.json +1 -0
- package/conformance/v1/bundles/closepack/strict-fail-evidence-index-mismatch/payload/invoice_bundle/payload/job_proof_bundle/governance/revocations.json +1 -0
- package/conformance/v1/bundles/closepack/strict-fail-evidence-index-mismatch/payload/invoice_bundle/payload/job_proof_bundle/governance/tenant/events/events.jsonl +0 -0
- 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
- package/conformance/v1/bundles/closepack/strict-fail-evidence-index-mismatch/payload/invoice_bundle/payload/job_proof_bundle/governance/tenant/snapshot.json +1 -0
- package/conformance/v1/bundles/closepack/strict-fail-evidence-index-mismatch/payload/invoice_bundle/payload/job_proof_bundle/job/snapshot.json +1 -0
- package/conformance/v1/bundles/closepack/strict-fail-evidence-index-mismatch/payload/invoice_bundle/payload/job_proof_bundle/keys/public_keys.json +1 -0
- package/conformance/v1/bundles/closepack/strict-fail-evidence-index-mismatch/payload/invoice_bundle/payload/job_proof_bundle/manifest.json +1 -0
- package/conformance/v1/bundles/closepack/strict-fail-evidence-index-mismatch/payload/invoice_bundle/payload/job_proof_bundle/verify/report.json +1 -0
- package/conformance/v1/bundles/closepack/strict-fail-evidence-index-mismatch/payload/invoice_bundle/payload/job_proof_bundle/verify/verification_report.json +1 -0
- package/conformance/v1/bundles/closepack/strict-fail-evidence-index-mismatch/payload/invoice_bundle/pricing/pricing_matrix.json +1 -0
- package/conformance/v1/bundles/closepack/strict-fail-evidence-index-mismatch/payload/invoice_bundle/pricing/pricing_matrix_signatures.json +1 -0
- package/conformance/v1/bundles/closepack/strict-fail-evidence-index-mismatch/payload/invoice_bundle/settld.json +1 -0
- package/conformance/v1/bundles/closepack/strict-fail-evidence-index-mismatch/payload/invoice_bundle/verify/verification_report.json +1 -0
- package/conformance/v1/bundles/closepack/strict-fail-evidence-index-mismatch/settld.json +1 -0
- package/conformance/v1/bundles/closepack/strict-fail-evidence-index-mismatch/sla/sla_definition.json +1 -0
- package/conformance/v1/bundles/closepack/strict-fail-evidence-index-mismatch/sla/sla_evaluation.json +1 -0
- package/conformance/v1/bundles/closepack/strict-fail-evidence-index-mismatch/verify/verification_report.json +1 -0
- package/conformance/v1/bundles/closepack/strict-pass/acceptance/acceptance_criteria.json +1 -0
- package/conformance/v1/bundles/closepack/strict-pass/acceptance/acceptance_evaluation.json +1 -0
- package/conformance/v1/bundles/closepack/strict-pass/attestation/bundle_head_attestation.json +1 -0
- package/conformance/v1/bundles/closepack/strict-pass/evidence/evidence_index.json +1 -0
- package/conformance/v1/bundles/closepack/strict-pass/governance/policy.json +1 -0
- package/conformance/v1/bundles/closepack/strict-pass/governance/revocations.json +1 -0
- package/conformance/v1/bundles/closepack/strict-pass/manifest.json +1 -0
- package/conformance/v1/bundles/closepack/strict-pass/payload/invoice_bundle/attestation/bundle_head_attestation.json +1 -0
- package/conformance/v1/bundles/closepack/strict-pass/payload/invoice_bundle/governance/policy.json +1 -0
- package/conformance/v1/bundles/closepack/strict-pass/payload/invoice_bundle/governance/revocations.json +1 -0
- package/conformance/v1/bundles/closepack/strict-pass/payload/invoice_bundle/invoice/invoice_claim.json +1 -0
- package/conformance/v1/bundles/closepack/strict-pass/payload/invoice_bundle/manifest.json +1 -0
- package/conformance/v1/bundles/closepack/strict-pass/payload/invoice_bundle/metering/metering_report.json +1 -0
- package/conformance/v1/bundles/closepack/strict-pass/payload/invoice_bundle/payload/job_proof_bundle/attestation/bundle_head_attestation.json +1 -0
- package/conformance/v1/bundles/closepack/strict-pass/payload/invoice_bundle/payload/job_proof_bundle/events/events.jsonl +1 -0
- package/conformance/v1/bundles/closepack/strict-pass/payload/invoice_bundle/payload/job_proof_bundle/events/payload_material.jsonl +1 -0
- package/conformance/v1/bundles/closepack/strict-pass/payload/invoice_bundle/payload/job_proof_bundle/governance/global/events/events.jsonl +1 -0
- package/conformance/v1/bundles/closepack/strict-pass/payload/invoice_bundle/payload/job_proof_bundle/governance/global/events/payload_material.jsonl +1 -0
- package/conformance/v1/bundles/closepack/strict-pass/payload/invoice_bundle/payload/job_proof_bundle/governance/global/snapshot.json +1 -0
- package/conformance/v1/bundles/closepack/strict-pass/payload/invoice_bundle/payload/job_proof_bundle/governance/policy.json +1 -0
- package/conformance/v1/bundles/closepack/strict-pass/payload/invoice_bundle/payload/job_proof_bundle/governance/revocations.json +1 -0
- package/conformance/v1/bundles/closepack/strict-pass/payload/invoice_bundle/payload/job_proof_bundle/governance/tenant/events/events.jsonl +0 -0
- package/conformance/v1/bundles/closepack/strict-pass/payload/invoice_bundle/payload/job_proof_bundle/governance/tenant/events/payload_material.jsonl +0 -0
- package/conformance/v1/bundles/closepack/strict-pass/payload/invoice_bundle/payload/job_proof_bundle/governance/tenant/snapshot.json +1 -0
- package/conformance/v1/bundles/closepack/strict-pass/payload/invoice_bundle/payload/job_proof_bundle/job/snapshot.json +1 -0
- package/conformance/v1/bundles/closepack/strict-pass/payload/invoice_bundle/payload/job_proof_bundle/keys/public_keys.json +1 -0
- package/conformance/v1/bundles/closepack/strict-pass/payload/invoice_bundle/payload/job_proof_bundle/manifest.json +1 -0
- package/conformance/v1/bundles/closepack/strict-pass/payload/invoice_bundle/payload/job_proof_bundle/verify/report.json +1 -0
- package/conformance/v1/bundles/closepack/strict-pass/payload/invoice_bundle/payload/job_proof_bundle/verify/verification_report.json +1 -0
- package/conformance/v1/bundles/closepack/strict-pass/payload/invoice_bundle/pricing/pricing_matrix.json +1 -0
- package/conformance/v1/bundles/closepack/strict-pass/payload/invoice_bundle/pricing/pricing_matrix_signatures.json +1 -0
- package/conformance/v1/bundles/closepack/strict-pass/payload/invoice_bundle/settld.json +1 -0
- package/conformance/v1/bundles/closepack/strict-pass/payload/invoice_bundle/verify/verification_report.json +1 -0
- package/conformance/v1/bundles/closepack/strict-pass/settld.json +1 -0
- package/conformance/v1/bundles/closepack/strict-pass/sla/sla_definition.json +1 -0
- package/conformance/v1/bundles/closepack/strict-pass/sla/sla_evaluation.json +1 -0
- package/conformance/v1/bundles/closepack/strict-pass/verify/verification_report.json +1 -0
- package/conformance/v1/bundles/financepack/pass-with-tool-version-unknown-warning/attestation/bundle_head_attestation.json +1 -0
- package/conformance/v1/bundles/financepack/pass-with-tool-version-unknown-warning/finance/GLBatch.v1.json +1 -0
- package/conformance/v1/bundles/financepack/pass-with-tool-version-unknown-warning/finance/JournalCsv.v1.csv +2 -0
- package/conformance/v1/bundles/financepack/pass-with-tool-version-unknown-warning/finance/JournalCsv.v1.json +1 -0
- package/conformance/v1/bundles/financepack/pass-with-tool-version-unknown-warning/finance/reconcile.json +1 -0
- package/conformance/v1/bundles/financepack/pass-with-tool-version-unknown-warning/governance/policy.json +1 -0
- package/conformance/v1/bundles/financepack/pass-with-tool-version-unknown-warning/governance/revocations.json +1 -0
- package/conformance/v1/bundles/financepack/pass-with-tool-version-unknown-warning/manifest.json +1 -0
- package/conformance/v1/bundles/financepack/pass-with-tool-version-unknown-warning/month/attestation/bundle_head_attestation.json +1 -0
- package/conformance/v1/bundles/financepack/pass-with-tool-version-unknown-warning/month/events/events.jsonl +1 -0
- package/conformance/v1/bundles/financepack/pass-with-tool-version-unknown-warning/month/events/payload_material.jsonl +1 -0
- package/conformance/v1/bundles/financepack/pass-with-tool-version-unknown-warning/month/governance/global/events/events.jsonl +1 -0
- package/conformance/v1/bundles/financepack/pass-with-tool-version-unknown-warning/month/governance/global/events/payload_material.jsonl +1 -0
- package/conformance/v1/bundles/financepack/pass-with-tool-version-unknown-warning/month/governance/global/snapshot.json +1 -0
- package/conformance/v1/bundles/financepack/pass-with-tool-version-unknown-warning/month/governance/policy.json +1 -0
- package/conformance/v1/bundles/financepack/pass-with-tool-version-unknown-warning/month/governance/revocations.json +1 -0
- package/conformance/v1/bundles/financepack/pass-with-tool-version-unknown-warning/month/governance/tenant/events/events.jsonl +0 -0
- package/conformance/v1/bundles/financepack/pass-with-tool-version-unknown-warning/month/governance/tenant/events/payload_material.jsonl +0 -0
- package/conformance/v1/bundles/financepack/pass-with-tool-version-unknown-warning/month/governance/tenant/snapshot.json +1 -0
- package/conformance/v1/bundles/financepack/pass-with-tool-version-unknown-warning/month/keys/public_keys.json +1 -0
- package/conformance/v1/bundles/financepack/pass-with-tool-version-unknown-warning/month/manifest.json +1 -0
- package/conformance/v1/bundles/financepack/pass-with-tool-version-unknown-warning/month/verify/report.json +1 -0
- package/conformance/v1/bundles/financepack/pass-with-tool-version-unknown-warning/month/verify/verification_report.json +1 -0
- package/conformance/v1/bundles/financepack/pass-with-tool-version-unknown-warning/settld.json +1 -0
- package/conformance/v1/bundles/financepack/pass-with-tool-version-unknown-warning/verify/verification_report.json +1 -0
- package/conformance/v1/bundles/financepack/strict-fail-manifest-tamper/attestation/bundle_head_attestation.json +1 -0
- package/conformance/v1/bundles/financepack/strict-fail-manifest-tamper/finance/GLBatch.v1.json +1 -0
- package/conformance/v1/bundles/financepack/strict-fail-manifest-tamper/finance/JournalCsv.v1.csv +2 -0
- package/conformance/v1/bundles/financepack/strict-fail-manifest-tamper/finance/JournalCsv.v1.json +1 -0
- package/conformance/v1/bundles/financepack/strict-fail-manifest-tamper/finance/reconcile.json +2 -0
- package/conformance/v1/bundles/financepack/strict-fail-manifest-tamper/governance/policy.json +1 -0
- package/conformance/v1/bundles/financepack/strict-fail-manifest-tamper/governance/revocations.json +1 -0
- package/conformance/v1/bundles/financepack/strict-fail-manifest-tamper/manifest.json +1 -0
- package/conformance/v1/bundles/financepack/strict-fail-manifest-tamper/month/attestation/bundle_head_attestation.json +1 -0
- package/conformance/v1/bundles/financepack/strict-fail-manifest-tamper/month/events/events.jsonl +1 -0
- package/conformance/v1/bundles/financepack/strict-fail-manifest-tamper/month/events/payload_material.jsonl +1 -0
- package/conformance/v1/bundles/financepack/strict-fail-manifest-tamper/month/governance/global/events/events.jsonl +1 -0
- package/conformance/v1/bundles/financepack/strict-fail-manifest-tamper/month/governance/global/events/payload_material.jsonl +1 -0
- package/conformance/v1/bundles/financepack/strict-fail-manifest-tamper/month/governance/global/snapshot.json +1 -0
- package/conformance/v1/bundles/financepack/strict-fail-manifest-tamper/month/governance/policy.json +1 -0
- package/conformance/v1/bundles/financepack/strict-fail-manifest-tamper/month/governance/revocations.json +1 -0
- package/conformance/v1/bundles/financepack/strict-fail-manifest-tamper/month/governance/tenant/events/events.jsonl +0 -0
- package/conformance/v1/bundles/financepack/strict-fail-manifest-tamper/month/governance/tenant/events/payload_material.jsonl +0 -0
- package/conformance/v1/bundles/financepack/strict-fail-manifest-tamper/month/governance/tenant/snapshot.json +1 -0
- package/conformance/v1/bundles/financepack/strict-fail-manifest-tamper/month/keys/public_keys.json +1 -0
- package/conformance/v1/bundles/financepack/strict-fail-manifest-tamper/month/manifest.json +1 -0
- package/conformance/v1/bundles/financepack/strict-fail-manifest-tamper/month/verify/report.json +1 -0
- package/conformance/v1/bundles/financepack/strict-fail-manifest-tamper/month/verify/verification_report.json +1 -0
- package/conformance/v1/bundles/financepack/strict-fail-manifest-tamper/settld.json +1 -0
- package/conformance/v1/bundles/financepack/strict-fail-manifest-tamper/verify/verification_report.json +1 -0
- package/conformance/v1/bundles/financepack/strict-fail-missing-verification-report/attestation/bundle_head_attestation.json +1 -0
- package/conformance/v1/bundles/financepack/strict-fail-missing-verification-report/finance/GLBatch.v1.json +1 -0
- package/conformance/v1/bundles/financepack/strict-fail-missing-verification-report/finance/JournalCsv.v1.csv +2 -0
- package/conformance/v1/bundles/financepack/strict-fail-missing-verification-report/finance/JournalCsv.v1.json +1 -0
- package/conformance/v1/bundles/financepack/strict-fail-missing-verification-report/finance/reconcile.json +1 -0
- package/conformance/v1/bundles/financepack/strict-fail-missing-verification-report/governance/policy.json +1 -0
- package/conformance/v1/bundles/financepack/strict-fail-missing-verification-report/governance/revocations.json +1 -0
- package/conformance/v1/bundles/financepack/strict-fail-missing-verification-report/manifest.json +1 -0
- package/conformance/v1/bundles/financepack/strict-fail-missing-verification-report/month/attestation/bundle_head_attestation.json +1 -0
- package/conformance/v1/bundles/financepack/strict-fail-missing-verification-report/month/events/events.jsonl +1 -0
- package/conformance/v1/bundles/financepack/strict-fail-missing-verification-report/month/events/payload_material.jsonl +1 -0
- package/conformance/v1/bundles/financepack/strict-fail-missing-verification-report/month/governance/global/events/events.jsonl +1 -0
- package/conformance/v1/bundles/financepack/strict-fail-missing-verification-report/month/governance/global/events/payload_material.jsonl +1 -0
- package/conformance/v1/bundles/financepack/strict-fail-missing-verification-report/month/governance/global/snapshot.json +1 -0
- package/conformance/v1/bundles/financepack/strict-fail-missing-verification-report/month/governance/policy.json +1 -0
- package/conformance/v1/bundles/financepack/strict-fail-missing-verification-report/month/governance/revocations.json +1 -0
- package/conformance/v1/bundles/financepack/strict-fail-missing-verification-report/month/governance/tenant/events/events.jsonl +0 -0
- package/conformance/v1/bundles/financepack/strict-fail-missing-verification-report/month/governance/tenant/events/payload_material.jsonl +0 -0
- package/conformance/v1/bundles/financepack/strict-fail-missing-verification-report/month/governance/tenant/snapshot.json +1 -0
- package/conformance/v1/bundles/financepack/strict-fail-missing-verification-report/month/keys/public_keys.json +1 -0
- package/conformance/v1/bundles/financepack/strict-fail-missing-verification-report/month/manifest.json +1 -0
- package/conformance/v1/bundles/financepack/strict-fail-missing-verification-report/month/verify/report.json +1 -0
- package/conformance/v1/bundles/financepack/strict-fail-missing-verification-report/month/verify/verification_report.json +1 -0
- package/conformance/v1/bundles/financepack/strict-fail-missing-verification-report/settld.json +1 -0
- package/conformance/v1/bundles/financepack/strict-pass/attestation/bundle_head_attestation.json +1 -0
- package/conformance/v1/bundles/financepack/strict-pass/finance/GLBatch.v1.json +1 -0
- package/conformance/v1/bundles/financepack/strict-pass/finance/JournalCsv.v1.csv +2 -0
- package/conformance/v1/bundles/financepack/strict-pass/finance/JournalCsv.v1.json +1 -0
- package/conformance/v1/bundles/financepack/strict-pass/finance/reconcile.json +1 -0
- package/conformance/v1/bundles/financepack/strict-pass/governance/policy.json +1 -0
- package/conformance/v1/bundles/financepack/strict-pass/governance/revocations.json +1 -0
- package/conformance/v1/bundles/financepack/strict-pass/manifest.json +1 -0
- package/conformance/v1/bundles/financepack/strict-pass/month/attestation/bundle_head_attestation.json +1 -0
- package/conformance/v1/bundles/financepack/strict-pass/month/events/events.jsonl +1 -0
- package/conformance/v1/bundles/financepack/strict-pass/month/events/payload_material.jsonl +1 -0
- package/conformance/v1/bundles/financepack/strict-pass/month/governance/global/events/events.jsonl +1 -0
- package/conformance/v1/bundles/financepack/strict-pass/month/governance/global/events/payload_material.jsonl +1 -0
- package/conformance/v1/bundles/financepack/strict-pass/month/governance/global/snapshot.json +1 -0
- package/conformance/v1/bundles/financepack/strict-pass/month/governance/policy.json +1 -0
- package/conformance/v1/bundles/financepack/strict-pass/month/governance/revocations.json +1 -0
- package/conformance/v1/bundles/financepack/strict-pass/month/governance/tenant/events/events.jsonl +0 -0
- package/conformance/v1/bundles/financepack/strict-pass/month/governance/tenant/events/payload_material.jsonl +0 -0
- package/conformance/v1/bundles/financepack/strict-pass/month/governance/tenant/snapshot.json +1 -0
- package/conformance/v1/bundles/financepack/strict-pass/month/keys/public_keys.json +1 -0
- package/conformance/v1/bundles/financepack/strict-pass/month/manifest.json +1 -0
- package/conformance/v1/bundles/financepack/strict-pass/month/verify/report.json +1 -0
- package/conformance/v1/bundles/financepack/strict-pass/month/verify/verification_report.json +1 -0
- package/conformance/v1/bundles/financepack/strict-pass/settld.json +1 -0
- package/conformance/v1/bundles/financepack/strict-pass/verify/verification_report.json +1 -0
- package/conformance/v1/bundles/invoicebundle/nonstrict-pass-missing-verification-report/attestation/bundle_head_attestation.json +1 -0
- package/conformance/v1/bundles/invoicebundle/nonstrict-pass-missing-verification-report/governance/policy.json +1 -0
- package/conformance/v1/bundles/invoicebundle/nonstrict-pass-missing-verification-report/governance/revocations.json +1 -0
- package/conformance/v1/bundles/invoicebundle/nonstrict-pass-missing-verification-report/invoice/invoice_claim.json +1 -0
- package/conformance/v1/bundles/invoicebundle/nonstrict-pass-missing-verification-report/manifest.json +1 -0
- package/conformance/v1/bundles/invoicebundle/nonstrict-pass-missing-verification-report/metering/metering_report.json +1 -0
- package/conformance/v1/bundles/invoicebundle/nonstrict-pass-missing-verification-report/payload/job_proof_bundle/attestation/bundle_head_attestation.json +1 -0
- package/conformance/v1/bundles/invoicebundle/nonstrict-pass-missing-verification-report/payload/job_proof_bundle/events/events.jsonl +1 -0
- package/conformance/v1/bundles/invoicebundle/nonstrict-pass-missing-verification-report/payload/job_proof_bundle/events/payload_material.jsonl +1 -0
- package/conformance/v1/bundles/invoicebundle/nonstrict-pass-missing-verification-report/payload/job_proof_bundle/governance/global/events/events.jsonl +1 -0
- package/conformance/v1/bundles/invoicebundle/nonstrict-pass-missing-verification-report/payload/job_proof_bundle/governance/global/events/payload_material.jsonl +1 -0
- package/conformance/v1/bundles/invoicebundle/nonstrict-pass-missing-verification-report/payload/job_proof_bundle/governance/global/snapshot.json +1 -0
- package/conformance/v1/bundles/invoicebundle/nonstrict-pass-missing-verification-report/payload/job_proof_bundle/governance/policy.json +1 -0
- package/conformance/v1/bundles/invoicebundle/nonstrict-pass-missing-verification-report/payload/job_proof_bundle/governance/revocations.json +1 -0
- package/conformance/v1/bundles/invoicebundle/nonstrict-pass-missing-verification-report/payload/job_proof_bundle/governance/tenant/events/events.jsonl +0 -0
- package/conformance/v1/bundles/invoicebundle/nonstrict-pass-missing-verification-report/payload/job_proof_bundle/governance/tenant/events/payload_material.jsonl +0 -0
- package/conformance/v1/bundles/invoicebundle/nonstrict-pass-missing-verification-report/payload/job_proof_bundle/governance/tenant/snapshot.json +1 -0
- package/conformance/v1/bundles/invoicebundle/nonstrict-pass-missing-verification-report/payload/job_proof_bundle/job/snapshot.json +1 -0
- package/conformance/v1/bundles/invoicebundle/nonstrict-pass-missing-verification-report/payload/job_proof_bundle/keys/public_keys.json +1 -0
- package/conformance/v1/bundles/invoicebundle/nonstrict-pass-missing-verification-report/payload/job_proof_bundle/manifest.json +1 -0
- package/conformance/v1/bundles/invoicebundle/nonstrict-pass-missing-verification-report/payload/job_proof_bundle/verify/report.json +1 -0
- package/conformance/v1/bundles/invoicebundle/nonstrict-pass-missing-verification-report/payload/job_proof_bundle/verify/verification_report.json +1 -0
- package/conformance/v1/bundles/invoicebundle/nonstrict-pass-missing-verification-report/pricing/pricing_matrix.json +1 -0
- package/conformance/v1/bundles/invoicebundle/nonstrict-pass-missing-verification-report/pricing/pricing_matrix_signatures.json +1 -0
- package/conformance/v1/bundles/invoicebundle/nonstrict-pass-missing-verification-report/settld.json +1 -0
- package/conformance/v1/bundles/invoicebundle/nonstrict-pass-unsigned-pricing-matrix-warning/attestation/bundle_head_attestation.json +1 -0
- package/conformance/v1/bundles/invoicebundle/nonstrict-pass-unsigned-pricing-matrix-warning/governance/policy.json +1 -0
- package/conformance/v1/bundles/invoicebundle/nonstrict-pass-unsigned-pricing-matrix-warning/governance/revocations.json +1 -0
- package/conformance/v1/bundles/invoicebundle/nonstrict-pass-unsigned-pricing-matrix-warning/invoice/invoice_claim.json +1 -0
- package/conformance/v1/bundles/invoicebundle/nonstrict-pass-unsigned-pricing-matrix-warning/manifest.json +1 -0
- package/conformance/v1/bundles/invoicebundle/nonstrict-pass-unsigned-pricing-matrix-warning/metering/metering_report.json +1 -0
- package/conformance/v1/bundles/invoicebundle/nonstrict-pass-unsigned-pricing-matrix-warning/payload/job_proof_bundle/attestation/bundle_head_attestation.json +1 -0
- package/conformance/v1/bundles/invoicebundle/nonstrict-pass-unsigned-pricing-matrix-warning/payload/job_proof_bundle/events/events.jsonl +1 -0
- package/conformance/v1/bundles/invoicebundle/nonstrict-pass-unsigned-pricing-matrix-warning/payload/job_proof_bundle/events/payload_material.jsonl +1 -0
- package/conformance/v1/bundles/invoicebundle/nonstrict-pass-unsigned-pricing-matrix-warning/payload/job_proof_bundle/governance/global/events/events.jsonl +1 -0
- package/conformance/v1/bundles/invoicebundle/nonstrict-pass-unsigned-pricing-matrix-warning/payload/job_proof_bundle/governance/global/events/payload_material.jsonl +1 -0
- package/conformance/v1/bundles/invoicebundle/nonstrict-pass-unsigned-pricing-matrix-warning/payload/job_proof_bundle/governance/global/snapshot.json +1 -0
- package/conformance/v1/bundles/invoicebundle/nonstrict-pass-unsigned-pricing-matrix-warning/payload/job_proof_bundle/governance/policy.json +1 -0
- package/conformance/v1/bundles/invoicebundle/nonstrict-pass-unsigned-pricing-matrix-warning/payload/job_proof_bundle/governance/revocations.json +1 -0
- package/conformance/v1/bundles/invoicebundle/nonstrict-pass-unsigned-pricing-matrix-warning/payload/job_proof_bundle/governance/tenant/events/events.jsonl +0 -0
- package/conformance/v1/bundles/invoicebundle/nonstrict-pass-unsigned-pricing-matrix-warning/payload/job_proof_bundle/governance/tenant/events/payload_material.jsonl +0 -0
- package/conformance/v1/bundles/invoicebundle/nonstrict-pass-unsigned-pricing-matrix-warning/payload/job_proof_bundle/governance/tenant/snapshot.json +1 -0
- package/conformance/v1/bundles/invoicebundle/nonstrict-pass-unsigned-pricing-matrix-warning/payload/job_proof_bundle/job/snapshot.json +1 -0
- package/conformance/v1/bundles/invoicebundle/nonstrict-pass-unsigned-pricing-matrix-warning/payload/job_proof_bundle/keys/public_keys.json +1 -0
- package/conformance/v1/bundles/invoicebundle/nonstrict-pass-unsigned-pricing-matrix-warning/payload/job_proof_bundle/manifest.json +1 -0
- package/conformance/v1/bundles/invoicebundle/nonstrict-pass-unsigned-pricing-matrix-warning/payload/job_proof_bundle/verify/report.json +1 -0
- package/conformance/v1/bundles/invoicebundle/nonstrict-pass-unsigned-pricing-matrix-warning/payload/job_proof_bundle/verify/verification_report.json +1 -0
- package/conformance/v1/bundles/invoicebundle/nonstrict-pass-unsigned-pricing-matrix-warning/pricing/pricing_matrix.json +1 -0
- package/conformance/v1/bundles/invoicebundle/nonstrict-pass-unsigned-pricing-matrix-warning/settld.json +1 -0
- package/conformance/v1/bundles/invoicebundle/nonstrict-pass-unsigned-pricing-matrix-warning/verify/verification_report.json +1 -0
- package/conformance/v1/bundles/invoicebundle/strict-fail-evidence-sha-mismatch/attestation/bundle_head_attestation.json +1 -0
- package/conformance/v1/bundles/invoicebundle/strict-fail-evidence-sha-mismatch/governance/policy.json +1 -0
- package/conformance/v1/bundles/invoicebundle/strict-fail-evidence-sha-mismatch/governance/revocations.json +1 -0
- package/conformance/v1/bundles/invoicebundle/strict-fail-evidence-sha-mismatch/invoice/invoice_claim.json +1 -0
- package/conformance/v1/bundles/invoicebundle/strict-fail-evidence-sha-mismatch/manifest.json +1 -0
- package/conformance/v1/bundles/invoicebundle/strict-fail-evidence-sha-mismatch/metering/metering_report.json +1 -0
- package/conformance/v1/bundles/invoicebundle/strict-fail-evidence-sha-mismatch/payload/job_proof_bundle/attestation/bundle_head_attestation.json +1 -0
- package/conformance/v1/bundles/invoicebundle/strict-fail-evidence-sha-mismatch/payload/job_proof_bundle/events/events.jsonl +1 -0
- package/conformance/v1/bundles/invoicebundle/strict-fail-evidence-sha-mismatch/payload/job_proof_bundle/events/payload_material.jsonl +1 -0
- package/conformance/v1/bundles/invoicebundle/strict-fail-evidence-sha-mismatch/payload/job_proof_bundle/governance/global/events/events.jsonl +1 -0
- package/conformance/v1/bundles/invoicebundle/strict-fail-evidence-sha-mismatch/payload/job_proof_bundle/governance/global/events/payload_material.jsonl +1 -0
- package/conformance/v1/bundles/invoicebundle/strict-fail-evidence-sha-mismatch/payload/job_proof_bundle/governance/global/snapshot.json +1 -0
- package/conformance/v1/bundles/invoicebundle/strict-fail-evidence-sha-mismatch/payload/job_proof_bundle/governance/policy.json +1 -0
- package/conformance/v1/bundles/invoicebundle/strict-fail-evidence-sha-mismatch/payload/job_proof_bundle/governance/revocations.json +1 -0
- package/conformance/v1/bundles/invoicebundle/strict-fail-evidence-sha-mismatch/payload/job_proof_bundle/governance/tenant/events/events.jsonl +0 -0
- package/conformance/v1/bundles/invoicebundle/strict-fail-evidence-sha-mismatch/payload/job_proof_bundle/governance/tenant/events/payload_material.jsonl +0 -0
- package/conformance/v1/bundles/invoicebundle/strict-fail-evidence-sha-mismatch/payload/job_proof_bundle/governance/tenant/snapshot.json +1 -0
- package/conformance/v1/bundles/invoicebundle/strict-fail-evidence-sha-mismatch/payload/job_proof_bundle/job/snapshot.json +1 -0
- package/conformance/v1/bundles/invoicebundle/strict-fail-evidence-sha-mismatch/payload/job_proof_bundle/keys/public_keys.json +1 -0
- package/conformance/v1/bundles/invoicebundle/strict-fail-evidence-sha-mismatch/payload/job_proof_bundle/manifest.json +1 -0
- package/conformance/v1/bundles/invoicebundle/strict-fail-evidence-sha-mismatch/payload/job_proof_bundle/verify/report.json +1 -0
- package/conformance/v1/bundles/invoicebundle/strict-fail-evidence-sha-mismatch/payload/job_proof_bundle/verify/verification_report.json +1 -0
- package/conformance/v1/bundles/invoicebundle/strict-fail-evidence-sha-mismatch/pricing/pricing_matrix.json +1 -0
- package/conformance/v1/bundles/invoicebundle/strict-fail-evidence-sha-mismatch/pricing/pricing_matrix_signatures.json +1 -0
- package/conformance/v1/bundles/invoicebundle/strict-fail-evidence-sha-mismatch/settld.json +1 -0
- package/conformance/v1/bundles/invoicebundle/strict-fail-evidence-sha-mismatch/verify/verification_report.json +1 -0
- package/conformance/v1/bundles/invoicebundle/strict-fail-invalid-pricing-matrix-signature/attestation/bundle_head_attestation.json +1 -0
- package/conformance/v1/bundles/invoicebundle/strict-fail-invalid-pricing-matrix-signature/governance/policy.json +1 -0
- package/conformance/v1/bundles/invoicebundle/strict-fail-invalid-pricing-matrix-signature/governance/revocations.json +1 -0
- package/conformance/v1/bundles/invoicebundle/strict-fail-invalid-pricing-matrix-signature/invoice/invoice_claim.json +1 -0
- package/conformance/v1/bundles/invoicebundle/strict-fail-invalid-pricing-matrix-signature/manifest.json +1 -0
- package/conformance/v1/bundles/invoicebundle/strict-fail-invalid-pricing-matrix-signature/metering/metering_report.json +1 -0
- package/conformance/v1/bundles/invoicebundle/strict-fail-invalid-pricing-matrix-signature/payload/job_proof_bundle/attestation/bundle_head_attestation.json +1 -0
- package/conformance/v1/bundles/invoicebundle/strict-fail-invalid-pricing-matrix-signature/payload/job_proof_bundle/events/events.jsonl +1 -0
- package/conformance/v1/bundles/invoicebundle/strict-fail-invalid-pricing-matrix-signature/payload/job_proof_bundle/events/payload_material.jsonl +1 -0
- package/conformance/v1/bundles/invoicebundle/strict-fail-invalid-pricing-matrix-signature/payload/job_proof_bundle/governance/global/events/events.jsonl +1 -0
- package/conformance/v1/bundles/invoicebundle/strict-fail-invalid-pricing-matrix-signature/payload/job_proof_bundle/governance/global/events/payload_material.jsonl +1 -0
- package/conformance/v1/bundles/invoicebundle/strict-fail-invalid-pricing-matrix-signature/payload/job_proof_bundle/governance/global/snapshot.json +1 -0
- package/conformance/v1/bundles/invoicebundle/strict-fail-invalid-pricing-matrix-signature/payload/job_proof_bundle/governance/policy.json +1 -0
- package/conformance/v1/bundles/invoicebundle/strict-fail-invalid-pricing-matrix-signature/payload/job_proof_bundle/governance/revocations.json +1 -0
- package/conformance/v1/bundles/invoicebundle/strict-fail-invalid-pricing-matrix-signature/payload/job_proof_bundle/governance/tenant/events/events.jsonl +0 -0
- package/conformance/v1/bundles/invoicebundle/strict-fail-invalid-pricing-matrix-signature/payload/job_proof_bundle/governance/tenant/events/payload_material.jsonl +0 -0
- package/conformance/v1/bundles/invoicebundle/strict-fail-invalid-pricing-matrix-signature/payload/job_proof_bundle/governance/tenant/snapshot.json +1 -0
- package/conformance/v1/bundles/invoicebundle/strict-fail-invalid-pricing-matrix-signature/payload/job_proof_bundle/job/snapshot.json +1 -0
- package/conformance/v1/bundles/invoicebundle/strict-fail-invalid-pricing-matrix-signature/payload/job_proof_bundle/keys/public_keys.json +1 -0
- package/conformance/v1/bundles/invoicebundle/strict-fail-invalid-pricing-matrix-signature/payload/job_proof_bundle/manifest.json +1 -0
- package/conformance/v1/bundles/invoicebundle/strict-fail-invalid-pricing-matrix-signature/payload/job_proof_bundle/verify/report.json +1 -0
- package/conformance/v1/bundles/invoicebundle/strict-fail-invalid-pricing-matrix-signature/payload/job_proof_bundle/verify/verification_report.json +1 -0
- package/conformance/v1/bundles/invoicebundle/strict-fail-invalid-pricing-matrix-signature/pricing/pricing_matrix.json +1 -0
- package/conformance/v1/bundles/invoicebundle/strict-fail-invalid-pricing-matrix-signature/pricing/pricing_matrix_signatures.json +1 -0
- package/conformance/v1/bundles/invoicebundle/strict-fail-invalid-pricing-matrix-signature/settld.json +1 -0
- package/conformance/v1/bundles/invoicebundle/strict-fail-invalid-pricing-matrix-signature/verify/verification_report.json +1 -0
- package/conformance/v1/bundles/invoicebundle/strict-fail-invoice-total-mismatch/attestation/bundle_head_attestation.json +1 -0
- package/conformance/v1/bundles/invoicebundle/strict-fail-invoice-total-mismatch/governance/policy.json +1 -0
- package/conformance/v1/bundles/invoicebundle/strict-fail-invoice-total-mismatch/governance/revocations.json +1 -0
- package/conformance/v1/bundles/invoicebundle/strict-fail-invoice-total-mismatch/invoice/invoice_claim.json +1 -0
- package/conformance/v1/bundles/invoicebundle/strict-fail-invoice-total-mismatch/manifest.json +1 -0
- package/conformance/v1/bundles/invoicebundle/strict-fail-invoice-total-mismatch/metering/metering_report.json +1 -0
- package/conformance/v1/bundles/invoicebundle/strict-fail-invoice-total-mismatch/payload/job_proof_bundle/attestation/bundle_head_attestation.json +1 -0
- package/conformance/v1/bundles/invoicebundle/strict-fail-invoice-total-mismatch/payload/job_proof_bundle/events/events.jsonl +1 -0
- package/conformance/v1/bundles/invoicebundle/strict-fail-invoice-total-mismatch/payload/job_proof_bundle/events/payload_material.jsonl +1 -0
- package/conformance/v1/bundles/invoicebundle/strict-fail-invoice-total-mismatch/payload/job_proof_bundle/governance/global/events/events.jsonl +1 -0
- package/conformance/v1/bundles/invoicebundle/strict-fail-invoice-total-mismatch/payload/job_proof_bundle/governance/global/events/payload_material.jsonl +1 -0
- package/conformance/v1/bundles/invoicebundle/strict-fail-invoice-total-mismatch/payload/job_proof_bundle/governance/global/snapshot.json +1 -0
- package/conformance/v1/bundles/invoicebundle/strict-fail-invoice-total-mismatch/payload/job_proof_bundle/governance/policy.json +1 -0
- package/conformance/v1/bundles/invoicebundle/strict-fail-invoice-total-mismatch/payload/job_proof_bundle/governance/revocations.json +1 -0
- package/conformance/v1/bundles/invoicebundle/strict-fail-invoice-total-mismatch/payload/job_proof_bundle/governance/tenant/events/events.jsonl +0 -0
- package/conformance/v1/bundles/invoicebundle/strict-fail-invoice-total-mismatch/payload/job_proof_bundle/governance/tenant/events/payload_material.jsonl +0 -0
- package/conformance/v1/bundles/invoicebundle/strict-fail-invoice-total-mismatch/payload/job_proof_bundle/governance/tenant/snapshot.json +1 -0
- package/conformance/v1/bundles/invoicebundle/strict-fail-invoice-total-mismatch/payload/job_proof_bundle/job/snapshot.json +1 -0
- package/conformance/v1/bundles/invoicebundle/strict-fail-invoice-total-mismatch/payload/job_proof_bundle/keys/public_keys.json +1 -0
- package/conformance/v1/bundles/invoicebundle/strict-fail-invoice-total-mismatch/payload/job_proof_bundle/manifest.json +1 -0
- package/conformance/v1/bundles/invoicebundle/strict-fail-invoice-total-mismatch/payload/job_proof_bundle/verify/report.json +1 -0
- package/conformance/v1/bundles/invoicebundle/strict-fail-invoice-total-mismatch/payload/job_proof_bundle/verify/verification_report.json +1 -0
- package/conformance/v1/bundles/invoicebundle/strict-fail-invoice-total-mismatch/pricing/pricing_matrix.json +1 -0
- package/conformance/v1/bundles/invoicebundle/strict-fail-invoice-total-mismatch/pricing/pricing_matrix_signatures.json +1 -0
- package/conformance/v1/bundles/invoicebundle/strict-fail-invoice-total-mismatch/settld.json +1 -0
- package/conformance/v1/bundles/invoicebundle/strict-fail-invoice-total-mismatch/verify/verification_report.json +1 -0
- package/conformance/v1/bundles/invoicebundle/strict-fail-missing-pricing-matrix-signature/attestation/bundle_head_attestation.json +1 -0
- package/conformance/v1/bundles/invoicebundle/strict-fail-missing-pricing-matrix-signature/governance/policy.json +1 -0
- package/conformance/v1/bundles/invoicebundle/strict-fail-missing-pricing-matrix-signature/governance/revocations.json +1 -0
- package/conformance/v1/bundles/invoicebundle/strict-fail-missing-pricing-matrix-signature/invoice/invoice_claim.json +1 -0
- package/conformance/v1/bundles/invoicebundle/strict-fail-missing-pricing-matrix-signature/manifest.json +1 -0
- package/conformance/v1/bundles/invoicebundle/strict-fail-missing-pricing-matrix-signature/metering/metering_report.json +1 -0
- package/conformance/v1/bundles/invoicebundle/strict-fail-missing-pricing-matrix-signature/payload/job_proof_bundle/attestation/bundle_head_attestation.json +1 -0
- package/conformance/v1/bundles/invoicebundle/strict-fail-missing-pricing-matrix-signature/payload/job_proof_bundle/events/events.jsonl +1 -0
- package/conformance/v1/bundles/invoicebundle/strict-fail-missing-pricing-matrix-signature/payload/job_proof_bundle/events/payload_material.jsonl +1 -0
- package/conformance/v1/bundles/invoicebundle/strict-fail-missing-pricing-matrix-signature/payload/job_proof_bundle/governance/global/events/events.jsonl +1 -0
- package/conformance/v1/bundles/invoicebundle/strict-fail-missing-pricing-matrix-signature/payload/job_proof_bundle/governance/global/events/payload_material.jsonl +1 -0
- package/conformance/v1/bundles/invoicebundle/strict-fail-missing-pricing-matrix-signature/payload/job_proof_bundle/governance/global/snapshot.json +1 -0
- package/conformance/v1/bundles/invoicebundle/strict-fail-missing-pricing-matrix-signature/payload/job_proof_bundle/governance/policy.json +1 -0
- package/conformance/v1/bundles/invoicebundle/strict-fail-missing-pricing-matrix-signature/payload/job_proof_bundle/governance/revocations.json +1 -0
- package/conformance/v1/bundles/invoicebundle/strict-fail-missing-pricing-matrix-signature/payload/job_proof_bundle/governance/tenant/events/events.jsonl +0 -0
- package/conformance/v1/bundles/invoicebundle/strict-fail-missing-pricing-matrix-signature/payload/job_proof_bundle/governance/tenant/events/payload_material.jsonl +0 -0
- package/conformance/v1/bundles/invoicebundle/strict-fail-missing-pricing-matrix-signature/payload/job_proof_bundle/governance/tenant/snapshot.json +1 -0
- package/conformance/v1/bundles/invoicebundle/strict-fail-missing-pricing-matrix-signature/payload/job_proof_bundle/job/snapshot.json +1 -0
- package/conformance/v1/bundles/invoicebundle/strict-fail-missing-pricing-matrix-signature/payload/job_proof_bundle/keys/public_keys.json +1 -0
- package/conformance/v1/bundles/invoicebundle/strict-fail-missing-pricing-matrix-signature/payload/job_proof_bundle/manifest.json +1 -0
- package/conformance/v1/bundles/invoicebundle/strict-fail-missing-pricing-matrix-signature/payload/job_proof_bundle/verify/report.json +1 -0
- package/conformance/v1/bundles/invoicebundle/strict-fail-missing-pricing-matrix-signature/payload/job_proof_bundle/verify/verification_report.json +1 -0
- package/conformance/v1/bundles/invoicebundle/strict-fail-missing-pricing-matrix-signature/pricing/pricing_matrix.json +1 -0
- package/conformance/v1/bundles/invoicebundle/strict-fail-missing-pricing-matrix-signature/settld.json +1 -0
- package/conformance/v1/bundles/invoicebundle/strict-fail-missing-pricing-matrix-signature/verify/verification_report.json +1 -0
- package/conformance/v1/bundles/invoicebundle/strict-fail-missing-verification-report/attestation/bundle_head_attestation.json +1 -0
- package/conformance/v1/bundles/invoicebundle/strict-fail-missing-verification-report/governance/policy.json +1 -0
- package/conformance/v1/bundles/invoicebundle/strict-fail-missing-verification-report/governance/revocations.json +1 -0
- package/conformance/v1/bundles/invoicebundle/strict-fail-missing-verification-report/invoice/invoice_claim.json +1 -0
- package/conformance/v1/bundles/invoicebundle/strict-fail-missing-verification-report/manifest.json +1 -0
- package/conformance/v1/bundles/invoicebundle/strict-fail-missing-verification-report/metering/metering_report.json +1 -0
- package/conformance/v1/bundles/invoicebundle/strict-fail-missing-verification-report/payload/job_proof_bundle/attestation/bundle_head_attestation.json +1 -0
- package/conformance/v1/bundles/invoicebundle/strict-fail-missing-verification-report/payload/job_proof_bundle/events/events.jsonl +1 -0
- package/conformance/v1/bundles/invoicebundle/strict-fail-missing-verification-report/payload/job_proof_bundle/events/payload_material.jsonl +1 -0
- package/conformance/v1/bundles/invoicebundle/strict-fail-missing-verification-report/payload/job_proof_bundle/governance/global/events/events.jsonl +1 -0
- package/conformance/v1/bundles/invoicebundle/strict-fail-missing-verification-report/payload/job_proof_bundle/governance/global/events/payload_material.jsonl +1 -0
- package/conformance/v1/bundles/invoicebundle/strict-fail-missing-verification-report/payload/job_proof_bundle/governance/global/snapshot.json +1 -0
- package/conformance/v1/bundles/invoicebundle/strict-fail-missing-verification-report/payload/job_proof_bundle/governance/policy.json +1 -0
- package/conformance/v1/bundles/invoicebundle/strict-fail-missing-verification-report/payload/job_proof_bundle/governance/revocations.json +1 -0
- package/conformance/v1/bundles/invoicebundle/strict-fail-missing-verification-report/payload/job_proof_bundle/governance/tenant/events/events.jsonl +0 -0
- package/conformance/v1/bundles/invoicebundle/strict-fail-missing-verification-report/payload/job_proof_bundle/governance/tenant/events/payload_material.jsonl +0 -0
- package/conformance/v1/bundles/invoicebundle/strict-fail-missing-verification-report/payload/job_proof_bundle/governance/tenant/snapshot.json +1 -0
- package/conformance/v1/bundles/invoicebundle/strict-fail-missing-verification-report/payload/job_proof_bundle/job/snapshot.json +1 -0
- package/conformance/v1/bundles/invoicebundle/strict-fail-missing-verification-report/payload/job_proof_bundle/keys/public_keys.json +1 -0
- package/conformance/v1/bundles/invoicebundle/strict-fail-missing-verification-report/payload/job_proof_bundle/manifest.json +1 -0
- package/conformance/v1/bundles/invoicebundle/strict-fail-missing-verification-report/payload/job_proof_bundle/verify/report.json +1 -0
- package/conformance/v1/bundles/invoicebundle/strict-fail-missing-verification-report/payload/job_proof_bundle/verify/verification_report.json +1 -0
- package/conformance/v1/bundles/invoicebundle/strict-fail-missing-verification-report/pricing/pricing_matrix.json +1 -0
- package/conformance/v1/bundles/invoicebundle/strict-fail-missing-verification-report/pricing/pricing_matrix_signatures.json +1 -0
- package/conformance/v1/bundles/invoicebundle/strict-fail-missing-verification-report/settld.json +1 -0
- package/conformance/v1/bundles/invoicebundle/strict-fail-pricing-code-unknown/attestation/bundle_head_attestation.json +1 -0
- package/conformance/v1/bundles/invoicebundle/strict-fail-pricing-code-unknown/governance/policy.json +1 -0
- package/conformance/v1/bundles/invoicebundle/strict-fail-pricing-code-unknown/governance/revocations.json +1 -0
- package/conformance/v1/bundles/invoicebundle/strict-fail-pricing-code-unknown/invoice/invoice_claim.json +1 -0
- package/conformance/v1/bundles/invoicebundle/strict-fail-pricing-code-unknown/manifest.json +1 -0
- package/conformance/v1/bundles/invoicebundle/strict-fail-pricing-code-unknown/metering/metering_report.json +1 -0
- package/conformance/v1/bundles/invoicebundle/strict-fail-pricing-code-unknown/payload/job_proof_bundle/attestation/bundle_head_attestation.json +1 -0
- package/conformance/v1/bundles/invoicebundle/strict-fail-pricing-code-unknown/payload/job_proof_bundle/events/events.jsonl +1 -0
- package/conformance/v1/bundles/invoicebundle/strict-fail-pricing-code-unknown/payload/job_proof_bundle/events/payload_material.jsonl +1 -0
- package/conformance/v1/bundles/invoicebundle/strict-fail-pricing-code-unknown/payload/job_proof_bundle/governance/global/events/events.jsonl +1 -0
- package/conformance/v1/bundles/invoicebundle/strict-fail-pricing-code-unknown/payload/job_proof_bundle/governance/global/events/payload_material.jsonl +1 -0
- package/conformance/v1/bundles/invoicebundle/strict-fail-pricing-code-unknown/payload/job_proof_bundle/governance/global/snapshot.json +1 -0
- package/conformance/v1/bundles/invoicebundle/strict-fail-pricing-code-unknown/payload/job_proof_bundle/governance/policy.json +1 -0
- package/conformance/v1/bundles/invoicebundle/strict-fail-pricing-code-unknown/payload/job_proof_bundle/governance/revocations.json +1 -0
- package/conformance/v1/bundles/invoicebundle/strict-fail-pricing-code-unknown/payload/job_proof_bundle/governance/tenant/events/events.jsonl +0 -0
- package/conformance/v1/bundles/invoicebundle/strict-fail-pricing-code-unknown/payload/job_proof_bundle/governance/tenant/events/payload_material.jsonl +0 -0
- package/conformance/v1/bundles/invoicebundle/strict-fail-pricing-code-unknown/payload/job_proof_bundle/governance/tenant/snapshot.json +1 -0
- package/conformance/v1/bundles/invoicebundle/strict-fail-pricing-code-unknown/payload/job_proof_bundle/job/snapshot.json +1 -0
- package/conformance/v1/bundles/invoicebundle/strict-fail-pricing-code-unknown/payload/job_proof_bundle/keys/public_keys.json +1 -0
- package/conformance/v1/bundles/invoicebundle/strict-fail-pricing-code-unknown/payload/job_proof_bundle/manifest.json +1 -0
- package/conformance/v1/bundles/invoicebundle/strict-fail-pricing-code-unknown/payload/job_proof_bundle/verify/report.json +1 -0
- package/conformance/v1/bundles/invoicebundle/strict-fail-pricing-code-unknown/payload/job_proof_bundle/verify/verification_report.json +1 -0
- package/conformance/v1/bundles/invoicebundle/strict-fail-pricing-code-unknown/pricing/pricing_matrix.json +1 -0
- package/conformance/v1/bundles/invoicebundle/strict-fail-pricing-code-unknown/pricing/pricing_matrix_signatures.json +1 -0
- package/conformance/v1/bundles/invoicebundle/strict-fail-pricing-code-unknown/settld.json +1 -0
- package/conformance/v1/bundles/invoicebundle/strict-fail-pricing-code-unknown/verify/verification_report.json +1 -0
- package/conformance/v1/bundles/invoicebundle/strict-pass/attestation/bundle_head_attestation.json +1 -0
- package/conformance/v1/bundles/invoicebundle/strict-pass/governance/policy.json +1 -0
- package/conformance/v1/bundles/invoicebundle/strict-pass/governance/revocations.json +1 -0
- package/conformance/v1/bundles/invoicebundle/strict-pass/invoice/invoice_claim.json +1 -0
- package/conformance/v1/bundles/invoicebundle/strict-pass/manifest.json +1 -0
- package/conformance/v1/bundles/invoicebundle/strict-pass/metering/metering_report.json +1 -0
- package/conformance/v1/bundles/invoicebundle/strict-pass/payload/job_proof_bundle/attestation/bundle_head_attestation.json +1 -0
- package/conformance/v1/bundles/invoicebundle/strict-pass/payload/job_proof_bundle/events/events.jsonl +1 -0
- package/conformance/v1/bundles/invoicebundle/strict-pass/payload/job_proof_bundle/events/payload_material.jsonl +1 -0
- package/conformance/v1/bundles/invoicebundle/strict-pass/payload/job_proof_bundle/governance/global/events/events.jsonl +1 -0
- package/conformance/v1/bundles/invoicebundle/strict-pass/payload/job_proof_bundle/governance/global/events/payload_material.jsonl +1 -0
- package/conformance/v1/bundles/invoicebundle/strict-pass/payload/job_proof_bundle/governance/global/snapshot.json +1 -0
- package/conformance/v1/bundles/invoicebundle/strict-pass/payload/job_proof_bundle/governance/policy.json +1 -0
- package/conformance/v1/bundles/invoicebundle/strict-pass/payload/job_proof_bundle/governance/revocations.json +1 -0
- package/conformance/v1/bundles/invoicebundle/strict-pass/payload/job_proof_bundle/governance/tenant/events/events.jsonl +0 -0
- package/conformance/v1/bundles/invoicebundle/strict-pass/payload/job_proof_bundle/governance/tenant/events/payload_material.jsonl +0 -0
- package/conformance/v1/bundles/invoicebundle/strict-pass/payload/job_proof_bundle/governance/tenant/snapshot.json +1 -0
- package/conformance/v1/bundles/invoicebundle/strict-pass/payload/job_proof_bundle/job/snapshot.json +1 -0
- package/conformance/v1/bundles/invoicebundle/strict-pass/payload/job_proof_bundle/keys/public_keys.json +1 -0
- package/conformance/v1/bundles/invoicebundle/strict-pass/payload/job_proof_bundle/manifest.json +1 -0
- package/conformance/v1/bundles/invoicebundle/strict-pass/payload/job_proof_bundle/verify/report.json +1 -0
- package/conformance/v1/bundles/invoicebundle/strict-pass/payload/job_proof_bundle/verify/verification_report.json +1 -0
- package/conformance/v1/bundles/invoicebundle/strict-pass/pricing/pricing_matrix.json +1 -0
- package/conformance/v1/bundles/invoicebundle/strict-pass/pricing/pricing_matrix_signatures.json +1 -0
- package/conformance/v1/bundles/invoicebundle/strict-pass/settld.json +1 -0
- package/conformance/v1/bundles/invoicebundle/strict-pass/verify/verification_report.json +1 -0
- package/conformance/v1/bundles/jobproof/nonstrict-pass-missing-verification-report/attestation/bundle_head_attestation.json +1 -0
- package/conformance/v1/bundles/jobproof/nonstrict-pass-missing-verification-report/events/events.jsonl +1 -0
- package/conformance/v1/bundles/jobproof/nonstrict-pass-missing-verification-report/events/payload_material.jsonl +1 -0
- package/conformance/v1/bundles/jobproof/nonstrict-pass-missing-verification-report/governance/global/events/events.jsonl +1 -0
- package/conformance/v1/bundles/jobproof/nonstrict-pass-missing-verification-report/governance/global/events/payload_material.jsonl +1 -0
- package/conformance/v1/bundles/jobproof/nonstrict-pass-missing-verification-report/governance/global/snapshot.json +1 -0
- package/conformance/v1/bundles/jobproof/nonstrict-pass-missing-verification-report/governance/policy.json +1 -0
- package/conformance/v1/bundles/jobproof/nonstrict-pass-missing-verification-report/governance/revocations.json +1 -0
- package/conformance/v1/bundles/jobproof/nonstrict-pass-missing-verification-report/governance/tenant/events/events.jsonl +0 -0
- package/conformance/v1/bundles/jobproof/nonstrict-pass-missing-verification-report/governance/tenant/events/payload_material.jsonl +0 -0
- package/conformance/v1/bundles/jobproof/nonstrict-pass-missing-verification-report/governance/tenant/snapshot.json +1 -0
- package/conformance/v1/bundles/jobproof/nonstrict-pass-missing-verification-report/job/snapshot.json +1 -0
- package/conformance/v1/bundles/jobproof/nonstrict-pass-missing-verification-report/keys/public_keys.json +1 -0
- package/conformance/v1/bundles/jobproof/nonstrict-pass-missing-verification-report/manifest.json +1 -0
- package/conformance/v1/bundles/jobproof/nonstrict-pass-missing-verification-report/verify/report.json +1 -0
- package/conformance/v1/bundles/jobproof/strict-fail-manifest-tamper/attestation/bundle_head_attestation.json +1 -0
- package/conformance/v1/bundles/jobproof/strict-fail-manifest-tamper/events/events.jsonl +1 -0
- package/conformance/v1/bundles/jobproof/strict-fail-manifest-tamper/events/payload_material.jsonl +1 -0
- package/conformance/v1/bundles/jobproof/strict-fail-manifest-tamper/governance/global/events/events.jsonl +1 -0
- package/conformance/v1/bundles/jobproof/strict-fail-manifest-tamper/governance/global/events/payload_material.jsonl +1 -0
- package/conformance/v1/bundles/jobproof/strict-fail-manifest-tamper/governance/global/snapshot.json +1 -0
- package/conformance/v1/bundles/jobproof/strict-fail-manifest-tamper/governance/policy.json +1 -0
- package/conformance/v1/bundles/jobproof/strict-fail-manifest-tamper/governance/revocations.json +1 -0
- package/conformance/v1/bundles/jobproof/strict-fail-manifest-tamper/governance/tenant/events/events.jsonl +0 -0
- package/conformance/v1/bundles/jobproof/strict-fail-manifest-tamper/governance/tenant/events/payload_material.jsonl +0 -0
- package/conformance/v1/bundles/jobproof/strict-fail-manifest-tamper/governance/tenant/snapshot.json +1 -0
- package/conformance/v1/bundles/jobproof/strict-fail-manifest-tamper/job/snapshot.json +1 -0
- package/conformance/v1/bundles/jobproof/strict-fail-manifest-tamper/keys/public_keys.json +1 -0
- package/conformance/v1/bundles/jobproof/strict-fail-manifest-tamper/manifest.json +1 -0
- package/conformance/v1/bundles/jobproof/strict-fail-manifest-tamper/verify/report.json +1 -0
- package/conformance/v1/bundles/jobproof/strict-fail-manifest-tamper/verify/verification_report.json +1 -0
- package/conformance/v1/bundles/jobproof/strict-fail-unauthorized-signer/attestation/bundle_head_attestation.json +1 -0
- package/conformance/v1/bundles/jobproof/strict-fail-unauthorized-signer/events/events.jsonl +1 -0
- package/conformance/v1/bundles/jobproof/strict-fail-unauthorized-signer/events/payload_material.jsonl +1 -0
- package/conformance/v1/bundles/jobproof/strict-fail-unauthorized-signer/governance/global/events/events.jsonl +1 -0
- package/conformance/v1/bundles/jobproof/strict-fail-unauthorized-signer/governance/global/events/payload_material.jsonl +1 -0
- package/conformance/v1/bundles/jobproof/strict-fail-unauthorized-signer/governance/global/snapshot.json +1 -0
- package/conformance/v1/bundles/jobproof/strict-fail-unauthorized-signer/governance/policy.json +1 -0
- package/conformance/v1/bundles/jobproof/strict-fail-unauthorized-signer/governance/revocations.json +1 -0
- package/conformance/v1/bundles/jobproof/strict-fail-unauthorized-signer/governance/tenant/events/events.jsonl +0 -0
- package/conformance/v1/bundles/jobproof/strict-fail-unauthorized-signer/governance/tenant/events/payload_material.jsonl +0 -0
- package/conformance/v1/bundles/jobproof/strict-fail-unauthorized-signer/governance/tenant/snapshot.json +1 -0
- package/conformance/v1/bundles/jobproof/strict-fail-unauthorized-signer/job/snapshot.json +1 -0
- package/conformance/v1/bundles/jobproof/strict-fail-unauthorized-signer/keys/public_keys.json +1 -0
- package/conformance/v1/bundles/jobproof/strict-fail-unauthorized-signer/manifest.json +1 -0
- package/conformance/v1/bundles/jobproof/strict-fail-unauthorized-signer/verify/report.json +1 -0
- package/conformance/v1/bundles/jobproof/strict-fail-unauthorized-signer/verify/verification_report.json +1 -0
- package/conformance/v1/bundles/jobproof/strict-pass/attestation/bundle_head_attestation.json +1 -0
- package/conformance/v1/bundles/jobproof/strict-pass/events/events.jsonl +1 -0
- package/conformance/v1/bundles/jobproof/strict-pass/events/payload_material.jsonl +1 -0
- package/conformance/v1/bundles/jobproof/strict-pass/governance/global/events/events.jsonl +1 -0
- package/conformance/v1/bundles/jobproof/strict-pass/governance/global/events/payload_material.jsonl +1 -0
- package/conformance/v1/bundles/jobproof/strict-pass/governance/global/snapshot.json +1 -0
- package/conformance/v1/bundles/jobproof/strict-pass/governance/policy.json +1 -0
- package/conformance/v1/bundles/jobproof/strict-pass/governance/revocations.json +1 -0
- package/conformance/v1/bundles/jobproof/strict-pass/governance/tenant/events/events.jsonl +0 -0
- package/conformance/v1/bundles/jobproof/strict-pass/governance/tenant/events/payload_material.jsonl +0 -0
- package/conformance/v1/bundles/jobproof/strict-pass/governance/tenant/snapshot.json +1 -0
- package/conformance/v1/bundles/jobproof/strict-pass/job/snapshot.json +1 -0
- package/conformance/v1/bundles/jobproof/strict-pass/keys/public_keys.json +1 -0
- package/conformance/v1/bundles/jobproof/strict-pass/manifest.json +1 -0
- package/conformance/v1/bundles/jobproof/strict-pass/verify/report.json +1 -0
- package/conformance/v1/bundles/jobproof/strict-pass/verify/verification_report.json +1 -0
- package/conformance/v1/bundles/monthproof/nonstrict-pass-missing-verification-report/attestation/bundle_head_attestation.json +1 -0
- package/conformance/v1/bundles/monthproof/nonstrict-pass-missing-verification-report/events/events.jsonl +1 -0
- package/conformance/v1/bundles/monthproof/nonstrict-pass-missing-verification-report/events/payload_material.jsonl +1 -0
- package/conformance/v1/bundles/monthproof/nonstrict-pass-missing-verification-report/governance/global/events/events.jsonl +1 -0
- package/conformance/v1/bundles/monthproof/nonstrict-pass-missing-verification-report/governance/global/events/payload_material.jsonl +1 -0
- package/conformance/v1/bundles/monthproof/nonstrict-pass-missing-verification-report/governance/global/snapshot.json +1 -0
- package/conformance/v1/bundles/monthproof/nonstrict-pass-missing-verification-report/governance/policy.json +1 -0
- package/conformance/v1/bundles/monthproof/nonstrict-pass-missing-verification-report/governance/revocations.json +1 -0
- package/conformance/v1/bundles/monthproof/nonstrict-pass-missing-verification-report/governance/tenant/events/events.jsonl +0 -0
- package/conformance/v1/bundles/monthproof/nonstrict-pass-missing-verification-report/governance/tenant/events/payload_material.jsonl +0 -0
- package/conformance/v1/bundles/monthproof/nonstrict-pass-missing-verification-report/governance/tenant/snapshot.json +1 -0
- package/conformance/v1/bundles/monthproof/nonstrict-pass-missing-verification-report/keys/public_keys.json +1 -0
- package/conformance/v1/bundles/monthproof/nonstrict-pass-missing-verification-report/manifest.json +1 -0
- package/conformance/v1/bundles/monthproof/nonstrict-pass-missing-verification-report/verify/report.json +1 -0
- package/conformance/v1/bundles/monthproof/strict-fail-manifest-tamper/attestation/bundle_head_attestation.json +1 -0
- package/conformance/v1/bundles/monthproof/strict-fail-manifest-tamper/events/events.jsonl +2 -0
- package/conformance/v1/bundles/monthproof/strict-fail-manifest-tamper/events/payload_material.jsonl +1 -0
- package/conformance/v1/bundles/monthproof/strict-fail-manifest-tamper/governance/global/events/events.jsonl +1 -0
- package/conformance/v1/bundles/monthproof/strict-fail-manifest-tamper/governance/global/events/payload_material.jsonl +1 -0
- package/conformance/v1/bundles/monthproof/strict-fail-manifest-tamper/governance/global/snapshot.json +1 -0
- package/conformance/v1/bundles/monthproof/strict-fail-manifest-tamper/governance/policy.json +1 -0
- package/conformance/v1/bundles/monthproof/strict-fail-manifest-tamper/governance/revocations.json +1 -0
- package/conformance/v1/bundles/monthproof/strict-fail-manifest-tamper/governance/tenant/events/events.jsonl +0 -0
- package/conformance/v1/bundles/monthproof/strict-fail-manifest-tamper/governance/tenant/events/payload_material.jsonl +0 -0
- package/conformance/v1/bundles/monthproof/strict-fail-manifest-tamper/governance/tenant/snapshot.json +1 -0
- package/conformance/v1/bundles/monthproof/strict-fail-manifest-tamper/keys/public_keys.json +1 -0
- package/conformance/v1/bundles/monthproof/strict-fail-manifest-tamper/manifest.json +1 -0
- package/conformance/v1/bundles/monthproof/strict-fail-manifest-tamper/verify/report.json +1 -0
- package/conformance/v1/bundles/monthproof/strict-fail-manifest-tamper/verify/verification_report.json +1 -0
- package/conformance/v1/bundles/monthproof/strict-fail-unauthorized-signer/attestation/bundle_head_attestation.json +1 -0
- package/conformance/v1/bundles/monthproof/strict-fail-unauthorized-signer/events/events.jsonl +1 -0
- package/conformance/v1/bundles/monthproof/strict-fail-unauthorized-signer/events/payload_material.jsonl +1 -0
- package/conformance/v1/bundles/monthproof/strict-fail-unauthorized-signer/governance/global/events/events.jsonl +1 -0
- package/conformance/v1/bundles/monthproof/strict-fail-unauthorized-signer/governance/global/events/payload_material.jsonl +1 -0
- package/conformance/v1/bundles/monthproof/strict-fail-unauthorized-signer/governance/global/snapshot.json +1 -0
- package/conformance/v1/bundles/monthproof/strict-fail-unauthorized-signer/governance/policy.json +1 -0
- package/conformance/v1/bundles/monthproof/strict-fail-unauthorized-signer/governance/revocations.json +1 -0
- package/conformance/v1/bundles/monthproof/strict-fail-unauthorized-signer/governance/tenant/events/events.jsonl +0 -0
- package/conformance/v1/bundles/monthproof/strict-fail-unauthorized-signer/governance/tenant/events/payload_material.jsonl +0 -0
- package/conformance/v1/bundles/monthproof/strict-fail-unauthorized-signer/governance/tenant/snapshot.json +1 -0
- package/conformance/v1/bundles/monthproof/strict-fail-unauthorized-signer/keys/public_keys.json +1 -0
- package/conformance/v1/bundles/monthproof/strict-fail-unauthorized-signer/manifest.json +1 -0
- package/conformance/v1/bundles/monthproof/strict-fail-unauthorized-signer/verify/report.json +1 -0
- package/conformance/v1/bundles/monthproof/strict-fail-unauthorized-signer/verify/verification_report.json +1 -0
- package/conformance/v1/bundles/monthproof/strict-pass/attestation/bundle_head_attestation.json +1 -0
- package/conformance/v1/bundles/monthproof/strict-pass/events/events.jsonl +1 -0
- package/conformance/v1/bundles/monthproof/strict-pass/events/payload_material.jsonl +1 -0
- package/conformance/v1/bundles/monthproof/strict-pass/governance/global/events/events.jsonl +1 -0
- package/conformance/v1/bundles/monthproof/strict-pass/governance/global/events/payload_material.jsonl +1 -0
- package/conformance/v1/bundles/monthproof/strict-pass/governance/global/snapshot.json +1 -0
- package/conformance/v1/bundles/monthproof/strict-pass/governance/policy.json +1 -0
- package/conformance/v1/bundles/monthproof/strict-pass/governance/revocations.json +1 -0
- package/conformance/v1/bundles/monthproof/strict-pass/governance/tenant/events/events.jsonl +0 -0
- package/conformance/v1/bundles/monthproof/strict-pass/governance/tenant/events/payload_material.jsonl +0 -0
- package/conformance/v1/bundles/monthproof/strict-pass/governance/tenant/snapshot.json +1 -0
- package/conformance/v1/bundles/monthproof/strict-pass/keys/public_keys.json +1 -0
- package/conformance/v1/bundles/monthproof/strict-pass/manifest.json +1 -0
- package/conformance/v1/bundles/monthproof/strict-pass/verify/report.json +1 -0
- package/conformance/v1/bundles/monthproof/strict-pass/verify/verification_report.json +1 -0
- package/conformance/v1/cases.json +381 -0
- package/conformance/v1/expected/closepack_nonstrict_pass_missing_sla_acceptance.json +9 -0
- package/conformance/v1/expected/closepack_strict_fail_embedded_invoice_fails.json +9 -0
- package/conformance/v1/expected/closepack_strict_fail_evidence_index_mismatch.json +9 -0
- package/conformance/v1/expected/closepack_strict_pass.json +9 -0
- package/conformance/v1/expected/financepack_strict_fail_missing_verification_report.json +9 -0
- package/conformance/v1/expected/financepack_strict_fail_on_warnings_tool_version_unknown.json +9 -0
- package/conformance/v1/expected/financepack_strict_fail_trust_roots_missing.json +9 -0
- package/conformance/v1/expected/financepack_strict_fail_trust_roots_wrong.json +9 -0
- package/conformance/v1/expected/financepack_strict_pass.json +9 -0
- package/conformance/v1/expected/invoicebundle_nonstrict_pass_missing_verification_report.json +9 -0
- package/conformance/v1/expected/invoicebundle_nonstrict_pass_unsigned_pricing_matrix_warning.json +9 -0
- package/conformance/v1/expected/invoicebundle_strict_fail_evidence_sha_mismatch.json +9 -0
- package/conformance/v1/expected/invoicebundle_strict_fail_invalid_pricing_matrix_signature.json +9 -0
- package/conformance/v1/expected/invoicebundle_strict_fail_invoice_total_mismatch.json +9 -0
- package/conformance/v1/expected/invoicebundle_strict_fail_missing_pricing_matrix_signature.json +9 -0
- package/conformance/v1/expected/invoicebundle_strict_fail_missing_verification_report.json +9 -0
- package/conformance/v1/expected/invoicebundle_strict_fail_pricing_code_unknown.json +9 -0
- package/conformance/v1/expected/invoicebundle_strict_pass.json +9 -0
- package/conformance/v1/expected/jobproof_nonstrict_pass_missing_verification_report.json +9 -0
- package/conformance/v1/expected/jobproof_strict_fail_manifest_tamper.json +9 -0
- package/conformance/v1/expected/jobproof_strict_fail_unauthorized_signer.json +9 -0
- package/conformance/v1/expected/jobproof_strict_pass.json +9 -0
- package/conformance/v1/expected/monthproof_nonstrict_pass_missing_verification_report.json +9 -0
- package/conformance/v1/expected/monthproof_strict_fail_manifest_tamper.json +9 -0
- package/conformance/v1/expected/monthproof_strict_fail_unauthorized_signer.json +9 -0
- package/conformance/v1/expected/monthproof_strict_pass.json +9 -0
- package/conformance/v1/expected/security_bundle_symlink_outside.json +9 -0
- package/conformance/v1/expected/security_manifest_case_collision.json +8 -0
- package/conformance/v1/expected/security_manifest_duplicate_paths.json +9 -0
- package/conformance/v1/expected/security_manifest_path_traversal.json +9 -0
- package/conformance/v1/lib/harness.mjs +78 -0
- package/conformance/v1/lib/mutations.mjs +61 -0
- package/conformance/v1/produce-cases.json +75 -0
- package/conformance/v1/producer/bad-plugin-invalid-provider.mjs +4 -0
- package/conformance/v1/producer/bad-plugin-no-export.mjs +3 -0
- package/conformance/v1/producer/fixture_keypairs.json +18 -0
- package/conformance/v1/producer/inmemory-signer-plugin.mjs +47 -0
- package/conformance/v1/producer/signer-stdio-bad-json.mjs +54 -0
- package/conformance/v1/producer/signer-stdio-partial-stdout-exit1.mjs +51 -0
- package/conformance/v1/producer/signer-stdio-stderr-only-exit1.mjs +46 -0
- package/conformance/v1/producer/signer-stdio-stub.mjs +134 -0
- package/conformance/v1/protocol-vectors/v1.json +81 -0
- package/conformance/v1/release-cases.json +111 -0
- package/conformance/v1/release-trust-quorum.json +15 -0
- package/conformance/v1/release-trust-revoked.json +16 -0
- package/conformance/v1/release-trust.json +15 -0
- package/conformance/v1/releases/release_fail_asset_hash_mismatch/a.tgz +1 -0
- package/conformance/v1/releases/release_fail_asset_hash_mismatch/b.tar.gz +1 -0
- package/conformance/v1/releases/release_fail_asset_hash_mismatch/release_index_v1.json +1 -0
- package/conformance/v1/releases/release_fail_asset_hash_mismatch/release_index_v1.sig +1 -0
- package/conformance/v1/releases/release_fail_missing_asset/a.tgz +1 -0
- package/conformance/v1/releases/release_fail_missing_asset/release_index_v1.json +1 -0
- package/conformance/v1/releases/release_fail_missing_asset/release_index_v1.sig +1 -0
- package/conformance/v1/releases/release_fail_signature_invalid/a.tgz +1 -0
- package/conformance/v1/releases/release_fail_signature_invalid/b.tar.gz +1 -0
- package/conformance/v1/releases/release_fail_signature_invalid/release_index_v1.json +1 -0
- package/conformance/v1/releases/release_fail_signature_invalid/release_index_v1.sig +1 -0
- package/conformance/v1/releases/release_pass/a.tgz +1 -0
- package/conformance/v1/releases/release_pass/b.tar.gz +1 -0
- package/conformance/v1/releases/release_pass/release_index_v1.json +1 -0
- package/conformance/v1/releases/release_pass/release_index_v1.sig +1 -0
- package/conformance/v1/run-produce.mjs +507 -0
- package/conformance/v1/run-release.mjs +129 -0
- package/conformance/v1/run.mjs +229 -0
- package/conformance/v1/trust.json +11 -0
- package/docker-compose.yml +154 -0
- package/package.json +98 -0
- package/packages/artifact-verify/src/bundle-path.js +60 -0
- package/packages/artifact-verify/src/canonical-json.js +48 -0
- package/packages/artifact-verify/src/close-pack-bundle.js +914 -0
- package/packages/artifact-verify/src/crypto.js +18 -0
- package/packages/artifact-verify/src/finance-pack-bundle.js +750 -0
- package/packages/artifact-verify/src/governance-policy.js +312 -0
- package/packages/artifact-verify/src/hash-file.js +38 -0
- package/packages/artifact-verify/src/index.js +100 -0
- package/packages/artifact-verify/src/invoice-bundle.js +865 -0
- package/packages/artifact-verify/src/job-proof-bundle.js +1996 -0
- package/packages/artifact-verify/src/map-with-concurrency.js +32 -0
- package/packages/artifact-verify/src/reconcile.js +135 -0
- package/packages/artifact-verify/src/release/release-index-lib.js +190 -0
- package/packages/artifact-verify/src/release/verify-release.js +187 -0
- package/packages/artifact-verify/src/revocation-list.js +119 -0
- package/packages/artifact-verify/src/safe-unzip.js +335 -0
- package/packages/artifact-verify/src/settlement-decision-report.js +61 -0
- package/packages/artifact-verify/src/timestamp-proof.js +49 -0
- package/packages/artifact-verify/src/tool-provenance.js +49 -0
- package/packages/artifact-verify/src/trust.js +54 -0
- package/packages/artifact-verify/src/verification-warnings.js +34 -0
- package/scripts/closepack/export.mjs +101 -0
- package/scripts/closepack/lib.mjs +1068 -0
- package/scripts/closepack/verify.mjs +65 -0
- package/scripts/init/capability.mjs +556 -0
- package/scripts/init/postinstall-sanity.mjs +18 -0
- package/services/finance-sink/README.md +37 -0
- package/services/finance-sink/package.json +6 -0
- package/services/finance-sink/src/ack-worker.js +152 -0
- package/services/finance-sink/src/config.js +176 -0
- package/services/finance-sink/src/dedupe-store.js +232 -0
- package/services/finance-sink/src/s3-store.js +139 -0
- package/services/finance-sink/src/server.js +391 -0
- package/services/receiver/README.md +49 -0
- package/services/receiver/package.json +6 -0
- package/services/receiver/src/ack-worker.js +166 -0
- package/services/receiver/src/config.js +178 -0
- package/services/receiver/src/dedupe-store.js +232 -0
- package/services/receiver/src/s3-store.js +111 -0
- package/services/receiver/src/server.js +304 -0
- package/src/agent/agent-sim.js +167 -0
- package/src/api/app.js +31794 -0
- package/src/api/http.js +124 -0
- package/src/api/maintenance.js +174 -0
- package/src/api/middleware/auth.js +105 -0
- package/src/api/middleware/authz.js +19 -0
- package/src/api/openapi.js +5684 -0
- package/src/api/outbox.js +93 -0
- package/src/api/persistence.js +628 -0
- package/src/api/server.js +100 -0
- package/src/api/store.js +2088 -0
- package/src/api/workers/artifacts.js +574 -0
- package/src/api/workers/deliveries.js +628 -0
- package/src/api/workers/proof.js +374 -0
- package/src/core/acceptance-criteria.js +78 -0
- package/src/core/access.js +130 -0
- package/src/core/agent-reputation.js +311 -0
- package/src/core/agent-runs.js +253 -0
- package/src/core/agent-wallets.js +883 -0
- package/src/core/allocations.js +160 -0
- package/src/core/artifact-verification-status.js +216 -0
- package/src/core/artifacts.js +938 -0
- package/src/core/assist.js +106 -0
- package/src/core/audit-export.js +68 -0
- package/src/core/auth.js +189 -0
- package/src/core/billing-plans.js +187 -0
- package/src/core/booking.js +268 -0
- package/src/core/cancellation.js +34 -0
- package/src/core/canonical-json.js +104 -0
- package/src/core/claims.js +152 -0
- package/src/core/close-pack-bundle.js +527 -0
- package/src/core/config.js +272 -0
- package/src/core/contract-compiler.js +68 -0
- package/src/core/contract-document.js +226 -0
- package/src/core/contract-selection.js +152 -0
- package/src/core/contracts.js +439 -0
- package/src/core/crypto.js +30 -0
- package/src/core/deterministic-zip.js +169 -0
- package/src/core/dispatch-events.js +113 -0
- package/src/core/dispatch.js +26 -0
- package/src/core/dispute-open-envelope.js +163 -0
- package/src/core/escrow-ledger.js +329 -0
- package/src/core/event-chain.js +114 -0
- package/src/core/event-policy.js +120 -0
- package/src/core/evidence-linker.js +93 -0
- package/src/core/evidence-store.js +286 -0
- package/src/core/evidence.js +119 -0
- package/src/core/failpoints.js +30 -0
- package/src/core/finance-account-map.js +59 -0
- package/src/core/finance-pack-bundle.js +554 -0
- package/src/core/funding-hold.js +185 -0
- package/src/core/gl-batch.js +107 -0
- package/src/core/governance-policy.js +174 -0
- package/src/core/governance.js +92 -0
- package/src/core/hold-exposure.js +74 -0
- package/src/core/idempotency.js +51 -0
- package/src/core/ids.js +21 -0
- package/src/core/incidents.js +75 -0
- package/src/core/insurer-reimbursements.js +58 -0
- package/src/core/interaction-directions.js +170 -0
- package/src/core/invoice-bundle.js +564 -0
- package/src/core/job-reducer.js +702 -0
- package/src/core/job-state-machine.js +266 -0
- package/src/core/journal-csv.js +94 -0
- package/src/core/ledger-postings-finance.js +31 -0
- package/src/core/ledger-postings.js +476 -0
- package/src/core/ledger.js +59 -0
- package/src/core/liveness.js +154 -0
- package/src/core/log.js +156 -0
- package/src/core/maintenance-locks.js +3 -0
- package/src/core/marketplace-kernel.js +243 -0
- package/src/core/metrics.js +133 -0
- package/src/core/money-rail-adapters.js +735 -0
- package/src/core/month-close-hold-policy.js +19 -0
- package/src/core/month-close.js +159 -0
- package/src/core/operator-cost.js +79 -0
- package/src/core/operator-coverage.js +46 -0
- package/src/core/operator-reducer.js +73 -0
- package/src/core/operators.js +52 -0
- package/src/core/ops-audit.js +45 -0
- package/src/core/party-statements.js +145 -0
- package/src/core/pilot-templates.js +26 -0
- package/src/core/policy.js +76 -0
- package/src/core/pricing.js +71 -0
- package/src/core/proof-bundle.js +1153 -0
- package/src/core/proof-events.js +88 -0
- package/src/core/proof-verifier.js +261 -0
- package/src/core/proof.js +46 -0
- package/src/core/protocol.js +105 -0
- package/src/core/quotas.js +32 -0
- package/src/core/reputation-event.js +203 -0
- package/src/core/rescheduling.js +51 -0
- package/src/core/retention.js +32 -0
- package/src/core/revocation-list.js +70 -0
- package/src/core/risk.js +383 -0
- package/src/core/robot-health.js +111 -0
- package/src/core/robot-reducer.js +198 -0
- package/src/core/robots.js +152 -0
- package/src/core/s3-presign.js +111 -0
- package/src/core/secrets.js +128 -0
- package/src/core/settlement-adjustment.js +151 -0
- package/src/core/settlement-kernel.js +405 -0
- package/src/core/settlement-policy.js +206 -0
- package/src/core/settlement-splits.js +46 -0
- package/src/core/signer-keys.js +33 -0
- package/src/core/skills.js +86 -0
- package/src/core/sla-events.js +229 -0
- package/src/core/sla-metering.js +169 -0
- package/src/core/sla-policy-templates.js +340 -0
- package/src/core/sla.js +29 -0
- package/src/core/statements.js +426 -0
- package/src/core/tenancy.js +55 -0
- package/src/core/timestamp-proof.js +36 -0
- package/src/core/tool-manifest.js +116 -0
- package/src/core/tool-provenance.js +36 -0
- package/src/core/url-safety.js +263 -0
- package/src/core/verification-warnings.js +53 -0
- package/src/core/zone-coverage.js +59 -0
- package/src/core/zones.js +8 -0
- package/src/core/zoneset.js +67 -0
- package/src/db/migrate.js +61 -0
- package/src/db/migrations/001_init.sql +92 -0
- package/src/db/migrations/002_robot_reservations.sql +23 -0
- package/src/db/migrations/003_idempotency_v2.sql +32 -0
- package/src/db/migrations/004_notifications.sql +12 -0
- package/src/db/migrations/005_multi_tenant.sql +106 -0
- package/src/db/migrations/006_contracts.sql +27 -0
- package/src/db/migrations/007_artifacts_deliveries_correlations.sql +53 -0
- package/src/db/migrations/008_delivery_ingest_hardening.sql +52 -0
- package/src/db/migrations/009_auth_keys.sql +21 -0
- package/src/db/migrations/010_signer_keys.sql +25 -0
- package/src/db/migrations/011_ops_audit.sql +33 -0
- package/src/db/migrations/012_retention.sql +16 -0
- package/src/db/migrations/013_perf_indexes.sql +18 -0
- package/src/db/migrations/014_contracts_v2.sql +68 -0
- package/src/db/migrations/015_parties.sql +16 -0
- package/src/db/migrations/016_ledger_allocations.sql +18 -0
- package/src/db/migrations/017_party_statements.sql +31 -0
- package/src/db/migrations/018_finance_account_map.sql +12 -0
- package/src/db/migrations/019_ledger_allocations_account_id.sql +7 -0
- package/src/db/migrations/020_artifacts_source_event_unique.sql +10 -0
- package/src/db/migrations/021_artifacts_by_job_created_at_id.sql +6 -0
- package/src/db/migrations/022_governance_uniqueness.sql +28 -0
- package/src/db/migrations/023_marketplace_tasks.sql +45 -0
- package/src/db/migrations/024_agent_runtime_state.sql +70 -0
- package/src/db/migrations/025_tenant_settlement_policies.sql +19 -0
- package/src/db/migrations/026_money_rails_billable_events.sql +82 -0
- package/src/db/migrations/027_tenant_billing_config.sql +10 -0
- package/src/db/migrations/028_marketplace_rfq_storage.sql +121 -0
- package/src/db/pg.js +123 -0
- 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
|
+
}
|