diff --git a/agents/claude.ts b/agents/claude.ts index 1928aca..66bd706 100644 --- a/agents/claude.ts +++ b/agents/claude.ts @@ -50,9 +50,6 @@ export const claude = agent({ // install CLI at start of run const cliPath = await installClaude(); - // Ensure API key is NOT in process.env - only pass via SDK's env option - delete process.env.ANTHROPIC_API_KEY; - // select model based on effort level const model = claudeEffortModels[ctx.effort]; log.info(`» using model: ${model} (effort: ${ctx.effort})`); @@ -63,8 +60,6 @@ export const claude = agent({ log.info(`» disallowed tools: ${disallowedTools.join(", ")}`); } - // Pass secrets via SDK's env option only (not process.env) - // This ensures secrets are only available to Claude Code subprocess, not user code const queryOptions: Options = { permissionMode: "bypassPermissions" as const, disallowedTools, diff --git a/entry b/entry index 420180c..fa15636 100755 --- a/entry +++ b/entry @@ -136852,7 +136852,6 @@ var claude = agent({ install: installClaude, run: async (ctx) => { const cliPath = await installClaude(); - delete process.env.ANTHROPIC_API_KEY; const model = claudeEffortModels[ctx.effort]; log.info(`\xBB using model: ${model} (effort: ${ctx.effort})`); const disallowedTools = buildDisallowedTools(ctx); diff --git a/utils/payload.ts b/utils/payload.ts index 050ad31..df7935a 100644 --- a/utils/payload.ts +++ b/utils/payload.ts @@ -29,6 +29,10 @@ const JsonPayload = type({ }); // inputs schema - action inputs from core.getInput() +// note: tool permissions use .or("undefined") because getInput() || undefined +// explicitly sets the property to undefined when empty, which is different from +// the property being absent. arktype's "prop?" means "optional to include" but +// if included, must match the type - so we need to explicitly allow undefined. export const Inputs = type({ prompt: "string", "effort?": Effort,