feat: add claudeArgs input for direct CLI argument passing

- Add claude_args input to both action.yml files
- Implement shell-style argument parsing with quote handling
- Pass arguments directly to Claude CLI for maximum flexibility
- Add comprehensive tests for argument parsing
- Log custom arguments for debugging

Users can now pass any Claude CLI arguments directly:
  claude_args: '--max-turns 3 --mcp-config /path/to/config.json'

This provides power users full control over Claude's behavior without
waiting for specific inputs to be added to the action.
This commit is contained in:
km-anthropic
2025-08-07 14:01:27 -07:00
parent 36c720c2db
commit dfcaac854e
5 changed files with 212 additions and 0 deletions

View File

@@ -31,6 +31,7 @@ async function run() {
claudeEnv: process.env.INPUT_CLAUDE_ENV,
fallbackModel: process.env.INPUT_FALLBACK_MODEL,
model: process.env.ANTHROPIC_MODEL,
claudeArgs: process.env.INPUT_CLAUDE_ARGS,
});
} catch (error) {
core.setFailed(`Action failed with error: ${error}`);