package com.correx.core.toolintent.rules

/**
 * Flattens a raw tool-call parameter value into candidate strings for rule
 * inspection. A declared param may arrive as a plain String (e.g. a path) or a
 * List<*> (e.g. shell `argv`); both are reduced to strings.
 */
internal fun extractParamStrings(value: Any?): List<String> = when (value) {
    is String -> listOf(value)
    is List<*> -> value.mapNotNull { it?.toString() }
    else -> emptyList()
}
