Compare commits

...

2 Commits

Author SHA1 Message Date
David Blass d03debab4b bump version 2025-10-14 15:56:27 -04:00
David Blass a05829f781 fix type errors 2025-10-14 14:58:46 -04:00
5 changed files with 13 additions and 17 deletions
+5 -9
View File
@@ -1,13 +1,9 @@
import type { MainParams } from "../main.ts"; import type { Inputs } from "../main.ts";
const testParams = { const testParams = {
inputs: { prompt:
prompt: "List all files in the current directory, then create a file called dynamic-test.txt with the content 'This was loaded from a TypeScript file!', then delete it.",
"List all files in the current directory, then create a file called dynamic-test.txt with the content 'This was loaded from a TypeScript file!', then delete it.", anthropic_api_key: "sk-test-key",
anthropic_api_key: "sk-test-key", } satisfies Inputs;
},
env: {},
cwd: process.cwd(),
} satisfies MainParams;
export default testParams; export default testParams;
+1 -1
View File
@@ -6,7 +6,7 @@
export { ClaudeAgent } from "./agents/claude.ts"; export { ClaudeAgent } from "./agents/claude.ts";
export type { Agent, AgentConfig, AgentResult } from "./agents/types.ts"; export type { Agent, AgentConfig, AgentResult } from "./agents/types.ts";
export { export {
type ActionInputs as ExecutionInputs, type Inputs as ExecutionInputs,
type MainResult, type MainResult,
main, main,
} from "./main.ts"; } from "./main.ts";
+4 -4
View File
@@ -8,7 +8,7 @@ export const Inputs = type({
"anthropic_api_key?": "string | undefined", "anthropic_api_key?": "string | undefined",
}); });
export type ActionInputs = typeof Inputs.infer; export type Inputs = typeof Inputs.infer;
export interface MainResult { export interface MainResult {
success: boolean; success: boolean;
@@ -16,16 +16,16 @@ export interface MainResult {
error?: string | undefined; error?: string | undefined;
} }
export async function main(inputs: ActionInputs): Promise<MainResult> { export async function main(inputs: Inputs): Promise<MainResult> {
try { try {
core.info(`→ Starting agent run with Claude Code`); core.info(`→ Starting agent run with Claude Code`);
// Setup GitHub installation token // Setup GitHub installation token
const githubInstallationToken = await setupGitHubInstallationToken(); const githubInstallationToken = await setupGitHubInstallationToken();
const agent = new ClaudeAgent({ const agent = new ClaudeAgent({
apiKey: inputs.anthropic_api_key!, apiKey: inputs.anthropic_api_key!,
githubInstallationToken githubInstallationToken,
}); });
await agent.install(); await agent.install();
+1 -1
View File
@@ -1,6 +1,6 @@
{ {
"name": "@pullfrog/action", "name": "@pullfrog/action",
"version": "0.0.46", "version": "0.0.47",
"type": "module", "type": "module",
"files": [ "files": [
"index.js", "index.js",
+2 -2
View File
@@ -4,7 +4,7 @@ import { pathToFileURL } from "node:url";
import { fromHere } from "@ark/fs"; import { fromHere } from "@ark/fs";
import arg from "arg"; import arg from "arg";
import { config } from "dotenv"; import { config } from "dotenv";
import { type ActionInputs, main } from "./main.ts"; import { type Inputs, main } from "./main.ts";
import packageJson from "./package.json" with { type: "json" }; import packageJson from "./package.json" with { type: "json" };
import { runAct } from "./utils/act.ts"; import { runAct } from "./utils/act.ts";
import { setupTestRepo } from "./utils/setup.ts"; import { setupTestRepo } from "./utils/setup.ts";
@@ -35,7 +35,7 @@ export async function run(
console.log(prompt); console.log(prompt);
console.log("─".repeat(50)); console.log("─".repeat(50));
const inputs: ActionInputs = { const inputs: Inputs = {
prompt, prompt,
anthropic_api_key: process.env.ANTHROPIC_API_KEY, anthropic_api_key: process.env.ANTHROPIC_API_KEY,
}; };