action.yml 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. name: 'lambdagent Agent Lint'
  2. description: 'Lint agent YAML configs for structural defects, type mismatches, cost issues, and parallel safety'
  3. author: 'lambdagentpaas'
  4. inputs:
  5. paths:
  6. description: 'Directories or files to scan (newline-separated)'
  7. required: false
  8. default: '.'
  9. fail-on:
  10. description: 'Fail the check on this severity level: error | warn | info'
  11. required: false
  12. default: 'error'
  13. frameworks:
  14. description: 'Framework detection: auto | crewai | langchain | autogen | dify'
  15. required: false
  16. default: 'auto'
  17. cost-threshold:
  18. description: 'Fail if worst-case cost per run exceeds this USD amount'
  19. required: false
  20. default: ''
  21. type-check:
  22. description: 'Enable T-Compose type checking'
  23. required: false
  24. default: 'true'
  25. parallel-check:
  26. description: 'Enable parallel safety (store independence) checking'
  27. required: false
  28. default: 'false'
  29. outputs:
  30. total-errors:
  31. description: 'Number of ERROR-level findings'
  32. total-warnings:
  33. description: 'Number of WARN-level findings'
  34. total-files:
  35. description: 'Number of config files scanned'
  36. runs:
  37. using: 'composite'
  38. steps:
  39. - name: Setup Python
  40. uses: actions/setup-python@v5
  41. with:
  42. python-version: '3.11'
  43. - name: Install lambdagent
  44. shell: bash
  45. run: pip install pyyaml lambdagent || pip install pyyaml
  46. - name: Run lint
  47. id: lint
  48. shell: bash
  49. env:
  50. INPUT_PATHS: ${{ inputs.paths }}
  51. INPUT_FAIL_ON: ${{ inputs.fail-on }}
  52. INPUT_COST_THRESHOLD: ${{ inputs.cost-threshold }}
  53. INPUT_TYPE_CHECK: ${{ inputs.type-check }}
  54. INPUT_PARALLEL_CHECK: ${{ inputs.parallel-check }}
  55. run: |
  56. python3 "${{ github.action_path }}/lint_runner.py"