Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion apps/cli/src/commands/compare/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import {
string,
} from 'cmd-ts';

import { toSnakeCaseDeep } from '../../utils/case-conversion.js';
import { toSnakeCaseDeep } from '@agentv/core';
import { loadLightweightResults, resolveResultSourcePath } from '../results/manifest.js';

// ANSI color codes (no dependency needed)
Expand Down
8 changes: 3 additions & 5 deletions apps/cli/src/commands/eval/jsonl-writer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,9 @@ import { createWriteStream } from 'node:fs';
import { mkdir } from 'node:fs/promises';
import path from 'node:path';
import { finished } from 'node:stream/promises';
import { type EvaluationResult, serializeEvaluationResultWire } from '@agentv/core';
import { Mutex } from 'async-mutex';

import { toSnakeCaseDeep } from '../../utils/case-conversion.js';

export class JsonlWriter {
private readonly stream: ReturnType<typeof createWriteStream>;
private readonly mutex = new Mutex();
Expand All @@ -22,13 +21,12 @@ export class JsonlWriter {
return new JsonlWriter(stream);
}

async append(record: unknown): Promise<void> {
async append(record: EvaluationResult): Promise<void> {
await this.mutex.runExclusive(async () => {
if (this.closed) {
throw new Error('Cannot write to closed JSONL writer');
}
// Convert camelCase keys to snake_case for Python ecosystem compatibility
const snakeCaseRecord = toSnakeCaseDeep(record);
const snakeCaseRecord = serializeEvaluationResultWire(record);
const line = `${JSON.stringify(snakeCaseRecord)}\n`;
if (!this.stream.write(line)) {
await new Promise<void>((resolve, reject) => {
Expand Down
3 changes: 1 addition & 2 deletions apps/cli/src/commands/eval/task-bundle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,10 @@ import {
type TestMessage,
type WorkspaceConfig,
parseYamlValue,
toSnakeCaseDeep,
} from '@agentv/core';
import { stringify as stringifyYaml } from 'yaml';

import { toSnakeCaseDeep } from '../../utils/case-conversion.js';

const TEST_BUNDLE_DIRNAME = 'test';
const TASK_EVAL_FILENAME = 'EVAL.yaml';
const TASK_TARGETS_FILENAME = 'targets.yaml';
Expand Down
2 changes: 1 addition & 1 deletion apps/cli/src/commands/inspect/list.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { toSnakeCaseDeep } from '@agentv/core';
import { command, number, oneOf, option, optional, string } from 'cmd-ts';
import { toSnakeCaseDeep } from '../../utils/case-conversion.js';
import {
type ResultFileMeta,
c,
Expand Down
2 changes: 1 addition & 1 deletion apps/cli/src/commands/inspect/search.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@

import { existsSync, readFileSync, readdirSync, statSync } from 'node:fs';
import path from 'node:path';
import { toSnakeCaseDeep } from '@agentv/core';
import { command, oneOf, option, optional, positional, string } from 'cmd-ts';
import { toSnakeCaseDeep } from '../../utils/case-conversion.js';
import { isReservedResultsNamespace } from '../eval/result-layout.js';
import { c, padRight } from './utils.js';

Expand Down
2 changes: 1 addition & 1 deletion apps/cli/src/commands/inspect/stats.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { toSnakeCaseDeep } from '@agentv/core';
import { command, oneOf, option, optional, positional, string } from 'cmd-ts';
import { toSnakeCaseDeep } from '../../utils/case-conversion.js';
import {
type RawResult,
c,
Expand Down
2 changes: 1 addition & 1 deletion apps/cli/src/commands/trend/index.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import path from 'node:path';

import { toSnakeCaseDeep } from '@agentv/core';
import { command, flag, number, oneOf, option, optional, restPositionals, string } from 'cmd-ts';

import { toSnakeCaseDeep } from '../../utils/case-conversion.js';
import { RESULT_INDEX_FILENAME, isRunManifestPath } from '../eval/result-layout.js';
import { listResultFiles } from '../inspect/utils.js';
import {
Expand Down
52 changes: 0 additions & 52 deletions apps/cli/src/utils/case-conversion.ts

This file was deleted.

2 changes: 1 addition & 1 deletion apps/cli/test/commands/eval/aggregate.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import { tmpdir } from 'node:os';
import path from 'node:path';

import { type EvaluationResult, buildTraceFromMessages } from '@agentv/core';
import { toSnakeCaseDeep } from '../../../src/utils/case-conversion.js';
import { toSnakeCaseDeep } from '@agentv/core';

import {
RESULT_INDEX_FILENAME,
Expand Down
2 changes: 1 addition & 1 deletion apps/cli/test/commands/eval/artifact-writer.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import {
buildResultIndexArtifact,
buildTraceFromMessages,
parseYamlValue,
toSnakeCaseDeep,
} from '@agentv/core';

import {
Expand All @@ -33,7 +34,6 @@ import {
writeArtifactsFromResults,
} from '../../../src/commands/eval/artifact-writer.js';
import { prepareResultForJsonl } from '../../../src/commands/eval/run-eval.js';
import { toSnakeCaseDeep } from '../../../src/utils/case-conversion.js';

function makeResult(overrides: Partial<EvaluationResult> = {}): EvaluationResult {
const result = {
Expand Down
140 changes: 0 additions & 140 deletions apps/cli/test/unit/case-conversion.test.ts

This file was deleted.

Loading
Loading