/** * @fileoverview DiagnosticsBag Implementation (SPEC Section 5.5) * * Concrete implementation of DiagnosticsBag for pipeline operations. * * @module pipeline/diagnostics-bag */ import type { DiagnosticsBag, Diagnostic } from "../core/types/diagnostics.js"; /** * Concrete implementation of DiagnosticsBag. * * Thread-safe for parallel operations via atomic operations. */ export declare class DiagnosticsBagImpl implements DiagnosticsBag { private readonly _warnings; private readonly _infos; private readonly _metrics; private readonly _metricObservations; /** * Add warning. */ warn(code: string, message: string, nodeId?: string): void; /** * Add info. */ info(code: string, message: string, nodeId?: string): void; /** * Record metric (last-write-wins). * * Per PLG-10: Non-deterministic in parallel chunk hooks. */ metric(name: string, value: number): void; /** * Accumulate metric (sum aggregation). * Safe for parallel chunk hooks. */ metricAdd(name: string, delta: number): void; /** * Observe metric (histogram/average). * * Per DIAG-OBS-1: May grow unbounded. */ metricObserve(name: string, value: number): void; /** * Read-only access to warnings. */ get warnings(): readonly Diagnostic[]; /** * Read-only access to infos. */ get infos(): readonly Diagnostic[]; /** * Read-only access to metrics. */ get metrics(): ReadonlyMap; /** * Read-only access to metric observations. */ get metricObservations(): ReadonlyMap; /** * Create a snapshot for read-only access. */ toReadonly(): DiagnosticsBag; /** * Clear all diagnostics. */ clear(): void; } /** * Create a new DiagnosticsBag. */ export declare function createDiagnosticsBag(): DiagnosticsBagImpl; //# sourceMappingURL=diagnostics-bag.d.ts.map