feat(cli): add *.eval.ts auto-discovery#1120
Merged
Conversation
Deploying agentv with
|
| Latest commit: |
7864abe
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://e0b657c9.agentv.pages.dev |
| Branch Preview URL: | https://feat-1116-eval-ts-discovery.agentv.pages.dev |
Add TypeScript eval file support to `agentv run`. TS eval files export an EvalConfig (default, `config`, or `evalConfig` named export) and are discovered alongside YAML files via the same glob/path resolution. Changes: - shared.ts: Include .ts in file extension regex and directory auto-glob - config-loader.ts: Add **/evals/**/*.eval.ts to DEFAULT_EVAL_PATTERNS - jsonl-parser.ts: Add typescript format detection in detectFormat() - ts-eval-loader.ts: New loader that imports TS modules and extracts EvalConfig - run-eval.ts: Integrate TS files through evaluate() with CLI overrides, feeding results through the same artifact/reporting pipeline - run.ts: Update CLI description to mention .ts files - index.ts: Export loadTsEvalFile and TsEvalResult from @agentv/core Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
4c051a1 to
7864abe
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds auto-discovery and execution of
*.eval.tsfiles alongside YAML evals. Each TS file exports anEvalConfigand runs throughevaluate()with the same output/artifact pipeline.Closes #1116
Depends on #1119 (#1115)
Changes
New: TS Eval Loader (
packages/core/src/evaluation/loaders/ts-eval-loader.ts)*.eval.tsvia dynamicimport()(native in Bun)default,config,evalConfigDiscovery (
apps/cli/src/commands/eval/shared.ts).ts**/evals/**/*.eval.tsaddedFormat Detection (
packages/core/src/evaluation/loaders/jsonl-parser.ts)detectFormat()returns'typescript'for.ts/.mtsCLI Integration (
apps/cli/src/commands/eval/run-eval.ts)evaluate()--workers,--threshold,--filter,--cache,--verbose,--max-retries,--agent-timeout--tag/--exclude-tagactive (TS files don't carry YAML tags)!== undefinedchecks)Tests
loadTsEvalFile(default export, named exports, error case).tsextensionresolveEvalPathstests for.eval.tsinclusionE2E Verification
Green (
.eval.tsfile discovered and executed):Test Results
475/475 pass, 0 failures