/** Internal-only categories (not submitted to tools). */
const INTERNAL_CATEGORIES = [
    "new_endpoint", // CRITICAL - diff-direct scenarios always fill GENERATE slots first
    "bug_caught", // CRITICAL - tests targeting a specific <bug_found> flaw identified during enrichment
];
/** External categories valid for tool submissions, ordered by priority. */
const CATEGORIES = [
    // HIGH priority
    "business_rule", // formula bugs, unique constraints, state machines — most common production failures
    "security_boundary", // auth, permission, cross-user isolation, idempotency
    "data_integrity", // cascade deletes, orphan prevention, referential integrity
    "breaking_change", // route renames, auth migration, response shape changes
    "auth", // authentication and authorization flows
    "error_handling", // missing 404/422 guards — silent failures are real bugs
    // MEDIUM priority
    "workflow", // cross-resource integration, user journeys
    "data_validation", // input validation and schema enforcement
    // LOW priority
    "crud", // basic create/read/update/delete operations
];
/** All categories including internal ones. */
export const SCENARIO_CATEGORIES = [...INTERNAL_CATEGORIES, ...CATEGORIES];
/** Categories valid for tool submissions (excludes internal-only categories). */
export const TEST_CATEGORIES = CATEGORIES;
/** Priority assignment for each category. */
export const CATEGORY_PRIORITY = {
    new_endpoint: "CRITICAL",
    bug_caught: "CRITICAL", // tests targeting a <bug_found> flaw — always in GENERATE
    business_rule: "HIGH", // formula/business-logic bugs are high priority but CRITICAL is reserved for new-endpoint diff-direct scenarios
    security_boundary: "HIGH",
    data_integrity: "HIGH",
    breaking_change: "HIGH",
    auth: "HIGH",
    error_handling: "HIGH",
    workflow: "MEDIUM",
    data_validation: "MEDIUM",
    crud: "LOW",
};
/** Map internal-only categories to their external equivalent for tool submission. */
export function externalCategory(cat) {
    if (cat === "new_endpoint")
        return "crud";
    if (cat === "bug_caught")
        return "business_rule";
    return cat;
}
