/**
 * §25 — Per-turn enrichment input shapes mirrored from
 * `backend/agent/prompts/build_llm_messages.py:FocusedRange / RangeRestriction`.
 *
 * The host attaches these on every submit; the embedded runtime renders each
 * present field into a `TextContent` block on the user `AgentMessage`.
 * See `shortcutXL/docs/migration/archive/section_25_human_turn_enrichments/spec.md`.
 */
/** Type guard: is the input a valid FocusedRange? */
export function isFocusedRange(value) {
    if (value === null || typeof value !== 'object')
        return false;
    const v = value;
    if (typeof v.sheet !== 'string')
        return false;
    if (typeof v.range !== 'string')
        return false;
    if (v.data !== undefined && v.data !== null && typeof v.data !== 'string')
        return false;
    if (v.chartName !== undefined && v.chartName !== null && typeof v.chartName !== 'string') {
        return false;
    }
    return true;
}
/** Type guard: is the input a valid RangeRestriction? */
export function isRangeRestriction(value) {
    if (value === null || typeof value !== 'object')
        return false;
    const v = value;
    if (typeof v.sheet !== 'string')
        return false;
    if (typeof v.range !== 'string')
        return false;
    if (v.mode !== undefined && v.mode !== 'enhanced' && v.mode !== 'restricted')
        return false;
    if (v.data !== undefined && v.data !== null && typeof v.data !== 'string')
        return false;
    return true;
}
//# sourceMappingURL=user-turn-enrichments.js.map