@openhands/extensions 0.1.0 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (347) hide show
  1. package/.agents/skills/custom-codereview-guide.md +25 -0
  2. package/.github/pull_request_template.md +38 -0
  3. package/.github/release.yml +14 -0
  4. package/.github/workflows/check-extensions.yml +72 -0
  5. package/.github/workflows/npm-publish.yml +89 -0
  6. package/.github/workflows/pr.yml +30 -0
  7. package/.github/workflows/release.yml +24 -0
  8. package/.github/workflows/tests.yml +25 -0
  9. package/.github/workflows/vulnerability-scan.yml +87 -0
  10. package/.release-please-manifest.json +3 -0
  11. package/AGENTS.md +132 -0
  12. package/README.md +10 -0
  13. package/analysis_results.md +162 -0
  14. package/marketplaces/large-codebase.json +66 -0
  15. package/marketplaces/openhands-extensions.json +682 -0
  16. package/package.json +4 -10
  17. package/plugins/README.md +30 -0
  18. package/plugins/city-weather/.plugin/plugin.json +13 -0
  19. package/plugins/city-weather/README.md +145 -0
  20. package/plugins/city-weather/commands/now.md +56 -0
  21. package/plugins/cobol-modernization/.plugin/plugin.json +19 -0
  22. package/plugins/cobol-modernization/README.md +201 -0
  23. package/plugins/cobol-modernization/references/troubleshooting.md +18 -0
  24. package/plugins/cobol-modernization/skills/build-setup/SKILL.md +78 -0
  25. package/plugins/cobol-modernization/skills/build-setup/scripts/install-gnucobol.sh +32 -0
  26. package/plugins/cobol-modernization/skills/cobol-modernization-overview/SKILL.md +113 -0
  27. package/plugins/cobol-modernization/skills/mainfraime-removal/SKILL.md +62 -0
  28. package/plugins/cobol-modernization/skills/mainfraime-removal/references/cics-transformation-examples.md +45 -0
  29. package/plugins/cobol-modernization/skills/mainframe-planning/SKILL.md +78 -0
  30. package/plugins/cobol-modernization/skills/to-java-migration/SKILL.md +59 -0
  31. package/plugins/cobol-modernization/skills/to-java-migration/references/cobol-to-java-example.md +58 -0
  32. package/plugins/cobol-modernization/skills/to-java-migration/references/datatype-mappings.md +19 -0
  33. package/plugins/issue-duplicate-checker/.plugin/plugin.json +13 -0
  34. package/plugins/issue-duplicate-checker/README.md +51 -0
  35. package/plugins/issue-duplicate-checker/action.yml +349 -0
  36. package/plugins/issue-duplicate-checker/scripts/auto_close_duplicate_issues.py +569 -0
  37. package/plugins/issue-duplicate-checker/scripts/issue_duplicate_check_openhands.py +681 -0
  38. package/plugins/issue-duplicate-checker/scripts/post_duplicate_notice.js +220 -0
  39. package/plugins/issue-duplicate-checker/scripts/remove_duplicate_candidate_label.js +27 -0
  40. package/plugins/magic-test/.plugin/plugin.json +13 -0
  41. package/plugins/magic-test/skills/magic-word/SKILL.md +33 -0
  42. package/plugins/migration-scoring/.plugin/plugin.json +19 -0
  43. package/plugins/migration-scoring/README.md +244 -0
  44. package/plugins/migration-scoring/skills/migration-mapping/SKILL.md +72 -0
  45. package/plugins/migration-scoring/skills/migration-report/SKILL.md +118 -0
  46. package/plugins/migration-scoring/skills/migration-scoring-overview/SKILL.md +126 -0
  47. package/plugins/migration-scoring/skills/score-quality/SKILL.md +54 -0
  48. package/plugins/migration-scoring/skills/score-quality/references/scoring-criteria.md +30 -0
  49. package/plugins/migration-scoring/skills/score-style/SKILL.md +106 -0
  50. package/plugins/onboarding/.plugin/plugin.json +20 -0
  51. package/plugins/onboarding/README.md +30 -0
  52. package/plugins/onboarding/references/criteria.md +144 -0
  53. package/plugins/onboarding/skills/agent-readiness-report/README.md +23 -0
  54. package/plugins/onboarding/skills/agent-readiness-report/SKILL.md +122 -0
  55. package/plugins/onboarding/skills/agent-readiness-report/scripts/scan_agent_instructions.sh +88 -0
  56. package/plugins/onboarding/skills/agent-readiness-report/scripts/scan_build_env.sh +114 -0
  57. package/plugins/onboarding/skills/agent-readiness-report/scripts/scan_feedback_loops.sh +133 -0
  58. package/plugins/onboarding/skills/agent-readiness-report/scripts/scan_policy.sh +113 -0
  59. package/plugins/onboarding/skills/agent-readiness-report/scripts/scan_workflows.sh +127 -0
  60. package/plugins/onboarding/skills/improve-agent-readiness/README.md +19 -0
  61. package/plugins/onboarding/skills/improve-agent-readiness/SKILL.md +167 -0
  62. package/plugins/onboarding/skills/setup-agents-md/README.md +15 -0
  63. package/plugins/onboarding/skills/setup-agents-md/SKILL.md +150 -0
  64. package/plugins/onboarding/skills/setup-openhands/README.md +20 -0
  65. package/plugins/onboarding/skills/setup-openhands/SKILL.md +56 -0
  66. package/plugins/onboarding/skills/setup-pr-review/README.md +23 -0
  67. package/plugins/onboarding/skills/setup-pr-review/SKILL.md +72 -0
  68. package/plugins/openhands/.plugin/plugin.json +13 -0
  69. package/plugins/openhands/README.md +52 -0
  70. package/plugins/openhands/SKILL.md +61 -0
  71. package/plugins/openhands/commands/create.md +55 -0
  72. package/plugins/openhands/commands/openhands-cloud.md +8 -0
  73. package/plugins/openhands/scripts/run.sh +69 -0
  74. package/plugins/pr-review/.plugin/plugin.json +13 -0
  75. package/plugins/pr-review/README.md +393 -0
  76. package/plugins/pr-review/action.yml +298 -0
  77. package/plugins/pr-review/scripts/agent_script.py +1282 -0
  78. package/plugins/pr-review/scripts/evaluate_review.py +655 -0
  79. package/plugins/pr-review/scripts/prompt.py +260 -0
  80. package/plugins/pr-review/workflows/pr-review-by-openhands.yml +51 -0
  81. package/plugins/pr-review/workflows/pr-review-evaluation.yml +85 -0
  82. package/plugins/qa-changes/.plugin/plugin.json +11 -0
  83. package/plugins/qa-changes/README.md +185 -0
  84. package/plugins/qa-changes/action.yml +181 -0
  85. package/plugins/qa-changes/scripts/agent_script.py +406 -0
  86. package/plugins/qa-changes/scripts/evaluate_qa_changes.py +385 -0
  87. package/plugins/qa-changes/scripts/prompt.py +174 -0
  88. package/plugins/qa-changes/workflows/qa-changes-by-openhands.yml +50 -0
  89. package/plugins/qa-changes/workflows/qa-changes-evaluation.yml +85 -0
  90. package/plugins/release-notes/.plugin/plugin.json +19 -0
  91. package/plugins/release-notes/README.md +283 -0
  92. package/plugins/release-notes/SKILL.md +83 -0
  93. package/plugins/release-notes/action.yml +117 -0
  94. package/plugins/release-notes/commands/release-notes.md +8 -0
  95. package/plugins/release-notes/scripts/agent_script.py +292 -0
  96. package/plugins/release-notes/scripts/generate_release_notes.py +733 -0
  97. package/plugins/release-notes/scripts/prompt.py +90 -0
  98. package/plugins/release-notes/scripts/validate_release_notes.py +328 -0
  99. package/plugins/release-notes/workflows/release-notes.yml +76 -0
  100. package/plugins/vulnerability-remediation/.plugin/plugin.json +19 -0
  101. package/plugins/vulnerability-remediation/README.md +217 -0
  102. package/plugins/vulnerability-remediation/action.yml +187 -0
  103. package/plugins/vulnerability-remediation/scripts/scan_and_remediate.py +561 -0
  104. package/plugins/vulnerability-remediation/workflows/vulnerability-scan.yml +87 -0
  105. package/pyproject.toml +12 -0
  106. package/release-please-config.json +16 -0
  107. package/scripts/sync_extensions.py +494 -0
  108. package/scripts/sync_openhands_sdk_skill.py +264 -0
  109. package/skills/README.md +159 -0
  110. package/skills/add-javadoc/.plugin/plugin.json +18 -0
  111. package/skills/add-javadoc/README.md +40 -0
  112. package/skills/add-javadoc/SKILL.md +35 -0
  113. package/skills/add-javadoc/references/example.md +32 -0
  114. package/skills/add-skill/.plugin/plugin.json +18 -0
  115. package/skills/add-skill/README.md +67 -0
  116. package/skills/add-skill/SKILL.md +47 -0
  117. package/skills/add-skill/scripts/fetch_skill.py +259 -0
  118. package/skills/agent-creator/.plugin/plugin.json +20 -0
  119. package/skills/agent-creator/README.md +104 -0
  120. package/skills/agent-creator/SKILL.md +190 -0
  121. package/skills/agent-creator/commands/agent-creator.md +8 -0
  122. package/skills/agent-creator/references/fallback.md +117 -0
  123. package/skills/agent-memory/.plugin/plugin.json +18 -0
  124. package/skills/agent-memory/README.md +35 -0
  125. package/skills/agent-memory/SKILL.md +30 -0
  126. package/skills/agent-memory/commands/remember.md +8 -0
  127. package/skills/agent-sdk-builder/.plugin/plugin.json +18 -0
  128. package/skills/agent-sdk-builder/README.md +40 -0
  129. package/skills/agent-sdk-builder/SKILL.md +37 -0
  130. package/skills/agent-sdk-builder/commands/agent-builder.md +8 -0
  131. package/skills/azure-devops/.plugin/plugin.json +18 -0
  132. package/skills/azure-devops/README.md +55 -0
  133. package/skills/azure-devops/SKILL.md +50 -0
  134. package/skills/bitbucket/.plugin/plugin.json +17 -0
  135. package/skills/bitbucket/README.md +50 -0
  136. package/skills/bitbucket/SKILL.md +45 -0
  137. package/skills/code-review/.plugin/plugin.json +19 -0
  138. package/skills/code-review/README.md +18 -0
  139. package/skills/code-review/SKILL.md +208 -0
  140. package/skills/code-review/commands/codereview-roasted.md +8 -0
  141. package/skills/code-review/commands/codereview.md +8 -0
  142. package/skills/code-review/references/risk-evaluation.md +41 -0
  143. package/skills/code-review/references/supply-chain-security.md +31 -0
  144. package/skills/code-simplifier/.plugin/plugin.json +21 -0
  145. package/skills/code-simplifier/README.md +30 -0
  146. package/skills/code-simplifier/SKILL.md +91 -0
  147. package/skills/code-simplifier/commands/simplify.md +8 -0
  148. package/skills/code-simplifier/references/code-quality-review.md +86 -0
  149. package/skills/code-simplifier/references/code-reuse-review.md +63 -0
  150. package/skills/code-simplifier/references/efficiency-review.md +81 -0
  151. package/skills/datadog/.plugin/plugin.json +19 -0
  152. package/skills/datadog/README.md +100 -0
  153. package/skills/datadog/SKILL.md +95 -0
  154. package/skills/deno/.plugin/plugin.json +18 -0
  155. package/skills/deno/README.md +5 -0
  156. package/skills/deno/SKILL.md +99 -0
  157. package/skills/deno/references/README.md +6 -0
  158. package/skills/discord/.plugin/plugin.json +18 -0
  159. package/skills/discord/README.md +31 -0
  160. package/skills/discord/SKILL.md +109 -0
  161. package/skills/discord/__init__.py +0 -0
  162. package/skills/discord/references/REFERENCE.md +78 -0
  163. package/skills/discord/scripts/__init__.py +0 -0
  164. package/skills/discord/scripts/_http.py +127 -0
  165. package/skills/discord/scripts/post_webhook.py +106 -0
  166. package/skills/discord/scripts/send_message.py +102 -0
  167. package/skills/docker/.plugin/plugin.json +17 -0
  168. package/skills/docker/README.md +34 -0
  169. package/skills/docker/SKILL.md +29 -0
  170. package/skills/evidence-based-citations/.plugin/plugin.json +20 -0
  171. package/skills/evidence-based-citations/README.md +31 -0
  172. package/skills/evidence-based-citations/SKILL.md +59 -0
  173. package/skills/flarglebargle/.plugin/plugin.json +16 -0
  174. package/skills/flarglebargle/README.md +14 -0
  175. package/skills/flarglebargle/SKILL.md +9 -0
  176. package/skills/frontend-design/.plugin/plugin.json +21 -0
  177. package/skills/frontend-design/LICENSE.txt +177 -0
  178. package/skills/frontend-design/README.md +42 -0
  179. package/skills/frontend-design/SKILL.md +42 -0
  180. package/skills/github/.plugin/plugin.json +19 -0
  181. package/skills/github/README.md +42 -0
  182. package/skills/github/SKILL.md +106 -0
  183. package/skills/github-pr-review/.plugin/plugin.json +18 -0
  184. package/skills/github-pr-review/README.md +145 -0
  185. package/skills/github-pr-review/SKILL.md +148 -0
  186. package/skills/github-pr-review/commands/github-pr-review.md +8 -0
  187. package/skills/github-pr-reviewer/.plugin/plugin.json +20 -0
  188. package/skills/github-pr-reviewer/README.md +34 -0
  189. package/skills/github-pr-reviewer/SKILL.md +89 -0
  190. package/skills/github-pr-reviewer/commands/pr-reviewer:setup.md +8 -0
  191. package/skills/github-repo-monitor/.plugin/plugin.json +22 -0
  192. package/skills/github-repo-monitor/README.md +70 -0
  193. package/skills/github-repo-monitor/SKILL.md +316 -0
  194. package/skills/github-repo-monitor/commands/github-monitor:poll.md +8 -0
  195. package/skills/github-repo-monitor/references/github-api.md +241 -0
  196. package/skills/github-repo-monitor/references/state-schema.md +160 -0
  197. package/skills/github-repo-monitor/scripts/main.py +915 -0
  198. package/skills/github-repo-monitor/tests/test_main.py +400 -0
  199. package/skills/gitlab/.plugin/plugin.json +17 -0
  200. package/skills/gitlab/README.md +37 -0
  201. package/skills/gitlab/SKILL.md +32 -0
  202. package/skills/incident-retrospective/.plugin/plugin.json +21 -0
  203. package/skills/incident-retrospective/README.md +34 -0
  204. package/skills/incident-retrospective/SKILL.md +98 -0
  205. package/skills/incident-retrospective/commands/incident-retro:setup.md +8 -0
  206. package/skills/iterate/.plugin/plugin.json +13 -0
  207. package/skills/iterate/README.md +25 -0
  208. package/skills/iterate/SKILL.md +399 -0
  209. package/skills/iterate/commands/babysit.md +8 -0
  210. package/skills/iterate/commands/iterate.md +8 -0
  211. package/skills/iterate/commands/verify.md +8 -0
  212. package/skills/iterate/references/heuristics.md +58 -0
  213. package/skills/iterate/references/verification.md +96 -0
  214. package/skills/jupyter/.plugin/plugin.json +18 -0
  215. package/skills/jupyter/README.md +55 -0
  216. package/skills/jupyter/SKILL.md +50 -0
  217. package/skills/kubernetes/.plugin/plugin.json +18 -0
  218. package/skills/kubernetes/README.md +53 -0
  219. package/skills/kubernetes/SKILL.md +48 -0
  220. package/skills/learn-from-code-review/.plugin/plugin.json +19 -0
  221. package/skills/learn-from-code-review/README.md +64 -0
  222. package/skills/learn-from-code-review/SKILL.md +186 -0
  223. package/skills/learn-from-code-review/commands/learn-from-reviews.md +8 -0
  224. package/skills/linear/.plugin/plugin.json +19 -0
  225. package/skills/linear/README.md +58 -0
  226. package/skills/linear/SKILL.md +213 -0
  227. package/skills/linear-triage/.plugin/plugin.json +21 -0
  228. package/skills/linear-triage/README.md +34 -0
  229. package/skills/linear-triage/SKILL.md +91 -0
  230. package/skills/linear-triage/commands/linear-triage:setup.md +8 -0
  231. package/skills/notion/.plugin/plugin.json +17 -0
  232. package/skills/notion/README.md +114 -0
  233. package/skills/notion/SKILL.md +109 -0
  234. package/skills/npm/.plugin/plugin.json +17 -0
  235. package/skills/npm/README.md +14 -0
  236. package/skills/npm/SKILL.md +9 -0
  237. package/skills/openhands-api/.plugin/plugin.json +22 -0
  238. package/skills/openhands-api/README.md +48 -0
  239. package/skills/openhands-api/SKILL.md +399 -0
  240. package/skills/openhands-api/references/README.md +33 -0
  241. package/skills/openhands-api/references/TROUBLESHOOTING.md +81 -0
  242. package/skills/openhands-api/references/example_prompt.md +12 -0
  243. package/skills/openhands-api/scripts/openhands_api.py +606 -0
  244. package/skills/openhands-api/scripts/openhands_api.ts +252 -0
  245. package/skills/openhands-automation/.plugin/plugin.json +19 -0
  246. package/skills/openhands-automation/README.md +89 -0
  247. package/skills/openhands-automation/SKILL.md +875 -0
  248. package/skills/openhands-automation/commands/automation:create.md +8 -0
  249. package/skills/openhands-automation/references/ab-testing.md +185 -0
  250. package/skills/openhands-automation/references/custom-automation.md +644 -0
  251. package/skills/openhands-sdk/.plugin/plugin.json +20 -0
  252. package/skills/openhands-sdk/README.md +22 -0
  253. package/skills/openhands-sdk/SKILL.md +229 -0
  254. package/skills/openhands-sdk/commands/sdk.md +8 -0
  255. package/skills/pdflatex/.plugin/plugin.json +18 -0
  256. package/skills/pdflatex/README.md +39 -0
  257. package/skills/pdflatex/SKILL.md +34 -0
  258. package/skills/prd/.plugin/plugin.json +19 -0
  259. package/skills/prd/README.md +28 -0
  260. package/skills/prd/SKILL.md +237 -0
  261. package/skills/prd/commands/prd.md +8 -0
  262. package/skills/qa-changes/README.md +18 -0
  263. package/skills/qa-changes/SKILL.md +229 -0
  264. package/skills/qa-changes/commands/qa-changes.md +8 -0
  265. package/skills/release-notes/README.md +24 -0
  266. package/skills/release-notes/SKILL.md +19 -0
  267. package/skills/release-notes/commands/release-notes.md +8 -0
  268. package/skills/research-brief/.plugin/plugin.json +20 -0
  269. package/skills/research-brief/README.md +34 -0
  270. package/skills/research-brief/SKILL.md +99 -0
  271. package/skills/research-brief/commands/research-brief:setup.md +8 -0
  272. package/skills/security/.plugin/plugin.json +18 -0
  273. package/skills/security/README.md +38 -0
  274. package/skills/security/SKILL.md +33 -0
  275. package/skills/skill-creator/.plugin/plugin.json +17 -0
  276. package/skills/skill-creator/LICENSE.txt +202 -0
  277. package/skills/skill-creator/README.md +182 -0
  278. package/skills/skill-creator/SKILL.md +545 -0
  279. package/skills/skill-creator/references/output-patterns.md +82 -0
  280. package/skills/skill-creator/references/workflows.md +28 -0
  281. package/skills/skill-creator/scripts/init_skill.py +303 -0
  282. package/skills/skill-creator/scripts/quick_validate.py +95 -0
  283. package/skills/slack-channel-monitor/.plugin/plugin.json +21 -0
  284. package/skills/slack-channel-monitor/README.md +91 -0
  285. package/skills/slack-channel-monitor/SKILL.md +276 -0
  286. package/skills/slack-channel-monitor/commands/slack-monitor:poll.md +8 -0
  287. package/skills/slack-channel-monitor/references/slack-api.md +207 -0
  288. package/skills/slack-channel-monitor/references/state-schema.md +180 -0
  289. package/skills/slack-channel-monitor/scripts/main.py +962 -0
  290. package/skills/slack-standup-digest/.plugin/plugin.json +21 -0
  291. package/skills/slack-standup-digest/README.md +34 -0
  292. package/skills/slack-standup-digest/SKILL.md +92 -0
  293. package/skills/slack-standup-digest/commands/standup-digest:setup.md +8 -0
  294. package/skills/spark-version-upgrade/.plugin/plugin.json +20 -0
  295. package/skills/spark-version-upgrade/README.md +54 -0
  296. package/skills/spark-version-upgrade/SKILL.md +233 -0
  297. package/skills/ssh/.plugin/plugin.json +18 -0
  298. package/skills/ssh/README.md +140 -0
  299. package/skills/ssh/SKILL.md +135 -0
  300. package/skills/swift-linux/.plugin/plugin.json +17 -0
  301. package/skills/swift-linux/README.md +86 -0
  302. package/skills/swift-linux/SKILL.md +81 -0
  303. package/skills/theme-factory/.plugin/plugin.json +19 -0
  304. package/skills/theme-factory/LICENSE.txt +202 -0
  305. package/skills/theme-factory/README.md +58 -0
  306. package/skills/theme-factory/SKILL.md +59 -0
  307. package/skills/theme-factory/theme-showcase.pdf +0 -0
  308. package/skills/theme-factory/themes/arctic-frost.md +19 -0
  309. package/skills/theme-factory/themes/botanical-garden.md +19 -0
  310. package/skills/theme-factory/themes/desert-rose.md +19 -0
  311. package/skills/theme-factory/themes/forest-canopy.md +19 -0
  312. package/skills/theme-factory/themes/golden-hour.md +19 -0
  313. package/skills/theme-factory/themes/midnight-galaxy.md +19 -0
  314. package/skills/theme-factory/themes/modern-minimalist.md +19 -0
  315. package/skills/theme-factory/themes/ocean-depths.md +19 -0
  316. package/skills/theme-factory/themes/sunset-boulevard.md +19 -0
  317. package/skills/theme-factory/themes/tech-innovation.md +19 -0
  318. package/skills/uv/.plugin/plugin.json +18 -0
  319. package/skills/uv/README.md +5 -0
  320. package/skills/uv/SKILL.md +95 -0
  321. package/skills/uv/references/README.md +5 -0
  322. package/skills/vercel/.plugin/plugin.json +18 -0
  323. package/skills/vercel/README.md +108 -0
  324. package/skills/vercel/SKILL.md +103 -0
  325. package/tests/test_add_skill_installs_to_agents_dir.py +42 -0
  326. package/tests/test_catalogs.py +109 -0
  327. package/tests/test_code_review_risk_evaluation.py +94 -0
  328. package/tests/test_issue_duplicate_checker.py +240 -0
  329. package/tests/test_openhands_api_python.py +152 -0
  330. package/tests/test_plugin_manifest.py +83 -0
  331. package/tests/test_pr_review_diff_payload.py +202 -0
  332. package/tests/test_pr_review_feedback.py +263 -0
  333. package/tests/test_pr_review_prompt.py +152 -0
  334. package/tests/test_pr_review_review_context.py +253 -0
  335. package/tests/test_qa_changes.py +232 -0
  336. package/tests/test_qa_changes_evaluation.py +259 -0
  337. package/tests/test_release_notes_generator.py +990 -0
  338. package/tests/test_sdk_loading.py +150 -0
  339. package/tests/test_skill_plugin_loading.py +149 -0
  340. package/tests/test_skills_have_readme.py +66 -0
  341. package/tests/test_sync_extensions.py +292 -0
  342. package/tests/test_workflow_sync.py +46 -0
  343. package/utils/analysis/README.md +7 -0
  344. package/utils/analysis/laminar_signals/README.md +211 -0
  345. package/utils/analysis/laminar_signals/analyze.py +780 -0
  346. package/utils/analysis/laminar_signals/templates/default.j2 +49 -0
  347. package/utils/analysis/laminar_signals/templates/pr_review.j2 +61 -0
