Nirmos
SDK reference

Evaluation types

Public evaluations types and declarations exported from @nirmos/sdk.

Import these names from @nirmos/sdk. Optional fields may be absent; nullable fields may be null. Dates in management DTOs remain strings. These declarations do not imply provider support or runtime implementation. Use TypeScript support for indexed DTOs.

EvaluationRunCaseDetail

// Public execution DTOs, generated from verified runtime wire contracts.
export type EvaluationRunCaseDetail = {
    "case": {
        "id": string;
        "rowKey": string;
        "data": {
            [key: string]: unknown;
        };
        "metadata": {
            [key: string]: unknown;
        } | null;
        "tags": Array<string>;
    };
    "trials": Array<{
        "id": string;
        "caseId": string;
        "targetId": string;
        "attempt": number;
        "status": string;
        "output"?: unknown | null;
        "error"?: unknown | null;
        "provider": string | null;
        "model": string | null;
        "routeId": string | null;
        "metrics": {
            "latencyMs": number | null;
            "ttftMs": number | null;
            "inputTokens": number | null;
            "outputTokens": number | null;
            "totalTokens": number | null;
            "cost": number | null;
            "cacheHit": boolean;
            "retryCount": number;
            "fallbackCount": number;
        };
        "traceId": string | null;
        "scores": Array<{
            "id": string;
            "evaluatorVersionId": string;
            "evaluationColumnId": string | null;
            "status": string;
            "value"?: unknown;
            "label": string | null;
            "passed": boolean | null;
            "reasoning": string | null;
            "error": unknown | null;
            "reviews": Array<{
                "id": string;
                "status": string;
                "value": boolean | number | string | null;
                "label": string | null;
                "comment": string | null;
                "updatedAt": string;
            }>;
        }>;
    }>;
};

EvaluationRunCases

export type EvaluationRunCases = {
    "data": Array<{
        "id": string;
        "rowKey": string;
        "position"?: number;
        "data": {
            [key: string]: unknown;
        };
        "metadata": {
            [key: string]: unknown;
        } | null;
        "tags": Array<string>;
    }>;
    "pagination": {
        "page": number;
        "pageSize": number;
        "total": number;
        "hasMore": boolean;
    };
};

EvaluationRunResults

export type EvaluationRunResults = {
    "data": Array<{
        "id": string;
        "caseId": string;
        "targetId": string;
        "attempt": number;
        "status": string;
        "output"?: unknown | null;
        "error"?: unknown | null;
        "provider": string | null;
        "model": string | null;
        "routeId": string | null;
        "metrics": {
            "latencyMs": number | null;
            "ttftMs": number | null;
            "inputTokens": number | null;
            "outputTokens": number | null;
            "totalTokens": number | null;
            "cost": number | null;
            "cacheHit": boolean;
            "retryCount": number;
            "fallbackCount": number;
        };
        "traceId": string | null;
        "scores": Array<{
            "id": string;
            "evaluatorVersionId": string;
            "evaluationColumnId": string | null;
            "status": string;
            "value"?: unknown;
            "label": string | null;
            "passed": boolean | null;
            "reasoning": string | null;
            "error": unknown | null;
            "reviews": Array<{
                "id": string;
                "status": string;
                "value": boolean | number | string | null;
                "label": string | null;
                "comment": string | null;
                "updatedAt": string;
            }>;
        }>;
    }>;
    "pagination": {
        "page": number;
        "pageSize": number;
        "total": number;
        "hasMore": boolean;
    };
};

EvaluationRun

export type EvaluationRun = {
    "id": string;
    "experimentId": string;
    "status": "QUEUED" | "RUNNING" | "COMPLETED" | "FAILED" | "CANCELLED";
    "progress": {
        "plannedTrials": number;
        "completedTrials": number;
        "failedTrials": number;
        "percentage": number;
    };
    "cost": {
        "current": number;
        "currency": string;
    };
    "summary": {
        [key: string]: unknown;
    } | null;
    "policyResult": unknown | null;
    "releaseDecision": string;
    "configuration": {
        "suiteId": string;
        "datasetVersionId": string;
        "trialCount": number;
        "estimates": {
            "caseCount": number;
            "targetCalls": number;
            "judgeCalls": number;
            "totalModelCalls": number;
        };
        "targets": Array<{
            "experimentTargetId": string;
            "targetVersionId": string;
            "targetId": string;
            "type": string;
            "alias": string;
            "role": string;
            "sourceVersionId"?: string;
        }>;
        "evaluators": Array<{
            "evaluationColumnId": string;
            "evaluatorVersionId": string;
            "evaluatorId": string;
            "slug": string;
            "type": string;
        }>;
        "releasePolicyVersionId"?: string;
    };
    "error": unknown | null;
    "heartbeatAt": string | null;
    "startedAt": string | null;
    "completedAt": string | null;
    "createdAt": string;
};

ExecutionRunStatus

export type ExecutionRunStatus = "QUEUED" | "RUNNING" | "COMPLETED" | "FAILED" | "CANCELLED";

ExecutionTrial

export type ExecutionTrial = {
    "id": string;
    "caseId": string;
    "targetId": string;
    "attempt": number;
    "status": string;
    "output"?: unknown | null;
    "error"?: unknown | null;
    "provider": string | null;
    "model": string | null;
    "routeId": string | null;
    "metrics": {
        "latencyMs": number | null;
        "ttftMs": number | null;
        "inputTokens": number | null;
        "outputTokens": number | null;
        "totalTokens": number | null;
        "cost": number | null;
        "cacheHit": boolean;
        "retryCount": number;
        "fallbackCount": number;
    };
    "traceId": string | null;
    "scores": Array<{
        "id": string;
        "evaluatorVersionId": string;
        "evaluationColumnId": string | null;
        "status": string;
        "value"?: unknown;
        "label": string | null;
        "passed": boolean | null;
        "reasoning": string | null;
        "error": unknown | null;
        "reviews": Array<{
            "id": string;
            "status": string;
            "value": boolean | number | string | null;
            "label": string | null;
            "comment": string | null;
            "updatedAt": string;
        }>;
    }>;
};

RunMutationResponse

export type RunMutationResponse = {
    "id": string;
    "status": "QUEUED" | "RUNNING" | "COMPLETED" | "FAILED" | "CANCELLED";
};

StartEvaluationRunRequest

export type StartEvaluationRunRequest = {
    "experimentId": string;
    "cases": "all" | Array<string>;
    "targetIds": Array<string>;
    "evaluatorIds"?: Array<string>;
    "trialCount": number;
    "releasePolicyVersionId"?: string;
};

EvaluationResultsQuery

export interface EvaluationResultsQuery {
    page?: number;
    pageSize?: number;
    caseId?: string;
    targetId?: string;
    evaluatorId?: string;
    status?: string;
    passed?: boolean;
}

On this page