inputKeys array, missing key error message

This commit is contained in:
David Blass
2025-11-14 16:12:32 -05:00
parent 7c724d931b
commit 1b55da51a1
8 changed files with 74 additions and 19 deletions
+1 -1
View File
@@ -6,7 +6,7 @@ import { agent, installFromNpmTarball } from "./shared.ts";
export const claude = agent({
name: "claude",
inputKey: "anthropic_api_key",
inputKeys: ["anthropic_api_key"],
install: async () => {
const versionRange = packageJson.dependencies["@anthropic-ai/claude-agent-sdk"] || "latest";
return await installFromNpmTarball({
+1 -1
View File
@@ -7,7 +7,7 @@ import { agent, installFromNpmTarball } from "./shared.ts";
export const codex = agent({
name: "codex",
inputKey: "openai_api_key",
inputKeys: ["openai_api_key"],
install: async () => {
return await installFromNpmTarball({
packageName: "@openai/codex",
+1 -1
View File
@@ -8,4 +8,4 @@ export const agents = {
jules,
} as const;
export type AgentInputKey = (typeof agents)[keyof typeof agents]["inputKey"];
export type AgentInputKey = (typeof agents)[keyof typeof agents]["inputKeys"][number];
+1 -1
View File
@@ -6,7 +6,7 @@ import { agent, installFromNpmTarball } from "./shared.ts";
export const jules = agent({
name: "jules",
inputKey: "google_api_key",
inputKeys: ["google_api_key", "gemini_api_key"],
install: async () => {
return await installFromNpmTarball({
packageName: "@google/jules",
+1 -1
View File
@@ -133,7 +133,7 @@ export const agent = <const agent extends Agent>(agent: agent): agent => {
export type Agent = {
name: string;
inputKey: string;
inputKeys: string[];
install: () => Promise<string>;
run: (config: AgentConfig) => Promise<AgentResult>;
};