"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.telemetryAdapter = exports.ConsoleTelemetryAdapter = exports.NoOpTelemetryAdapter = void 0;
exports.createTelemetryAdapter = createTelemetryAdapter;
class NoOpTelemetryAdapter {
    logEvent(event) {
    }
    logKill(runId, reason, metadata) {
    }
    logPolicyViolation(runId, policy, threshold, metadata) {
    }
}
exports.NoOpTelemetryAdapter = NoOpTelemetryAdapter;
class ConsoleTelemetryAdapter {
    logEvent(event) {
        console.log(`📊 Sentinel Telemetry: ${event.type}`, {
            runId: event.runId,
            timestamp: new Date(event.timestamp).toISOString(),
            ...event.metadata
        });
    }
    logKill(runId, reason, metadata) {
        console.log(`🛑 Sentinel Kill: ${runId}`, {
            reason,
            timestamp: new Date().toISOString(),
            ...metadata
        });
    }
    logPolicyViolation(runId, policy, threshold, metadata) {
        console.log(`⚠️ Sentinel Policy Violation: ${runId}`, {
            policy,
            threshold,
            timestamp: new Date().toISOString(),
            ...metadata
        });
    }
}
exports.ConsoleTelemetryAdapter = ConsoleTelemetryAdapter;
function createTelemetryAdapter() {
    if (process.env['NODE_ENV'] === 'development' || process.env['NODE_ENV'] === 'test') {
        return new ConsoleTelemetryAdapter();
    }
    return new NoOpTelemetryAdapter();
}
exports.telemetryAdapter = createTelemetryAdapter();
//# sourceMappingURL=telemetry.js.map