refactor(core): normalize ToolCall names at provider layer#1061
Merged
refactor(core): normalize ToolCall names at provider layer#1061
Conversation
Phase 1: Add normalizeToolCall() pure function with static mapping tables - Canonical names: Skill, Read, Write, Edit, Bash (Claude naming) - Wired into all 9 providers and 2 import parsers - Input normalization: path → file_path for Read tools - 83 unit tests for normalizeToolCall Phase 2: Add stream_log config + auto-write transcript JSONL - New stream_log field on TargetDefinition and all resolved configs - resolveStreamLog() helper with log_format → stream_log fallback - Deprecation warning when log_format used - Auto-writes transcript.jsonl on every eval run Phase 3: Simplify skill-trigger evaluator - Removed ~120 lines of provider-specific code (ToolMatcher, matchers, PROVIDER_TOOL_SEMANTICS, resolveMatcher, readPathFromInput) - Evaluator now only checks canonical names: Skill + Read - Fully provider-agnostic (no ProviderKind import) All 2045 tests pass. Lint clean. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Deploying agentv with
|
| Latest commit: |
00ba70b
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://d944fe09.agentv.pages.dev |
| Branch Preview URL: | https://refactor-1059-normalize-tool.agentv.pages.dev |
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
Closes #1059
Normalizes provider-specific tool names to canonical names (Skill, Read, Write, Edit, Bash) at the provider layer, eliminating ~120 lines of per-provider matching logic from evaluators.
Changes
Phase 1:
normalizeToolCall()functionnormalize-tool-call.tswith static mapping tables (data-driven, not if/else)path→file_pathfor Read toolsPhase 2:
stream_logconfig + auto-transcriptstream_logfield onTargetDefinitionand all resolved configsresolveStreamLog()helper withlog_format→stream_logfallback + deprecation warningtranscript.jsonlon every eval runPhase 3: Simplified
skill-triggerevaluatorSkill(input.skill) +Read(input.file_path)ProviderKindimportTesting
Files changed