mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-06-08 18:12:52 -07:00
59d377e5e0
- Implement `extract.ts` with robust character-aware parsing for snippets and tools. - Consolidate research dependencies by moving `@ax-llm/ax` to root `optionalDependencies`. - Relocate evaluation logic from `packages/core` to `scripts/optimization/lib/evals` to keep the production core lean. - Add `optimization_targets` to `data/manifest.json` as the single source of truth for the pipeline. - Implement comprehensive unit tests for extraction and variable masking with 100% pass rate. - Update global config and linting rules to support the new optimization infrastructure.
50 lines
1.3 KiB
TypeScript
50 lines
1.3 KiB
TypeScript
/**
|
|
* @license
|
|
* Copyright 2026 Google LLC
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
|
|
/**
|
|
* The core data interface for the Tool Alignment Dataset.
|
|
* Designed to be extensible for custom error reports and metrics.
|
|
*/
|
|
|
|
export interface ToolCall {
|
|
name: string;
|
|
arguments: Record<string, unknown>;
|
|
}
|
|
|
|
export interface NegativeExample {
|
|
id?: string;
|
|
tool_calls: ToolCall[];
|
|
output_text?: string; // For "too chatty" or "hallucination" failures
|
|
reason: string; // e.g., "Defaulted to shell 'cat'", "Included conversational filler"
|
|
severity: 'low' | 'medium' | 'high'; // Helps the optimizer prioritize fixes
|
|
}
|
|
|
|
export interface Scenario {
|
|
id: string; // Unique identifier (e.g., 'read_file-01')
|
|
metadata: {
|
|
tags: string[]; // e.g., ['tool-alignment', 'shell-avoidance']
|
|
created_at: string;
|
|
platform?: 'darwin' | 'linux' | 'win32'; // To handle platform-specific shell variations
|
|
model_info?: {
|
|
// Placeholder for future tracking
|
|
name?: string;
|
|
version?: string;
|
|
};
|
|
};
|
|
input: {
|
|
user_query: string;
|
|
context?: {
|
|
current_file?: string;
|
|
directory_structure?: string[];
|
|
};
|
|
};
|
|
expected: {
|
|
tool_calls: ToolCall[];
|
|
rationale: string; // Why this is the 'Golden' choice
|
|
};
|
|
negatives: NegativeExample[]; // Array of multiple failure modes
|
|
}
|