From e477ad81b2d9b886267f418e51e6f8cd4ebc0559 Mon Sep 17 00:00:00 2001 From: David Blass Date: Wed, 19 Nov 2025 12:25:49 -0500 Subject: [PATCH] update todos, cleanup --- agents/instructions.ts | 2 -- main.ts | 3 ++- payload.ts | 3 ++- todo.md | 4 ++++ 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/agents/instructions.ts b/agents/instructions.ts index c540daa..65cfc7a 100644 --- a/agents/instructions.ts +++ b/agents/instructions.ts @@ -2,8 +2,6 @@ import { ghPullfrogMcpName } from "../mcp/index.ts"; import { modes } from "../modes.ts"; import type { Payload } from "../payload.ts"; -// const userPromptHeader = `************* USER PROMPT *************\n`; - export const addInstructions = (payload: Payload) => `************* GENERAL INSTRUCTIONS ************* # General instructions diff --git a/main.ts b/main.ts index 1ac98a0..d4ccdd2 100644 --- a/main.ts +++ b/main.ts @@ -131,7 +131,8 @@ export async function main(inputs: Inputs): Promise { // attempt JSON parsing const parsedPrompt = JSON.parse(inputs.prompt); if (!("~pullfrog" in parsedPrompt)) { - throw new Error("Invalid prompt: not a pullfrog webhook payload"); + // is non-pullfrog JSON (probably from a GitHub event), treat it as a plain text prompt + throw new Error(); } payload = parsedPrompt as Payload; } catch { diff --git a/payload.ts b/payload.ts index 4d46aa2..7dcca09 100644 --- a/payload.ts +++ b/payload.ts @@ -1,5 +1,6 @@ /** May be a `github.event` payload that has been stringified. This case needs to be detected and handled appropriately. */ +import type { AgentName } from "./main.ts"; import type { Mode } from "./modes.ts"; // type Payload = GithubEventPayload | WorkflowDispatchPayload; @@ -11,7 +12,7 @@ export type Payload = { /** * Agent slug identifier (e.g., "claude", "codex", "gemini") */ - readonly agent: string | null; + readonly agent: AgentName | null; /** * The prompt/instructions for the agent to execute diff --git a/todo.md b/todo.md index 7ad73b5..4d6fe19 100644 --- a/todo.md +++ b/todo.md @@ -2,6 +2,10 @@ [] gemini installation speed [] entry.js +[] handle defaulting agent name value +[] test agent/mode combinations +[] test if home directory mcp.json works if mcp.json is specified in repo +[] add footer to the working comment ("executed by {agent}", link to pullfrog (homepage) w/ small logo?, feedback (create github issue), link to workflow run) ## MAYBE