Refactor action with agent interface system and make anthropic_api_key optional

- Created extensible agent interface with install() and execute() methods
- Moved Claude Code logic to agents/claude.ts implementing Agent interface
- Added utilities directory for reusable functions (exec, files)
- Refactored index.ts to be minimal (35 lines) using agent abstraction
- Made anthropic_api_key optional in action.yml
- Updated Node.js imports to use node: prefix convention
- Bumped version to 0.0.5
- Architecture now supports multiple agents (OpenAI, Gemini, etc.)
This commit is contained in:
Colin McDonnell
2025-08-28 13:37:20 -07:00
parent 6a0d9cc244
commit 1abbd7ff41
10 changed files with 364 additions and 71 deletions
+10 -7
View File
@@ -1,17 +1,20 @@
name: 'Simple Message Action'
description: 'A simple GitHub Action that prints a message to the console'
name: 'Pullfrog Claude Code Action'
description: 'Execute Claude Code with a prompt using Anthropic API'
author: 'Pullfrog'
inputs:
message:
description: 'Message to print to console'
prompt:
description: 'Prompt to send to Claude Code'
required: true
default: 'Hello from Pullfrog Action!'
default: 'Hello from Claude Code!'
anthropic_api_key:
description: 'Anthropic API key for Claude Code authentication'
required: false
runs:
using: 'node20'
main: 'index.cjs'
branding:
icon: 'message-circle'
color: 'blue'
icon: 'code'
color: 'orange'