/**
 * JobKind registry — maps LlmJobType → JobKind plugin.
 *
 * PR4: IMAGE_APPROVAL registered.
 * PR5: DEAL_MODERATION + VENDOR_VIOLATION registered.
 * PR6: Legacy dispatch.ts deleted. All transport paths call runJob() directly.
 * Dead-code cleanup: processLlmJob + model-resolver deleted (zero prod callers).
 *
 * Type is Record<LlmJobType, JobKind | undefined> (not Partial<Record>):
 *   - Every LlmJobType must have an explicit entry here.
 *   - Adding a new value to LlmJobType will cause a typecheck error in this file
 *     until the author either registers a JobKind or explicitly marks it undefined.
 *   - REVIEW_PRESCORING is marked undefined because it is not a queued job.
 *     It runs synchronously from admin/resources/review-moderation/actions.ts::prescoreViaAi.
 *     Pre-deploy DB query confirmed zero historical llm_jobs rows of this type,
 *     so the runner's unknown_kind fatal branch will not fire in practice.
 *     The DB enum value and admin UI filter are retained for historical data.
 */
import type { LlmJobType } from '@/server/ai/llm.js';
import type { JobKind } from './types.js';
import { imageApprovalKind } from './image-approval.js';
import { dealModerationKind } from './deal-moderation.js';
import { vendorViolationKind } from './vendor-violation.js';
import { translationKind } from './translation.js';

export const JOB_KIND_REGISTRY: Record<LlmJobType, JobKind<unknown, unknown, unknown> | undefined> =
  {
    IMAGE_APPROVAL: imageApprovalKind,
    DEAL_MODERATION: dealModerationKind,
    TRANSLATION: translationKind,
    VENDOR_VIOLATION: vendorViolationKind,
    REVIEW_PRESCORING: undefined,
  };
