Simplify agent mode and re-add additional_permissions input

- Agent mode now only triggers when explicit prompt is provided
- Removed automatic triggering for workflow_dispatch/schedule without prompt
- Re-added additional_permissions input for requesting GitHub permissions
- Fixed TypeScript types for mock context helpers to properly handle partial inputs
- Updated documentation to reflect simplified mode behavior
This commit is contained in:
km-anthropic
2025-08-08 14:00:31 -07:00
parent e2aee89b4a
commit 1b4fc382c8
8 changed files with 75 additions and 41 deletions

View File

@@ -25,19 +25,19 @@ The traditional implementation mode that responds to @claude mentions, issue ass
**Note: Agent mode is currently in active development and may undergo breaking changes.**
For automation with workflow_dispatch and scheduled events only.
For direct automation when an explicit prompt is provided.
- **Triggers**: Only works with `workflow_dispatch` and `schedule` events - does NOT work with PR/issue events
- **Features**: Perfect for scheduled tasks, works with `override_prompt`
- **Use case**: Maintenance tasks, automated reporting, scheduled checks
- **Triggers**: Works with any event when `prompt` input is provided
- **Features**: Direct execution without @claude mentions, no tracking comments
- **Use case**: Automated PR reviews, scheduled tasks, workflow automation
```yaml
- uses: anthropics/claude-code-action@beta
with:
mode: agent
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
override_prompt: |
prompt: |
Check for outdated dependencies and create an issue if any are found.
# Mode is auto-detected when prompt is provided
```
### Experimental Review Mode