"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.CANONICAL_LABELS = exports.CANONICAL_STEPS = void 0;
exports.matchCanonicalStep = matchCanonicalStep;
exports.CANONICAL_STEPS = [
    {
        id: 'detect',
        label: 'Detect your project setup',
        defaultActiveForm: 'Detecting your project setup',
    },
    {
        id: 'install',
        label: 'Install Amplitude',
        defaultActiveForm: 'Installing Amplitude',
    },
    {
        id: 'plan',
        label: 'Plan and approve events to track',
        defaultActiveForm: 'Planning events to track',
    },
    {
        id: 'wire',
        label: 'Wire up event tracking',
        defaultActiveForm: 'Wiring up event tracking',
    },
    {
        id: 'dashboard',
        label: 'Build your starter dashboard',
        defaultActiveForm: 'Building your starter dashboard',
    },
];
/** The canonical labels in order — convenience for callers that only need the strings. */
exports.CANONICAL_LABELS = exports.CANONICAL_STEPS.map((s) => s.label);
/**
 * Match an agent-emitted TodoWrite content string to a canonical step.
 * Case-insensitive exact-label match only — anything else returns -1
 * and is dropped by the renderer. The system prompt is the contract;
 * we don't paper over drift here.
 */
function matchCanonicalStep(content) {
    if (!content)
        return -1;
    const lc = content.toLowerCase().trim();
    if (!lc)
        return -1;
    for (let i = 0; i < exports.CANONICAL_STEPS.length; i++) {
        if (exports.CANONICAL_STEPS[i].label.toLowerCase() === lc)
            return i;
    }
    return -1;
}
