Add set_output tool (#205)

This commit is contained in:
Mateusz Burzyński
2026-01-29 22:49:00 +00:00
committed by pullfrog[bot]
parent 2daab6fc78
commit c1f8247077
9 changed files with 116 additions and 7 deletions
+9
View File
@@ -100,6 +100,13 @@ function getShellInstructions(bash: ResolvedPayload["bash"]): string {
}
}
function getStandaloneModeInstructions(trigger: string): string {
if (trigger !== "unknown") {
return "";
}
return `**Standalone mode**: You are running as a step in a user-defined CI workflow. When you complete your task, call \`${ghPullfrogMcpName}/set_output\` with the main result of your work (generated content, summary of changes, analysis results, etc.). This makes it available as a GitHub Action output named \`result\` for subsequent workflow steps to consume.`;
}
export interface ResolvedInstructions {
full: string;
system: string;
@@ -187,6 +194,8 @@ Tool names may be formatted as \`(server name)/(tool name)\`, for example: \`${g
${getShellInstructions(ctx.payload.bash)}
${getStandaloneModeInstructions(ctx.payload.event.trigger)}
**Command execution**: Never use \`sleep\` to wait for commands to complete. Commands run synchronously - when the bash tool returns, the command has finished.
**Commenting style**: When posting comments via ${ghPullfrogMcpName}, write as a professional team member would. Your final comments should be polished and actionable—do not include intermediate reasoning like "I'll now look at the code" or "Let me respond to the question."
+1 -1
View File
@@ -2,7 +2,7 @@ import type { AgentResult } from "../agents/shared.ts";
import type { MainResult } from "../main.ts";
import { log } from "./cli.ts";
export async function handleAgentResult(result: AgentResult): Promise<MainResult> {
export function handleAgentResult(result: AgentResult): MainResult {
if (!result.success) {
return {
success: false,