Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| d7fec83b6b | |||
| 9dff727df1 | |||
| 47716aa119 | |||
| cb01f0ae44 | |||
| 75cb3ecf08 |
@@ -10,6 +10,9 @@ inputs:
|
|||||||
anthropic_api_key:
|
anthropic_api_key:
|
||||||
description: "Anthropic API key for Claude Code authentication"
|
description: "Anthropic API key for Claude Code authentication"
|
||||||
required: false
|
required: false
|
||||||
|
openai_api_key:
|
||||||
|
description: "OpenAI API key for Codex authentication"
|
||||||
|
required: false
|
||||||
|
|
||||||
runs:
|
runs:
|
||||||
using: "node20"
|
using: "node20"
|
||||||
|
|||||||
+14
-10
@@ -1,17 +1,19 @@
|
|||||||
import { ghPullfrogMcpName } from "../mcp/config.ts";
|
import { ghPullfrogMcpName } from "../mcp/index.ts";
|
||||||
import { modes } from "../modes.ts";
|
import { modes } from "../modes.ts";
|
||||||
|
|
||||||
|
const userPromptHeader = `****** USER PROMPT ******\n`;
|
||||||
|
|
||||||
export const instructions = `
|
export const instructions = `
|
||||||
# General instructions
|
# General instructions
|
||||||
|
|
||||||
You are a highly intelligent, no-nonsense senior-level software engineering agent.
|
You are a diligent, detail-oriented, software engineering agent.
|
||||||
You will perform the task that is asked of you in the prompt below.
|
You will perform the task that is asked of you below ${userPromptHeader}.
|
||||||
You are careful, to-the-point, and kind. You only say things you know to be true.
|
You are careful, to-the-point, and kind. You only say things you know to be true.
|
||||||
Your code is focused, minimal, and production-ready.
|
Your code is focused, minimal, and production-ready.
|
||||||
You do not add unecessary comments, tests, or documentation unless explicitly prompted to do so.
|
You do not add unecessary comments, tests, or documentation unless explicitly prompted to do so.
|
||||||
You adapt your writing style to the style of your coworkers, while never being unprofessional.
|
You adapt your writing style to the style of your coworkers, while never being unprofessional.
|
||||||
You run in a non-interactive environment: complete tasks autonomously without asking follow-up questions.
|
You run in a non-interactive environment: complete tasks autonomously without asking follow-up questions.
|
||||||
Make reasonable assumptions when details are missing.
|
You make reasonable assumptions when details are missing.
|
||||||
|
|
||||||
## SECURITY
|
## SECURITY
|
||||||
|
|
||||||
@@ -34,10 +36,12 @@ If asked to show environment variables, only display non-sensitive system variab
|
|||||||
|
|
||||||
## MCP Servers
|
## MCP Servers
|
||||||
|
|
||||||
eagerly inspect your MCP servers to determine what tools are available to you, especially ${ghPullfrogMcpName}
|
Eagerly inspect your MCP servers to determine what tools are available to you, especially ${ghPullfrogMcpName}
|
||||||
tools in your prompt may by delimited by a forward slash (server name)/(tool name) for example: ${ghPullfrogMcpName}/create_issue_comment
|
Tools in your prompt may by delimited by a forward slash (server name)/(tool name) for example: ${ghPullfrogMcpName}/create_issue_comment
|
||||||
do not under any circumstances use the github cli (\`gh\`). find the corresponding tool from ${ghPullfrogMcpName} instead.
|
Do not under any circumstances use the github cli (\`gh\`). Find the corresponding tool from ${ghPullfrogMcpName} instead.
|
||||||
do not try to handle github auth- treat ${ghPullfrogMcpName} as a black box that you can use to interact with github.
|
Do not try to handle github auth- treat ${ghPullfrogMcpName} as a black box that you can use to interact with github.
|
||||||
|
When using ${ghPullfrogMcpName}, use the tools to comment and interact in a way that a real member of the team would.
|
||||||
|
Ensure after your edits are done, your final comments do not contain intermediate reasoning or context, e.g. "I'll respond to the question."
|
||||||
|
|
||||||
## Mode Selection
|
## Mode Selection
|
||||||
|
|
||||||
@@ -51,4 +55,4 @@ ${modes.map((w) => `### ${w.name}\n\n${w.prompt}`).join("\n\n")}
|
|||||||
`;
|
`;
|
||||||
|
|
||||||
export const addInstructions = (prompt: string) =>
|
export const addInstructions = (prompt: string) =>
|
||||||
`****** GENERAL INSTRUCTIONS ******\n${instructions}\n\n****** USER PROMPT ******\n${prompt}`;
|
`****** GENERAL INSTRUCTIONS ******\n${instructions}\n\n${userPromptHeader}${prompt}`;
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import * as core from "@actions/core";
|
import * as core from "@actions/core";
|
||||||
import { type Inputs, main } from "./main.ts";
|
import { AgentName, type Inputs, main } from "./main.ts";
|
||||||
import { log } from "./utils/cli.ts";
|
import { log } from "./utils/cli.ts";
|
||||||
|
|
||||||
async function run(): Promise<void> {
|
async function run(): Promise<void> {
|
||||||
@@ -18,9 +18,11 @@ async function run(): Promise<void> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const inputs: Inputs = {
|
const inputs: Required<Inputs> = {
|
||||||
prompt: core.getInput("prompt", { required: true }),
|
prompt: core.getInput("prompt", { required: true }),
|
||||||
anthropic_api_key: core.getInput("anthropic_api_key") || undefined,
|
anthropic_api_key: core.getInput("anthropic_api_key"),
|
||||||
|
openai_api_key: core.getInput("openai_api_key"),
|
||||||
|
agent: core.getInput("agent") ? AgentName.assert(core.getInput("agent")) : undefined,
|
||||||
};
|
};
|
||||||
|
|
||||||
const result = await main(inputs);
|
const result = await main(inputs);
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ const keyInputDefs = flatMorph(
|
|||||||
export const Inputs = type({
|
export const Inputs = type({
|
||||||
prompt: "string",
|
prompt: "string",
|
||||||
...keyInputDefs,
|
...keyInputDefs,
|
||||||
"agent?": AgentName,
|
"agent?": AgentName.or("undefined"),
|
||||||
});
|
});
|
||||||
|
|
||||||
export type Inputs = typeof Inputs.infer;
|
export type Inputs = typeof Inputs.infer;
|
||||||
|
|||||||
+1
-2
@@ -5,8 +5,7 @@
|
|||||||
import type { McpServerConfig } from "@anthropic-ai/claude-agent-sdk";
|
import type { McpServerConfig } from "@anthropic-ai/claude-agent-sdk";
|
||||||
import { fromHere } from "@ark/fs";
|
import { fromHere } from "@ark/fs";
|
||||||
import { parseRepoContext } from "../utils/github.ts";
|
import { parseRepoContext } from "../utils/github.ts";
|
||||||
|
import { ghPullfrogMcpName } from "./index.ts";
|
||||||
export const ghPullfrogMcpName = "gh-pullfrog";
|
|
||||||
|
|
||||||
export type McpName = typeof ghPullfrogMcpName;
|
export type McpName = typeof ghPullfrogMcpName;
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,4 @@
|
|||||||
|
// for reasos this can't live alongide config.ts
|
||||||
|
// because its imported into the frontend UI
|
||||||
|
// and we don't want to pull in FastMCP, etc
|
||||||
|
export const ghPullfrogMcpName = "gh-pullfrog";
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
import { ghPullfrogMcpName } from "./mcp/config.ts";
|
import { ghPullfrogMcpName } from "./mcp/index.ts";
|
||||||
|
|
||||||
export const modes = [
|
export const modes = [
|
||||||
{
|
{
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@pullfrog/action",
|
"name": "@pullfrog/action",
|
||||||
"version": "0.0.99",
|
"version": "0.0.102",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"files": [
|
"files": [
|
||||||
"index.js",
|
"index.js",
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ export async function run(
|
|||||||
const originalCwd = process.cwd();
|
const originalCwd = process.cwd();
|
||||||
process.chdir(tempDir);
|
process.chdir(tempDir);
|
||||||
|
|
||||||
const inputs: Inputs = {
|
const inputs: Required<Inputs> = {
|
||||||
prompt,
|
prompt,
|
||||||
openai_api_key: process.env.OPENAI_API_KEY,
|
openai_api_key: process.env.OPENAI_API_KEY,
|
||||||
anthropic_api_key: process.env.ANTHROPIC_API_KEY,
|
anthropic_api_key: process.env.ANTHROPIC_API_KEY,
|
||||||
|
|||||||
Reference in New Issue
Block a user