cb15c5e0d8
Release / Check for new version (push) Has been cancelled
Release / Build macOS ARM64 (push) Has been cancelled
Release / Build macOS x64 (push) Has been cancelled
Release / Build Linux ARM64 (push) Has been cancelled
Release / Build Linux musl ARM64 (push) Has been cancelled
Release / Build Linux musl x64 (push) Has been cancelled
Release / Build Linux x64 (push) Has been cancelled
Release / Build Windows x64 (push) Has been cancelled
Release / Publish to npm (push) Has been cancelled
Release / Publish sandbox package to npm (push) Has been cancelled
Release / Create GitHub Release (push) Has been cancelled
CI / Rust (windows-latest - x86_64-pc-windows-msvc) (push) Has been cancelled
CI / Native E2E Tests (push) Has been cancelled
CI / Windows Integration Test (push) Has been cancelled
CI / Global Install (macos-latest) (push) Has been cancelled
CI / Global Install (ubuntu-latest) (push) Has been cancelled
CI / Version Sync Check (push) Has been cancelled
CI / Rust (push) Has been cancelled
CI / Dashboard (push) Has been cancelled
CI / Sandbox Package (push) Has been cancelled
CI / Rust (macos-latest - aarch64-apple-darwin) (push) Has been cancelled
CI / Rust (macos-latest - x86_64-apple-darwin) (push) Has been cancelled
CI / Global Install (windows-latest) (push) Has been cancelled
83 lines
1.8 KiB
TypeScript
83 lines
1.8 KiB
TypeScript
export type Category =
|
|
| "skill-loading"
|
|
| "skill-selection"
|
|
| "command-usage"
|
|
| "context-footprint";
|
|
export type ProviderName = "claude" | "codex";
|
|
|
|
export interface ProviderOptions {
|
|
model?: string;
|
|
timeout?: number;
|
|
}
|
|
|
|
export interface ProviderResponse {
|
|
output: string;
|
|
durationMs: number;
|
|
error?: string;
|
|
}
|
|
|
|
export interface Provider {
|
|
name: ProviderName;
|
|
defaultModel: string;
|
|
call(prompt: string, options?: ProviderOptions, context?: string): Promise<ProviderResponse>;
|
|
callRaw(prompt: string, options?: ProviderOptions): Promise<ProviderResponse>;
|
|
}
|
|
|
|
export interface EvalCase {
|
|
id: string;
|
|
name: string;
|
|
category: Category;
|
|
/** The user task prompt sent to the model */
|
|
prompt: string;
|
|
/** Additional context injected after the skill content (e.g., simulated skill output) */
|
|
context?: string;
|
|
/** Regex patterns that must all match in the response */
|
|
expectedPatterns: string[];
|
|
/** Regex patterns that must NOT match in the response */
|
|
forbiddenPatterns?: string[];
|
|
/** Rubric for LLM judge quality scoring (1-5) */
|
|
rubric?: string;
|
|
}
|
|
|
|
export interface PatternResult {
|
|
pattern: string;
|
|
matched: boolean;
|
|
type: "expected" | "forbidden";
|
|
}
|
|
|
|
export interface JudgeResult {
|
|
score: number;
|
|
reasoning: string;
|
|
}
|
|
|
|
export interface EvalResult {
|
|
caseId: string;
|
|
caseName: string;
|
|
category: Category;
|
|
pass: boolean;
|
|
patternResults: PatternResult[];
|
|
judge?: JudgeResult;
|
|
response: string;
|
|
durationMs: number;
|
|
error?: string;
|
|
}
|
|
|
|
export interface EvalSummary {
|
|
total: number;
|
|
passed: number;
|
|
failed: number;
|
|
errors: number;
|
|
byCategory: Record<Category, { total: number; passed: number }>;
|
|
durationMs: number;
|
|
}
|
|
|
|
export interface RunOptions {
|
|
provider: ProviderName;
|
|
model: string;
|
|
category?: Category;
|
|
judge: boolean;
|
|
json: boolean;
|
|
concurrency: number;
|
|
timeout: number;
|
|
}
|