@agentv/core 0.5.1 → 0.6.1

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
@@ -1,4 +1,4 @@
1
- import { AxChatRequest } from '@ax-llm/ax';
1
+ import { AxChatRequest, AxAI } from '@ax-llm/ax';
2
2
 
3
3
  /**
4
4
  * JSON primitive values appearing in AgentV payloads.
@@ -99,6 +99,7 @@ type EvaluatorConfig = CodeEvaluatorConfig | LlmJudgeEvaluatorConfig;
99
99
  */
100
100
  interface EvalCase {
101
101
  readonly id: string;
102
+ readonly dataset: string;
102
103
  readonly conversation_id?: string;
103
104
  readonly task: string;
104
105
  readonly user_segments: readonly JsonObject[];
@@ -117,6 +118,7 @@ interface EvalCase {
117
118
  */
118
119
  interface EvaluationResult {
119
120
  readonly eval_id: string;
121
+ readonly dataset: string;
120
122
  readonly conversation_id?: string;
121
123
  readonly score: number;
122
124
  readonly hits: readonly string[];
@@ -171,6 +173,11 @@ declare function buildPromptInputs(testCase: EvalCase): Promise<{
171
173
  }>;
172
174
 
173
175
  declare function fileExists(filePath: string): Promise<boolean>;
176
+ /**
177
+ * Read a text file and normalize line endings to LF (\n).
178
+ * This ensures consistent behavior across Windows (CRLF) and Unix (LF) systems.
179
+ */
180
+ declare function readTextFile(filePath: string): Promise<string>;
174
181
  /**
175
182
  * Find git repository root by walking up the directory tree.
176
183
  */
@@ -229,6 +236,11 @@ interface Provider {
229
236
  * the orchestrator may send multiple requests in a single provider session.
230
237
  */
231
238
  invokeBatch?(requests: readonly ProviderRequest[]): Promise<readonly ProviderResponse[]>;
239
+ /**
240
+ * Optional access to the underlying AxAI instance.
241
+ * This enables using advanced Ax features like structured output signatures.
242
+ */
243
+ getAxAI?(): AxAI;
232
244
  }
233
245
  type EnvLookup = Readonly<Record<string, string | undefined>>;
234
246
  interface TargetDefinition {
@@ -265,6 +277,8 @@ interface CodexResolvedConfig {
265
277
  readonly args?: readonly string[];
266
278
  readonly cwd?: string;
267
279
  readonly timeoutMs?: number;
280
+ readonly logDir?: string;
281
+ readonly logFormat?: "summary" | "json";
268
282
  }
269
283
  interface MockResolvedConfig {
270
284
  readonly response?: string;
@@ -370,6 +384,16 @@ interface EnsureSubagentsResult {
370
384
  */
371
385
  declare function ensureVSCodeSubagents(options: EnsureSubagentsOptions): Promise<EnsureSubagentsResult>;
372
386
 
387
+ type CodexLogEntry = {
388
+ readonly filePath: string;
389
+ readonly evalCaseId?: string;
390
+ readonly targetName: string;
391
+ readonly attempt?: number;
392
+ };
393
+ type CodexLogListener = (entry: CodexLogEntry) => void;
394
+ declare function consumeCodexLogEntries(): CodexLogEntry[];
395
+ declare function subscribeToCodexLogEntries(listener: CodexLogListener): () => void;
396
+
373
397
  declare function createProvider(target: ResolvedTarget): Provider;
374
398
  declare function resolveAndCreateProvider(definition: TargetDefinition, env?: EnvLookup): Provider;
375
399
 
@@ -418,6 +442,10 @@ declare class LlmJudgeEvaluator implements Evaluator {
418
442
  private readonly customPrompt?;
419
443
  constructor(options: LlmJudgeEvaluatorOptions);
420
444
  evaluate(context: EvaluationContext): Promise<EvaluationScore>;
445
+ private evaluateWithAx;
446
+ private evaluateWithPrompt;
447
+ private buildJudgeForwardOptions;
448
+ private buildJudgeModelConfig;
421
449
  }
422
450
  interface CodeEvaluatorOptions {
423
451
  readonly script: string;
@@ -490,4 +518,4 @@ type AgentKernel = {
490
518
  };
491
519
  declare function createAgentKernel(): AgentKernel;
492
520
 
493
- 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, createAgentKernel, createProvider, ensureVSCodeSubagents, extractCodeBlocks, fileExists, findGitRoot, getHitCount, isEvaluatorKind, isGuidelineFile, isJsonObject, isJsonValue, isTestMessage, isTestMessageRole, listTargetNames, loadEvalCases, readTargetDefinitions, resolveAndCreateProvider, resolveFileReference, resolveTargetDefinition, runEvalCase, runEvaluation };
521
+ 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, readTargetDefinitions, readTextFile, resolveAndCreateProvider, resolveFileReference, resolveTargetDefinition, runEvalCase, runEvaluation, subscribeToCodexLogEntries };
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { AxChatRequest } from '@ax-llm/ax';
1
+ import { AxChatRequest, AxAI } from '@ax-llm/ax';
2
2
 
3
3
  /**
4
4
  * JSON primitive values appearing in AgentV payloads.
@@ -99,6 +99,7 @@ type EvaluatorConfig = CodeEvaluatorConfig | LlmJudgeEvaluatorConfig;
99
99
  */
100
100
  interface EvalCase {
101
101
  readonly id: string;
102
+ readonly dataset: string;
102
103
  readonly conversation_id?: string;
103
104
  readonly task: string;
104
105
  readonly user_segments: readonly JsonObject[];
@@ -117,6 +118,7 @@ interface EvalCase {
117
118
  */
118
119
  interface EvaluationResult {
119
120
  readonly eval_id: string;
121
+ readonly dataset: string;
120
122
  readonly conversation_id?: string;
121
123
  readonly score: number;
122
124
  readonly hits: readonly string[];
@@ -171,6 +173,11 @@ declare function buildPromptInputs(testCase: EvalCase): Promise<{
171
173
  }>;
172
174
 
173
175
  declare function fileExists(filePath: string): Promise<boolean>;
176
+ /**
177
+ * Read a text file and normalize line endings to LF (\n).
178
+ * This ensures consistent behavior across Windows (CRLF) and Unix (LF) systems.
179
+ */
180
+ declare function readTextFile(filePath: string): Promise<string>;
174
181
  /**
175
182
  * Find git repository root by walking up the directory tree.
176
183
  */
@@ -229,6 +236,11 @@ interface Provider {
229
236
  * the orchestrator may send multiple requests in a single provider session.
230
237
  */
231
238
  invokeBatch?(requests: readonly ProviderRequest[]): Promise<readonly ProviderResponse[]>;
239
+ /**
240
+ * Optional access to the underlying AxAI instance.
241
+ * This enables using advanced Ax features like structured output signatures.
242
+ */
243
+ getAxAI?(): AxAI;
232
244
  }
233
245
  type EnvLookup = Readonly<Record<string, string | undefined>>;
234
246
  interface TargetDefinition {
@@ -265,6 +277,8 @@ interface CodexResolvedConfig {
265
277
  readonly args?: readonly string[];
266
278
  readonly cwd?: string;
267
279
  readonly timeoutMs?: number;
280
+ readonly logDir?: string;
281
+ readonly logFormat?: "summary" | "json";
268
282
  }
269
283
  interface MockResolvedConfig {
270
284
  readonly response?: string;
@@ -370,6 +384,16 @@ interface EnsureSubagentsResult {
370
384
  */
371
385
  declare function ensureVSCodeSubagents(options: EnsureSubagentsOptions): Promise<EnsureSubagentsResult>;
372
386
 
387
+ type CodexLogEntry = {
388
+ readonly filePath: string;
389
+ readonly evalCaseId?: string;
390
+ readonly targetName: string;
391
+ readonly attempt?: number;
392
+ };
393
+ type CodexLogListener = (entry: CodexLogEntry) => void;
394
+ declare function consumeCodexLogEntries(): CodexLogEntry[];
395
+ declare function subscribeToCodexLogEntries(listener: CodexLogListener): () => void;
396
+
373
397
  declare function createProvider(target: ResolvedTarget): Provider;
374
398
  declare function resolveAndCreateProvider(definition: TargetDefinition, env?: EnvLookup): Provider;
375
399
 
@@ -418,6 +442,10 @@ declare class LlmJudgeEvaluator implements Evaluator {
418
442
  private readonly customPrompt?;
419
443
  constructor(options: LlmJudgeEvaluatorOptions);
420
444
  evaluate(context: EvaluationContext): Promise<EvaluationScore>;
445
+ private evaluateWithAx;
446
+ private evaluateWithPrompt;
447
+ private buildJudgeForwardOptions;
448
+ private buildJudgeModelConfig;
421
449
  }
422
450
  interface CodeEvaluatorOptions {
423
451
  readonly script: string;
@@ -490,4 +518,4 @@ type AgentKernel = {
490
518
  };
491
519
  declare function createAgentKernel(): AgentKernel;
492
520
 
493
- 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, createAgentKernel, createProvider, ensureVSCodeSubagents, extractCodeBlocks, fileExists, findGitRoot, getHitCount, isEvaluatorKind, isGuidelineFile, isJsonObject, isJsonValue, isTestMessage, isTestMessageRole, listTargetNames, loadEvalCases, readTargetDefinitions, resolveAndCreateProvider, resolveFileReference, resolveTargetDefinition, runEvalCase, runEvaluation };
521
+ 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, readTargetDefinitions, readTextFile, resolveAndCreateProvider, resolveFileReference, resolveTargetDefinition, runEvalCase, runEvaluation, subscribeToCodexLogEntries };