agentv 5.3.1-next.1 → 5.3.2-next.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/README.md +52 -44
- package/dist/{artifact-writer-7NBCOAYC.js → artifact-writer-KJEOROKQ.js} +5 -5
- package/dist/{chunk-ELCJ23K4.js → chunk-6262OKXM.js} +2856 -2404
- package/dist/chunk-6262OKXM.js.map +1 -0
- package/dist/chunk-AQ5BIAXF.js +604 -0
- package/dist/chunk-AQ5BIAXF.js.map +1 -0
- package/dist/chunk-BV5VQLI2.js +2 -0
- package/dist/{chunk-LXBI3SPX.js → chunk-JGSRUJZQ.js} +46 -20
- package/dist/chunk-JGSRUJZQ.js.map +1 -0
- package/dist/chunk-MMDLXYBX.js +721 -0
- package/dist/chunk-MMDLXYBX.js.map +1 -0
- package/dist/{chunk-LKGARI3W.js → chunk-QSK3PC44.js} +812 -570
- package/dist/chunk-QSK3PC44.js.map +1 -0
- package/dist/chunk-TEEXVJWM.js +2 -0
- package/dist/{chunk-RKE7SSET.js → chunk-WIAJ7JAV.js} +186 -64
- package/dist/chunk-WIAJ7JAV.js.map +1 -0
- package/dist/cli.d.ts +1 -0
- package/dist/cli.js +17517 -10
- package/dist/cli.js.map +1 -1
- package/dist/config.d.ts +2 -0
- package/dist/config.js +14 -0
- package/dist/config.js.map +1 -0
- package/dist/contracts-DsZmZLl8.d.ts +742 -0
- package/dist/contracts.d.ts +2 -0
- package/dist/contracts.js +28 -0
- package/dist/contracts.js.map +1 -0
- package/dist/dashboard/assets/{index-CbEMiJSb.js → index-BfqOlLOF.js} +1 -1
- package/dist/dashboard/assets/index-Bh8lpGce.css +1 -0
- package/dist/dashboard/assets/index-oPR3ywQb.js +121 -0
- package/dist/dashboard/index.html +2 -2
- package/dist/{dist-NMXMI5SK.js → dist-A3SGR7TW.js} +16 -16
- package/dist/dist-A3SGR7TW.js.map +1 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +137 -18
- package/dist/{interactive-BN527UV3.js → interactive-DL7N2C7K.js} +24 -24
- package/dist/interactive-DL7N2C7K.js.map +1 -0
- package/dist/provider.d.ts +2 -0
- package/dist/provider.js +24 -0
- package/dist/provider.js.map +1 -0
- package/dist/sdk.d.ts +802 -0
- package/dist/sdk.js +145 -0
- package/dist/sdk.js.map +1 -0
- package/dist/skills/agentv-eval-migrations/references/breaking-changes.md +17 -18
- package/dist/skills/agentv-eval-writer/SKILL.md +27 -15
- package/dist/skills/agentv-eval-writer/references/custom-evaluators.md +5 -5
- package/dist/skills/agentv-eval-writer/references/eval.schema.json +5402 -4639
- package/dist/skills/agentv-eval-writer/references/python-helpers.md +2 -2
- package/dist/skills/agentv-eval-writer/references/rubric-evaluator.md +19 -2
- package/dist/templates/.agentv/providers.yaml +42 -0
- package/dist/templates/.env.example +2 -2
- package/dist/{ts-eval-loader-2RFVZHCT-7CZ3DCDD.js → ts-eval-loader-3G5GEAEC-6F52JLPP.js} +3 -3
- package/dist/ts-eval-loader-3G5GEAEC-6F52JLPP.js.map +1 -0
- package/package.json +29 -4
- package/dist/chunk-ASIGJIOJ.js +0 -17993
- package/dist/chunk-ASIGJIOJ.js.map +0 -1
- package/dist/chunk-ELCJ23K4.js.map +0 -1
- package/dist/chunk-LKGARI3W.js.map +0 -1
- package/dist/chunk-LXBI3SPX.js.map +0 -1
- package/dist/chunk-RKE7SSET.js.map +0 -1
- package/dist/dashboard/assets/index-DTA6-l7q.js +0 -121
- package/dist/dashboard/assets/index-D_bokML8.css +0 -1
- package/dist/interactive-BN527UV3.js.map +0 -1
- package/dist/templates/.agentv/targets.yaml +0 -97
- /package/dist/{artifact-writer-7NBCOAYC.js.map → artifact-writer-KJEOROKQ.js.map} +0 -0
- /package/dist/{dist-NMXMI5SK.js.map → chunk-BV5VQLI2.js.map} +0 -0
- /package/dist/{ts-eval-loader-2RFVZHCT-7CZ3DCDD.js.map → chunk-TEEXVJWM.js.map} +0 -0
|
@@ -0,0 +1,742 @@
|
|
|
1
|
+
import { d, m, P, e } from './ts-eval-loader-kf6J7wSc.js';
|
|
2
|
+
|
|
3
|
+
var __createBinding = (undefined && undefined.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
4
|
+
if (k2 === undefined) k2 = k;
|
|
5
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
6
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
7
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
8
|
+
}
|
|
9
|
+
Object.defineProperty(o, k2, desc);
|
|
10
|
+
}) : (function(o, m, k, k2) {
|
|
11
|
+
if (k2 === undefined) k2 = k;
|
|
12
|
+
o[k2] = m[k];
|
|
13
|
+
}));
|
|
14
|
+
var __exportStar = (undefined && undefined.__exportStar) || function(m, exports$1) {
|
|
15
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports$1, p)) __createBinding(exports$1, m, p);
|
|
16
|
+
};
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
__exportStar(require("./errors.cjs"), exports);
|
|
19
|
+
__exportStar(require("./helpers/parseUtil.cjs"), exports);
|
|
20
|
+
__exportStar(require("./helpers/typeAliases.cjs"), exports);
|
|
21
|
+
__exportStar(require("./helpers/util.cjs"), exports);
|
|
22
|
+
__exportStar(require("./types.cjs"), exports);
|
|
23
|
+
__exportStar(require("./ZodError.cjs"), exports);
|
|
24
|
+
|
|
25
|
+
declare namespace z {
|
|
26
|
+
export { };
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
type TargetRuntimeMode = 'host' | 'profile' | 'sandbox';
|
|
30
|
+
interface TargetRuntimeConfig {
|
|
31
|
+
readonly mode: TargetRuntimeMode;
|
|
32
|
+
readonly [key: string]: unknown;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* Strict normalized schema for CLI target configuration.
|
|
37
|
+
* This is the final validated shape after environment variable resolution
|
|
38
|
+
* and internal field normalization.
|
|
39
|
+
*
|
|
40
|
+
* Uses .strict() to reject unknown properties, ensuring configuration
|
|
41
|
+
* errors are caught early rather than silently ignored.
|
|
42
|
+
*
|
|
43
|
+
* @example
|
|
44
|
+
* ```typescript
|
|
45
|
+
* const config: CliNormalizedConfig = {
|
|
46
|
+
* command: 'agent run {PROMPT}',
|
|
47
|
+
* timeoutMs: 120000,
|
|
48
|
+
* verbose: true,
|
|
49
|
+
* };
|
|
50
|
+
* CliTargetConfigSchema.parse(config); // Validates the normalized config
|
|
51
|
+
* ```
|
|
52
|
+
*/
|
|
53
|
+
declare const CliTargetConfigSchema: undefined<{
|
|
54
|
+
command: undefined;
|
|
55
|
+
filesFormat: undefined<undefined>;
|
|
56
|
+
cwd: undefined<undefined>;
|
|
57
|
+
timeoutMs: undefined<undefined>;
|
|
58
|
+
healthcheck: undefined<undefined<[undefined<{
|
|
59
|
+
url: undefined;
|
|
60
|
+
timeoutMs: undefined<undefined>;
|
|
61
|
+
}, "strict", undefined, {
|
|
62
|
+
url: string;
|
|
63
|
+
timeoutMs?: number | undefined;
|
|
64
|
+
}, {
|
|
65
|
+
url: string;
|
|
66
|
+
timeoutMs?: number | undefined;
|
|
67
|
+
}>, undefined<{
|
|
68
|
+
command: undefined;
|
|
69
|
+
cwd: undefined<undefined>;
|
|
70
|
+
timeoutMs: undefined<undefined>;
|
|
71
|
+
}, "strict", undefined, {
|
|
72
|
+
command: string;
|
|
73
|
+
cwd?: string | undefined;
|
|
74
|
+
timeoutMs?: number | undefined;
|
|
75
|
+
}, {
|
|
76
|
+
command: string;
|
|
77
|
+
cwd?: string | undefined;
|
|
78
|
+
timeoutMs?: number | undefined;
|
|
79
|
+
}>]>>;
|
|
80
|
+
verbose: undefined<undefined>;
|
|
81
|
+
keepTempFiles: undefined<undefined>;
|
|
82
|
+
}, "strict", undefined, {
|
|
83
|
+
command: string;
|
|
84
|
+
cwd?: string | undefined;
|
|
85
|
+
timeoutMs?: number | undefined;
|
|
86
|
+
healthcheck?: {
|
|
87
|
+
url: string;
|
|
88
|
+
timeoutMs?: number | undefined;
|
|
89
|
+
} | {
|
|
90
|
+
command: string;
|
|
91
|
+
cwd?: string | undefined;
|
|
92
|
+
timeoutMs?: number | undefined;
|
|
93
|
+
} | undefined;
|
|
94
|
+
verbose?: boolean | undefined;
|
|
95
|
+
filesFormat?: string | undefined;
|
|
96
|
+
keepTempFiles?: boolean | undefined;
|
|
97
|
+
}, {
|
|
98
|
+
command: string;
|
|
99
|
+
cwd?: string | undefined;
|
|
100
|
+
timeoutMs?: number | undefined;
|
|
101
|
+
healthcheck?: {
|
|
102
|
+
url: string;
|
|
103
|
+
timeoutMs?: number | undefined;
|
|
104
|
+
} | {
|
|
105
|
+
command: string;
|
|
106
|
+
cwd?: string | undefined;
|
|
107
|
+
timeoutMs?: number | undefined;
|
|
108
|
+
} | undefined;
|
|
109
|
+
verbose?: boolean | undefined;
|
|
110
|
+
filesFormat?: string | undefined;
|
|
111
|
+
keepTempFiles?: boolean | undefined;
|
|
112
|
+
}>;
|
|
113
|
+
type CliNormalizedConfig = undefined<typeof CliTargetConfigSchema>;
|
|
114
|
+
/**
|
|
115
|
+
* Resolved CLI configuration type derived from CliTargetConfigSchema.
|
|
116
|
+
* This is the final validated shape used by the CLI provider at runtime.
|
|
117
|
+
* Using Readonly to ensure immutability for runtime safety.
|
|
118
|
+
*/
|
|
119
|
+
type CliResolvedConfig = Readonly<CliNormalizedConfig>;
|
|
120
|
+
interface RetryConfig {
|
|
121
|
+
readonly maxRetries?: number;
|
|
122
|
+
readonly initialDelayMs?: number;
|
|
123
|
+
readonly maxDelayMs?: number;
|
|
124
|
+
readonly backoffFactor?: number;
|
|
125
|
+
readonly retryableStatusCodes?: readonly number[];
|
|
126
|
+
}
|
|
127
|
+
/**
|
|
128
|
+
* Selects which OpenAI-compatible API endpoint to use.
|
|
129
|
+
* - "chat" (default): POST /chat/completions — universally supported by all OpenAI-compatible providers.
|
|
130
|
+
* - "responses": POST /responses — only supported by api.openai.com.
|
|
131
|
+
*
|
|
132
|
+
* Maps to Vercel AI SDK methods: "chat" → provider.chat(model), "responses" → provider(model).
|
|
133
|
+
*/
|
|
134
|
+
type ApiFormat = 'chat' | 'responses';
|
|
135
|
+
/**
|
|
136
|
+
* Azure OpenAI settings.
|
|
137
|
+
*
|
|
138
|
+
* Note: `api_format` was removed — AgentV always routes Azure targets through
|
|
139
|
+
* pi-ai's Responses API path. Chat-completions-only Azure deployments must
|
|
140
|
+
* use `provider: openai` with a deployment-scoped `base_url`.
|
|
141
|
+
*/
|
|
142
|
+
interface AzureResolvedConfig {
|
|
143
|
+
readonly resourceName: string;
|
|
144
|
+
readonly deploymentName: string;
|
|
145
|
+
readonly apiKey: string;
|
|
146
|
+
readonly version?: string;
|
|
147
|
+
readonly temperature?: number;
|
|
148
|
+
readonly maxOutputTokens?: number;
|
|
149
|
+
readonly retry?: RetryConfig;
|
|
150
|
+
}
|
|
151
|
+
/**
|
|
152
|
+
* OpenAI-compatible settings used by the Vercel AI SDK.
|
|
153
|
+
*/
|
|
154
|
+
interface OpenAIResolvedConfig {
|
|
155
|
+
readonly baseURL: string;
|
|
156
|
+
readonly apiKey: string;
|
|
157
|
+
readonly model: string;
|
|
158
|
+
readonly apiFormat?: ApiFormat;
|
|
159
|
+
readonly temperature?: number;
|
|
160
|
+
readonly maxOutputTokens?: number;
|
|
161
|
+
readonly retry?: RetryConfig;
|
|
162
|
+
}
|
|
163
|
+
/**
|
|
164
|
+
* OpenRouter settings used by the Vercel AI SDK provider.
|
|
165
|
+
*/
|
|
166
|
+
interface OpenRouterResolvedConfig {
|
|
167
|
+
readonly apiKey: string;
|
|
168
|
+
readonly model: string;
|
|
169
|
+
readonly temperature?: number;
|
|
170
|
+
readonly maxOutputTokens?: number;
|
|
171
|
+
readonly retry?: RetryConfig;
|
|
172
|
+
}
|
|
173
|
+
/**
|
|
174
|
+
* Anthropic Claude settings used by the Vercel AI SDK.
|
|
175
|
+
*/
|
|
176
|
+
interface AnthropicResolvedConfig {
|
|
177
|
+
readonly apiKey: string;
|
|
178
|
+
readonly model: string;
|
|
179
|
+
readonly temperature?: number;
|
|
180
|
+
readonly maxOutputTokens?: number;
|
|
181
|
+
readonly thinkingBudget?: number;
|
|
182
|
+
readonly retry?: RetryConfig;
|
|
183
|
+
}
|
|
184
|
+
/**
|
|
185
|
+
* Google Gemini settings used by the Vercel AI SDK.
|
|
186
|
+
*/
|
|
187
|
+
interface GeminiResolvedConfig {
|
|
188
|
+
readonly apiKey: string;
|
|
189
|
+
readonly model: string;
|
|
190
|
+
readonly temperature?: number;
|
|
191
|
+
readonly maxOutputTokens?: number;
|
|
192
|
+
readonly retry?: RetryConfig;
|
|
193
|
+
}
|
|
194
|
+
interface CodexResolvedConfig {
|
|
195
|
+
readonly model?: string;
|
|
196
|
+
readonly modelReasoningEffort?: CodexModelReasoningEffort;
|
|
197
|
+
readonly modelVerbosity?: CodexModelVerbosity;
|
|
198
|
+
readonly baseUrl?: string;
|
|
199
|
+
readonly apiKey?: string;
|
|
200
|
+
readonly apiFormat?: ApiFormat;
|
|
201
|
+
readonly sandboxMode?: CodexSandboxMode;
|
|
202
|
+
readonly approvalPolicy?: CodexApprovalPolicy;
|
|
203
|
+
readonly command?: readonly string[];
|
|
204
|
+
readonly runtime: CodingAgentRuntimeConfig;
|
|
205
|
+
readonly cwd?: string;
|
|
206
|
+
readonly timeoutMs?: number;
|
|
207
|
+
readonly logDir?: string;
|
|
208
|
+
/** New stream_log field. false=no stream log (default), 'raw'=per-event, 'summary'=consolidated. */
|
|
209
|
+
readonly streamLog?: false | 'raw' | 'summary';
|
|
210
|
+
readonly systemPrompt?: string;
|
|
211
|
+
}
|
|
212
|
+
type CodingAgentRuntimeMode = 'host' | 'profile' | 'sandbox';
|
|
213
|
+
interface CodingAgentRuntimeConfig {
|
|
214
|
+
readonly mode: CodingAgentRuntimeMode;
|
|
215
|
+
readonly home?: string;
|
|
216
|
+
readonly codexHome?: string;
|
|
217
|
+
readonly tmpDir?: string;
|
|
218
|
+
readonly env?: Readonly<Record<string, string>>;
|
|
219
|
+
readonly envAllowlist?: readonly string[];
|
|
220
|
+
}
|
|
221
|
+
interface CopilotCliResolvedConfig {
|
|
222
|
+
readonly command: readonly string[];
|
|
223
|
+
readonly executable: string;
|
|
224
|
+
readonly model?: string;
|
|
225
|
+
readonly args?: readonly string[];
|
|
226
|
+
readonly cwd?: string;
|
|
227
|
+
readonly timeoutMs?: number;
|
|
228
|
+
readonly logDir?: string;
|
|
229
|
+
readonly logFormat?: 'summary' | 'json';
|
|
230
|
+
/** New stream_log field. false=no stream log (default), 'raw'=per-event, 'summary'=consolidated. */
|
|
231
|
+
readonly streamLog?: false | 'raw' | 'summary';
|
|
232
|
+
readonly systemPrompt?: string;
|
|
233
|
+
readonly customProvider?: CopilotCustomProviderConfig;
|
|
234
|
+
}
|
|
235
|
+
interface CopilotCustomProviderConfig {
|
|
236
|
+
readonly type?: string;
|
|
237
|
+
readonly baseUrl: string;
|
|
238
|
+
readonly apiKey?: string;
|
|
239
|
+
readonly bearerToken?: string;
|
|
240
|
+
readonly apiVersion?: string;
|
|
241
|
+
readonly wireApi?: string;
|
|
242
|
+
readonly modelId?: string;
|
|
243
|
+
readonly wireModel?: string;
|
|
244
|
+
}
|
|
245
|
+
interface CopilotSdkResolvedConfig {
|
|
246
|
+
readonly cliUrl?: string;
|
|
247
|
+
readonly cliPath?: string;
|
|
248
|
+
readonly args?: readonly string[];
|
|
249
|
+
readonly githubToken?: string;
|
|
250
|
+
readonly model?: string;
|
|
251
|
+
readonly cwd?: string;
|
|
252
|
+
readonly timeoutMs?: number;
|
|
253
|
+
readonly logDir?: string;
|
|
254
|
+
readonly logFormat?: 'summary' | 'json';
|
|
255
|
+
/** New stream_log field. false=no stream log (default), 'raw'=per-event, 'summary'=consolidated. */
|
|
256
|
+
readonly streamLog?: false | 'raw' | 'summary';
|
|
257
|
+
readonly systemPrompt?: string;
|
|
258
|
+
readonly customProvider?: CopilotCustomProviderConfig;
|
|
259
|
+
}
|
|
260
|
+
interface PiCodingAgentResolvedConfig {
|
|
261
|
+
readonly subprovider?: string;
|
|
262
|
+
readonly model?: string;
|
|
263
|
+
readonly apiKey?: string;
|
|
264
|
+
readonly baseUrl?: string;
|
|
265
|
+
readonly tools?: string;
|
|
266
|
+
readonly thinking?: string;
|
|
267
|
+
readonly cwd?: string;
|
|
268
|
+
readonly timeoutMs?: number;
|
|
269
|
+
readonly logDir?: string;
|
|
270
|
+
readonly logFormat?: 'summary' | 'json';
|
|
271
|
+
/** New stream_log field. false=no stream log (default), 'raw'=per-event, 'summary'=consolidated. */
|
|
272
|
+
readonly streamLog?: false | 'raw' | 'summary';
|
|
273
|
+
readonly systemPrompt?: string;
|
|
274
|
+
}
|
|
275
|
+
interface PiCliResolvedConfig {
|
|
276
|
+
readonly command: readonly string[];
|
|
277
|
+
readonly executable: string;
|
|
278
|
+
readonly subprovider?: string;
|
|
279
|
+
readonly model?: string;
|
|
280
|
+
readonly apiKey?: string;
|
|
281
|
+
readonly baseUrl?: string;
|
|
282
|
+
readonly tools?: string;
|
|
283
|
+
readonly thinking?: string;
|
|
284
|
+
readonly cwd?: string;
|
|
285
|
+
readonly timeoutMs?: number;
|
|
286
|
+
readonly logDir?: string;
|
|
287
|
+
readonly logFormat?: 'summary' | 'json';
|
|
288
|
+
/** New stream_log field. false=no stream log (default), 'raw'=per-event, 'summary'=consolidated. */
|
|
289
|
+
readonly streamLog?: false | 'raw' | 'summary';
|
|
290
|
+
readonly systemPrompt?: string;
|
|
291
|
+
readonly runtime: PiRuntimeResolvedConfig;
|
|
292
|
+
}
|
|
293
|
+
interface PiRpcResolvedConfig {
|
|
294
|
+
readonly command: readonly string[];
|
|
295
|
+
readonly subprovider?: string;
|
|
296
|
+
readonly model?: string;
|
|
297
|
+
readonly apiKey?: string;
|
|
298
|
+
readonly baseUrl?: string;
|
|
299
|
+
readonly tools?: string;
|
|
300
|
+
readonly thinking?: string;
|
|
301
|
+
readonly cwd?: string;
|
|
302
|
+
readonly timeoutMs?: number;
|
|
303
|
+
readonly logDir?: string;
|
|
304
|
+
readonly logFormat?: 'summary' | 'json';
|
|
305
|
+
readonly streamLog?: false | 'raw' | 'summary';
|
|
306
|
+
readonly systemPrompt?: string;
|
|
307
|
+
readonly runtime: PiRuntimeResolvedConfig;
|
|
308
|
+
}
|
|
309
|
+
interface PiRuntimeResolvedConfig {
|
|
310
|
+
readonly mode: 'host' | 'profile' | 'sandbox';
|
|
311
|
+
readonly home?: string;
|
|
312
|
+
readonly env?: Readonly<Record<string, string>>;
|
|
313
|
+
readonly [key: string]: unknown;
|
|
314
|
+
}
|
|
315
|
+
interface ClaudeResolvedConfig {
|
|
316
|
+
readonly command: readonly string[];
|
|
317
|
+
readonly executable: string;
|
|
318
|
+
readonly model?: string;
|
|
319
|
+
readonly systemPrompt?: string;
|
|
320
|
+
readonly cwd?: string;
|
|
321
|
+
readonly timeoutMs?: number;
|
|
322
|
+
readonly maxTurns?: number;
|
|
323
|
+
readonly maxBudgetUsd?: number;
|
|
324
|
+
readonly logDir?: string;
|
|
325
|
+
readonly logFormat?: 'summary' | 'json';
|
|
326
|
+
/** New stream_log field. false=no stream log (default), 'raw'=per-event, 'summary'=consolidated. */
|
|
327
|
+
readonly streamLog?: false | 'raw' | 'summary';
|
|
328
|
+
/** When true (default), passes --dangerously-skip-permissions to the Claude CLI. Matches ClaudeSdkProvider behavior. */
|
|
329
|
+
readonly bypassPermissions?: boolean;
|
|
330
|
+
}
|
|
331
|
+
interface MockResolvedConfig {
|
|
332
|
+
readonly response?: string;
|
|
333
|
+
readonly delayMs?: number;
|
|
334
|
+
readonly delayMinMs?: number;
|
|
335
|
+
readonly delayMaxMs?: number;
|
|
336
|
+
}
|
|
337
|
+
interface VSCodeResolvedConfig {
|
|
338
|
+
readonly executable: string;
|
|
339
|
+
readonly waitForResponse: boolean;
|
|
340
|
+
readonly dryRun: boolean;
|
|
341
|
+
readonly subagentRoot?: string;
|
|
342
|
+
readonly timeoutMs?: number;
|
|
343
|
+
}
|
|
344
|
+
interface AgentVResolvedConfig {
|
|
345
|
+
readonly model: string;
|
|
346
|
+
readonly temperature: number;
|
|
347
|
+
}
|
|
348
|
+
interface ReplayResolvedConfig {
|
|
349
|
+
readonly source?: ReplayResolvedSource;
|
|
350
|
+
readonly fixturesPath?: string;
|
|
351
|
+
readonly transcriptsPath?: string;
|
|
352
|
+
readonly sourceTarget: string;
|
|
353
|
+
readonly suite?: string;
|
|
354
|
+
readonly evalPath?: string;
|
|
355
|
+
readonly variant?: string;
|
|
356
|
+
}
|
|
357
|
+
type ReplayResolvedSource = {
|
|
358
|
+
readonly kind: 'fixtures';
|
|
359
|
+
readonly path: string;
|
|
360
|
+
} | {
|
|
361
|
+
readonly kind: 'execution_traces';
|
|
362
|
+
readonly path: string;
|
|
363
|
+
} | {
|
|
364
|
+
readonly kind: 'transcripts';
|
|
365
|
+
readonly path: string;
|
|
366
|
+
};
|
|
367
|
+
type CodexModelReasoningEffort = 'minimal' | 'low' | 'medium' | 'high' | 'xhigh';
|
|
368
|
+
type CodexModelVerbosity = 'low' | 'medium' | 'high';
|
|
369
|
+
type CodexSandboxMode = 'read-only' | 'workspace-write' | 'danger-full-access';
|
|
370
|
+
type CodexApprovalPolicy = 'never' | 'on-request' | 'on-failure' | 'untrusted';
|
|
371
|
+
declare function resolveProviderDefinitionEnvironments(definitions: readonly P[], baseDir: string, options?: {
|
|
372
|
+
readonly location?: string;
|
|
373
|
+
}): Promise<readonly P[]>;
|
|
374
|
+
/** Base fields shared by all resolved provider backends. */
|
|
375
|
+
interface ResolvedProviderBackendBase {
|
|
376
|
+
readonly name: string;
|
|
377
|
+
readonly label?: string;
|
|
378
|
+
readonly runtime?: TargetRuntimeConfig;
|
|
379
|
+
readonly environment?: d;
|
|
380
|
+
readonly graderTarget?: string;
|
|
381
|
+
readonly workers?: number;
|
|
382
|
+
/**
|
|
383
|
+
* Whether this target can be executed via executor subagents in subagent mode.
|
|
384
|
+
* Defaults to `true` for all non-CLI providers. Set `false` in targets.yaml
|
|
385
|
+
* to force CLI invocation even in subagent mode.
|
|
386
|
+
*/
|
|
387
|
+
readonly subagentModeAllowed?: boolean;
|
|
388
|
+
/**
|
|
389
|
+
* Ordered list of target names to try when the primary target fails after
|
|
390
|
+
* exhausting retries. Each fallback is attempted in order.
|
|
391
|
+
*/
|
|
392
|
+
readonly fallbackTargets?: readonly string[];
|
|
393
|
+
}
|
|
394
|
+
type ResolvedProviderBackend = (ResolvedProviderBackendBase & {
|
|
395
|
+
readonly kind: 'openai';
|
|
396
|
+
readonly config: OpenAIResolvedConfig;
|
|
397
|
+
}) | (ResolvedProviderBackendBase & {
|
|
398
|
+
readonly kind: 'openrouter';
|
|
399
|
+
readonly config: OpenRouterResolvedConfig;
|
|
400
|
+
}) | (ResolvedProviderBackendBase & {
|
|
401
|
+
readonly kind: 'azure';
|
|
402
|
+
readonly config: AzureResolvedConfig;
|
|
403
|
+
}) | (ResolvedProviderBackendBase & {
|
|
404
|
+
readonly kind: 'anthropic';
|
|
405
|
+
readonly config: AnthropicResolvedConfig;
|
|
406
|
+
}) | (ResolvedProviderBackendBase & {
|
|
407
|
+
readonly kind: 'gemini';
|
|
408
|
+
readonly config: GeminiResolvedConfig;
|
|
409
|
+
}) | (ResolvedProviderBackendBase & {
|
|
410
|
+
readonly kind: 'codex-cli' | 'codex-app-server' | 'codex-sdk';
|
|
411
|
+
readonly config: CodexResolvedConfig;
|
|
412
|
+
}) | (ResolvedProviderBackendBase & {
|
|
413
|
+
readonly kind: 'copilot-sdk';
|
|
414
|
+
readonly config: CopilotSdkResolvedConfig;
|
|
415
|
+
}) | (ResolvedProviderBackendBase & {
|
|
416
|
+
readonly kind: 'copilot-cli';
|
|
417
|
+
readonly config: CopilotCliResolvedConfig;
|
|
418
|
+
}) | (ResolvedProviderBackendBase & {
|
|
419
|
+
readonly kind: 'pi-sdk' | 'pi-coding-agent';
|
|
420
|
+
readonly config: PiCodingAgentResolvedConfig;
|
|
421
|
+
}) | (ResolvedProviderBackendBase & {
|
|
422
|
+
readonly kind: 'pi-cli';
|
|
423
|
+
readonly config: PiCliResolvedConfig;
|
|
424
|
+
}) | (ResolvedProviderBackendBase & {
|
|
425
|
+
readonly kind: 'pi-rpc';
|
|
426
|
+
readonly config: PiRpcResolvedConfig;
|
|
427
|
+
}) | (ResolvedProviderBackendBase & {
|
|
428
|
+
readonly kind: 'claude-cli';
|
|
429
|
+
readonly config: ClaudeResolvedConfig;
|
|
430
|
+
}) | (ResolvedProviderBackendBase & {
|
|
431
|
+
readonly kind: 'claude-sdk';
|
|
432
|
+
readonly config: ClaudeResolvedConfig;
|
|
433
|
+
}) | (ResolvedProviderBackendBase & {
|
|
434
|
+
readonly kind: 'mock';
|
|
435
|
+
readonly config: MockResolvedConfig;
|
|
436
|
+
}) | (ResolvedProviderBackendBase & {
|
|
437
|
+
readonly kind: 'vscode' | 'vscode-insiders';
|
|
438
|
+
readonly config: VSCodeResolvedConfig;
|
|
439
|
+
}) | (ResolvedProviderBackendBase & {
|
|
440
|
+
readonly kind: 'agentv';
|
|
441
|
+
readonly config: AgentVResolvedConfig;
|
|
442
|
+
}) | (ResolvedProviderBackendBase & {
|
|
443
|
+
readonly kind: 'cli';
|
|
444
|
+
readonly config: CliResolvedConfig;
|
|
445
|
+
}) | (ResolvedProviderBackendBase & {
|
|
446
|
+
readonly kind: 'transcript';
|
|
447
|
+
readonly config: Record<string, never>;
|
|
448
|
+
}) | (ResolvedProviderBackendBase & {
|
|
449
|
+
readonly kind: 'replay';
|
|
450
|
+
readonly config: ReplayResolvedConfig;
|
|
451
|
+
});
|
|
452
|
+
declare function resolveDelegatedProviderDefinition(name: string, definitions: ReadonlyMap<string, P>, env?: e): P | undefined;
|
|
453
|
+
declare function resolveProviderDefinition(definition: P, env?: e, evalFilePath?: string, options?: {
|
|
454
|
+
readonly emitDeprecationWarnings?: boolean;
|
|
455
|
+
}): ResolvedProviderBackend;
|
|
456
|
+
|
|
457
|
+
/**
|
|
458
|
+
* Extensible provider registry.
|
|
459
|
+
*
|
|
460
|
+
* Replaces the hardcoded switch/case dispatch in createProvider() with
|
|
461
|
+
* a registry of named factory functions. Built-in providers are registered
|
|
462
|
+
* at startup; users can add custom providers via the registry API or by
|
|
463
|
+
* dropping files in `.agentv/providers/`.
|
|
464
|
+
*/
|
|
465
|
+
|
|
466
|
+
/**
|
|
467
|
+
* Factory function that creates a Provider instance from a resolved target.
|
|
468
|
+
*/
|
|
469
|
+
type ProviderFactoryFn = (target: ResolvedProviderBackend) => m;
|
|
470
|
+
/**
|
|
471
|
+
* Registry of provider factory functions keyed by provider kind.
|
|
472
|
+
*
|
|
473
|
+
* Built-in providers are registered at startup. Custom providers can be
|
|
474
|
+
* registered via the `register()` method.
|
|
475
|
+
*/
|
|
476
|
+
declare class ProviderRegistry {
|
|
477
|
+
private readonly factories;
|
|
478
|
+
/** Register a factory function for a provider kind. */
|
|
479
|
+
register(kind: string, factory: ProviderFactoryFn): this;
|
|
480
|
+
/** Get the factory function for a provider kind. */
|
|
481
|
+
get(kind: string): ProviderFactoryFn | undefined;
|
|
482
|
+
/** Check if a factory is registered for the given kind. */
|
|
483
|
+
has(kind: string): boolean;
|
|
484
|
+
/** List all registered provider kind names. */
|
|
485
|
+
list(): string[];
|
|
486
|
+
/**
|
|
487
|
+
* Create a provider instance from a resolved target.
|
|
488
|
+
* Falls back to CLI provider for unknown kinds (custom provider escape hatch).
|
|
489
|
+
*/
|
|
490
|
+
create(target: ResolvedProviderBackend): m;
|
|
491
|
+
}
|
|
492
|
+
|
|
493
|
+
/**
|
|
494
|
+
* Create and return the default provider registry with all built-in providers.
|
|
495
|
+
*/
|
|
496
|
+
declare function createBuiltinProviderRegistry(): ProviderRegistry;
|
|
497
|
+
/**
|
|
498
|
+
* Create a provider from a resolved target using the default registry.
|
|
499
|
+
* Custom providers can be registered via `createBuiltinProviderRegistry().register()`.
|
|
500
|
+
*/
|
|
501
|
+
declare function createProvider(target: ResolvedProviderBackend): m;
|
|
502
|
+
declare function resolveAndCreateProvider(definition: P, env?: e): m;
|
|
503
|
+
|
|
504
|
+
/**
|
|
505
|
+
* Typed configuration file support for AgentV.
|
|
506
|
+
*
|
|
507
|
+
* Provides `defineConfig()` for use in `agentv.config.ts` files. Supports
|
|
508
|
+
* auto-discovery, Zod validation, and IDE autocomplete.
|
|
509
|
+
*
|
|
510
|
+
* @example
|
|
511
|
+
* ```typescript
|
|
512
|
+
* // agentv.config.ts
|
|
513
|
+
* import { defineConfig } from 'agentv';
|
|
514
|
+
*
|
|
515
|
+
* export default defineConfig({
|
|
516
|
+
* execution: {
|
|
517
|
+
* maxConcurrency: 5,
|
|
518
|
+
* maxRetries: 2,
|
|
519
|
+
* agentTimeoutMs: 120_000,
|
|
520
|
+
* },
|
|
521
|
+
* output: {
|
|
522
|
+
* dir: './results',
|
|
523
|
+
* },
|
|
524
|
+
* });
|
|
525
|
+
* ```
|
|
526
|
+
*
|
|
527
|
+
* @module
|
|
528
|
+
*/
|
|
529
|
+
|
|
530
|
+
/**
|
|
531
|
+
* Schema for AgentV project-level configuration.
|
|
532
|
+
*/
|
|
533
|
+
declare const AgentVConfigSchema: undefined<{
|
|
534
|
+
/** Default execution settings */
|
|
535
|
+
execution: undefined<undefined<undefined<undefined<{
|
|
536
|
+
/** General eval parallelism (default: 3) */
|
|
537
|
+
maxConcurrency: undefined<undefined>;
|
|
538
|
+
/** Maximum retries on failure (default: 2) */
|
|
539
|
+
maxRetries: undefined<undefined>;
|
|
540
|
+
/** Agent timeout in milliseconds. No timeout if not set. */
|
|
541
|
+
agentTimeoutMs: undefined<undefined>;
|
|
542
|
+
/** Enable verbose logging */
|
|
543
|
+
verbose: undefined<undefined>;
|
|
544
|
+
/** Always keep temp workspaces after eval */
|
|
545
|
+
keepWorkspaces: undefined<undefined>;
|
|
546
|
+
}, "passthrough", undefined, undefined<{
|
|
547
|
+
/** General eval parallelism (default: 3) */
|
|
548
|
+
maxConcurrency: undefined<undefined>;
|
|
549
|
+
/** Maximum retries on failure (default: 2) */
|
|
550
|
+
maxRetries: undefined<undefined>;
|
|
551
|
+
/** Agent timeout in milliseconds. No timeout if not set. */
|
|
552
|
+
agentTimeoutMs: undefined<undefined>;
|
|
553
|
+
/** Enable verbose logging */
|
|
554
|
+
verbose: undefined<undefined>;
|
|
555
|
+
/** Always keep temp workspaces after eval */
|
|
556
|
+
keepWorkspaces: undefined<undefined>;
|
|
557
|
+
}, undefined, "passthrough">, undefined<{
|
|
558
|
+
/** General eval parallelism (default: 3) */
|
|
559
|
+
maxConcurrency: undefined<undefined>;
|
|
560
|
+
/** Maximum retries on failure (default: 2) */
|
|
561
|
+
maxRetries: undefined<undefined>;
|
|
562
|
+
/** Agent timeout in milliseconds. No timeout if not set. */
|
|
563
|
+
agentTimeoutMs: undefined<undefined>;
|
|
564
|
+
/** Enable verbose logging */
|
|
565
|
+
verbose: undefined<undefined>;
|
|
566
|
+
/** Always keep temp workspaces after eval */
|
|
567
|
+
keepWorkspaces: undefined<undefined>;
|
|
568
|
+
}, undefined, "passthrough">>, undefined<{
|
|
569
|
+
/** General eval parallelism (default: 3) */
|
|
570
|
+
maxConcurrency: undefined<undefined>;
|
|
571
|
+
/** Maximum retries on failure (default: 2) */
|
|
572
|
+
maxRetries: undefined<undefined>;
|
|
573
|
+
/** Agent timeout in milliseconds. No timeout if not set. */
|
|
574
|
+
agentTimeoutMs: undefined<undefined>;
|
|
575
|
+
/** Enable verbose logging */
|
|
576
|
+
verbose: undefined<undefined>;
|
|
577
|
+
/** Always keep temp workspaces after eval */
|
|
578
|
+
keepWorkspaces: undefined<undefined>;
|
|
579
|
+
}, undefined, "passthrough">, undefined<{
|
|
580
|
+
/** General eval parallelism (default: 3) */
|
|
581
|
+
maxConcurrency: undefined<undefined>;
|
|
582
|
+
/** Maximum retries on failure (default: 2) */
|
|
583
|
+
maxRetries: undefined<undefined>;
|
|
584
|
+
/** Agent timeout in milliseconds. No timeout if not set. */
|
|
585
|
+
agentTimeoutMs: undefined<undefined>;
|
|
586
|
+
/** Enable verbose logging */
|
|
587
|
+
verbose: undefined<undefined>;
|
|
588
|
+
/** Always keep temp workspaces after eval */
|
|
589
|
+
keepWorkspaces: undefined<undefined>;
|
|
590
|
+
}, undefined, "passthrough">>, {
|
|
591
|
+
keepWorkspaces?: boolean | undefined;
|
|
592
|
+
verbose?: boolean | undefined;
|
|
593
|
+
agentTimeoutMs?: number | undefined;
|
|
594
|
+
maxRetries?: number | undefined;
|
|
595
|
+
maxConcurrency?: number | undefined;
|
|
596
|
+
}, undefined<{
|
|
597
|
+
/** General eval parallelism (default: 3) */
|
|
598
|
+
maxConcurrency: undefined<undefined>;
|
|
599
|
+
/** Maximum retries on failure (default: 2) */
|
|
600
|
+
maxRetries: undefined<undefined>;
|
|
601
|
+
/** Agent timeout in milliseconds. No timeout if not set. */
|
|
602
|
+
agentTimeoutMs: undefined<undefined>;
|
|
603
|
+
/** Enable verbose logging */
|
|
604
|
+
verbose: undefined<undefined>;
|
|
605
|
+
/** Always keep temp workspaces after eval */
|
|
606
|
+
keepWorkspaces: undefined<undefined>;
|
|
607
|
+
}, undefined, "passthrough">>>;
|
|
608
|
+
/** Output settings */
|
|
609
|
+
output: undefined<undefined<{
|
|
610
|
+
/** Default eval run artifact directory */
|
|
611
|
+
dir: undefined<undefined>;
|
|
612
|
+
}, "strict", undefined, {
|
|
613
|
+
dir?: string | undefined;
|
|
614
|
+
}, {
|
|
615
|
+
dir?: string | undefined;
|
|
616
|
+
}>>;
|
|
617
|
+
/** Response caching */
|
|
618
|
+
cache: undefined<undefined<{
|
|
619
|
+
/** Enable response caching */
|
|
620
|
+
enabled: undefined<undefined>;
|
|
621
|
+
/** Response cache directory */
|
|
622
|
+
path: undefined<undefined>;
|
|
623
|
+
}, "strip", undefined, {
|
|
624
|
+
path?: string | undefined;
|
|
625
|
+
enabled?: boolean | undefined;
|
|
626
|
+
}, {
|
|
627
|
+
path?: string | undefined;
|
|
628
|
+
enabled?: boolean | undefined;
|
|
629
|
+
}>>;
|
|
630
|
+
/** Cost and duration limits */
|
|
631
|
+
limits: undefined<undefined<{
|
|
632
|
+
/** Maximum cost per run in USD */
|
|
633
|
+
maxCostUsd: undefined<undefined>;
|
|
634
|
+
/** Maximum duration per run in milliseconds */
|
|
635
|
+
maxDurationMs: undefined<undefined>;
|
|
636
|
+
}, "strip", undefined, {
|
|
637
|
+
maxDurationMs?: number | undefined;
|
|
638
|
+
maxCostUsd?: number | undefined;
|
|
639
|
+
}, {
|
|
640
|
+
maxDurationMs?: number | undefined;
|
|
641
|
+
maxCostUsd?: number | undefined;
|
|
642
|
+
}>>;
|
|
643
|
+
/** Lifecycle hooks */
|
|
644
|
+
hooks: undefined<undefined<{
|
|
645
|
+
/**
|
|
646
|
+
* Shell command to run once at agentv startup, before any command executes.
|
|
647
|
+
* stdout is parsed for env var exports (`KEY=value` or `export KEY="value"`)
|
|
648
|
+
* and injected into process.env. Keys already set in the environment are
|
|
649
|
+
* not overwritten — existing env always takes priority.
|
|
650
|
+
* stderr is forwarded to the user. Non-zero exit aborts with an error.
|
|
651
|
+
*/
|
|
652
|
+
beforeSession: undefined<undefined>;
|
|
653
|
+
}, "strip", undefined, {
|
|
654
|
+
beforeSession?: string | undefined;
|
|
655
|
+
}, {
|
|
656
|
+
beforeSession?: string | undefined;
|
|
657
|
+
}>>;
|
|
658
|
+
/** Project-local reusable references for fields that support ref://name */
|
|
659
|
+
refs: undefined<undefined<undefined, undefined>>;
|
|
660
|
+
}, "strip", undefined, {
|
|
661
|
+
output?: {
|
|
662
|
+
dir?: string | undefined;
|
|
663
|
+
} | undefined;
|
|
664
|
+
execution?: {
|
|
665
|
+
keepWorkspaces?: boolean | undefined;
|
|
666
|
+
verbose?: boolean | undefined;
|
|
667
|
+
agentTimeoutMs?: number | undefined;
|
|
668
|
+
maxRetries?: number | undefined;
|
|
669
|
+
maxConcurrency?: number | undefined;
|
|
670
|
+
} | undefined;
|
|
671
|
+
hooks?: {
|
|
672
|
+
beforeSession?: string | undefined;
|
|
673
|
+
} | undefined;
|
|
674
|
+
refs?: Record<string, string> | undefined;
|
|
675
|
+
cache?: {
|
|
676
|
+
path?: string | undefined;
|
|
677
|
+
enabled?: boolean | undefined;
|
|
678
|
+
} | undefined;
|
|
679
|
+
limits?: {
|
|
680
|
+
maxDurationMs?: number | undefined;
|
|
681
|
+
maxCostUsd?: number | undefined;
|
|
682
|
+
} | undefined;
|
|
683
|
+
}, {
|
|
684
|
+
output?: {
|
|
685
|
+
dir?: string | undefined;
|
|
686
|
+
} | undefined;
|
|
687
|
+
execution?: undefined<{
|
|
688
|
+
/** General eval parallelism (default: 3) */
|
|
689
|
+
maxConcurrency: undefined<undefined>;
|
|
690
|
+
/** Maximum retries on failure (default: 2) */
|
|
691
|
+
maxRetries: undefined<undefined>;
|
|
692
|
+
/** Agent timeout in milliseconds. No timeout if not set. */
|
|
693
|
+
agentTimeoutMs: undefined<undefined>;
|
|
694
|
+
/** Enable verbose logging */
|
|
695
|
+
verbose: undefined<undefined>;
|
|
696
|
+
/** Always keep temp workspaces after eval */
|
|
697
|
+
keepWorkspaces: undefined<undefined>;
|
|
698
|
+
}, undefined, "passthrough"> | undefined;
|
|
699
|
+
hooks?: {
|
|
700
|
+
beforeSession?: string | undefined;
|
|
701
|
+
} | undefined;
|
|
702
|
+
refs?: Record<string, string> | undefined;
|
|
703
|
+
cache?: {
|
|
704
|
+
path?: string | undefined;
|
|
705
|
+
enabled?: boolean | undefined;
|
|
706
|
+
} | undefined;
|
|
707
|
+
limits?: {
|
|
708
|
+
maxDurationMs?: number | undefined;
|
|
709
|
+
maxCostUsd?: number | undefined;
|
|
710
|
+
} | undefined;
|
|
711
|
+
}>;
|
|
712
|
+
/**
|
|
713
|
+
* AgentV project-level configuration type.
|
|
714
|
+
* Inferred from the Zod schema for full type safety.
|
|
715
|
+
*/
|
|
716
|
+
type AgentVConfig = undefined<typeof AgentVConfigSchema>;
|
|
717
|
+
/**
|
|
718
|
+
* Define a typed AgentV configuration.
|
|
719
|
+
*
|
|
720
|
+
* Use this in `agentv.config.ts` at your project root. The configuration
|
|
721
|
+
* is validated at load time and provides full IDE autocomplete.
|
|
722
|
+
*
|
|
723
|
+
* @param config - Configuration object
|
|
724
|
+
* @returns Validated configuration
|
|
725
|
+
*
|
|
726
|
+
* @example
|
|
727
|
+
* ```typescript
|
|
728
|
+
* import { defineConfig } from 'agentv';
|
|
729
|
+
*
|
|
730
|
+
* export default defineConfig({
|
|
731
|
+
* execution: { maxConcurrency: 5 },
|
|
732
|
+
* output: { dir: './results' },
|
|
733
|
+
* limits: { maxCostUsd: 10.0 },
|
|
734
|
+
* });
|
|
735
|
+
* ```
|
|
736
|
+
*/
|
|
737
|
+
declare function defineConfig(config: AgentVConfig): AgentVConfig;
|
|
738
|
+
type TraceSummaryWire = Record<string, unknown>;
|
|
739
|
+
type TraceWire = Record<string, unknown>;
|
|
740
|
+
type EvaluationResultWire = Record<string, unknown>;
|
|
741
|
+
|
|
742
|
+
export { type AgentVConfig as A, type EvaluationResultWire as E, type ProviderFactoryFn as P, type ResolvedProviderBackend as R, type TraceSummaryWire as T, createProvider as a, resolveDelegatedProviderDefinition as b, createBuiltinProviderRegistry as c, defineConfig as d, resolveProviderDefinition as e, resolveProviderDefinitionEnvironments as f, type TraceWire as g, resolveAndCreateProvider as r, z };
|