using ZB.MOM.WW.Audit; using ZB.MOM.WW.ScadaBridge.Commons.Interfaces.Services; namespace ZB.MOM.WW.ScadaBridge.Host.Services; /// /// Central-only bridge from the shared-library audit seam /// () to the central direct-write path /// ( → dbo.AuditLog). Shared-lib UI components — /// today the Secrets.Ui components mounted at /admin/secrets — inject the shared /// seam, which is deliberately distinct from the repo's own /// (ScadaBridge#22). /// /// /// The target is and NOT the repo's own site /// writer chain: the site SQLite chain is registered on central but by design /// never resolved there, and events written to it would dead-end in a local file /// that no forwarding sidecar drains on a central node. The best-effort contract /// (audit failures never abort the user-facing action) is inherited from /// , which swallows and logs — /// so this forward needs no try/catch of its own. /// /// The central direct-write audit path to forward into. public sealed class CentralSharedSeamAuditWriter(ICentralAuditWriter central) : ZB.MOM.WW.Audit.IAuditWriter { /// public Task WriteAsync(AuditEvent auditEvent, CancellationToken cancellationToken = default) => central.WriteAsync(auditEvent, cancellationToken); }