update todos, cleanup

This commit is contained in:
David Blass
2025-11-19 12:25:49 -05:00
parent 06a19567c0
commit e477ad81b2
4 changed files with 8 additions and 4 deletions
-2
View File
@@ -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
+2 -1
View File
@@ -131,7 +131,8 @@ export async function main(inputs: Inputs): Promise<MainResult> {
// 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 {
+2 -1
View File
@@ -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
+4
View File
@@ -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