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,1153 @@
|
|
|
1
|
+
import { canonicalJsonStringify } from "./canonical-json.js";
|
|
2
|
+
import { sha256Hex } from "./crypto.js";
|
|
3
|
+
import { signHashHexEd25519 } from "./crypto.js";
|
|
4
|
+
import { verifyChainedEvents } from "./event-chain.js";
|
|
5
|
+
import { computeArtifactHash } from "./artifacts.js";
|
|
6
|
+
import { compileContractPolicyTemplate } from "./contract-compiler.js";
|
|
7
|
+
import { DEFAULT_TENANT_ID } from "./tenancy.js";
|
|
8
|
+
import { VERIFICATION_WARNING_CODE, normalizeVerificationWarnings } from "./verification-warnings.js";
|
|
9
|
+
import { normalizeSignerKeyPurpose, normalizeSignerKeyStatus, SIGNER_KEY_PURPOSE } from "./signer-keys.js";
|
|
10
|
+
import {
|
|
11
|
+
GOVERNANCE_POLICY_SCHEMA_V2,
|
|
12
|
+
buildDefaultGovernancePolicyV1,
|
|
13
|
+
buildGovernancePolicyV2Unsigned,
|
|
14
|
+
signGovernancePolicyV2,
|
|
15
|
+
validateGovernancePolicyV1,
|
|
16
|
+
validateGovernancePolicyV2
|
|
17
|
+
} from "./governance-policy.js";
|
|
18
|
+
import { REVOCATION_LIST_SCHEMA_V1, buildRevocationListV1Core, signRevocationListV1, validateRevocationListV1 } from "./revocation-list.js";
|
|
19
|
+
import { buildTimestampProofV1 } from "./timestamp-proof.js";
|
|
20
|
+
import { normalizeCommitSha, readToolCommitBestEffort, readToolVersionBestEffort } from "./tool-provenance.js";
|
|
21
|
+
import fs from "node:fs";
|
|
22
|
+
import path from "node:path";
|
|
23
|
+
|
|
24
|
+
function isPlainObject(value) {
|
|
25
|
+
return Boolean(value && typeof value === "object" && !Array.isArray(value) && (Object.getPrototypeOf(value) === Object.prototype || Object.getPrototypeOf(value) === null));
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
function assertNonEmptyString(value, name) {
|
|
29
|
+
if (typeof value !== "string" || value.trim() === "") throw new TypeError(`${name} must be a non-empty string`);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
function normalizeIsoOrNull(value) {
|
|
33
|
+
if (typeof value !== "string" || !value.trim()) return null;
|
|
34
|
+
const s = String(value).trim();
|
|
35
|
+
const ms = Date.parse(s);
|
|
36
|
+
return Number.isFinite(ms) ? s : null;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
function buildPublicKeysFileV1({ tenantId, generatedAt, publicKeyByKeyId, signerKeys = [], keyIds = null, governanceEvents = null } = {}) {
|
|
40
|
+
assertNonEmptyString(tenantId, "tenantId");
|
|
41
|
+
assertNonEmptyString(generatedAt, "generatedAt");
|
|
42
|
+
if (!(publicKeyByKeyId instanceof Map)) throw new TypeError("publicKeyByKeyId must be a Map");
|
|
43
|
+
if (!Array.isArray(signerKeys)) throw new TypeError("signerKeys must be an array");
|
|
44
|
+
if (governanceEvents !== null && !Array.isArray(governanceEvents)) throw new TypeError("governanceEvents must be null or an array");
|
|
45
|
+
|
|
46
|
+
const serverSignerKeyIds = new Set();
|
|
47
|
+
const eventSignerKeyIds = new Set();
|
|
48
|
+
for (const e of Array.isArray(governanceEvents) ? governanceEvents : []) {
|
|
49
|
+
if (!e || typeof e !== "object") continue;
|
|
50
|
+
if (typeof e.signerKeyId === "string" && e.signerKeyId.trim()) eventSignerKeyIds.add(String(e.signerKeyId));
|
|
51
|
+
const type = String(e.type ?? "");
|
|
52
|
+
if (!type.startsWith("SERVER_SIGNER_KEY_")) continue;
|
|
53
|
+
const p = e.payload ?? null;
|
|
54
|
+
if (!p || typeof p !== "object") continue;
|
|
55
|
+
if (typeof p.keyId === "string" && p.keyId.trim()) serverSignerKeyIds.add(String(p.keyId));
|
|
56
|
+
if (typeof p.oldKeyId === "string" && p.oldKeyId.trim()) serverSignerKeyIds.add(String(p.oldKeyId));
|
|
57
|
+
if (typeof p.newKeyId === "string" && p.newKeyId.trim()) serverSignerKeyIds.add(String(p.newKeyId));
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
const metaByKeyId = new Map();
|
|
61
|
+
for (const r of signerKeys) {
|
|
62
|
+
if (!r || typeof r !== "object") continue;
|
|
63
|
+
const recTenantId = String(r.tenantId ?? "");
|
|
64
|
+
// Server signer keys can be global (stored under DEFAULT_TENANT_ID) but used across tenants.
|
|
65
|
+
if (recTenantId !== tenantId && recTenantId !== DEFAULT_TENANT_ID) continue;
|
|
66
|
+
const kid = typeof r.keyId === "string" && r.keyId.trim() ? r.keyId : null;
|
|
67
|
+
if (!kid) continue;
|
|
68
|
+
metaByKeyId.set(kid, r);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
const needed = new Set(Array.isArray(keyIds) ? keyIds.filter((k) => typeof k === "string" && k.trim()) : Array.from(publicKeyByKeyId.keys()));
|
|
72
|
+
for (const kid of serverSignerKeyIds) needed.add(kid);
|
|
73
|
+
for (const kid of eventSignerKeyIds) needed.add(kid);
|
|
74
|
+
const keys = [];
|
|
75
|
+
for (const keyId of Array.from(needed).sort()) {
|
|
76
|
+
const publicKeyPem = publicKeyByKeyId.get(keyId) ?? null;
|
|
77
|
+
if (!publicKeyPem) continue;
|
|
78
|
+
const meta = metaByKeyId.get(keyId) ?? null;
|
|
79
|
+
|
|
80
|
+
let purpose = null;
|
|
81
|
+
let status = null;
|
|
82
|
+
if (meta?.purpose !== undefined && meta?.purpose !== null) {
|
|
83
|
+
try {
|
|
84
|
+
purpose = normalizeSignerKeyPurpose(String(meta.purpose));
|
|
85
|
+
} catch {
|
|
86
|
+
purpose = null;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
if (meta?.status !== undefined && meta?.status !== null) {
|
|
90
|
+
try {
|
|
91
|
+
status = normalizeSignerKeyStatus(String(meta.status));
|
|
92
|
+
} catch {
|
|
93
|
+
status = null;
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
// Governance events are the authoritative declaration that a key is a server signer key.
|
|
97
|
+
if (!purpose && serverSignerKeyIds.has(keyId)) purpose = SIGNER_KEY_PURPOSE.SERVER;
|
|
98
|
+
|
|
99
|
+
keys.push({
|
|
100
|
+
keyId,
|
|
101
|
+
publicKeyPem: String(publicKeyPem),
|
|
102
|
+
tenantId: meta?.tenantId ?? tenantId,
|
|
103
|
+
purpose,
|
|
104
|
+
status,
|
|
105
|
+
description: meta?.description ?? null,
|
|
106
|
+
validFrom: normalizeIsoOrNull(meta?.validFrom ?? null),
|
|
107
|
+
validTo: normalizeIsoOrNull(meta?.validTo ?? null),
|
|
108
|
+
createdAt: normalizeIsoOrNull(meta?.createdAt ?? null),
|
|
109
|
+
rotatedAt: normalizeIsoOrNull(meta?.rotatedAt ?? null),
|
|
110
|
+
revokedAt: normalizeIsoOrNull(meta?.revokedAt ?? null)
|
|
111
|
+
});
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
keys.sort((a, b) => String(a.keyId).localeCompare(String(b.keyId)));
|
|
115
|
+
|
|
116
|
+
return {
|
|
117
|
+
schemaVersion: "PublicKeys.v1",
|
|
118
|
+
tenantId,
|
|
119
|
+
generatedAt,
|
|
120
|
+
order: "keyId_asc",
|
|
121
|
+
keys
|
|
122
|
+
};
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
export const JOB_PROOF_BUNDLE_SCHEMA_VERSION_V1 = "JobProofBundle.v1";
|
|
126
|
+
export const MONTH_PROOF_BUNDLE_SCHEMA_VERSION_V1 = "MonthProofBundle.v1";
|
|
127
|
+
export const BUNDLE_HEAD_ATTESTATION_SCHEMA_V1 = "BundleHeadAttestation.v1";
|
|
128
|
+
export const PROOF_BUNDLE_MANIFEST_HASHING_SCHEMA_VERSION_V1 = "ProofBundleManifestHash.v1";
|
|
129
|
+
|
|
130
|
+
function stripUndefinedDeep(value) {
|
|
131
|
+
if (value === undefined) return null;
|
|
132
|
+
if (value === null) return null;
|
|
133
|
+
if (Array.isArray(value)) return value.map(stripUndefinedDeep);
|
|
134
|
+
if (value && typeof value === "object") {
|
|
135
|
+
const out = {};
|
|
136
|
+
for (const [k, v] of Object.entries(value)) {
|
|
137
|
+
if (v === undefined) continue;
|
|
138
|
+
out[k] = stripUndefinedDeep(v);
|
|
139
|
+
}
|
|
140
|
+
return out;
|
|
141
|
+
}
|
|
142
|
+
return value;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
function computeBundleHeads({ jobSnapshot, tenantGovernanceSnapshot, governanceSnapshot } = {}) {
|
|
146
|
+
return {
|
|
147
|
+
job: {
|
|
148
|
+
lastEventId: jobSnapshot?.lastEventId ?? jobSnapshot?.lastEvent?.id ?? null,
|
|
149
|
+
lastChainHash: jobSnapshot?.lastChainHash ?? jobSnapshot?.lastEvent?.chainHash ?? null
|
|
150
|
+
},
|
|
151
|
+
governance: {
|
|
152
|
+
tenant: tenantGovernanceSnapshot ? { lastEventId: tenantGovernanceSnapshot.lastEventId ?? null, lastChainHash: tenantGovernanceSnapshot.lastChainHash ?? null } : null,
|
|
153
|
+
global: governanceSnapshot ? { lastEventId: governanceSnapshot.lastEventId ?? null, lastChainHash: governanceSnapshot.lastChainHash ?? null } : null
|
|
154
|
+
}
|
|
155
|
+
};
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
function parseJsonlFromBytes(bytes) {
|
|
159
|
+
if (!(bytes instanceof Uint8Array)) return [];
|
|
160
|
+
const text = new TextDecoder().decode(bytes);
|
|
161
|
+
const out = [];
|
|
162
|
+
for (const line of String(text).split("\n")) {
|
|
163
|
+
const trimmed = line.trim();
|
|
164
|
+
if (!trimmed) continue;
|
|
165
|
+
try {
|
|
166
|
+
out.push(JSON.parse(trimmed));
|
|
167
|
+
} catch {
|
|
168
|
+
return [];
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
return out;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
// NOTE: tool provenance derivation lives in src/core/tool-provenance.js
|
|
175
|
+
|
|
176
|
+
function findSignerGovernanceEventRef({ bundleFiles, keyId }) {
|
|
177
|
+
if (!(bundleFiles instanceof Map)) return null;
|
|
178
|
+
if (typeof keyId !== "string" || !keyId.trim()) return null;
|
|
179
|
+
const raw = bundleFiles.get("governance/global/events/events.jsonl") ?? null;
|
|
180
|
+
if (!(raw instanceof Uint8Array)) return null;
|
|
181
|
+
const events = parseJsonlFromBytes(raw);
|
|
182
|
+
for (const e of events) {
|
|
183
|
+
if (!e || typeof e !== "object") continue;
|
|
184
|
+
const type = String(e.type ?? "");
|
|
185
|
+
const p = e.payload ?? null;
|
|
186
|
+
if (!p || typeof p !== "object") continue;
|
|
187
|
+
if (type === "SERVER_SIGNER_KEY_REGISTERED" && String(p.keyId ?? "") === keyId) {
|
|
188
|
+
return { eventId: e.id ?? null, chainHash: e.chainHash ?? null, payloadHash: e.payloadHash ?? null, type };
|
|
189
|
+
}
|
|
190
|
+
if (type === "SERVER_SIGNER_KEY_ROTATED" && String(p.newKeyId ?? "") === keyId) {
|
|
191
|
+
return { eventId: e.id ?? null, chainHash: e.chainHash ?? null, payloadHash: e.payloadHash ?? null, type };
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
return null;
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
function warningsWithToolIdentity({ warnings, toolVersion, toolCommit }) {
|
|
198
|
+
const resolvedVersion = typeof toolVersion === "string" && toolVersion.trim() ? toolVersion.trim() : null;
|
|
199
|
+
const resolvedCommit = normalizeCommitSha(toolCommit) ?? readToolCommitBestEffort();
|
|
200
|
+
const out = [];
|
|
201
|
+
if (warnings !== null && warnings !== undefined) {
|
|
202
|
+
if (!Array.isArray(warnings)) throw new TypeError("warnings must be an array");
|
|
203
|
+
out.push(...warnings);
|
|
204
|
+
}
|
|
205
|
+
if (!resolvedVersion) out.push({ code: VERIFICATION_WARNING_CODE.TOOL_VERSION_UNKNOWN });
|
|
206
|
+
if (!resolvedCommit) out.push({ code: VERIFICATION_WARNING_CODE.TOOL_COMMIT_UNKNOWN });
|
|
207
|
+
return { version: resolvedVersion, commit: resolvedCommit ?? undefined, warnings: out };
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
function buildVerificationReportV1ForProofBundle({
|
|
211
|
+
kind,
|
|
212
|
+
tenantId,
|
|
213
|
+
scope,
|
|
214
|
+
generatedAt,
|
|
215
|
+
manifestHash,
|
|
216
|
+
bundleHeadAttestation,
|
|
217
|
+
signer,
|
|
218
|
+
timestampAuthoritySigner = null,
|
|
219
|
+
bundleFiles,
|
|
220
|
+
warnings,
|
|
221
|
+
toolVersion,
|
|
222
|
+
toolCommit
|
|
223
|
+
} = {}) {
|
|
224
|
+
assertNonEmptyString(kind, "kind");
|
|
225
|
+
assertNonEmptyString(tenantId, "tenantId");
|
|
226
|
+
if (!isPlainObject(scope)) throw new TypeError("scope must be an object");
|
|
227
|
+
assertNonEmptyString(generatedAt, "generatedAt");
|
|
228
|
+
assertNonEmptyString(manifestHash, "manifestHash");
|
|
229
|
+
|
|
230
|
+
const signerKeyId = signer?.keyId && typeof signer.keyId === "string" && signer.keyId.trim() ? signer.keyId : null;
|
|
231
|
+
const signerScope = signerKeyId ? (signer?.scope ?? "global") : null;
|
|
232
|
+
const signerGovernanceEventRef = signerKeyId ? findSignerGovernanceEventRef({ bundleFiles, keyId: signerKeyId }) : null;
|
|
233
|
+
const tool = warningsWithToolIdentity({ warnings, toolVersion: toolVersion ?? readToolVersionBestEffort(), toolCommit });
|
|
234
|
+
const signedAt = generatedAt;
|
|
235
|
+
|
|
236
|
+
const coreNoProof = stripUndefinedDeep({
|
|
237
|
+
schemaVersion: "VerificationReport.v1",
|
|
238
|
+
profile: "strict",
|
|
239
|
+
tool: {
|
|
240
|
+
name: "settld",
|
|
241
|
+
version: tool.version,
|
|
242
|
+
commit: tool.commit
|
|
243
|
+
},
|
|
244
|
+
warnings: normalizeVerificationWarnings(tool.warnings),
|
|
245
|
+
signer: signerKeyId
|
|
246
|
+
? {
|
|
247
|
+
keyId: signerKeyId,
|
|
248
|
+
scope: signerScope,
|
|
249
|
+
governanceEventRef: signerGovernanceEventRef
|
|
250
|
+
}
|
|
251
|
+
: null,
|
|
252
|
+
signerKeyId,
|
|
253
|
+
signedAt,
|
|
254
|
+
bundleHeadAttestation:
|
|
255
|
+
bundleHeadAttestation && typeof bundleHeadAttestation === "object"
|
|
256
|
+
? {
|
|
257
|
+
schemaVersion: bundleHeadAttestation.schemaVersion ?? null,
|
|
258
|
+
attestationHash: bundleHeadAttestation.attestationHash ?? null,
|
|
259
|
+
signerKeyId: bundleHeadAttestation.signerKeyId ?? null,
|
|
260
|
+
signedAt: bundleHeadAttestation.signedAt ?? null,
|
|
261
|
+
manifestHash: bundleHeadAttestation.manifestHash ?? null
|
|
262
|
+
}
|
|
263
|
+
: null,
|
|
264
|
+
subject: {
|
|
265
|
+
type: kind,
|
|
266
|
+
tenantId,
|
|
267
|
+
createdAt: generatedAt,
|
|
268
|
+
manifestHash,
|
|
269
|
+
scope
|
|
270
|
+
}
|
|
271
|
+
});
|
|
272
|
+
|
|
273
|
+
let timestampProof;
|
|
274
|
+
if (timestampAuthoritySigner && typeof timestampAuthoritySigner === "object") {
|
|
275
|
+
const messageHash = sha256Hex(canonicalJsonStringify(coreNoProof));
|
|
276
|
+
timestampProof = buildTimestampProofV1({ messageHash, timestamp: signedAt, signer: timestampAuthoritySigner });
|
|
277
|
+
}
|
|
278
|
+
const core = stripUndefinedDeep({ ...coreNoProof, timestampProof });
|
|
279
|
+
|
|
280
|
+
const reportHash = sha256Hex(canonicalJsonStringify(core));
|
|
281
|
+
let signature = null;
|
|
282
|
+
if (signer?.privateKeyPem && signerKeyId) {
|
|
283
|
+
signature = signHashHexEd25519(reportHash, signer.privateKeyPem);
|
|
284
|
+
}
|
|
285
|
+
return stripUndefinedDeep({ ...core, reportHash, signature });
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
function buildBundleHeadAttestationV1({ kind, tenantId, scope, generatedAt, manifestHash, heads, signer, timestampAuthoritySigner = null } = {}) {
|
|
289
|
+
assertNonEmptyString(kind, "kind");
|
|
290
|
+
assertNonEmptyString(tenantId, "tenantId");
|
|
291
|
+
if (!isPlainObject(scope)) throw new TypeError("scope must be an object");
|
|
292
|
+
assertNonEmptyString(generatedAt, "generatedAt");
|
|
293
|
+
assertNonEmptyString(manifestHash, "manifestHash");
|
|
294
|
+
if (!isPlainObject(heads)) throw new TypeError("heads must be an object");
|
|
295
|
+
if (!signer || typeof signer !== "object") throw new TypeError("signer is required");
|
|
296
|
+
assertNonEmptyString(signer.keyId, "signer.keyId");
|
|
297
|
+
assertNonEmptyString(signer.privateKeyPem, "signer.privateKeyPem");
|
|
298
|
+
|
|
299
|
+
const signedAt = generatedAt;
|
|
300
|
+
const coreNoProof = stripUndefinedDeep({
|
|
301
|
+
schemaVersion: BUNDLE_HEAD_ATTESTATION_SCHEMA_V1,
|
|
302
|
+
kind,
|
|
303
|
+
tenantId,
|
|
304
|
+
scope,
|
|
305
|
+
generatedAt,
|
|
306
|
+
manifestHash,
|
|
307
|
+
heads,
|
|
308
|
+
signedAt,
|
|
309
|
+
signerKeyId: signer.keyId
|
|
310
|
+
});
|
|
311
|
+
let timestampProof;
|
|
312
|
+
if (timestampAuthoritySigner && typeof timestampAuthoritySigner === "object") {
|
|
313
|
+
const messageHash = sha256Hex(canonicalJsonStringify(coreNoProof));
|
|
314
|
+
timestampProof = buildTimestampProofV1({ messageHash, timestamp: signedAt, signer: timestampAuthoritySigner });
|
|
315
|
+
}
|
|
316
|
+
const core = stripUndefinedDeep({ ...coreNoProof, timestampProof });
|
|
317
|
+
const attestationHash = sha256Hex(canonicalJsonStringify(core));
|
|
318
|
+
const signature = signHashHexEd25519(attestationHash, signer.privateKeyPem);
|
|
319
|
+
return { ...core, attestationHash, signature };
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
export function canonicalJsonlLines(values) {
|
|
323
|
+
if (!Array.isArray(values)) throw new TypeError("values must be an array");
|
|
324
|
+
return values.map((v) => `${canonicalJsonStringify(v)}\n`).join("");
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
export function computeProofBundleManifestV1({ files, generatedAt, kind, tenantId, scope } = {}) {
|
|
328
|
+
if (!(files instanceof Map)) throw new TypeError("files must be a Map(name -> bytes)");
|
|
329
|
+
assertNonEmptyString(generatedAt, "generatedAt");
|
|
330
|
+
assertNonEmptyString(kind, "kind");
|
|
331
|
+
assertNonEmptyString(tenantId, "tenantId");
|
|
332
|
+
if (!isPlainObject(scope)) throw new TypeError("scope must be an object");
|
|
333
|
+
|
|
334
|
+
const entries = [];
|
|
335
|
+
for (const [name, bytes] of Array.from(files.entries()).sort(([a], [b]) => (a < b ? -1 : a > b ? 1 : 0))) {
|
|
336
|
+
assertNonEmptyString(name, "file name");
|
|
337
|
+
if (!(bytes instanceof Uint8Array)) throw new TypeError(`file ${name} bytes must be a Uint8Array`);
|
|
338
|
+
// `verify/*` files are derived outputs and intentionally excluded from the manifest.
|
|
339
|
+
// This avoids circular hashing when a verification report wants to refer to the manifestHash.
|
|
340
|
+
if (name.startsWith("verify/")) continue;
|
|
341
|
+
entries.push({
|
|
342
|
+
name,
|
|
343
|
+
sha256: sha256Hex(bytes),
|
|
344
|
+
bytes: bytes.byteLength
|
|
345
|
+
});
|
|
346
|
+
}
|
|
347
|
+
|
|
348
|
+
const manifest = {
|
|
349
|
+
schemaVersion: "ProofBundleManifest.v1",
|
|
350
|
+
kind,
|
|
351
|
+
tenantId,
|
|
352
|
+
scope,
|
|
353
|
+
generatedAt,
|
|
354
|
+
hashing: {
|
|
355
|
+
schemaVersion: PROOF_BUNDLE_MANIFEST_HASHING_SCHEMA_VERSION_V1,
|
|
356
|
+
fileOrder: "path_asc",
|
|
357
|
+
excludes: ["verify/**"]
|
|
358
|
+
},
|
|
359
|
+
files: entries
|
|
360
|
+
};
|
|
361
|
+
const manifestHash = sha256Hex(canonicalJsonStringify(manifest));
|
|
362
|
+
return { manifest, manifestHash };
|
|
363
|
+
}
|
|
364
|
+
|
|
365
|
+
export function verifyProofBundleManifestV1({ files, manifest }) {
|
|
366
|
+
if (!(files instanceof Map)) throw new TypeError("files must be a Map");
|
|
367
|
+
if (!isPlainObject(manifest)) throw new TypeError("manifest must be an object");
|
|
368
|
+
if (manifest.schemaVersion !== "ProofBundleManifest.v1") return { ok: false, error: "unsupported manifest schemaVersion" };
|
|
369
|
+
|
|
370
|
+
const expected = new Map();
|
|
371
|
+
for (const f of manifest.files ?? []) {
|
|
372
|
+
if (!f || typeof f !== "object") continue;
|
|
373
|
+
if (typeof f.name !== "string") continue;
|
|
374
|
+
expected.set(f.name, String(f.sha256 ?? ""));
|
|
375
|
+
}
|
|
376
|
+
|
|
377
|
+
for (const [name, sha] of expected.entries()) {
|
|
378
|
+
const bytes = files.get(name) ?? null;
|
|
379
|
+
if (!(bytes instanceof Uint8Array)) return { ok: false, error: "missing file", name };
|
|
380
|
+
const actual = sha256Hex(bytes);
|
|
381
|
+
if (actual !== sha) return { ok: false, error: "sha256 mismatch", name, expected: sha, actual };
|
|
382
|
+
}
|
|
383
|
+
return { ok: true };
|
|
384
|
+
}
|
|
385
|
+
|
|
386
|
+
function verifyArtifacts(artifacts) {
|
|
387
|
+
const results = [];
|
|
388
|
+
for (const a of Array.isArray(artifacts) ? artifacts : []) {
|
|
389
|
+
if (!a || typeof a !== "object") continue;
|
|
390
|
+
const artifactType = typeof a.artifactType === "string" ? a.artifactType : null;
|
|
391
|
+
const schemaVersion = typeof a.schemaVersion === "string" ? a.schemaVersion : null;
|
|
392
|
+
const artifactHash = typeof a.artifactHash === "string" ? a.artifactHash : null;
|
|
393
|
+
let ok = true;
|
|
394
|
+
let error = null;
|
|
395
|
+
let expectedHash = null;
|
|
396
|
+
try {
|
|
397
|
+
if (!artifactType) throw new Error("missing artifactType");
|
|
398
|
+
if (schemaVersion && schemaVersion !== artifactType) throw new Error("schemaVersion mismatch");
|
|
399
|
+
if (!artifactHash) throw new Error("missing artifactHash");
|
|
400
|
+
const { artifactHash: _ignored, ...core } = a;
|
|
401
|
+
expectedHash = computeArtifactHash(core);
|
|
402
|
+
if (expectedHash !== artifactHash) throw new Error("artifactHash mismatch");
|
|
403
|
+
} catch (err) {
|
|
404
|
+
ok = false;
|
|
405
|
+
error = err?.message ?? "artifact verification failed";
|
|
406
|
+
}
|
|
407
|
+
results.push({ artifactType, artifactId: a.artifactId ?? null, artifactHash, ok, error, expectedHash });
|
|
408
|
+
}
|
|
409
|
+
return results;
|
|
410
|
+
}
|
|
411
|
+
|
|
412
|
+
function verifyEventChain(events, publicKeyByKeyId) {
|
|
413
|
+
try {
|
|
414
|
+
const res = verifyChainedEvents(events, { publicKeyByKeyId });
|
|
415
|
+
if (!res?.ok) return { ok: false, error: res?.error ?? "event chain invalid" };
|
|
416
|
+
return { ok: true };
|
|
417
|
+
} catch (err) {
|
|
418
|
+
return { ok: false, error: err?.message ?? "event chain verification failed" };
|
|
419
|
+
}
|
|
420
|
+
}
|
|
421
|
+
|
|
422
|
+
function verifySettlementProofRefs(events) {
|
|
423
|
+
const result = { ok: true, checked: 0, errors: [] };
|
|
424
|
+
if (!Array.isArray(events) || events.length === 0) return { ok: true, checked: 0, errors: [] };
|
|
425
|
+
|
|
426
|
+
const byId = new Map();
|
|
427
|
+
for (const e of events) {
|
|
428
|
+
if (!e || typeof e !== "object") continue;
|
|
429
|
+
if (typeof e.id === "string" && e.id.trim()) byId.set(e.id, e);
|
|
430
|
+
}
|
|
431
|
+
|
|
432
|
+
for (const settled of events) {
|
|
433
|
+
if (settled?.type !== "SETTLED") continue;
|
|
434
|
+
result.checked += 1;
|
|
435
|
+
const ref = settled?.payload?.settlementProofRef ?? null;
|
|
436
|
+
if (!ref || typeof ref !== "object") {
|
|
437
|
+
result.ok = false;
|
|
438
|
+
result.errors.push({ error: "missing settlementProofRef", settledEventId: settled?.id ?? null });
|
|
439
|
+
continue;
|
|
440
|
+
}
|
|
441
|
+
|
|
442
|
+
const proofEventId = typeof ref.proofEventId === "string" ? ref.proofEventId : null;
|
|
443
|
+
const proofEvent = proofEventId ? byId.get(proofEventId) ?? null : null;
|
|
444
|
+
if (!proofEvent) {
|
|
445
|
+
result.ok = false;
|
|
446
|
+
result.errors.push({ error: "missing referenced proof event", settledEventId: settled?.id ?? null, proofEventId });
|
|
447
|
+
continue;
|
|
448
|
+
}
|
|
449
|
+
if (proofEvent.type !== "PROOF_EVALUATED") {
|
|
450
|
+
result.ok = false;
|
|
451
|
+
result.errors.push({ error: "referenced event is not PROOF_EVALUATED", settledEventId: settled?.id ?? null, proofEventId, type: proofEvent.type ?? null });
|
|
452
|
+
continue;
|
|
453
|
+
}
|
|
454
|
+
|
|
455
|
+
if (ref.proofEventChainHash && ref.proofEventChainHash !== proofEvent.chainHash) {
|
|
456
|
+
result.ok = false;
|
|
457
|
+
result.errors.push({ error: "proofEventChainHash mismatch", settledEventId: settled?.id ?? null, proofEventId });
|
|
458
|
+
}
|
|
459
|
+
if (ref.proofEventPayloadHash && ref.proofEventPayloadHash !== proofEvent.payloadHash) {
|
|
460
|
+
result.ok = false;
|
|
461
|
+
result.errors.push({ error: "proofEventPayloadHash mismatch", settledEventId: settled?.id ?? null, proofEventId });
|
|
462
|
+
}
|
|
463
|
+
|
|
464
|
+
const p = proofEvent.payload ?? null;
|
|
465
|
+
if (!p || typeof p !== "object") {
|
|
466
|
+
result.ok = false;
|
|
467
|
+
result.errors.push({ error: "proof event missing payload", settledEventId: settled?.id ?? null, proofEventId });
|
|
468
|
+
continue;
|
|
469
|
+
}
|
|
470
|
+
|
|
471
|
+
if (ref.factsHash && ref.factsHash !== p.factsHash) {
|
|
472
|
+
result.ok = false;
|
|
473
|
+
result.errors.push({ error: "factsHash mismatch", settledEventId: settled?.id ?? null, proofEventId });
|
|
474
|
+
}
|
|
475
|
+
if (ref.evaluatedAtChainHash && ref.evaluatedAtChainHash !== p.evaluatedAtChainHash) {
|
|
476
|
+
result.ok = false;
|
|
477
|
+
result.errors.push({ error: "evaluatedAtChainHash mismatch", settledEventId: settled?.id ?? null, proofEventId });
|
|
478
|
+
}
|
|
479
|
+
|
|
480
|
+
const proofStatus = p.status ?? null;
|
|
481
|
+
const settlementStatus = ref.status ?? null;
|
|
482
|
+
const forfeit = ref.forfeit && typeof ref.forfeit === "object" ? ref.forfeit : null;
|
|
483
|
+
const statusOk =
|
|
484
|
+
proofStatus === settlementStatus || (forfeit && proofStatus === "INSUFFICIENT_EVIDENCE" && settlementStatus === "FAIL");
|
|
485
|
+
if (!statusOk) {
|
|
486
|
+
result.ok = false;
|
|
487
|
+
result.errors.push({
|
|
488
|
+
error: "settlement status does not match referenced proof",
|
|
489
|
+
settledEventId: settled?.id ?? null,
|
|
490
|
+
proofEventId,
|
|
491
|
+
proofStatus,
|
|
492
|
+
settlementStatus
|
|
493
|
+
});
|
|
494
|
+
}
|
|
495
|
+
|
|
496
|
+
// Forfeit settlements must reference a forfeiture event as well.
|
|
497
|
+
if (forfeit) {
|
|
498
|
+
const forfeitEventId = typeof forfeit.forfeitEventId === "string" ? forfeit.forfeitEventId : null;
|
|
499
|
+
const forfeitEvent = forfeitEventId ? byId.get(forfeitEventId) ?? null : null;
|
|
500
|
+
if (!forfeitEvent || forfeitEvent.type !== "SETTLEMENT_FORFEITED") {
|
|
501
|
+
result.ok = false;
|
|
502
|
+
result.errors.push({
|
|
503
|
+
error: "missing referenced forfeiture event",
|
|
504
|
+
settledEventId: settled?.id ?? null,
|
|
505
|
+
forfeitEventId
|
|
506
|
+
});
|
|
507
|
+
} else {
|
|
508
|
+
if (forfeit.forfeitEventChainHash && forfeit.forfeitEventChainHash !== forfeitEvent.chainHash) {
|
|
509
|
+
result.ok = false;
|
|
510
|
+
result.errors.push({ error: "forfeitEventChainHash mismatch", settledEventId: settled?.id ?? null, forfeitEventId });
|
|
511
|
+
}
|
|
512
|
+
if (forfeit.forfeitEventPayloadHash && forfeit.forfeitEventPayloadHash !== forfeitEvent.payloadHash) {
|
|
513
|
+
result.ok = false;
|
|
514
|
+
result.errors.push({ error: "forfeitEventPayloadHash mismatch", settledEventId: settled?.id ?? null, forfeitEventId });
|
|
515
|
+
}
|
|
516
|
+
}
|
|
517
|
+
}
|
|
518
|
+
}
|
|
519
|
+
|
|
520
|
+
return result;
|
|
521
|
+
}
|
|
522
|
+
|
|
523
|
+
function compilePolicySnapshotForContractDoc(contractDoc) {
|
|
524
|
+
if (!contractDoc || typeof contractDoc !== "object") return null;
|
|
525
|
+
try {
|
|
526
|
+
const { policyTemplate, policyHash, compilerId } = compileContractPolicyTemplate({ contractDoc });
|
|
527
|
+
return { policySnapshot: policyTemplate, policyHash, compilerId };
|
|
528
|
+
} catch {
|
|
529
|
+
return null;
|
|
530
|
+
}
|
|
531
|
+
}
|
|
532
|
+
|
|
533
|
+
export function buildJobProofBundleV1({
|
|
534
|
+
tenantId,
|
|
535
|
+
jobId,
|
|
536
|
+
jobEvents,
|
|
537
|
+
jobSnapshot,
|
|
538
|
+
governanceEvents = null,
|
|
539
|
+
governanceSnapshot = null,
|
|
540
|
+
tenantGovernanceEvents = null,
|
|
541
|
+
tenantGovernanceSnapshot = null,
|
|
542
|
+
governancePolicy = null,
|
|
543
|
+
governancePolicySigner = null,
|
|
544
|
+
revocationList = null,
|
|
545
|
+
artifacts,
|
|
546
|
+
contractDocsByHash = new Map(),
|
|
547
|
+
publicKeyByKeyId = new Map(),
|
|
548
|
+
signerKeys = [],
|
|
549
|
+
manifestSigner = null,
|
|
550
|
+
verificationReportSigner = null,
|
|
551
|
+
timestampAuthoritySigner = null,
|
|
552
|
+
toolVersion = null,
|
|
553
|
+
toolCommit = null,
|
|
554
|
+
requireHeadAttestation = false,
|
|
555
|
+
generatedAt
|
|
556
|
+
} = {}) {
|
|
557
|
+
assertNonEmptyString(tenantId, "tenantId");
|
|
558
|
+
assertNonEmptyString(jobId, "jobId");
|
|
559
|
+
if (!Array.isArray(jobEvents) || jobEvents.length === 0) throw new TypeError("jobEvents is required");
|
|
560
|
+
if (!jobSnapshot || typeof jobSnapshot !== "object") throw new TypeError("jobSnapshot is required");
|
|
561
|
+
if (governanceEvents !== null && !Array.isArray(governanceEvents)) throw new TypeError("governanceEvents must be null or an array");
|
|
562
|
+
if (governanceSnapshot !== null && typeof governanceSnapshot !== "object") throw new TypeError("governanceSnapshot must be null or an object");
|
|
563
|
+
if (tenantGovernanceEvents !== null && !Array.isArray(tenantGovernanceEvents)) throw new TypeError("tenantGovernanceEvents must be null or an array");
|
|
564
|
+
if (tenantGovernanceSnapshot !== null && typeof tenantGovernanceSnapshot !== "object") {
|
|
565
|
+
throw new TypeError("tenantGovernanceSnapshot must be null or an object");
|
|
566
|
+
}
|
|
567
|
+
if (governancePolicy !== null && typeof governancePolicy !== "object") throw new TypeError("governancePolicy must be null or an object");
|
|
568
|
+
if (governancePolicySigner !== null && typeof governancePolicySigner !== "object") throw new TypeError("governancePolicySigner must be null or an object");
|
|
569
|
+
if (revocationList !== null && typeof revocationList !== "object") throw new TypeError("revocationList must be null or an object");
|
|
570
|
+
if (!Array.isArray(artifacts)) throw new TypeError("artifacts must be an array");
|
|
571
|
+
if (!(contractDocsByHash instanceof Map)) throw new TypeError("contractDocsByHash must be a Map");
|
|
572
|
+
if (!(publicKeyByKeyId instanceof Map)) throw new TypeError("publicKeyByKeyId must be a Map");
|
|
573
|
+
if (!Array.isArray(signerKeys)) throw new TypeError("signerKeys must be an array");
|
|
574
|
+
if (manifestSigner !== null && typeof manifestSigner !== "object") throw new TypeError("manifestSigner must be null or an object");
|
|
575
|
+
if (verificationReportSigner !== null && typeof verificationReportSigner !== "object") throw new TypeError("verificationReportSigner must be null or an object");
|
|
576
|
+
if (timestampAuthoritySigner !== null && typeof timestampAuthoritySigner !== "object") throw new TypeError("timestampAuthoritySigner must be null or an object");
|
|
577
|
+
if (toolVersion !== null && typeof toolVersion !== "string") throw new TypeError("toolVersion must be null or a string");
|
|
578
|
+
if (toolCommit !== null && typeof toolCommit !== "string") throw new TypeError("toolCommit must be null or a string");
|
|
579
|
+
if (requireHeadAttestation !== true && requireHeadAttestation !== false) throw new TypeError("requireHeadAttestation must be a boolean");
|
|
580
|
+
assertNonEmptyString(generatedAt, "generatedAt");
|
|
581
|
+
|
|
582
|
+
if (requireHeadAttestation && !manifestSigner) {
|
|
583
|
+
const err = new Error("manifestSigner is required to produce a bundle head attestation");
|
|
584
|
+
err.code = "MANIFEST_SIGNER_REQUIRED";
|
|
585
|
+
throw err;
|
|
586
|
+
}
|
|
587
|
+
|
|
588
|
+
const files = new Map();
|
|
589
|
+
let tenantGovSnapshotUsed = null;
|
|
590
|
+
let globalGovSnapshotUsed = null;
|
|
591
|
+
|
|
592
|
+
// Governance policy: strict authorization contract, optionally signed by a governance root key.
|
|
593
|
+
// - If a signed policy signer is provided, we emit GovernancePolicy.v2 + RevocationList.v1.
|
|
594
|
+
// - Otherwise, fall back to GovernancePolicy.v1 (non-strict / legacy).
|
|
595
|
+
if (governancePolicySigner) {
|
|
596
|
+
const list =
|
|
597
|
+
revocationList ??
|
|
598
|
+
({
|
|
599
|
+
schemaVersion: REVOCATION_LIST_SCHEMA_V1,
|
|
600
|
+
listId: "revocations_default_v1",
|
|
601
|
+
generatedAt,
|
|
602
|
+
rotations: [],
|
|
603
|
+
revocations: [],
|
|
604
|
+
signerKeyId: null,
|
|
605
|
+
signedAt: null,
|
|
606
|
+
listHash: null,
|
|
607
|
+
signature: null
|
|
608
|
+
});
|
|
609
|
+
validateRevocationListV1(list);
|
|
610
|
+
const signedList = signRevocationListV1({
|
|
611
|
+
listCore: buildRevocationListV1Core({
|
|
612
|
+
listId: list.listId ?? "revocations_default_v1",
|
|
613
|
+
generatedAt,
|
|
614
|
+
rotations: list.rotations ?? [],
|
|
615
|
+
revocations: list.revocations ?? [],
|
|
616
|
+
signerKeyId: governancePolicySigner.keyId,
|
|
617
|
+
signedAt: generatedAt
|
|
618
|
+
}),
|
|
619
|
+
signer: governancePolicySigner
|
|
620
|
+
});
|
|
621
|
+
files.set("governance/revocations.json", new TextEncoder().encode(`${canonicalJsonStringify(signedList)}\n`));
|
|
622
|
+
|
|
623
|
+
const policyUnsigned =
|
|
624
|
+
governancePolicy && governancePolicy.schemaVersion === GOVERNANCE_POLICY_SCHEMA_V2
|
|
625
|
+
? {
|
|
626
|
+
...governancePolicy,
|
|
627
|
+
revocationList: { path: "governance/revocations.json", sha256: signedList.listHash },
|
|
628
|
+
signerKeyId: null,
|
|
629
|
+
signedAt: null,
|
|
630
|
+
policyHash: null,
|
|
631
|
+
signature: null
|
|
632
|
+
}
|
|
633
|
+
: buildGovernancePolicyV2Unsigned({
|
|
634
|
+
policyId: "governance_policy_default_v2",
|
|
635
|
+
generatedAt,
|
|
636
|
+
revocationList: { path: "governance/revocations.json", sha256: signedList.listHash },
|
|
637
|
+
verificationReportSigners: [
|
|
638
|
+
{
|
|
639
|
+
subjectType: JOB_PROOF_BUNDLE_SCHEMA_VERSION_V1,
|
|
640
|
+
allowedScopes: ["global", "tenant"],
|
|
641
|
+
allowedKeyIds: [String((verificationReportSigner ?? manifestSigner)?.keyId ?? "")].filter(Boolean),
|
|
642
|
+
requireGoverned: true,
|
|
643
|
+
requiredPurpose: "server"
|
|
644
|
+
}
|
|
645
|
+
],
|
|
646
|
+
bundleHeadAttestationSigners: [
|
|
647
|
+
{
|
|
648
|
+
subjectType: JOB_PROOF_BUNDLE_SCHEMA_VERSION_V1,
|
|
649
|
+
allowedScopes: ["global", "tenant"],
|
|
650
|
+
allowedKeyIds: [String(manifestSigner?.keyId ?? "")].filter(Boolean),
|
|
651
|
+
requireGoverned: true,
|
|
652
|
+
requiredPurpose: "server"
|
|
653
|
+
}
|
|
654
|
+
]
|
|
655
|
+
});
|
|
656
|
+
validateGovernancePolicyV2(policyUnsigned);
|
|
657
|
+
const signedPolicy = signGovernancePolicyV2({ policy: policyUnsigned, signer: governancePolicySigner, signedAt: generatedAt });
|
|
658
|
+
files.set("governance/policy.json", new TextEncoder().encode(`${canonicalJsonStringify(signedPolicy)}\n`));
|
|
659
|
+
} else {
|
|
660
|
+
const policy = governancePolicy ?? buildDefaultGovernancePolicyV1({ generatedAt });
|
|
661
|
+
validateGovernancePolicyV1(policy);
|
|
662
|
+
files.set("governance/policy.json", new TextEncoder().encode(`${canonicalJsonStringify(policy)}\n`));
|
|
663
|
+
}
|
|
664
|
+
|
|
665
|
+
// Event bytes used for payloadHash material (the "physics" bytes).
|
|
666
|
+
const payloadMaterial = jobEvents.map((e) => ({
|
|
667
|
+
v: e?.v ?? null,
|
|
668
|
+
id: e?.id ?? null,
|
|
669
|
+
at: e?.at ?? null,
|
|
670
|
+
streamId: e?.streamId ?? null,
|
|
671
|
+
type: e?.type ?? null,
|
|
672
|
+
actor: e?.actor ?? null,
|
|
673
|
+
payload: e?.payload ?? null
|
|
674
|
+
}));
|
|
675
|
+
files.set("events/payload_material.jsonl", new TextEncoder().encode(canonicalJsonlLines(payloadMaterial)));
|
|
676
|
+
files.set("events/events.jsonl", new TextEncoder().encode(canonicalJsonlLines(jobEvents)));
|
|
677
|
+
|
|
678
|
+
files.set("job/snapshot.json", new TextEncoder().encode(`${canonicalJsonStringify(jobSnapshot)}\n`));
|
|
679
|
+
|
|
680
|
+
if (Array.isArray(tenantGovernanceEvents)) {
|
|
681
|
+
const govMaterial = tenantGovernanceEvents.map((e) => ({
|
|
682
|
+
v: e?.v ?? null,
|
|
683
|
+
id: e?.id ?? null,
|
|
684
|
+
at: e?.at ?? null,
|
|
685
|
+
streamId: e?.streamId ?? null,
|
|
686
|
+
type: e?.type ?? null,
|
|
687
|
+
actor: e?.actor ?? null,
|
|
688
|
+
payload: e?.payload ?? null
|
|
689
|
+
}));
|
|
690
|
+
files.set("governance/tenant/events/payload_material.jsonl", new TextEncoder().encode(canonicalJsonlLines(govMaterial)));
|
|
691
|
+
files.set("governance/tenant/events/events.jsonl", new TextEncoder().encode(canonicalJsonlLines(tenantGovernanceEvents)));
|
|
692
|
+
const snap =
|
|
693
|
+
tenantGovernanceSnapshot ??
|
|
694
|
+
({
|
|
695
|
+
streamId: "governance",
|
|
696
|
+
lastChainHash: tenantGovernanceEvents.length ? tenantGovernanceEvents[tenantGovernanceEvents.length - 1]?.chainHash ?? null : null,
|
|
697
|
+
lastEventId: tenantGovernanceEvents.length ? tenantGovernanceEvents[tenantGovernanceEvents.length - 1]?.id ?? null : null
|
|
698
|
+
});
|
|
699
|
+
tenantGovSnapshotUsed = snap;
|
|
700
|
+
files.set("governance/tenant/snapshot.json", new TextEncoder().encode(`${canonicalJsonStringify(snap)}\n`));
|
|
701
|
+
}
|
|
702
|
+
|
|
703
|
+
if (Array.isArray(governanceEvents)) {
|
|
704
|
+
const govMaterial = governanceEvents.map((e) => ({
|
|
705
|
+
v: e?.v ?? null,
|
|
706
|
+
id: e?.id ?? null,
|
|
707
|
+
at: e?.at ?? null,
|
|
708
|
+
streamId: e?.streamId ?? null,
|
|
709
|
+
type: e?.type ?? null,
|
|
710
|
+
actor: e?.actor ?? null,
|
|
711
|
+
payload: e?.payload ?? null
|
|
712
|
+
}));
|
|
713
|
+
files.set("governance/global/events/payload_material.jsonl", new TextEncoder().encode(canonicalJsonlLines(govMaterial)));
|
|
714
|
+
files.set("governance/global/events/events.jsonl", new TextEncoder().encode(canonicalJsonlLines(governanceEvents)));
|
|
715
|
+
const snap =
|
|
716
|
+
governanceSnapshot ??
|
|
717
|
+
({
|
|
718
|
+
streamId: "governance",
|
|
719
|
+
lastChainHash: governanceEvents.length ? governanceEvents[governanceEvents.length - 1]?.chainHash ?? null : null,
|
|
720
|
+
lastEventId: governanceEvents.length ? governanceEvents[governanceEvents.length - 1]?.id ?? null : null
|
|
721
|
+
});
|
|
722
|
+
globalGovSnapshotUsed = snap;
|
|
723
|
+
files.set("governance/global/snapshot.json", new TextEncoder().encode(`${canonicalJsonStringify(snap)}\n`));
|
|
724
|
+
}
|
|
725
|
+
|
|
726
|
+
// Contracts + compiled policies (reproducible from contract doc).
|
|
727
|
+
const customerContractHash = jobSnapshot?.booking?.customerContractHash ?? jobSnapshot?.customerContractHash ?? null;
|
|
728
|
+
const operatorContractHash = jobSnapshot?.operatorContractHash ?? null;
|
|
729
|
+
const contractHashes = [customerContractHash, operatorContractHash].filter((h) => typeof h === "string" && h.trim());
|
|
730
|
+
|
|
731
|
+
const compiledPolicies = [];
|
|
732
|
+
for (const h of Array.from(new Set(contractHashes)).sort()) {
|
|
733
|
+
const doc = contractDocsByHash.get(h) ?? null;
|
|
734
|
+
if (!doc) continue;
|
|
735
|
+
files.set(`contracts/${h}.json`, new TextEncoder().encode(`${canonicalJsonStringify(doc)}\n`));
|
|
736
|
+
const compiled = compilePolicySnapshotForContractDoc(doc);
|
|
737
|
+
if (compiled?.policySnapshot && compiled?.policyHash) {
|
|
738
|
+
const policyHash = String(compiled.policyHash);
|
|
739
|
+
files.set(`policies/${policyHash}.json`, new TextEncoder().encode(`${canonicalJsonStringify(compiled.policySnapshot)}\n`));
|
|
740
|
+
compiledPolicies.push({ contractHash: h, ...compiled, policySnapshotFile: `policies/${policyHash}.json` });
|
|
741
|
+
}
|
|
742
|
+
}
|
|
743
|
+
|
|
744
|
+
// Artifacts as delivered/stored (canonical JSON).
|
|
745
|
+
const artifactFiles = [];
|
|
746
|
+
for (const a of artifacts) {
|
|
747
|
+
if (!a || typeof a !== "object") continue;
|
|
748
|
+
const artifactType = typeof a.artifactType === "string" ? a.artifactType : "unknown";
|
|
749
|
+
const artifactHash = typeof a.artifactHash === "string" ? a.artifactHash : "unknown";
|
|
750
|
+
const name = `artifacts/${artifactType}/${artifactHash}.json`;
|
|
751
|
+
files.set(name, new TextEncoder().encode(`${canonicalJsonStringify(a)}\n`));
|
|
752
|
+
artifactFiles.push({ artifactType, artifactHash, name });
|
|
753
|
+
}
|
|
754
|
+
|
|
755
|
+
// Public keys (with lifecycle metadata when available) needed to verify signed events.
|
|
756
|
+
const keyIds = Array.from(
|
|
757
|
+
new Set(
|
|
758
|
+
jobEvents
|
|
759
|
+
.map((e) => (e?.signerKeyId && typeof e.signerKeyId === "string" ? e.signerKeyId : null))
|
|
760
|
+
.filter((v) => typeof v === "string" && v.trim())
|
|
761
|
+
)
|
|
762
|
+
).sort();
|
|
763
|
+
const keysFile = buildPublicKeysFileV1({
|
|
764
|
+
tenantId,
|
|
765
|
+
generatedAt,
|
|
766
|
+
publicKeyByKeyId,
|
|
767
|
+
signerKeys,
|
|
768
|
+
keyIds,
|
|
769
|
+
governanceEvents: [...(Array.isArray(governanceEvents) ? governanceEvents : []), ...(Array.isArray(tenantGovernanceEvents) ? tenantGovernanceEvents : [])]
|
|
770
|
+
});
|
|
771
|
+
files.set("keys/public_keys.json", new TextEncoder().encode(`${canonicalJsonStringify(keysFile)}\n`));
|
|
772
|
+
|
|
773
|
+
const eventChain = verifyEventChain(jobEvents, publicKeyByKeyId);
|
|
774
|
+
const settlementProofRefs = verifySettlementProofRefs(jobEvents);
|
|
775
|
+
const artifactsVerify = verifyArtifacts(artifacts);
|
|
776
|
+
|
|
777
|
+
const report = {
|
|
778
|
+
schemaVersion: "ProofBundleVerifyReport.v1",
|
|
779
|
+
kind: JOB_PROOF_BUNDLE_SCHEMA_VERSION_V1,
|
|
780
|
+
tenantId,
|
|
781
|
+
scope: { jobId },
|
|
782
|
+
generatedAt,
|
|
783
|
+
eventChain,
|
|
784
|
+
settlementProofRefs,
|
|
785
|
+
artifacts: artifactsVerify,
|
|
786
|
+
compiledPolicies
|
|
787
|
+
};
|
|
788
|
+
files.set("verify/report.json", new TextEncoder().encode(`${canonicalJsonStringify(report)}\n`));
|
|
789
|
+
|
|
790
|
+
const { manifest, manifestHash } = computeProofBundleManifestV1({
|
|
791
|
+
files,
|
|
792
|
+
generatedAt,
|
|
793
|
+
kind: JOB_PROOF_BUNDLE_SCHEMA_VERSION_V1,
|
|
794
|
+
tenantId,
|
|
795
|
+
scope: { jobId }
|
|
796
|
+
});
|
|
797
|
+
files.set("manifest.json", new TextEncoder().encode(`${canonicalJsonStringify({ ...manifest, manifestHash })}\n`));
|
|
798
|
+
|
|
799
|
+
if (manifestSigner) {
|
|
800
|
+
const heads = computeBundleHeads({
|
|
801
|
+
jobSnapshot,
|
|
802
|
+
tenantGovernanceSnapshot: tenantGovSnapshotUsed,
|
|
803
|
+
governanceSnapshot: globalGovSnapshotUsed
|
|
804
|
+
});
|
|
805
|
+
const att = buildBundleHeadAttestationV1({
|
|
806
|
+
kind: JOB_PROOF_BUNDLE_SCHEMA_VERSION_V1,
|
|
807
|
+
tenantId,
|
|
808
|
+
scope: { jobId },
|
|
809
|
+
generatedAt,
|
|
810
|
+
manifestHash,
|
|
811
|
+
heads,
|
|
812
|
+
signer: manifestSigner,
|
|
813
|
+
timestampAuthoritySigner
|
|
814
|
+
});
|
|
815
|
+
files.set("attestation/bundle_head_attestation.json", new TextEncoder().encode(`${canonicalJsonStringify(att)}\n`));
|
|
816
|
+
}
|
|
817
|
+
|
|
818
|
+
if (manifestSigner) {
|
|
819
|
+
const attestation = JSON.parse(new TextDecoder().decode(files.get("attestation/bundle_head_attestation.json")));
|
|
820
|
+
const reportSigner = verificationReportSigner ?? manifestSigner;
|
|
821
|
+
const vr = buildVerificationReportV1ForProofBundle({
|
|
822
|
+
kind: JOB_PROOF_BUNDLE_SCHEMA_VERSION_V1,
|
|
823
|
+
tenantId,
|
|
824
|
+
scope: { jobId },
|
|
825
|
+
generatedAt,
|
|
826
|
+
manifestHash,
|
|
827
|
+
bundleHeadAttestation: attestation,
|
|
828
|
+
signer: reportSigner,
|
|
829
|
+
timestampAuthoritySigner,
|
|
830
|
+
toolVersion,
|
|
831
|
+
toolCommit,
|
|
832
|
+
bundleFiles: files
|
|
833
|
+
});
|
|
834
|
+
files.set("verify/verification_report.json", new TextEncoder().encode(`${canonicalJsonStringify(vr)}\n`));
|
|
835
|
+
}
|
|
836
|
+
|
|
837
|
+
return {
|
|
838
|
+
bundle: {
|
|
839
|
+
schemaVersion: JOB_PROOF_BUNDLE_SCHEMA_VERSION_V1,
|
|
840
|
+
tenantId,
|
|
841
|
+
jobId,
|
|
842
|
+
generatedAt,
|
|
843
|
+
manifestHash
|
|
844
|
+
},
|
|
845
|
+
files
|
|
846
|
+
};
|
|
847
|
+
}
|
|
848
|
+
|
|
849
|
+
export function buildMonthProofBundleV1({
|
|
850
|
+
tenantId,
|
|
851
|
+
period,
|
|
852
|
+
basis,
|
|
853
|
+
monthEvents,
|
|
854
|
+
governanceEvents = null,
|
|
855
|
+
governanceSnapshot = null,
|
|
856
|
+
tenantGovernanceEvents = null,
|
|
857
|
+
tenantGovernanceSnapshot = null,
|
|
858
|
+
governancePolicy = null,
|
|
859
|
+
governancePolicySigner = null,
|
|
860
|
+
revocationList = null,
|
|
861
|
+
artifacts,
|
|
862
|
+
contractDocsByHash = new Map(),
|
|
863
|
+
publicKeyByKeyId = new Map(),
|
|
864
|
+
signerKeys = [],
|
|
865
|
+
manifestSigner = null,
|
|
866
|
+
verificationReportSigner = null,
|
|
867
|
+
timestampAuthoritySigner = null,
|
|
868
|
+
toolVersion = null,
|
|
869
|
+
toolCommit = null,
|
|
870
|
+
requireHeadAttestation = false,
|
|
871
|
+
generatedAt
|
|
872
|
+
} = {}) {
|
|
873
|
+
assertNonEmptyString(tenantId, "tenantId");
|
|
874
|
+
assertNonEmptyString(period, "period");
|
|
875
|
+
assertNonEmptyString(basis, "basis");
|
|
876
|
+
if (!Array.isArray(monthEvents) || monthEvents.length === 0) throw new TypeError("monthEvents is required");
|
|
877
|
+
if (governanceEvents !== null && !Array.isArray(governanceEvents)) throw new TypeError("governanceEvents must be null or an array");
|
|
878
|
+
if (governanceSnapshot !== null && typeof governanceSnapshot !== "object") throw new TypeError("governanceSnapshot must be null or an object");
|
|
879
|
+
if (tenantGovernanceEvents !== null && !Array.isArray(tenantGovernanceEvents)) throw new TypeError("tenantGovernanceEvents must be null or an array");
|
|
880
|
+
if (tenantGovernanceSnapshot !== null && typeof tenantGovernanceSnapshot !== "object") {
|
|
881
|
+
throw new TypeError("tenantGovernanceSnapshot must be null or an object");
|
|
882
|
+
}
|
|
883
|
+
if (governancePolicy !== null && typeof governancePolicy !== "object") throw new TypeError("governancePolicy must be null or an object");
|
|
884
|
+
if (governancePolicySigner !== null && typeof governancePolicySigner !== "object") throw new TypeError("governancePolicySigner must be null or an object");
|
|
885
|
+
if (revocationList !== null && typeof revocationList !== "object") throw new TypeError("revocationList must be null or an object");
|
|
886
|
+
if (!Array.isArray(artifacts)) throw new TypeError("artifacts must be an array");
|
|
887
|
+
if (!(contractDocsByHash instanceof Map)) throw new TypeError("contractDocsByHash must be a Map");
|
|
888
|
+
if (!(publicKeyByKeyId instanceof Map)) throw new TypeError("publicKeyByKeyId must be a Map");
|
|
889
|
+
if (!Array.isArray(signerKeys)) throw new TypeError("signerKeys must be an array");
|
|
890
|
+
if (manifestSigner !== null && typeof manifestSigner !== "object") throw new TypeError("manifestSigner must be null or an object");
|
|
891
|
+
if (verificationReportSigner !== null && typeof verificationReportSigner !== "object") throw new TypeError("verificationReportSigner must be null or an object");
|
|
892
|
+
if (timestampAuthoritySigner !== null && typeof timestampAuthoritySigner !== "object") throw new TypeError("timestampAuthoritySigner must be null or an object");
|
|
893
|
+
if (toolVersion !== null && typeof toolVersion !== "string") throw new TypeError("toolVersion must be null or a string");
|
|
894
|
+
if (toolCommit !== null && typeof toolCommit !== "string") throw new TypeError("toolCommit must be null or a string");
|
|
895
|
+
if (requireHeadAttestation !== true && requireHeadAttestation !== false) throw new TypeError("requireHeadAttestation must be a boolean");
|
|
896
|
+
assertNonEmptyString(generatedAt, "generatedAt");
|
|
897
|
+
|
|
898
|
+
if (requireHeadAttestation && !manifestSigner) {
|
|
899
|
+
const err = new Error("manifestSigner is required to produce a bundle head attestation");
|
|
900
|
+
err.code = "MANIFEST_SIGNER_REQUIRED";
|
|
901
|
+
throw err;
|
|
902
|
+
}
|
|
903
|
+
|
|
904
|
+
const files = new Map();
|
|
905
|
+
let tenantGovSnapshotUsed = null;
|
|
906
|
+
let globalGovSnapshotUsed = null;
|
|
907
|
+
|
|
908
|
+
// Governance policy: strict authorization contract, optionally signed by a governance root key.
|
|
909
|
+
if (governancePolicySigner) {
|
|
910
|
+
const list =
|
|
911
|
+
revocationList ??
|
|
912
|
+
({
|
|
913
|
+
schemaVersion: REVOCATION_LIST_SCHEMA_V1,
|
|
914
|
+
listId: "revocations_default_v1",
|
|
915
|
+
generatedAt,
|
|
916
|
+
rotations: [],
|
|
917
|
+
revocations: [],
|
|
918
|
+
signerKeyId: null,
|
|
919
|
+
signedAt: null,
|
|
920
|
+
listHash: null,
|
|
921
|
+
signature: null
|
|
922
|
+
});
|
|
923
|
+
validateRevocationListV1(list);
|
|
924
|
+
const signedList = signRevocationListV1({
|
|
925
|
+
listCore: buildRevocationListV1Core({
|
|
926
|
+
listId: list.listId ?? "revocations_default_v1",
|
|
927
|
+
generatedAt,
|
|
928
|
+
rotations: list.rotations ?? [],
|
|
929
|
+
revocations: list.revocations ?? [],
|
|
930
|
+
signerKeyId: governancePolicySigner.keyId,
|
|
931
|
+
signedAt: generatedAt
|
|
932
|
+
}),
|
|
933
|
+
signer: governancePolicySigner
|
|
934
|
+
});
|
|
935
|
+
files.set("governance/revocations.json", new TextEncoder().encode(`${canonicalJsonStringify(signedList)}\n`));
|
|
936
|
+
|
|
937
|
+
const policyUnsigned =
|
|
938
|
+
governancePolicy && governancePolicy.schemaVersion === GOVERNANCE_POLICY_SCHEMA_V2
|
|
939
|
+
? {
|
|
940
|
+
...governancePolicy,
|
|
941
|
+
revocationList: { path: "governance/revocations.json", sha256: signedList.listHash },
|
|
942
|
+
signerKeyId: null,
|
|
943
|
+
signedAt: null,
|
|
944
|
+
policyHash: null,
|
|
945
|
+
signature: null
|
|
946
|
+
}
|
|
947
|
+
: buildGovernancePolicyV2Unsigned({
|
|
948
|
+
policyId: "governance_policy_default_v2",
|
|
949
|
+
generatedAt,
|
|
950
|
+
revocationList: { path: "governance/revocations.json", sha256: signedList.listHash },
|
|
951
|
+
verificationReportSigners: [
|
|
952
|
+
{
|
|
953
|
+
subjectType: MONTH_PROOF_BUNDLE_SCHEMA_VERSION_V1,
|
|
954
|
+
allowedScopes: ["global", "tenant"],
|
|
955
|
+
allowedKeyIds: [String((verificationReportSigner ?? manifestSigner)?.keyId ?? "")].filter(Boolean),
|
|
956
|
+
requireGoverned: true,
|
|
957
|
+
requiredPurpose: "server"
|
|
958
|
+
}
|
|
959
|
+
],
|
|
960
|
+
bundleHeadAttestationSigners: [
|
|
961
|
+
{
|
|
962
|
+
subjectType: MONTH_PROOF_BUNDLE_SCHEMA_VERSION_V1,
|
|
963
|
+
allowedScopes: ["global", "tenant"],
|
|
964
|
+
allowedKeyIds: [String(manifestSigner?.keyId ?? "")].filter(Boolean),
|
|
965
|
+
requireGoverned: true,
|
|
966
|
+
requiredPurpose: "server"
|
|
967
|
+
}
|
|
968
|
+
]
|
|
969
|
+
});
|
|
970
|
+
validateGovernancePolicyV2(policyUnsigned);
|
|
971
|
+
const signedPolicy = signGovernancePolicyV2({ policy: policyUnsigned, signer: governancePolicySigner, signedAt: generatedAt });
|
|
972
|
+
files.set("governance/policy.json", new TextEncoder().encode(`${canonicalJsonStringify(signedPolicy)}\n`));
|
|
973
|
+
} else {
|
|
974
|
+
const policy = governancePolicy ?? buildDefaultGovernancePolicyV1({ generatedAt });
|
|
975
|
+
validateGovernancePolicyV1(policy);
|
|
976
|
+
files.set("governance/policy.json", new TextEncoder().encode(`${canonicalJsonStringify(policy)}\n`));
|
|
977
|
+
}
|
|
978
|
+
|
|
979
|
+
const payloadMaterial = monthEvents.map((e) => ({
|
|
980
|
+
v: e?.v ?? null,
|
|
981
|
+
id: e?.id ?? null,
|
|
982
|
+
at: e?.at ?? null,
|
|
983
|
+
streamId: e?.streamId ?? null,
|
|
984
|
+
type: e?.type ?? null,
|
|
985
|
+
actor: e?.actor ?? null,
|
|
986
|
+
payload: e?.payload ?? null
|
|
987
|
+
}));
|
|
988
|
+
files.set("events/payload_material.jsonl", new TextEncoder().encode(canonicalJsonlLines(payloadMaterial)));
|
|
989
|
+
files.set("events/events.jsonl", new TextEncoder().encode(canonicalJsonlLines(monthEvents)));
|
|
990
|
+
|
|
991
|
+
if (Array.isArray(tenantGovernanceEvents)) {
|
|
992
|
+
const govMaterial = tenantGovernanceEvents.map((e) => ({
|
|
993
|
+
v: e?.v ?? null,
|
|
994
|
+
id: e?.id ?? null,
|
|
995
|
+
at: e?.at ?? null,
|
|
996
|
+
streamId: e?.streamId ?? null,
|
|
997
|
+
type: e?.type ?? null,
|
|
998
|
+
actor: e?.actor ?? null,
|
|
999
|
+
payload: e?.payload ?? null
|
|
1000
|
+
}));
|
|
1001
|
+
files.set("governance/tenant/events/payload_material.jsonl", new TextEncoder().encode(canonicalJsonlLines(govMaterial)));
|
|
1002
|
+
files.set("governance/tenant/events/events.jsonl", new TextEncoder().encode(canonicalJsonlLines(tenantGovernanceEvents)));
|
|
1003
|
+
const snap =
|
|
1004
|
+
tenantGovernanceSnapshot ??
|
|
1005
|
+
({
|
|
1006
|
+
streamId: "governance",
|
|
1007
|
+
lastChainHash: tenantGovernanceEvents.length ? tenantGovernanceEvents[tenantGovernanceEvents.length - 1]?.chainHash ?? null : null,
|
|
1008
|
+
lastEventId: tenantGovernanceEvents.length ? tenantGovernanceEvents[tenantGovernanceEvents.length - 1]?.id ?? null : null
|
|
1009
|
+
});
|
|
1010
|
+
tenantGovSnapshotUsed = snap;
|
|
1011
|
+
files.set("governance/tenant/snapshot.json", new TextEncoder().encode(`${canonicalJsonStringify(snap)}\n`));
|
|
1012
|
+
}
|
|
1013
|
+
|
|
1014
|
+
if (Array.isArray(governanceEvents)) {
|
|
1015
|
+
const govMaterial = governanceEvents.map((e) => ({
|
|
1016
|
+
v: e?.v ?? null,
|
|
1017
|
+
id: e?.id ?? null,
|
|
1018
|
+
at: e?.at ?? null,
|
|
1019
|
+
streamId: e?.streamId ?? null,
|
|
1020
|
+
type: e?.type ?? null,
|
|
1021
|
+
actor: e?.actor ?? null,
|
|
1022
|
+
payload: e?.payload ?? null
|
|
1023
|
+
}));
|
|
1024
|
+
files.set("governance/global/events/payload_material.jsonl", new TextEncoder().encode(canonicalJsonlLines(govMaterial)));
|
|
1025
|
+
files.set("governance/global/events/events.jsonl", new TextEncoder().encode(canonicalJsonlLines(governanceEvents)));
|
|
1026
|
+
const snap =
|
|
1027
|
+
governanceSnapshot ??
|
|
1028
|
+
({
|
|
1029
|
+
streamId: "governance",
|
|
1030
|
+
lastChainHash: governanceEvents.length ? governanceEvents[governanceEvents.length - 1]?.chainHash ?? null : null,
|
|
1031
|
+
lastEventId: governanceEvents.length ? governanceEvents[governanceEvents.length - 1]?.id ?? null : null
|
|
1032
|
+
});
|
|
1033
|
+
globalGovSnapshotUsed = snap;
|
|
1034
|
+
files.set("governance/global/snapshot.json", new TextEncoder().encode(`${canonicalJsonStringify(snap)}\n`));
|
|
1035
|
+
}
|
|
1036
|
+
|
|
1037
|
+
const artifactFiles = [];
|
|
1038
|
+
for (const a of artifacts) {
|
|
1039
|
+
if (!a || typeof a !== "object") continue;
|
|
1040
|
+
const artifactType = typeof a.artifactType === "string" ? a.artifactType : "unknown";
|
|
1041
|
+
const artifactHash = typeof a.artifactHash === "string" ? a.artifactHash : "unknown";
|
|
1042
|
+
const name = `artifacts/${artifactType}/${artifactHash}.json`;
|
|
1043
|
+
files.set(name, new TextEncoder().encode(`${canonicalJsonStringify(a)}\n`));
|
|
1044
|
+
artifactFiles.push({ artifactType, artifactHash, name });
|
|
1045
|
+
}
|
|
1046
|
+
|
|
1047
|
+
// Best-effort: include any contract docs referenced by artifacts (policy hashes etc).
|
|
1048
|
+
// If caller provides docs, include them.
|
|
1049
|
+
for (const [h, doc] of Array.from(contractDocsByHash.entries()).sort(([a], [b]) => (a < b ? -1 : a > b ? 1 : 0))) {
|
|
1050
|
+
if (!doc) continue;
|
|
1051
|
+
files.set(`contracts/${h}.json`, new TextEncoder().encode(`${canonicalJsonStringify(doc)}\n`));
|
|
1052
|
+
const compiled = compilePolicySnapshotForContractDoc(doc);
|
|
1053
|
+
if (compiled?.policySnapshot && compiled?.policyHash) {
|
|
1054
|
+
const policyHash = String(compiled.policyHash);
|
|
1055
|
+
files.set(`policies/${policyHash}.json`, new TextEncoder().encode(`${canonicalJsonStringify(compiled.policySnapshot)}\n`));
|
|
1056
|
+
}
|
|
1057
|
+
}
|
|
1058
|
+
|
|
1059
|
+
const monthKeyIds = Array.from(
|
|
1060
|
+
new Set(
|
|
1061
|
+
monthEvents
|
|
1062
|
+
.map((e) => (e?.signerKeyId && typeof e.signerKeyId === "string" ? e.signerKeyId : null))
|
|
1063
|
+
.filter((v) => typeof v === "string" && v.trim())
|
|
1064
|
+
)
|
|
1065
|
+
).sort();
|
|
1066
|
+
const keysFile = buildPublicKeysFileV1({
|
|
1067
|
+
tenantId,
|
|
1068
|
+
generatedAt,
|
|
1069
|
+
publicKeyByKeyId,
|
|
1070
|
+
signerKeys,
|
|
1071
|
+
keyIds: monthKeyIds,
|
|
1072
|
+
governanceEvents: [...(Array.isArray(governanceEvents) ? governanceEvents : []), ...(Array.isArray(tenantGovernanceEvents) ? tenantGovernanceEvents : [])]
|
|
1073
|
+
});
|
|
1074
|
+
files.set("keys/public_keys.json", new TextEncoder().encode(`${canonicalJsonStringify(keysFile)}\n`));
|
|
1075
|
+
|
|
1076
|
+
const eventChain = verifyEventChain(monthEvents, publicKeyByKeyId);
|
|
1077
|
+
const artifactsVerify = verifyArtifacts(artifacts);
|
|
1078
|
+
|
|
1079
|
+
const report = {
|
|
1080
|
+
schemaVersion: "ProofBundleVerifyReport.v1",
|
|
1081
|
+
kind: MONTH_PROOF_BUNDLE_SCHEMA_VERSION_V1,
|
|
1082
|
+
tenantId,
|
|
1083
|
+
scope: { period, basis },
|
|
1084
|
+
generatedAt,
|
|
1085
|
+
eventChain,
|
|
1086
|
+
artifacts: artifactsVerify
|
|
1087
|
+
};
|
|
1088
|
+
files.set("verify/report.json", new TextEncoder().encode(`${canonicalJsonStringify(report)}\n`));
|
|
1089
|
+
|
|
1090
|
+
const { manifest, manifestHash } = computeProofBundleManifestV1({
|
|
1091
|
+
files,
|
|
1092
|
+
generatedAt,
|
|
1093
|
+
kind: MONTH_PROOF_BUNDLE_SCHEMA_VERSION_V1,
|
|
1094
|
+
tenantId,
|
|
1095
|
+
scope: { period, basis }
|
|
1096
|
+
});
|
|
1097
|
+
files.set("manifest.json", new TextEncoder().encode(`${canonicalJsonStringify({ ...manifest, manifestHash })}\n`));
|
|
1098
|
+
|
|
1099
|
+
if (manifestSigner) {
|
|
1100
|
+
const heads = {
|
|
1101
|
+
month: {
|
|
1102
|
+
lastEventId: monthEvents[monthEvents.length - 1]?.id ?? null,
|
|
1103
|
+
lastChainHash: monthEvents[monthEvents.length - 1]?.chainHash ?? null
|
|
1104
|
+
},
|
|
1105
|
+
governance: {
|
|
1106
|
+
tenant: tenantGovSnapshotUsed ? { lastEventId: tenantGovSnapshotUsed.lastEventId ?? null, lastChainHash: tenantGovSnapshotUsed.lastChainHash ?? null } : null,
|
|
1107
|
+
global: globalGovSnapshotUsed ? { lastEventId: globalGovSnapshotUsed.lastEventId ?? null, lastChainHash: globalGovSnapshotUsed.lastChainHash ?? null } : null
|
|
1108
|
+
}
|
|
1109
|
+
};
|
|
1110
|
+
const att = buildBundleHeadAttestationV1({
|
|
1111
|
+
kind: MONTH_PROOF_BUNDLE_SCHEMA_VERSION_V1,
|
|
1112
|
+
tenantId,
|
|
1113
|
+
scope: { period, basis },
|
|
1114
|
+
generatedAt,
|
|
1115
|
+
manifestHash,
|
|
1116
|
+
heads,
|
|
1117
|
+
signer: manifestSigner,
|
|
1118
|
+
timestampAuthoritySigner
|
|
1119
|
+
});
|
|
1120
|
+
files.set("attestation/bundle_head_attestation.json", new TextEncoder().encode(`${canonicalJsonStringify(att)}\n`));
|
|
1121
|
+
}
|
|
1122
|
+
|
|
1123
|
+
if (manifestSigner) {
|
|
1124
|
+
const attestation = JSON.parse(new TextDecoder().decode(files.get("attestation/bundle_head_attestation.json")));
|
|
1125
|
+
const reportSigner = verificationReportSigner ?? manifestSigner;
|
|
1126
|
+
const vr = buildVerificationReportV1ForProofBundle({
|
|
1127
|
+
kind: MONTH_PROOF_BUNDLE_SCHEMA_VERSION_V1,
|
|
1128
|
+
tenantId,
|
|
1129
|
+
scope: { period, basis },
|
|
1130
|
+
generatedAt,
|
|
1131
|
+
manifestHash,
|
|
1132
|
+
bundleHeadAttestation: attestation,
|
|
1133
|
+
signer: reportSigner,
|
|
1134
|
+
timestampAuthoritySigner,
|
|
1135
|
+
toolVersion,
|
|
1136
|
+
toolCommit,
|
|
1137
|
+
bundleFiles: files
|
|
1138
|
+
});
|
|
1139
|
+
files.set("verify/verification_report.json", new TextEncoder().encode(`${canonicalJsonStringify(vr)}\n`));
|
|
1140
|
+
}
|
|
1141
|
+
|
|
1142
|
+
return {
|
|
1143
|
+
bundle: {
|
|
1144
|
+
schemaVersion: MONTH_PROOF_BUNDLE_SCHEMA_VERSION_V1,
|
|
1145
|
+
tenantId,
|
|
1146
|
+
period,
|
|
1147
|
+
basis,
|
|
1148
|
+
generatedAt,
|
|
1149
|
+
manifestHash
|
|
1150
|
+
},
|
|
1151
|
+
files
|
|
1152
|
+
};
|
|
1153
|
+
}
|