Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ for the provider you use:

```bash
bun add --optional @openai/codex-sdk
bun add --optional @earendil-works/pi-coding-agent
bun add --optional @earendil-works/pi-coding-agent @earendil-works/pi-ai
bun add --optional @anthropic-ai/claude-agent-sdk
bun add --optional @github/copilot-sdk
```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ for the provider you use:

```bash
bun add --optional @openai/codex-sdk
bun add --optional @earendil-works/pi-coding-agent
bun add --optional @earendil-works/pi-coding-agent @earendil-works/pi-ai
bun add --optional @anthropic-ai/claude-agent-sdk
bun add --optional @github/copilot-sdk
```
Expand Down
31 changes: 19 additions & 12 deletions bun.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,5 +40,12 @@
"tsup": "8.3.5",
"typescript": "5.8.3",
"yaml": "^2.8.3"
},
"optionalDependencies": {
"@anthropic-ai/claude-agent-sdk": "^0.2.89",
"@earendil-works/pi-ai": "^0.74.0",
"@earendil-works/pi-coding-agent": "^0.74.0",
"@github/copilot-sdk": "^1.0.3",
"@openai/codex-sdk": "^0.136.0"
}
}
4 changes: 3 additions & 1 deletion packages/core/src/evaluation/providers/claude-sdk.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,11 @@ async function loadClaudeSdk(): Promise<typeof import('@anthropic-ai/claude-agen
try {
claudeSdkModule = await import('@anthropic-ai/claude-agent-sdk');
} catch (error) {
throw new Error(
const missing = new Error(
`Failed to load @anthropic-ai/claude-agent-sdk. AgentV declares SDK beta packages as optional dependencies; run bun install to hydrate optional dependencies, or install this SDK explicitly:\n bun add --optional @anthropic-ai/claude-agent-sdk\n npm install @anthropic-ai/claude-agent-sdk\n\nOriginal error: ${error instanceof Error ? error.message : String(error)}`,
);
missing.name = 'MissingSdkDependency';
throw missing;
}
}
return claudeSdkModule;
Expand Down
6 changes: 4 additions & 2 deletions packages/core/src/evaluation/providers/claude.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,11 @@ async function loadClaudeSdk(): Promise<typeof import('@anthropic-ai/claude-agen
try {
claudeSdkModule = await import('@anthropic-ai/claude-agent-sdk');
} catch (error) {
throw new Error(
`Failed to load @anthropic-ai/claude-agent-sdk. Please install it:\n npm install @anthropic-ai/claude-agent-sdk\n\nOriginal error: ${error instanceof Error ? error.message : String(error)}`,
const missing = new Error(
`Failed to load @anthropic-ai/claude-agent-sdk. AgentV declares SDK beta packages as optional dependencies; run bun install to hydrate optional dependencies, or install this SDK explicitly:\n bun add --optional @anthropic-ai/claude-agent-sdk\n npm install @anthropic-ai/claude-agent-sdk\n\nOriginal error: ${error instanceof Error ? error.message : String(error)}`,
);
missing.name = 'MissingSdkDependency';
throw missing;
}
}
return claudeSdkModule;
Expand Down
4 changes: 3 additions & 1 deletion packages/core/src/evaluation/providers/codex.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,11 @@ async function loadCodexSdk(): Promise<any> {
try {
codexSdkModule = await import('@openai/codex-sdk');
} catch (error) {
throw new Error(
const missing = new Error(
`Failed to load @openai/codex-sdk. AgentV declares SDK beta packages as optional dependencies; run bun install to hydrate optional dependencies, or install this SDK explicitly:\n bun add --optional @openai/codex-sdk\n npm install @openai/codex-sdk\n\nOriginal error: ${error instanceof Error ? error.message : String(error)}`,
);
missing.name = 'MissingSdkDependency';
throw missing;
}
}
return codexSdkModule;
Expand Down
4 changes: 3 additions & 1 deletion packages/core/src/evaluation/providers/copilot-sdk.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,11 @@ async function loadCopilotSdk(): Promise<any> {
' Set provider: copilot-cli in your eval YAML',
);
}
throw new Error(
const missing = new Error(
`Failed to load @github/copilot-sdk. AgentV declares SDK beta packages as optional dependencies; run bun install to hydrate optional dependencies, or install this SDK explicitly:\n bun add --optional @github/copilot-sdk\n npm install @github/copilot-sdk\n\nOriginal error: ${message}`,
);
missing.name = 'MissingSdkDependency';
throw missing;
}
}
return copilotSdkModule;
Expand Down
6 changes: 4 additions & 2 deletions packages/core/src/evaluation/providers/pi-coding-agent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -224,9 +224,11 @@ async function doLoadSdkModules(): Promise<void> {
}
}

throw new Error(
'pi-coding-agent SDK is not installed. AgentV declares SDK beta packages as optional dependencies; run bun install to hydrate optional dependencies, or install this SDK explicitly:\n bun add --optional @earendil-works/pi-coding-agent\n npm install @earendil-works/pi-coding-agent',
const missing = new Error(
'pi-coding-agent SDK dependencies are not installed. AgentV declares SDK beta packages as optional dependencies; run bun install to hydrate optional dependencies, or install the Pi SDK packages explicitly:\n bun add --optional @earendil-works/pi-coding-agent @earendil-works/pi-ai\n npm install @earendil-works/pi-coding-agent @earendil-works/pi-ai',
);
missing.name = 'MissingSdkDependency';
throw missing;
}

async function loadSdkModules() {
Expand Down
Loading