@@ -0,0 +1,298 @@
1
+ ---
2
+ name: OpenHands PR Review
3
+ description: Automated PR review using OpenHands agent
4
+ author: OpenHands
5
+
6
+ branding:
7
+ icon: code
8
+ color: blue
9
+
10
+ inputs:
11
+ agent-kind:
12
+ description: >
13
+ Review agent backend. Use 'openhands' for the standard OpenHands
14
+ SDK Agent, or 'acp' to run an ACP-compatible agent server.
15
+ required: false
16
+ default: openhands
17
+ llm-model:
18
+ description: >
19
+ LLM model to use for the review. In ACP mode this is passed to the
20
+ ACP server when supported. Can be a comma-separated list for A/B
21
+ testing - one model will be randomly selected per review.
22
+ Example: 'model-a' or 'model-a,model-b,model-c'
23
+ required: false
24
+ default: anthropic/claude-sonnet-4-5-20250929
25
+ acp-command:
26
+ description: >
27
+ Command used to start the ACP server when agent-kind is
28
+ 'acp'. The command must be available in the runner environment
29
+ or runnable through a package manager. The value is shell-split
30
+ before execution.
31
+ Examples: 'npx -y @zed-industries/codex-acp@0.12.0',
32
+ 'codex-acp', 'claude-agent-acp', or 'npx -y
33
+ @agentclientprotocol/claude-agent-acp'.
34
+ required: false
35
+ default: ''
36
+ acp-prompt-timeout:
37
+ description: Timeout in seconds for one ACP prompt turn.
38
+ required: false
39
+ default: '1800'
40
+ llm-base-url:
41
+ description: LLM base URL (optional, for custom LLM endpoints)
42
+ required: false
43
+ default: ''
44
+ review-style:
45
+ description: "[DEPRECATED] Previously chose between 'standard' and 'roasted' review styles. These have been merged into a single code-review skill. The input is kept for backward compatibility but no longer changes behavior. Will be removed in a future version."
46
+ required: false
47
+ default: roasted
48
+ require-evidence:
49
+ description: "When true, require the reviewer to check the PR description for an Evidence section proving the code works end-to-end (screenshots/videos for frontend changes; commands and runtime output for backend, CLI, or script changes; conversation link when agent-generated). Test output alone does not count."
50
+ required: false
51
+ default: 'false'
52
+ use-sub-agents:
53
+ description: >
54
+ Enable sub-agent delegation for file-level reviews.
55
+ When true, the agent gets the TaskToolSet and decides at runtime
56
+ whether to delegate based on diff size and complexity.
57
+ Disabled by default due to high token costs and potential timeouts
58
+ (see issue #208). Set to 'true' to opt in.
59
+ required: false
60
+ default: 'false'
61
+ load-public-skills:
62
+ description: >
63
+ Load the public skills repository into the review agent context.
64
+ Disable this to keep PR review prompts limited to project skills
65
+ and the pr-review plugin skills.
66
+ required: false
67
+ default: 'true'
68
+ collect-feedback:
69
+ description: >
70
+ Ask maintainers to rate the automated review with thumbs up/down
71
+ reactions by appending a short footer to the main review body.
72
+ required: false
73
+ default: 'true'
74
+ extensions-repo:
75
+ description: GitHub repository for extensions (owner/repo)
76
+ required: false
77
+ default: OpenHands/extensions
78
+ extensions-version:
79
+ description: Git ref to use for extensions (tag, branch, or commit SHA, e.g., v1.0.0, main, or abc1234)
80
+ required: false
81
+ default: main
82
+ openhands-sdk-package:
83
+ description: >
84
+ Package spec passed to uv for openhands-sdk. Keep the default for
85
+ normal use, or override it to pin a specific SDK build for testing
86
+ or rollout control.
87
+ required: false
88
+ default: openhands-sdk
89
+ llm-api-key:
90
+ description: >
91
+ LLM API key. Required when agent-kind is 'openhands'.
92
+ Ignored in ACP mode because the ACP server owns authentication.
93
+ required: false
94
+ github-token:
95
+ description: GitHub token for API access (required)
96
+ required: true
97
+ lmnr-api-key:
98
+ description: Laminar API key for observability (optional)
99
+ required: false
100
+ default: ''
101
+ enable-uv-cache:
102
+ description: >
103
+ Enable setup-uv's GitHub Actions cache for Python dependencies.
104
+ Default is 'false' for security: shared caches can become a pivot
105
+ into more privileged workflows (prompt-injected reviewer could
106
+ write a malicious wheel into cache; subsequent higher-privilege
107
+ workflow hits poisoned cache). Only opt in when you control the
108
+ runner environment (e.g. self-hosted, single-tenant) and accept
109
+ the trade-off.
110
+ required: false
111
+ default: 'false'
112
+
113
+ runs:
114
+ using: composite
115
+ steps:
116
+ - name: Checkout extensions repository
117
+ uses: actions/checkout@v4
118
+ with:
119
+ repository: ${{ inputs.extensions-repo }}
120
+ ref: ${{ inputs.extensions-version }}
121
+ path: extensions
122
+
123
+ - name: Checkout PR repository
124
+ uses: actions/checkout@v4
125
+ with:
126
+ repository: ${{ github.event.pull_request.head.repo.full_name }}
127
+ ref: ${{ github.event.pull_request.head.ref }}
128
+ fetch-depth: 0
129
+ persist-credentials: false
130
+ path: pr-repo
131
+ submodules: recursive
132
+
133
+ - name: Set up Python
134
+ uses: actions/setup-python@v5
135
+ with:
136
+ python-version: '3.12'
137
+
138
+ # Security: caching is disabled by default. Prompt injection can coerce
139
+ # the reviewer into running commands, and shared caches can become a
140
+ # pivot into more privileged workflows. Opt in via `enable-uv-cache`
141
+ # only when the runner is single-tenant / self-hosted.
142
+ - name: Install uv
143
+ uses: astral-sh/setup-uv@v6
144
+ with:
145
+ enable-cache: ${{ inputs.enable-uv-cache }}
146
+
147
+ - name: Install GitHub CLI
148
+ shell: bash
149
+ run: |
150
+ # `gh` is preinstalled on all GitHub-hosted Ubuntu runners, so the
151
+ # apt path only runs on self-hosted runners that lack it. This
152
+ # avoids a ~10s `apt-get update` on every review on hosted runners,
153
+ # and also avoids spurious failures when an apt mirror is flaky.
154
+ if command -v gh >/dev/null 2>&1; then
155
+ echo "gh already installed: $(gh --version | head -n1)"
156
+ else
157
+ echo "gh not found, installing via apt..."
158
+ sudo apt-get update
159
+ sudo apt-get install -y gh
160
+ fi
161
+
162
+ - name: Check required configuration and select model
163
+ id: select-model
164
+ shell: bash
165
+ env:
166
+ AGENT_KIND: ${{ inputs.agent-kind }}
167
+ ACP_COMMAND: ${{ inputs.acp-command }}
168
+ LLM_API_KEY: ${{ inputs.llm-api-key }}
169
+ GITHUB_TOKEN: ${{ inputs.github-token }}
170
+ LLM_MODEL_INPUT: ${{ inputs.llm-model }}
171
+ LLM_BASE_URL: ${{ inputs.llm-base-url }}
172
+ PR_NUMBER: ${{ github.event.pull_request.number }}
173
+ PR_TITLE: ${{ github.event.pull_request.title }}
174
+ REPOSITORY: ${{ github.repository }}
175
+ EXTENSIONS_VERSION: ${{ inputs.extensions-version }}
176
+ run: |
177
+ if [ "$AGENT_KIND" != "openhands" ] && [ "$AGENT_KIND" != "acp" ]; then
178
+ echo "Error: agent-kind must be 'openhands' or 'acp'."
179
+ exit 1
180
+ fi
181
+
182
+ if [ "$AGENT_KIND" = "openhands" ] && [ -z "$LLM_API_KEY" ]; then
183
+ echo "Error: llm-api-key is required when agent-kind is 'openhands'."
184
+ exit 1
185
+ fi
186
+
187
+ if [ "$AGENT_KIND" = "acp" ] && [ -z "$ACP_COMMAND" ]; then
188
+ echo "Error: acp-command is required when agent-kind is 'acp'."
189
+ exit 1
190
+ fi
191
+
192
+ if [ -z "$GITHUB_TOKEN" ]; then
193
+ echo "Error: github-token is required."
194
+ exit 1
195
+ fi
196
+
197
+ # Select one model randomly from the comma-separated list
198
+ MODELS_LIST="$LLM_MODEL_INPUT"
199
+ IFS=',' read -ra MODELS <<< "$MODELS_LIST"
200
+ SELECTED_MODEL="${MODELS[$RANDOM % ${#MODELS[@]}]}"
201
+ printf 'selected_model=%s\n' "$SELECTED_MODEL" >> "$GITHUB_OUTPUT"
202
+
203
+ printf 'PR Number: %s\n' "$PR_NUMBER"
204
+ printf 'PR Title: %s\n' "$PR_TITLE"
205
+ printf 'Repository: %s\n' "$REPOSITORY"
206
+ printf 'Extensions Version: %s\n' "$EXTENSIONS_VERSION"
207
+ printf 'Agent kind: %s\n' "$AGENT_KIND"
208
+ printf 'Available models: %s\n' "$MODELS_LIST"
209
+ printf 'Selected LLM model: %s\n' "$SELECTED_MODEL"
210
+ if [ "$AGENT_KIND" = "acp" ]; then
211
+ printf 'ACP command: %s\n' "$ACP_COMMAND"
212
+ fi
213
+ if [ -n "$LLM_BASE_URL" ]; then
214
+ printf 'LLM base URL: %s\n' "$LLM_BASE_URL"
215
+ fi
216
+
217
+ - name: Preflight review permission smoke test
218
+ shell: bash
219
+ env:
220
+ GITHUB_TOKEN: ${{ inputs.github-token }}
221
+ PR_NUMBER: ${{ github.event.pull_request.number }}
222
+ REPOSITORY: ${{ github.repository }}
223
+ run: |
224
+ if ! REVIEW_ID="$(
225
+ gh api \
226
+ -X POST \
227
+ "repos/${REPOSITORY}/pulls/${PR_NUMBER}/reviews" \
228
+ -f body='Preflight review permission smoke test. This pending review will be deleted immediately.' \
229
+ --jq '.id'
230
+ )"; then
231
+ echo "Failed to create pending review during preflight smoke test"
232
+ echo "The GITHUB_TOKEN lacks 'pull_requests: write' permission."
233
+ echo "Add 'permissions: { pull-requests: write }' to your workflow job."
234
+ exit 1
235
+ fi
236
+
237
+ if [ -z "$REVIEW_ID" ]; then
238
+ echo "Preflight smoke test returned an empty review id"
239
+ exit 1
240
+ fi
241
+
242
+ if ! gh api \
243
+ -X DELETE \
244
+ "repos/${REPOSITORY}/pulls/${PR_NUMBER}/reviews/${REVIEW_ID}"; then
245
+ echo "Warning: Failed to delete preflight review (ID: ${REVIEW_ID}). This is cosmetic and won't affect the workflow."
246
+ fi
247
+
248
+ - name: Run PR review
249
+ shell: bash
250
+ env:
251
+ # Pin uv to the exact Python installed by setup-python so it
252
+ # ignores any .python-version in the PR repo checkout (which
253
+ # could be older *or* newer than 3.12).
254
+ UV_PYTHON: '3.12'
255
+ OPENHANDS_SDK_PACKAGE: ${{ inputs.openhands-sdk-package }}
256
+ AGENT_KIND: ${{ inputs.agent-kind }}
257
+ ACP_COMMAND: ${{ inputs.acp-command }}
258
+ ACP_PROMPT_TIMEOUT: ${{ inputs.acp-prompt-timeout }}
259
+ LLM_MODEL: ${{ steps.select-model.outputs.selected_model }}
260
+ LLM_BASE_URL: ${{ inputs.llm-base-url }}
261
+ REVIEW_STYLE: ${{ inputs.review-style }}
262
+ REQUIRE_EVIDENCE: ${{ inputs.require-evidence }}
263
+ COLLECT_FEEDBACK: ${{ inputs.collect-feedback }}
264
+ REVIEW_RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
265
+ USE_SUB_AGENTS: ${{ inputs.use-sub-agents }}
266
+ LOAD_PUBLIC_SKILLS: ${{ inputs.load-public-skills }}
267
+ LLM_API_KEY: ${{ inputs.llm-api-key }}
268
+ GITHUB_TOKEN: ${{ inputs.github-token }}
269
+ LMNR_PROJECT_API_KEY: ${{ inputs.lmnr-api-key }}
270
+ PR_NUMBER: ${{ github.event.pull_request.number }}
271
+ PR_TITLE: ${{ github.event.pull_request.title }}
272
+ PR_BODY: ${{ github.event.pull_request.body }}
273
+ PR_BASE_BRANCH: ${{ github.event.pull_request.base.ref }}
274
+ PR_HEAD_BRANCH: ${{ github.event.pull_request.head.ref }}
275
+ REPO_NAME: ${{ github.repository }}
276
+ run: |
277
+ cd pr-repo
278
+ uv run --no-project --with "$OPENHANDS_SDK_PACKAGE" --with openhands-tools --with lmnr \
279
+ python ../extensions/plugins/pr-review/scripts/agent_script.py
280
+
281
+ - name: Upload logs as artifact
282
+ uses: actions/upload-artifact@v4
283
+ if: always()
284
+ with:
285
+ name: openhands-pr-review-logs
286
+ path: |
287
+ *.log
288
+ output/
289
+ retention-days: 7
290
+
291
+ - name: Upload Laminar trace info for evaluation
292
+ uses: actions/upload-artifact@v4
293
+ if: success()
294
+ with:
295
+ name: pr-review-trace-${{ github.event.pull_request.number }}
296
+ path: pr-repo/laminar_trace_info.json
297
+ retention-days: 30
298
+ if-no-files-found: ignore