fix instructions
This commit is contained in:
+3
-1
@@ -18,8 +18,10 @@ export const claude = agent({
|
|||||||
run: async ({ payload, mcpServers, apiKey, cliPath }) => {
|
run: async ({ payload, mcpServers, apiKey, cliPath }) => {
|
||||||
process.env.ANTHROPIC_API_KEY = apiKey;
|
process.env.ANTHROPIC_API_KEY = apiKey;
|
||||||
|
|
||||||
|
const prompt = addInstructions(payload);
|
||||||
|
|
||||||
const queryInstance = query({
|
const queryInstance = query({
|
||||||
prompt: addInstructions(payload),
|
prompt,
|
||||||
options: {
|
options: {
|
||||||
permissionMode: "bypassPermissions",
|
permissionMode: "bypassPermissions",
|
||||||
mcpServers,
|
mcpServers,
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ Your code is focused, elegant, 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.
|
||||||
You make reasonable assumptions when details are missing.
|
You make reasonable assumptions when details are missing, but fail with an explicit error if critical information is missing (e.g. user asks to review a PR but does not provide a link or ID).
|
||||||
|
|
||||||
## SECURITY
|
## SECURITY
|
||||||
|
|
||||||
@@ -58,4 +58,4 @@ ${[...modes, ...payload.modes].map((w) => `### ${w.name}\n\n${w.prompt}`).join("
|
|||||||
|
|
||||||
${payload.prompt}
|
${payload.prompt}
|
||||||
|
|
||||||
${payload.event}`;
|
${JSON.stringify(payload.event, null, 2)}`;
|
||||||
|
|||||||
@@ -32889,7 +32889,7 @@ function query({
|
|||||||
// package.json
|
// package.json
|
||||||
var package_default = {
|
var package_default = {
|
||||||
name: "@pullfrog/action",
|
name: "@pullfrog/action",
|
||||||
version: "0.0.105",
|
version: "0.0.106",
|
||||||
type: "module",
|
type: "module",
|
||||||
files: [
|
files: [
|
||||||
"index.js",
|
"index.js",
|
||||||
@@ -33226,7 +33226,7 @@ Your code is focused, elegant, 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.
|
||||||
You make reasonable assumptions when details are missing.
|
You make reasonable assumptions when details are missing, but fail with an explicit error if critical information is missing (e.g. user asks to review a PR but does not provide a link or ID).
|
||||||
|
|
||||||
## SECURITY
|
## SECURITY
|
||||||
|
|
||||||
@@ -33272,7 +33272,7 @@ ${w.prompt}`).join("\n\n")}
|
|||||||
|
|
||||||
${payload.prompt}
|
${payload.prompt}
|
||||||
|
|
||||||
${payload.event}`;
|
${JSON.stringify(payload.event, null, 2)}`;
|
||||||
|
|
||||||
// agents/shared.ts
|
// agents/shared.ts
|
||||||
import { spawnSync } from "node:child_process";
|
import { spawnSync } from "node:child_process";
|
||||||
@@ -33422,8 +33422,9 @@ var claude = agent({
|
|||||||
},
|
},
|
||||||
run: async ({ payload, mcpServers, apiKey, cliPath }) => {
|
run: async ({ payload, mcpServers, apiKey, cliPath }) => {
|
||||||
process.env.ANTHROPIC_API_KEY = apiKey;
|
process.env.ANTHROPIC_API_KEY = apiKey;
|
||||||
|
const prompt = addInstructions(payload);
|
||||||
const queryInstance = query({
|
const queryInstance = query({
|
||||||
prompt: addInstructions(payload),
|
prompt,
|
||||||
options: {
|
options: {
|
||||||
permissionMode: "bypassPermissions",
|
permissionMode: "bypassPermissions",
|
||||||
mcpServers,
|
mcpServers,
|
||||||
@@ -42393,7 +42394,7 @@ async function main(inputs) {
|
|||||||
try {
|
try {
|
||||||
const parsedPrompt = JSON.parse(inputs.prompt);
|
const parsedPrompt = JSON.parse(inputs.prompt);
|
||||||
if (!("~pullfrog" in parsedPrompt)) {
|
if (!("~pullfrog" in parsedPrompt)) {
|
||||||
throw new Error("Invalid prompt: not a pullfrog webhook payload");
|
throw new Error();
|
||||||
}
|
}
|
||||||
payload = parsedPrompt;
|
payload = parsedPrompt;
|
||||||
} catch {
|
} catch {
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@pullfrog/action",
|
"name": "@pullfrog/action",
|
||||||
"version": "0.0.105",
|
"version": "0.0.106",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"files": [
|
"files": [
|
||||||
"index.js",
|
"index.js",
|
||||||
|
|||||||
@@ -14,6 +14,7 @@
|
|||||||
[] try to find heavy claude code user
|
[] try to find heavy claude code user
|
||||||
[] investigate including terminal output from bash commands as collapsed groups from claude
|
[] investigate including terminal output from bash commands as collapsed groups from claude
|
||||||
[] test initialization trade offs for pullfrog.yml
|
[] test initialization trade offs for pullfrog.yml
|
||||||
|
[] split up prompts, load dynamically based on mode
|
||||||
|
|
||||||
## DONE
|
## DONE
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user