<?php
/**
 * Audit and operational diagnostics service bundle.
 *
 * @package ScheduledChanges
 */

namespace ScheduledChanges\Audit;

use ScheduledChanges\Repository\AuditRepository;
use ScheduledChanges\Repository\RunRepository;

/**
 * Holds durable run and audit contracts shared by execution and delivery modules.
 */
final class AuditDiagnosticsServices {
	private RunRepository $runs;
	private AuditRepository $audit;
	private AuditRedactor $redactor;

	/**
	 * Creates the service bundle.
	 */
	public function __construct( RunRepository $runs, AuditRepository $audit, AuditRedactor $redactor ) {
		$this->runs     = $runs;
		$this->audit    = $audit;
		$this->redactor = $redactor;
	}

	/**
	 * Returns durable run storage.
	 */
	public function runs(): RunRepository {
		return $this->runs;
	}

	/**
	 * Returns append-only audit storage.
	 */
	public function audit(): AuditRepository {
		return $this->audit;
	}

	/**
	 * Returns the shared sensitive-value redactor.
	 */
	public function redactor(): AuditRedactor {
		return $this->redactor;
	}
}
