@vercel/agent-eval 0.0.9 → 0.0.12

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.
Files changed (53) hide show
  1. package/dist/cli.js +69 -13
  2. package/dist/cli.js.map +1 -1
  3. package/dist/index.d.ts +2 -0
  4. package/dist/index.d.ts.map +1 -1
  5. package/dist/index.js +1 -0
  6. package/dist/index.js.map +1 -1
  7. package/dist/lib/agents/index.d.ts.map +1 -1
  8. package/dist/lib/agents/index.js +0 -2
  9. package/dist/lib/agents/index.js.map +1 -1
  10. package/dist/lib/config.d.ts.map +1 -1
  11. package/dist/lib/config.js +3 -1
  12. package/dist/lib/config.js.map +1 -1
  13. package/dist/lib/o11y/index.d.ts +11 -0
  14. package/dist/lib/o11y/index.d.ts.map +1 -0
  15. package/dist/lib/o11y/index.js +11 -0
  16. package/dist/lib/o11y/index.js.map +1 -0
  17. package/dist/lib/o11y/parsers/claude-code.d.ts +18 -0
  18. package/dist/lib/o11y/parsers/claude-code.d.ts.map +1 -0
  19. package/dist/lib/o11y/parsers/claude-code.js +343 -0
  20. package/dist/lib/o11y/parsers/claude-code.js.map +1 -0
  21. package/dist/lib/o11y/parsers/codex.d.ts +17 -0
  22. package/dist/lib/o11y/parsers/codex.d.ts.map +1 -0
  23. package/dist/lib/o11y/parsers/codex.js +296 -0
  24. package/dist/lib/o11y/parsers/codex.js.map +1 -0
  25. package/dist/lib/o11y/parsers/index.d.ts +51 -0
  26. package/dist/lib/o11y/parsers/index.d.ts.map +1 -0
  27. package/dist/lib/o11y/parsers/index.js +280 -0
  28. package/dist/lib/o11y/parsers/index.js.map +1 -0
  29. package/dist/lib/o11y/parsers/opencode.d.ts +17 -0
  30. package/dist/lib/o11y/parsers/opencode.d.ts.map +1 -0
  31. package/dist/lib/o11y/parsers/opencode.js +313 -0
  32. package/dist/lib/o11y/parsers/opencode.js.map +1 -0
  33. package/dist/lib/o11y/types.d.ts +113 -0
  34. package/dist/lib/o11y/types.d.ts.map +1 -0
  35. package/dist/lib/o11y/types.js +6 -0
  36. package/dist/lib/o11y/types.js.map +1 -0
  37. package/dist/lib/results.d.ts +2 -1
  38. package/dist/lib/results.d.ts.map +1 -1
  39. package/dist/lib/results.js +23 -7
  40. package/dist/lib/results.js.map +1 -1
  41. package/dist/lib/runner.d.ts +6 -5
  42. package/dist/lib/runner.d.ts.map +1 -1
  43. package/dist/lib/runner.js +21 -11
  44. package/dist/lib/runner.js.map +1 -1
  45. package/dist/lib/types.d.ts +25 -3
  46. package/dist/lib/types.d.ts.map +1 -1
  47. package/dist/lib/types.js.map +1 -1
  48. package/package.json +5 -3
  49. package/README.md +0 -474
  50. package/dist/lib/agents/ai-sdk-agent.d.ts +0 -10
  51. package/dist/lib/agents/ai-sdk-agent.d.ts.map +0 -1
  52. package/dist/lib/agents/ai-sdk-agent.js +0 -427
  53. package/dist/lib/agents/ai-sdk-agent.js.map +0 -1
