inputKeys array, missing key error message
This commit is contained in:
+1
-1
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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>;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user