All files / api/src/connectors/evaluations/task-completion task-completion.ts

100% Statements 15/15
100% Branches 1/1
100% Functions 1/1
100% Lines 15/15

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 271x 1x         1x           1x 1x 1x 1x 1x 1x     1x 1x 1x 1x 1x 1x  
import { evaluateLog } from '@api/connectors/evaluations/task-completion/service/evaluate';
import {
  TaskCompletionEvaluationAIParameters,
  TaskCompletionEvaluationParameters,
} from '@api/connectors/evaluations/task-completion/types';
import type { EvaluationMethodConnector } from '@api/types/connector';
import {
  type EvaluationMethodDetails,
  EvaluationMethodName,
} from '@shared/types/evaluations';
 
// Simplified method configuration constant - only essential fields for standardization
const taskCompletionMethodConfig: EvaluationMethodDetails = {
  method: EvaluationMethodName.TASK_COMPLETION,
  name: 'Task Completion',
  description:
    'Evaluates whether an AI agent successfully completed a given task using LLM-as-a-judge',
} as const;
 
// Evaluation connector constant
export const taskCompletionEvaluationConnector: EvaluationMethodConnector = {
  getDetails: () => taskCompletionMethodConfig,
  evaluateLog,
  getParameterSchema: TaskCompletionEvaluationParameters,
  getAIParameterSchema: TaskCompletionEvaluationAIParameters,
};