/**
 * Ordered pipeline stages. Index position determines progression — used to
 * skip completed stages when a build is retried after a worker crash.
 * 'ready' is included as the final stage; 'error' is terminal but not a
 * stage (not reachable through normal progression).
 */
export const APP_VERSION_STAGE_ORDER = [
    'pending',
    'sandbox',
    'catalog',
    'generating',
    'building',
    'packaging',
    'ready',
];
export const APP_VERSION_TERMINAL_STATUSES = ['ready', 'error'];
export const isAppVersionInProgress = (status) => !APP_VERSION_TERMINAL_STATUSES.includes(status);
export const DATA_APP_TEMPLATES = [
    'dashboard',
    'slideshow',
    'pdf',
    'custom',
];
/**
 * Fold clarifications into the prompt sent to the sandbox. The persisted
 * prompt stays as the user's original words — clarifications travel
 * separately on `resources.clarifications` for chat rendering.
 */
export const formatPromptWithClarifications = (prompt, clarifications) => {
    if (!clarifications || clarifications.length === 0)
        return prompt;
    const qa = clarifications
        .map((c, i) => `${i + 1}. Q: ${c.question.trim()}\n   A: ${c.answer.trim()}`)
        .join('\n');
    return `${prompt}\n\nClarifications:\n${qa}`;
};
//# sourceMappingURL=types.js.map