Skip to content

feat: Propagate exceptions to AfterToolCallEvent for decorated tools (#1565) #500

feat: Propagate exceptions to AfterToolCallEvent for decorated tools (#1565)

feat: Propagate exceptions to AfterToolCallEvent for decorated tools (#1565) #500

name: Strands Command Handler
on:
issue_comment:
types: [created]
workflow_dispatch:
inputs:
issue_id:
description: 'Issue ID to process (can be issue or PR number)'
required: true
type: string
command:
description: 'Strands command to execute'
required: false
type: string
default: ''
session_id:
description: 'Optional session ID to use'
required: false
type: string
default: ''
jobs:
authorization-check:
if: startsWith(github.event.comment.body, '/strands') || github.event_name == 'workflow_dispatch'
name: Check access
permissions: read-all
runs-on: ubuntu-latest
outputs:
approval-env: ${{ steps.auth.outputs.result }}
steps:
- name: Check Authorization
id: auth
uses: strands-agents/devtools/authorization-check@main
with:
skip-check: ${{ github.event_name == 'workflow_dispatch' }}
username: ${{ github.event.comment.user.login || 'invalid' }}
allowed-roles: 'triage,write,admin'
setup-and-process:
needs: [authorization-check]
environment: ${{ needs.authorization-check.outputs.approval-env }}
permissions:
# Needed to create a branch for the Implementer Agent
contents: write
# These both are needed to add the `strands-running` label to issues and prs
issues: write
pull-requests: write
runs-on: ubuntu-latest
steps:
- name: Parse input
id: parse
uses: strands-agents/devtools/strands-command/actions/strands-input-parser@main
with:
issue_id: ${{ inputs.issue_id }}
command: ${{ inputs.command }}
session_id: ${{ inputs.session_id }}
execute-readonly-agent:
needs: [setup-and-process]
permissions:
contents: read
issues: read
pull-requests: read
id-token: write # Required for OIDC
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
# Add any steps here to set up the environment for the Agent in your repo
# setup node, setup python, or any other dependencies
- name: Run Strands Agent
id: agent-runner
uses: strands-agents/devtools/strands-command/actions/strands-agent-runner@main
with:
aws_role_arn: ${{ secrets.AWS_ROLE_ARN }}
sessions_bucket: ${{ secrets.AGENT_SESSIONS_BUCKET }}
write_permission: 'false'
finalize:
needs: [setup-and-process, execute-readonly-agent]
permissions:
contents: write
issues: write
pull-requests: write
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- name: Execute write operations
uses: strands-agents/devtools/strands-command/actions/strands-finalize@main