/**
 * TelemetryPort — sovereign multi-sink observability for agent runs.
 *
 * Per ADR-ECO-039 (accepted 2026-05-16). Sink-based interface replaces the
 * implicit coupling between agent-sdk and the CC `agent_run` table (legacy
 * `AgentRunTracker`). Callers configure 0..N sinks; the {@link TelemetryBus}
 * fans events out non-blockingly.
 *
 * Three modes :
 *   1. Standalone   : `[stdoutTelemetrySink(), localSqliteTelemetrySink()]`
 *   2. + CC SaaS    : add `commandCenterTelemetrySink({apiKey})`
 *   3. Tiered       : same code, API key changes entitlement server-side
 *
 * Ref: command-center:sprint-693:port-interface
 */
// ─── NOOP — default when no sinks configured ─────────────────────────────────
/**
 * No-op sink. The bus uses this when no sinks are configured, so callers
 * never need to null-check.
 */
export const NOOP_TELEMETRY_SINK = {
    name: "noop",
    async start() {
        /* no-op */
    },
    async step() {
        /* no-op */
    },
    async finish() {
        /* no-op */
    },
};
// ─── Error type ──────────────────────────────────────────────────────────────
/**
 * Thrown only at the BUS boundary when ALL sinks fail. Individual sink
 * failures are warned and isolated (see {@link TelemetryBus}).
 */
export class TelemetrySinkError extends Error {
    sinkName;
    cause;
    constructor(message, sinkName, cause) {
        super(`[telemetry:${sinkName}] ${message}`);
        this.sinkName = sinkName;
        this.cause = cause;
        this.name = "TelemetrySinkError";
    }
}
//# sourceMappingURL=port.js.map