@agentv/core 0.9.0 → 0.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.cts CHANGED
@@ -102,9 +102,10 @@ interface EvalCase {
102
102
  readonly dataset?: string;
103
103
  readonly conversation_id?: string;
104
104
  readonly question: string;
105
+ readonly input_messages: readonly TestMessage[];
105
106
  readonly input_segments: readonly JsonObject[];
106
107
  readonly output_segments: readonly JsonObject[];
107
- readonly reference_answer: string;
108
+ readonly reference_answer?: string;
108
109
  readonly guideline_paths: readonly string[];
109
110
  readonly guideline_patterns?: readonly string[];
110
111
  readonly file_paths: readonly string[];
@@ -129,7 +130,8 @@ interface EvaluationResult {
129
130
  readonly timestamp: string;
130
131
  readonly reasoning?: string;
131
132
  readonly raw_aspects?: readonly string[];
132
- readonly raw_request?: JsonObject;
133
+ readonly agent_provider_request?: JsonObject;
134
+ readonly lm_provider_request?: JsonObject;
133
135
  readonly evaluator_raw_request?: JsonObject;
134
136
  readonly evaluator_results?: readonly EvaluatorResult[];
135
137
  readonly error?: string;
@@ -149,65 +151,6 @@ interface EvaluatorResult {
149
151
  */
150
152
  declare function getHitCount(result: Pick<EvaluationResult, "hits">): number;
151
153
 
152
- /**
153
- * Determine whether a path references guideline content (instructions or prompts).
154
- */
155
- declare function isGuidelineFile(filePath: string, patterns?: readonly string[]): boolean;
156
- /**
157
- * Extract fenced code blocks from AgentV user segments.
158
- */
159
- declare function extractCodeBlocks(segments: readonly JsonObject[]): readonly string[];
160
- type LoadOptions = {
161
- readonly verbose?: boolean;
162
- readonly evalId?: string;
163
- };
164
- /**
165
- * Load eval cases from a AgentV YAML specification file.
166
- */
167
- declare function loadEvalCases(evalFilePath: string, repoRoot: URL | string, options?: LoadOptions): Promise<readonly EvalCase[]>;
168
- /**
169
- * Build prompt inputs by consolidating user request context and guideline content.
170
- */
171
- declare function buildPromptInputs(testCase: EvalCase): Promise<{
172
- question: string;
173
- guidelines: string;
174
- systemMessage?: string;
175
- }>;
176
-
177
- declare function fileExists(filePath: string): Promise<boolean>;
178
- /**
179
- * Normalize line endings to LF (\n).
180
- * This ensures consistent behavior across Windows (CRLF) and Unix (LF) systems.
181
- */
182
- declare function normalizeLineEndings(content: string): string;
183
- /**
184
- * Read a text file and normalize line endings to LF (\n).
185
- * This ensures consistent behavior across Windows (CRLF) and Unix (LF) systems.
186
- */
187
- declare function readTextFile(filePath: string): Promise<string>;
188
- /**
189
- * Find git repository root by walking up the directory tree.
190
- */
191
- declare function findGitRoot(startPath: string): Promise<string | null>;
192
- /**
193
- * Build a chain of directories walking from a file's location up to repo root.
194
- * Used for discovering configuration files like targets.yaml or config.yaml.
195
- */
196
- declare function buildDirectoryChain(filePath: string, repoRoot: string): readonly string[];
197
- /**
198
- * Build search roots for file resolution, matching yaml-parser behavior.
199
- * Searches from eval file directory up to repo root.
200
- */
201
- declare function buildSearchRoots(evalPath: string, repoRoot: string): readonly string[];
202
- /**
203
- * Resolve a file reference using search roots, matching yaml-parser behavior.
204
- */
205
- declare function resolveFileReference(rawValue: string, searchRoots: readonly string[]): Promise<{
206
- readonly displayPath: string;
207
- readonly resolvedPath?: string;
208
- readonly attempted: readonly string[];
209
- }>;
210
-
211
154
  type ChatPrompt = AxChatRequest["chatPrompt"];
212
155
  type ProviderKind = "azure" | "anthropic" | "gemini" | "codex" | "cli" | "mock" | "vscode" | "vscode-insiders";
213
156
  interface ProviderRequest {
@@ -321,6 +264,67 @@ interface TargetDefinition {
321
264
  readonly retryStatusCodes?: unknown | undefined;
322
265
  }
323
266
 
267
+ /**
268
+ * Determine whether a path references guideline content (instructions or prompts).
269
+ */
270
+ declare function isGuidelineFile(filePath: string, patterns?: readonly string[]): boolean;
271
+ /**
272
+ * Extract fenced code blocks from AgentV user segments.
273
+ */
274
+ declare function extractCodeBlocks(segments: readonly JsonObject[]): readonly string[];
275
+ type LoadOptions = {
276
+ readonly verbose?: boolean;
277
+ readonly evalId?: string;
278
+ };
279
+ /**
280
+ * Load eval cases from a AgentV YAML specification file.
281
+ */
282
+ declare function loadEvalCases(evalFilePath: string, repoRoot: URL | string, options?: LoadOptions): Promise<readonly EvalCase[]>;
283
+ /**
284
+ * Build prompt inputs by consolidating user request context and guideline content.
285
+ */
286
+ interface PromptInputs {
287
+ readonly question: string;
288
+ readonly guidelines: string;
289
+ readonly chatPrompt?: ChatPrompt;
290
+ readonly systemMessage?: string;
291
+ }
292
+ declare function buildPromptInputs(testCase: EvalCase): Promise<PromptInputs>;
293
+
294
+ declare function fileExists(filePath: string): Promise<boolean>;
295
+ /**
296
+ * Normalize line endings to LF (\n).
297
+ * This ensures consistent behavior across Windows (CRLF) and Unix (LF) systems.
298
+ */
299
+ declare function normalizeLineEndings(content: string): string;
300
+ /**
301
+ * Read a text file and normalize line endings to LF (\n).
302
+ * This ensures consistent behavior across Windows (CRLF) and Unix (LF) systems.
303
+ */
304
+ declare function readTextFile(filePath: string): Promise<string>;
305
+ /**
306
+ * Find git repository root by walking up the directory tree.
307
+ */
308
+ declare function findGitRoot(startPath: string): Promise<string | null>;
309
+ /**
310
+ * Build a chain of directories walking from a file's location up to repo root.
311
+ * Used for discovering configuration files like targets.yaml or config.yaml.
312
+ */
313
+ declare function buildDirectoryChain(filePath: string, repoRoot: string): readonly string[];
314
+ /**
315
+ * Build search roots for file resolution, matching yaml-parser behavior.
316
+ * Searches from eval file directory up to repo root.
317
+ */
318
+ declare function buildSearchRoots(evalPath: string, repoRoot: string): readonly string[];
319
+ /**
320
+ * Resolve a file reference using search roots, matching yaml-parser behavior.
321
+ */
322
+ declare function resolveFileReference(rawValue: string, searchRoots: readonly string[]): Promise<{
323
+ readonly displayPath: string;
324
+ readonly resolvedPath?: string;
325
+ readonly attempted: readonly string[];
326
+ }>;
327
+
324
328
  interface RetryConfig {
325
329
  readonly maxRetries?: number;
326
330
  readonly initialDelayMs?: number;
@@ -486,6 +490,7 @@ interface EvaluationContext {
486
490
  readonly question: string;
487
491
  readonly guidelines: string;
488
492
  readonly systemMessage?: string;
493
+ readonly chatPrompt?: ChatPrompt;
489
494
  };
490
495
  readonly now: Date;
491
496
  readonly judgeProvider?: Provider;
@@ -594,4 +599,4 @@ type AgentKernel = {
594
599
  };
595
600
  declare function createAgentKernel(): AgentKernel;
596
601
 
597
- export { type AgentKernel, type AnthropicResolvedConfig, type AssistantTestMessage, type AzureResolvedConfig, type CliResolvedConfig, CodeEvaluator, type CodeEvaluatorConfig, type CodeEvaluatorOptions, type EnsureSubagentsOptions, type EnsureSubagentsResult, type EnvLookup, type EvalCase, type EvaluationCache, type EvaluationContext, type EvaluationResult, type EvaluationScore, type Evaluator, type EvaluatorConfig, type EvaluatorKind, type EvaluatorResult, type GeminiResolvedConfig, type JsonObject, type JsonPrimitive, type JsonValue, LlmJudgeEvaluator, type LlmJudgeEvaluatorConfig, type LlmJudgeEvaluatorOptions, type MockResolvedConfig, type ProgressEvent, type Provider, type ProviderKind, type ProviderRequest, type ProviderResponse, type ResolvedTarget, type RunEvalCaseOptions, type RunEvaluationOptions, type SystemTestMessage, TEST_MESSAGE_ROLES, type TargetDefinition, type TestMessage, type TestMessageContent, type TestMessageRole, type ToolTestMessage, type UserTestMessage, type VSCodeResolvedConfig, buildDirectoryChain, buildPromptInputs, buildSearchRoots, consumeCodexLogEntries, createAgentKernel, createProvider, ensureVSCodeSubagents, extractCodeBlocks, fileExists, findGitRoot, getHitCount, isEvaluatorKind, isGuidelineFile, isJsonObject, isJsonValue, isTestMessage, isTestMessageRole, listTargetNames, loadEvalCases, normalizeLineEndings, readTargetDefinitions, readTextFile, resolveAndCreateProvider, resolveFileReference, resolveTargetDefinition, runEvalCase, runEvaluation, subscribeToCodexLogEntries };
602
+ export { type AgentKernel, type AnthropicResolvedConfig, type AssistantTestMessage, type AzureResolvedConfig, type CliResolvedConfig, CodeEvaluator, type CodeEvaluatorConfig, type CodeEvaluatorOptions, type EnsureSubagentsOptions, type EnsureSubagentsResult, type EnvLookup, type EvalCase, type EvaluationCache, type EvaluationContext, type EvaluationResult, type EvaluationScore, type Evaluator, type EvaluatorConfig, type EvaluatorKind, type EvaluatorResult, type GeminiResolvedConfig, type JsonObject, type JsonPrimitive, type JsonValue, LlmJudgeEvaluator, type LlmJudgeEvaluatorConfig, type LlmJudgeEvaluatorOptions, type MockResolvedConfig, type ProgressEvent, type PromptInputs, type Provider, type ProviderKind, type ProviderRequest, type ProviderResponse, type ResolvedTarget, type RunEvalCaseOptions, type RunEvaluationOptions, type SystemTestMessage, TEST_MESSAGE_ROLES, type TargetDefinition, type TestMessage, type TestMessageContent, type TestMessageRole, type ToolTestMessage, type UserTestMessage, type VSCodeResolvedConfig, buildDirectoryChain, buildPromptInputs, buildSearchRoots, consumeCodexLogEntries, createAgentKernel, createProvider, ensureVSCodeSubagents, extractCodeBlocks, fileExists, findGitRoot, getHitCount, isEvaluatorKind, isGuidelineFile, isJsonObject, isJsonValue, isTestMessage, isTestMessageRole, listTargetNames, loadEvalCases, normalizeLineEndings, readTargetDefinitions, readTextFile, resolveAndCreateProvider, resolveFileReference, resolveTargetDefinition, runEvalCase, runEvaluation, subscribeToCodexLogEntries };
package/dist/index.d.ts CHANGED
@@ -102,9 +102,10 @@ interface EvalCase {
102
102
  readonly dataset?: string;
103
103
  readonly conversation_id?: string;
104
104
  readonly question: string;
105
+ readonly input_messages: readonly TestMessage[];
105
106
  readonly input_segments: readonly JsonObject[];
106
107
  readonly output_segments: readonly JsonObject[];
107
- readonly reference_answer: string;
108
+ readonly reference_answer?: string;
108
109
  readonly guideline_paths: readonly string[];
109
110
  readonly guideline_patterns?: readonly string[];
110
111
  readonly file_paths: readonly string[];
@@ -129,7 +130,8 @@ interface EvaluationResult {
129
130
  readonly timestamp: string;
130
131
  readonly reasoning?: string;
131
132
  readonly raw_aspects?: readonly string[];
132
- readonly raw_request?: JsonObject;
133
+ readonly agent_provider_request?: JsonObject;
134
+ readonly lm_provider_request?: JsonObject;
133
135
  readonly evaluator_raw_request?: JsonObject;
134
136
  readonly evaluator_results?: readonly EvaluatorResult[];
135
137
  readonly error?: string;
@@ -149,65 +151,6 @@ interface EvaluatorResult {
149
151
  */
150
152
  declare function getHitCount(result: Pick<EvaluationResult, "hits">): number;
151
153
 
152
- /**
153
- * Determine whether a path references guideline content (instructions or prompts).
154
- */
155
- declare function isGuidelineFile(filePath: string, patterns?: readonly string[]): boolean;
156
- /**
157
- * Extract fenced code blocks from AgentV user segments.
158
- */
159
- declare function extractCodeBlocks(segments: readonly JsonObject[]): readonly string[];
160
- type LoadOptions = {
161
- readonly verbose?: boolean;
162
- readonly evalId?: string;
163
- };
164
- /**
165
- * Load eval cases from a AgentV YAML specification file.
166
- */
167
- declare function loadEvalCases(evalFilePath: string, repoRoot: URL | string, options?: LoadOptions): Promise<readonly EvalCase[]>;
168
- /**
169
- * Build prompt inputs by consolidating user request context and guideline content.
170
- */
171
- declare function buildPromptInputs(testCase: EvalCase): Promise<{
172
- question: string;
173
- guidelines: string;
174
- systemMessage?: string;
175
- }>;
176
-
177
- declare function fileExists(filePath: string): Promise<boolean>;
178
- /**
179
- * Normalize line endings to LF (\n).
180
- * This ensures consistent behavior across Windows (CRLF) and Unix (LF) systems.
181
- */
182
- declare function normalizeLineEndings(content: string): string;
183
- /**
184
- * Read a text file and normalize line endings to LF (\n).
185
- * This ensures consistent behavior across Windows (CRLF) and Unix (LF) systems.
186
- */
187
- declare function readTextFile(filePath: string): Promise<string>;
188
- /**
189
- * Find git repository root by walking up the directory tree.
190
- */
191
- declare function findGitRoot(startPath: string): Promise<string | null>;
192
- /**
193
- * Build a chain of directories walking from a file's location up to repo root.
194
- * Used for discovering configuration files like targets.yaml or config.yaml.
195
- */
196
- declare function buildDirectoryChain(filePath: string, repoRoot: string): readonly string[];
197
- /**
198
- * Build search roots for file resolution, matching yaml-parser behavior.
199
- * Searches from eval file directory up to repo root.
200
- */
201
- declare function buildSearchRoots(evalPath: string, repoRoot: string): readonly string[];
202
- /**
203
- * Resolve a file reference using search roots, matching yaml-parser behavior.
204
- */
205
- declare function resolveFileReference(rawValue: string, searchRoots: readonly string[]): Promise<{
206
- readonly displayPath: string;
207
- readonly resolvedPath?: string;
208
- readonly attempted: readonly string[];
209
- }>;
210
-
211
154
  type ChatPrompt = AxChatRequest["chatPrompt"];
212
155
  type ProviderKind = "azure" | "anthropic" | "gemini" | "codex" | "cli" | "mock" | "vscode" | "vscode-insiders";
213
156
  interface ProviderRequest {
@@ -321,6 +264,67 @@ interface TargetDefinition {
321
264
  readonly retryStatusCodes?: unknown | undefined;
322
265
  }
323
266
 
267
+ /**
268
+ * Determine whether a path references guideline content (instructions or prompts).
269
+ */
270
+ declare function isGuidelineFile(filePath: string, patterns?: readonly string[]): boolean;
271
+ /**
272
+ * Extract fenced code blocks from AgentV user segments.
273
+ */
274
+ declare function extractCodeBlocks(segments: readonly JsonObject[]): readonly string[];
275
+ type LoadOptions = {
276
+ readonly verbose?: boolean;
277
+ readonly evalId?: string;
278
+ };
279
+ /**
280
+ * Load eval cases from a AgentV YAML specification file.
281
+ */
282
+ declare function loadEvalCases(evalFilePath: string, repoRoot: URL | string, options?: LoadOptions): Promise<readonly EvalCase[]>;
283
+ /**
284
+ * Build prompt inputs by consolidating user request context and guideline content.
285
+ */
286
+ interface PromptInputs {
287
+ readonly question: string;
288
+ readonly guidelines: string;
289
+ readonly chatPrompt?: ChatPrompt;
290
+ readonly systemMessage?: string;
291
+ }
292
+ declare function buildPromptInputs(testCase: EvalCase): Promise<PromptInputs>;
293
+
294
+ declare function fileExists(filePath: string): Promise<boolean>;
295
+ /**
296
+ * Normalize line endings to LF (\n).
297
+ * This ensures consistent behavior across Windows (CRLF) and Unix (LF) systems.
298
+ */
299
+ declare function normalizeLineEndings(content: string): string;
300
+ /**
301
+ * Read a text file and normalize line endings to LF (\n).
302
+ * This ensures consistent behavior across Windows (CRLF) and Unix (LF) systems.
303
+ */
304
+ declare function readTextFile(filePath: string): Promise<string>;
305
+ /**
306
+ * Find git repository root by walking up the directory tree.
307
+ */
308
+ declare function findGitRoot(startPath: string): Promise<string | null>;
309
+ /**
310
+ * Build a chain of directories walking from a file's location up to repo root.
311
+ * Used for discovering configuration files like targets.yaml or config.yaml.
312
+ */
313
+ declare function buildDirectoryChain(filePath: string, repoRoot: string): readonly string[];
314
+ /**
315
+ * Build search roots for file resolution, matching yaml-parser behavior.
316
+ * Searches from eval file directory up to repo root.
317
+ */
318
+ declare function buildSearchRoots(evalPath: string, repoRoot: string): readonly string[];
319
+ /**
320
+ * Resolve a file reference using search roots, matching yaml-parser behavior.
321
+ */
322
+ declare function resolveFileReference(rawValue: string, searchRoots: readonly string[]): Promise<{
323
+ readonly displayPath: string;
324
+ readonly resolvedPath?: string;
325
+ readonly attempted: readonly string[];
326
+ }>;
327
+
324
328
  interface RetryConfig {
325
329
  readonly maxRetries?: number;
326
330
  readonly initialDelayMs?: number;
@@ -486,6 +490,7 @@ interface EvaluationContext {
486
490
  readonly question: string;
487
491
  readonly guidelines: string;
488
492
  readonly systemMessage?: string;
493
+ readonly chatPrompt?: ChatPrompt;
489
494
  };
490
495
  readonly now: Date;
491
496
  readonly judgeProvider?: Provider;
@@ -594,4 +599,4 @@ type AgentKernel = {
594
599
  };
595
600
  declare function createAgentKernel(): AgentKernel;
596
601
 
597
- export { type AgentKernel, type AnthropicResolvedConfig, type AssistantTestMessage, type AzureResolvedConfig, type CliResolvedConfig, CodeEvaluator, type CodeEvaluatorConfig, type CodeEvaluatorOptions, type EnsureSubagentsOptions, type EnsureSubagentsResult, type EnvLookup, type EvalCase, type EvaluationCache, type EvaluationContext, type EvaluationResult, type EvaluationScore, type Evaluator, type EvaluatorConfig, type EvaluatorKind, type EvaluatorResult, type GeminiResolvedConfig, type JsonObject, type JsonPrimitive, type JsonValue, LlmJudgeEvaluator, type LlmJudgeEvaluatorConfig, type LlmJudgeEvaluatorOptions, type MockResolvedConfig, type ProgressEvent, type Provider, type ProviderKind, type ProviderRequest, type ProviderResponse, type ResolvedTarget, type RunEvalCaseOptions, type RunEvaluationOptions, type SystemTestMessage, TEST_MESSAGE_ROLES, type TargetDefinition, type TestMessage, type TestMessageContent, type TestMessageRole, type ToolTestMessage, type UserTestMessage, type VSCodeResolvedConfig, buildDirectoryChain, buildPromptInputs, buildSearchRoots, consumeCodexLogEntries, createAgentKernel, createProvider, ensureVSCodeSubagents, extractCodeBlocks, fileExists, findGitRoot, getHitCount, isEvaluatorKind, isGuidelineFile, isJsonObject, isJsonValue, isTestMessage, isTestMessageRole, listTargetNames, loadEvalCases, normalizeLineEndings, readTargetDefinitions, readTextFile, resolveAndCreateProvider, resolveFileReference, resolveTargetDefinition, runEvalCase, runEvaluation, subscribeToCodexLogEntries };
602
+ export { type AgentKernel, type AnthropicResolvedConfig, type AssistantTestMessage, type AzureResolvedConfig, type CliResolvedConfig, CodeEvaluator, type CodeEvaluatorConfig, type CodeEvaluatorOptions, type EnsureSubagentsOptions, type EnsureSubagentsResult, type EnvLookup, type EvalCase, type EvaluationCache, type EvaluationContext, type EvaluationResult, type EvaluationScore, type Evaluator, type EvaluatorConfig, type EvaluatorKind, type EvaluatorResult, type GeminiResolvedConfig, type JsonObject, type JsonPrimitive, type JsonValue, LlmJudgeEvaluator, type LlmJudgeEvaluatorConfig, type LlmJudgeEvaluatorOptions, type MockResolvedConfig, type ProgressEvent, type PromptInputs, type Provider, type ProviderKind, type ProviderRequest, type ProviderResponse, type ResolvedTarget, type RunEvalCaseOptions, type RunEvaluationOptions, type SystemTestMessage, TEST_MESSAGE_ROLES, type TargetDefinition, type TestMessage, type TestMessageContent, type TestMessageRole, type ToolTestMessage, type UserTestMessage, type VSCodeResolvedConfig, buildDirectoryChain, buildPromptInputs, buildSearchRoots, consumeCodexLogEntries, createAgentKernel, createProvider, ensureVSCodeSubagents, extractCodeBlocks, fileExists, findGitRoot, getHitCount, isEvaluatorKind, isGuidelineFile, isJsonObject, isJsonValue, isTestMessage, isTestMessageRole, listTargetNames, loadEvalCases, normalizeLineEndings, readTargetDefinitions, readTextFile, resolveAndCreateProvider, resolveFileReference, resolveTargetDefinition, runEvalCase, runEvaluation, subscribeToCodexLogEntries };