import type { JobDefinition } from './job-definition.types';

export const LEARNING_ANALYSIS_JOB_DEFINITION: JobDefinition = {
  jobType: 'learning_analysis',

  metadata: {
    label: 'Learning Analysis',
    description: 'Analyze user learning behavior, review performance, quiz results, and knowledge progress. Generates comprehensive analysis with strengths, weaknesses, trends, risks, and actionable recommendations.',
    domain: 'analysis',
    version: '1.0.0',
  },

  queue: {
    queueName: 'ai-background',
    defaultPriority: 5,
  },

  execution: {
    timeoutMs: 180_000,
    maxRetries: 2,
    retryBackoff: { type: 'exponential', delay: 2000 },
    cancellable: true,
    abortStrategy: 'fail',
  },

  input: { schemaVersion: 'learning-analysis-v1' },
  output: { schemaVersion: 'learning-analysis-v1' },

  prompt: {
    promptKey: 'learning-analysis',
    promptVersion: '1.0.0',
  },

  model: {
    modelTier: 'primary',
    modelProvider: 'deepseek',
    modelName: 'deepseek-v4-pro',
    maxTokens: 4096,
  },

  credential: {
    allowedModes: ['platform_key'],
    defaultMode: 'platform_key',
  },

  projectorKey: 'learning_analysis_projector',

  security: {
    contentSafetyCheck: true,
    outputRedaction: false,
  },
};
