Add repo settings API integration and move workflows into action
- Add getRepoSettings utility to fetch repo settings from Pullfrog API - Integrate repo settings fetch in main.ts with agent validation - Move workflows from lib/workflows.ts into action/workflows.ts - Update workflow prompts to include comment management steps - Add 'Prompt' workflow as fallback for general tasks - Fix null check for response.body in claude agent tarball download - Remove unused message handlers (tool_progress, auth_status) - Fix tsconfig.json indentation consistency
This commit is contained in:
+3
-3
@@ -3,6 +3,7 @@ import { createWriteStream, existsSync, rmSync } from "node:fs";
|
||||
import { mkdtemp } from "node:fs/promises";
|
||||
import { tmpdir } from "node:os";
|
||||
import { join } from "node:path";
|
||||
|
||||
import { pipeline } from "node:stream/promises";
|
||||
import { query, type SDKMessage } from "@anthropic-ai/claude-agent-sdk";
|
||||
import packageJson from "../package.json" with { type: "json" };
|
||||
@@ -66,8 +67,9 @@ export const claude: Agent = {
|
||||
}
|
||||
|
||||
// Write tarball to file
|
||||
if (!response.body) throw new Error("Response body is null");
|
||||
const fileStream = createWriteStream(tarballPath);
|
||||
await pipeline(response.body!, fileStream);
|
||||
await pipeline(response.body, fileStream);
|
||||
log.info(`Downloaded tarball to ${tarballPath}`);
|
||||
|
||||
// Extract tarball
|
||||
@@ -239,6 +241,4 @@ const messageHandlers: SDKMessageHandlers = {
|
||||
},
|
||||
system: () => {},
|
||||
stream_event: () => {},
|
||||
tool_progress: () => {},
|
||||
auth_status: () => {},
|
||||
};
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
import type { McpServerConfig } from "@anthropic-ai/claude-agent-sdk";
|
||||
import { workflows } from "../../lib/workflows.ts";
|
||||
import { ghPullfrogMcpName } from "../mcp/config.ts";
|
||||
import { workflows } from "../workflows.ts";
|
||||
|
||||
/**
|
||||
* Result returned by agent execution
|
||||
|
||||
Reference in New Issue
Block a user