@@ -1,427 +0,0 @@
1
- /**
2
- * AI SDK Agent - A simple coding agent using the Vercel AI SDK.
3
- * Works with any model available on Vercel AI Gateway.
4
- */
5
- import { createSandbox, collectLocalFiles, splitTestFiles, verifyNoTestFiles, } from '../sandbox.js';
6
- import { runValidation, captureGeneratedFiles, createVitestConfig, AI_GATEWAY, } from './shared.js';
7
- /**
8
- * The CLI script source code that runs inside the sandbox.
9
- * This is a self-contained script that uses the AI SDK.
10
- */
11
- const CLI_SCRIPT = `
12
- import { generateText, tool, stepCountIs } from 'ai';
13
- import { createGateway } from '@ai-sdk/gateway';
14
- import { z } from 'zod';
15
- import { readFileSync, writeFileSync, readdirSync, existsSync, statSync } from 'fs';
16
- import { execSync } from 'child_process';
17
- import { join, dirname } from 'path';
18
- import { mkdirSync } from 'fs';
19
-
20
- // Parse command line arguments
21
- const args = process.argv.slice(2);
22
- let prompt = '';
23
- let model = '';
24
-
25
- for (let i = 0; i < args.length; i++) {
26
- if (args[i] === '--prompt' && args[i + 1]) {
27
- prompt = args[++i];
28
- } else if (args[i] === '--model' && args[i + 1]) {
29
- model = args[++i];
30
- }
31
- }
32
-
33
- if (!prompt || !model) {
34
- console.error('Usage: ai-sdk-agent --prompt "..." --model "provider/model"');
35
- process.exit(1);
36
- }
37
-
38
- // Create AI Gateway client
39
- const gateway = createGateway({
40
- apiKey: process.env.AI_GATEWAY_API_KEY,
41
- });
42
-
43
- // Transcript events
44
- const events = [];
45
-
46
- function logEvent(type, data) {
47
- const event = { type, timestamp: Date.now(), ...data };
48
- events.push(event);
49
- console.log(JSON.stringify(event));
50
- }
51
-
52
- // Define coding tools
53
- const tools = {
54
- readFile: tool({
55
- description: 'Read the contents of a file at the given path',
56
- inputSchema: z.object({
57
- path: z.string().describe('The file path to read'),
58
- }),
59
- execute: async ({ path }) => {
60
- try {
61
- const content = readFileSync(path, 'utf-8');
62
- logEvent('tool_result', { tool: 'readFile', path, success: true });
63
- return content;
64
- } catch (error) {
65
- logEvent('tool_result', { tool: 'readFile', path, success: false, error: error.message });
66
- return \`Error reading file: \${error.message}\`;
67
- }
68
- },
69
- }),
70
-
71
- writeFile: tool({
72
- description: 'Write content to a file at the given path. Creates directories if needed.',
73
- inputSchema: z.object({
74
- path: z.string().describe('The file path to write'),
75
- content: z.string().describe('The content to write'),
76
- }),
77
- execute: async ({ path, content }) => {
78
- try {
79
- const dir = dirname(path);
80
- if (dir && dir !== '.') {
81
- mkdirSync(dir, { recursive: true });
82
- }
83
- writeFileSync(path, content);
84
- logEvent('tool_result', { tool: 'writeFile', path, success: true });
85
- return 'File written successfully';
86
- } catch (error) {
87
- logEvent('tool_result', { tool: 'writeFile', path, success: false, error: error.message });
88
- return \`Error writing file: \${error.message}\`;
89
- }
90
- },
91
- }),
92
-
93
- editFile: tool({
94
- description: 'Edit a file by replacing a specific string with new content',
95
- inputSchema: z.object({
96
- path: z.string().describe('The file path to edit'),
97
- oldString: z.string().describe('The exact string to find and replace'),
98
- newString: z.string().describe('The replacement string'),
99
- }),
100
- execute: async ({ path, oldString, newString }) => {
101
- try {
102
- const content = readFileSync(path, 'utf-8');
103
- if (!content.includes(oldString)) {
104
- logEvent('tool_result', { tool: 'editFile', path, success: false, error: 'String not found' });
105
- return 'Error: The specified string was not found in the file';
106
- }
107
- const newContent = content.replace(oldString, newString);
108
- writeFileSync(path, newContent);
109
- logEvent('tool_result', { tool: 'editFile', path, success: true });
110
- return 'File edited successfully';
111
- } catch (error) {
112
- logEvent('tool_result', { tool: 'editFile', path, success: false, error: error.message });
113
- return \`Error editing file: \${error.message}\`;
114
- }
115
- },
116
- }),
117
-
118
- listFiles: tool({
119
- description: 'List files in a directory. Call with path="." to list current directory.',
120
- inputSchema: z.object({
121
- path: z.string().describe('The directory path to list (use "." for current directory)'),
122
- recursive: z.boolean().describe('Whether to list recursively').optional(),
123
- }),
124
- execute: async ({ path, recursive }) => {
125
- const targetPath = path || '.';
126
- const isRecursive = recursive || false;
127
- try {
128
- if (isRecursive) {
129
- const result = execSync(\`find \${targetPath} -type f | head -100\`, { encoding: 'utf-8' });
130
- logEvent('tool_result', { tool: 'listFiles', path: targetPath, recursive: isRecursive, success: true });
131
- return result;
132
- }
133
- const files = readdirSync(targetPath);
134
- logEvent('tool_result', { tool: 'listFiles', path: targetPath, recursive: isRecursive, success: true });
135
- return files.join('\\n');
136
- } catch (error) {
137
- logEvent('tool_result', { tool: 'listFiles', path: targetPath, success: false, error: error.message });
138
- return \`Error listing files: \${error.message}\`;
139
- }
140
- },
141
- }),
142
-
143
- glob: tool({
144
- description: 'Find files matching a pattern (e.g., "*.ts" for TypeScript files)',
145
- inputSchema: z.object({
146
- pattern: z.string().describe('The file pattern (e.g., "*.ts", "*.js")'),
147
- }),
148
- execute: async ({ pattern }) => {
149
- try {
150
- // Extract just the file pattern, remove any path prefix
151
- const filePattern = pattern.replace(/^\\*\\*\\//, '').replace(/^\\.\\//, '');
152
- const result = execSync(\`find . -name "\${filePattern}" -type f 2>/dev/null | grep -v node_modules | head -50\`, { encoding: 'utf-8' });
153
- logEvent('tool_result', { tool: 'glob', pattern, success: true });
154
- return result.trim() || 'No files found';
155
- } catch (error) {
156
- logEvent('tool_result', { tool: 'glob', pattern, success: false, error: error.message });
157
- return 'No files found';
158
- }
159
- },
160
- }),
161
-
162
- grep: tool({
163
- description: 'Search for a text pattern in files',
164
- inputSchema: z.object({
165
- pattern: z.string().describe('The search pattern'),
166
- path: z.string().describe('The file or directory to search in').optional(),
167
- }),
168
- execute: async ({ pattern, path }) => {
169
- const targetPath = path || '.';
170
- try {
171
- const result = execSync(\`grep -rn "\${pattern}" \${targetPath} 2>/dev/null | grep -v node_modules | head -50\`, { encoding: 'utf-8' });
172
- logEvent('tool_result', { tool: 'grep', pattern, path: targetPath, success: true });
173
- return result.trim() || 'No matches found';
174
- } catch (error) {
175
- logEvent('tool_result', { tool: 'grep', pattern, path: targetPath, success: false });
176
- return 'No matches found';
177
- }
178
- },
179
- }),
180
-
181
- bash: tool({
182
- description: 'Run a bash command',
183
- inputSchema: z.object({
184
- command: z.string().describe('The command to run'),
185
- }),
186
- execute: async ({ command }) => {
187
- try {
188
- const result = execSync(command, { encoding: 'utf-8', timeout: 30000 });
189
- logEvent('tool_result', { tool: 'bash', command, success: true });
190
- return result;
191
- } catch (error) {
192
- logEvent('tool_result', { tool: 'bash', command, success: false, error: error.message });
193
- return \`Error: \${error.message}\\n\${error.stdout || ''}\\n\${error.stderr || ''}\`;
194
- }
195
- },
196
- }),
197
- };
198
-
199
- // System prompt for the coding agent
200
- const systemPrompt = \`You are an expert coding agent. Your job is to complete programming tasks by reading, writing, and modifying files.
201
-
202
- Available tools:
203
- - readFile(path): Read a file's contents
204
- - writeFile(path, content): Write/create a file (creates directories if needed)
205
- - editFile(path, oldString, newString): Replace a specific string in a file
206
- - listFiles(path): List files in a directory (use path="." for current directory)
207
- - glob(pattern): Find files by pattern (e.g., "*.ts")
208
- - grep(pattern, path): Search for text in files
209
- - bash(command): Run shell commands
210
-
211
- IMPORTANT WORKFLOW:
212
- 1. First, list files to understand the project structure: listFiles(path=".")
213
- 2. Read any relevant existing files to understand the context
214
- 3. Make the necessary code changes using writeFile or editFile
215
- 4. If needed, run build/test commands with bash to verify
216
-
217
- RULES:
218
- - Always check what files exist before modifying them
219
- - Create complete, working code - not placeholders
220
- - Put files in the correct directories (e.g., src/ for source files)
221
- - Be thorough but efficient\`;
222
-
223
- // Run the agent
224
- async function main() {
225
- logEvent('start', { model, prompt });
226
-
227
- try {
228
- const result = await generateText({
229
- model: gateway(model),
230
- tools,
231
- stopWhen: stepCountIs(100), // Allow up to 100 steps
232
- system: systemPrompt,
233
- prompt,
234
- onStepFinish: ({ stepType, text, toolCalls, toolResults }) => {
235
- logEvent('step', { stepType, text, toolCalls: toolCalls?.length, toolResults: toolResults?.length });
236
- },
237
- });
238
-
239
- logEvent('complete', {
240
- success: true,
241
- steps: result.steps.length,
242
- text: result.text,
243
- });
244
- } catch (error) {
245
- logEvent('error', {
246
- success: false,
247
- error: error.message,
248
- name: error.name,
249
- });
250
- process.exit(1);
251
- }
252
- }
253
-
254
- main();
255
- `;
256
- /**
257
- * Create AI SDK agent with Vercel AI Gateway authentication.
258
- */
259
- export function createAiSdkAgent() {
260
- return {
261
- name: 'vercel-ai-gateway/ai-sdk-harness',
262
- displayName: 'AI SDK Harness (Vercel AI Gateway)',
263
- getApiKeyEnvVar() {
264
- return AI_GATEWAY.apiKeyEnvVar;
265
- },
266
- getDefaultModel() {
267
- return 'anthropic/claude-sonnet-4';
268
- },
269
- async run(fixturePath, options) {
270
- const startTime = Date.now();
271
- let sandbox = null;
272
- let agentOutput = '';
273
- let aborted = false;
274
- let sandboxStopped = false;
275
- // Handle abort signal
276
- const abortHandler = () => {
277
- aborted = true;
278
- if (sandbox && !sandboxStopped) {
279
- sandboxStopped = true;
280
- sandbox.stop().catch(() => { });
281
- }
282
- };
283
- if (options.signal) {
284
- if (options.signal.aborted) {
285
- return {
286
- success: false,
287
- output: '',
288
- error: 'Aborted before start',
289
- duration: 0,
290
- };
291
- }
292
- options.signal.addEventListener('abort', abortHandler);
293
- }
294
- try {
295
- // Collect files from fixture
296
- const allFiles = await collectLocalFiles(fixturePath);
297
- const { workspaceFiles, testFiles } = splitTestFiles(allFiles);
298
- // Check for abort before expensive operations
299
- if (aborted) {
300
- return {
301
- success: false,
302
- output: '',
303
- error: 'Aborted',
304
- duration: Date.now() - startTime,
305
- };
306
- }
307
- // Create sandbox
308
- sandbox = await createSandbox({
309
- timeout: options.timeout,
310
- runtime: 'node24',
311
- backend: options.sandbox,
312
- });
313
- // Check for abort after sandbox creation
314
- if (aborted) {
315
- return {
316
- success: false,
317
- output: '',
318
- error: 'Aborted',
319
- duration: Date.now() - startTime,
320
- sandboxId: sandbox.sandboxId,
321
- };
322
- }
323
- // Upload workspace files (excluding tests)
324
- await sandbox.uploadFiles(workspaceFiles);
325
- // Run setup function if provided
326
- if (options.setup) {
327
- await options.setup(sandbox);
328
- }
329
- // Install dependencies
330
- const installResult = await sandbox.runCommand('npm', ['install']);
331
- if (installResult.exitCode !== 0) {
332
- throw new Error(`npm install failed: ${installResult.stderr}`);
333
- }
334
- // Install AI SDK dependencies
335
- const aiInstall = await sandbox.runCommand('npm', [
336
- 'install',
337
- 'ai@^5.0.11',
338
- '@ai-sdk/gateway@^1.0.0',
339
- 'zod@^3.23.8',
340
- ]);
341
- if (aiInstall.exitCode !== 0) {
342
- throw new Error(`AI SDK install failed: ${aiInstall.stderr}`);
343
- }
344
- // Write the CLI script to the sandbox
345
- await sandbox.writeFiles({
346
- 'ai-sdk-agent.mjs': CLI_SCRIPT,
347
- });
348
- // Verify no test files in sandbox
349
- await verifyNoTestFiles(sandbox);
350
- // Run the AI SDK agent
351
- const agentResult = await sandbox.runCommand('node', [
352
- 'ai-sdk-agent.mjs',
353
- '--prompt',
354
- options.prompt,
355
- '--model',
356
- options.model,
357
- ], {
358
- env: {
359
- [AI_GATEWAY.apiKeyEnvVar]: options.apiKey,
360
- },
361
- });
362
- agentOutput = agentResult.stdout + agentResult.stderr;
363
- if (agentResult.exitCode !== 0) {
364
- // Extract meaningful error from output
365
- const errorLines = agentOutput.trim().split('\n').slice(-5).join('\n');
366
- return {
367
- success: false,
368
- output: agentOutput,
369
- error: errorLines || `AI SDK agent exited with code ${agentResult.exitCode}`,
370
- duration: Date.now() - startTime,
371
- sandboxId: sandbox.sandboxId,
372
- };
373
- }
374
- // Upload test files for validation
375
- await sandbox.uploadFiles(testFiles);
376
- // Create vitest config for EVAL.ts/tsx
377
- await createVitestConfig(sandbox);
378
- // The agent outputs JSON events, use that as transcript
379
- const transcript = agentOutput;
380
- // Run validation scripts
381
- const validationResults = await runValidation(sandbox, options.scripts ?? []);
382
- // Capture generated files
383
- const generatedFiles = await captureGeneratedFiles(sandbox);
384
- return {
385
- success: validationResults.allPassed,
386
- output: agentOutput,
387
- transcript,
388
- duration: Date.now() - startTime,
389
- testResult: validationResults.test,
390
- scriptsResults: validationResults.scripts,
391
- sandboxId: sandbox.sandboxId,
392
- generatedFiles,
393
- };
394
- }
395
- catch (error) {
396
- // Check if this was an abort
397
- if (aborted) {
398
- return {
399
- success: false,
400
- output: agentOutput,
401
- error: 'Aborted',
402
- duration: Date.now() - startTime,
403
- sandboxId: sandbox?.sandboxId,
404
- };
405
- }
406
- return {
407
- success: false,
408
- output: agentOutput,
409
- error: error instanceof Error ? error.message : String(error),
410
- duration: Date.now() - startTime,
411
- sandboxId: sandbox?.sandboxId,
412
- };
413
- }
414
- finally {
415
- // Clean up abort listener
416
- if (options.signal) {
417
- options.signal.removeEventListener('abort', abortHandler);
418
- }
419
- if (sandbox && !sandboxStopped) {
420
- sandboxStopped = true;
421
- await sandbox.stop();
422
- }
423
- }
424
- },
425
- };
426
- }
427
- //# sourceMappingURL=ai-sdk-agent.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ai-sdk-agent.js","sourceRoot":"","sources":["../../../src/lib/agents/ai-sdk-agent.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,EACL,aAAa,EACb,iBAAiB,EACjB,cAAc,EACd,iB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