Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| e6c3fd93f9 | |||
| 1c678f6ef8 |
+8
-2
@@ -2,7 +2,7 @@ import { query, type SDKMessage } from "@anthropic-ai/claude-agent-sdk";
|
|||||||
import packageJson from "../package.json" with { type: "json" };
|
import packageJson from "../package.json" with { type: "json" };
|
||||||
import { log } from "../utils/cli.ts";
|
import { log } from "../utils/cli.ts";
|
||||||
import { addInstructions } from "./instructions.ts";
|
import { addInstructions } from "./instructions.ts";
|
||||||
import { agent, installFromNpmTarball, setupProcessAgentEnv } from "./shared.ts";
|
import { agent, createAgentEnv, installFromNpmTarball, setupProcessAgentEnv } from "./shared.ts";
|
||||||
|
|
||||||
export const claude = agent({
|
export const claude = agent({
|
||||||
name: "claude",
|
name: "claude",
|
||||||
@@ -15,7 +15,12 @@ export const claude = agent({
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
run: async ({ payload, mcpServers, apiKey, cliPath }) => {
|
run: async ({ payload, mcpServers, apiKey, cliPath }) => {
|
||||||
setupProcessAgentEnv({ ANTHROPIC_API_KEY: apiKey });
|
setupProcessAgentEnv({
|
||||||
|
// ANTHROPIC_API_KEY: apiKey
|
||||||
|
});
|
||||||
|
|
||||||
|
// delete process.env.ANTHROPIC_API_KEY to ensure it's not used by the SDK
|
||||||
|
delete process.env.ANTHROPIC_API_KEY;
|
||||||
|
|
||||||
const prompt = addInstructions(payload);
|
const prompt = addInstructions(payload);
|
||||||
console.log(prompt);
|
console.log(prompt);
|
||||||
@@ -26,6 +31,7 @@ export const claude = agent({
|
|||||||
permissionMode: "bypassPermissions",
|
permissionMode: "bypassPermissions",
|
||||||
mcpServers,
|
mcpServers,
|
||||||
pathToClaudeCodeExecutable: cliPath,
|
pathToClaudeCodeExecutable: cliPath,
|
||||||
|
env: createAgentEnv({ ANTHROPIC_API_KEY: apiKey }),
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -83859,7 +83859,7 @@ function query({
|
|||||||
// package.json
|
// package.json
|
||||||
var package_default = {
|
var package_default = {
|
||||||
name: "@pullfrog/action",
|
name: "@pullfrog/action",
|
||||||
version: "0.0.115",
|
version: "0.0.116",
|
||||||
type: "module",
|
type: "module",
|
||||||
files: [
|
files: [
|
||||||
"index.js",
|
"index.js",
|
||||||
@@ -92783,7 +92783,10 @@ var claude = agent({
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
run: async ({ payload, mcpServers, apiKey, cliPath }) => {
|
run: async ({ payload, mcpServers, apiKey, cliPath }) => {
|
||||||
setupProcessAgentEnv({ ANTHROPIC_API_KEY: apiKey });
|
setupProcessAgentEnv({
|
||||||
|
// ANTHROPIC_API_KEY: apiKey
|
||||||
|
});
|
||||||
|
delete process.env.ANTHROPIC_API_KEY;
|
||||||
const prompt = addInstructions(payload);
|
const prompt = addInstructions(payload);
|
||||||
console.log(prompt);
|
console.log(prompt);
|
||||||
const queryInstance = query({
|
const queryInstance = query({
|
||||||
@@ -92791,7 +92794,8 @@ var claude = agent({
|
|||||||
options: {
|
options: {
|
||||||
permissionMode: "bypassPermissions",
|
permissionMode: "bypassPermissions",
|
||||||
mcpServers,
|
mcpServers,
|
||||||
pathToClaudeCodeExecutable: cliPath
|
pathToClaudeCodeExecutable: cliPath,
|
||||||
|
env: createAgentEnv({ ANTHROPIC_API_KEY: apiKey })
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
for await (const message of queryInstance) {
|
for await (const message of queryInstance) {
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@pullfrog/action",
|
"name": "@pullfrog/action",
|
||||||
"version": "0.0.115",
|
"version": "0.0.116",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"files": [
|
"files": [
|
||||||
"index.js",
|
"index.js",
|
||||||
|
|||||||
Reference in New Issue
Block a user