/**
 * Core health types for the goodvibes-sdk runtime health monitoring system.
 * These types model domain health status, composite system health, cascade rules,
 * and the effects that propagate when a domain transitions to a degraded or failed state.
 */
/**
 * Create a CascadeAppliedEvent from a CascadeResult.
 * Call this after applying a cascade effect to produce a trace event.
 */
export function createCascadeAppliedEvent(result) {
    return {
        type: 'CASCADE_APPLIED',
        ruleId: result.ruleId,
        source: result.source,
        target: result.target,
        effect: result.effect,
        timestamp: result.timestamp,
        recoveryExhausted: result.recoveryExhausted,
        sourceContext: result.sourceContext,
        latencyMs: result.latencyMs,
        severity: result.severity,
        remediationPlaybookIds: result.remediationPlaybookIds,
    };
}
