@openhands/extensions 0.22.0 → 0.23.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.
- package/.agents/skills/custom-codereview-guide.md +84 -17
- package/.release-please-manifest.json +1 -1
- package/AGENTS.md +22 -1
- package/README.md +1 -1
- package/automations/bundle-index.js +12 -11
- package/automations/catalog/github-issue-to-pr/manifest.json +2 -2
- package/automations/catalog/github-issue-triage/manifest.json +2 -2
- package/automations/catalog/github-pr-reviewer/manifest.json +42 -5
- package/automations/catalog.schema.json +0 -4
- package/package.json +1 -1
- package/plugins/openhands/skills/openhands-sdk/SKILL.md +3 -1
- package/plugins/pr-review/README.md +2 -1
- package/plugins/pr-review/scripts/agent_script.py +198 -81
- package/plugins/pr-review/scripts/prompt.py +35 -11
- package/plugins/pr-review/skills/code-review/SKILL.md +165 -200
- package/plugins/pr-review/skills/code-review/commands/codereview-roasted.md +1 -1
- package/plugins/pr-review/skills/code-review/commands/codereview.md +1 -1
- package/plugins/vulnerability-remediation/skills/github/scripts/agent_conversation.py +15 -3
- package/plugins/vulnerability-remediation/skills/github/scripts/github_client.py +4 -0
- package/pyproject.toml +1 -1
- package/python/openhands_extensions/_version.py +1 -1
- package/skills/code-review/SKILL.md +165 -200
- package/skills/code-review/commands/codereview-roasted.md +1 -1
- package/skills/code-review/commands/codereview.md +1 -1
- package/skills/github/scripts/agent_conversation.py +15 -3
- package/skills/github/scripts/github_client.py +4 -0
- package/skills/github-agents-md-maintainer/scripts/github_client.py +4 -0
- package/skills/github-delivery-watchdog/scripts/github_client.py +4 -0
- package/skills/github-issue-to-pr/scripts/agent_conversation.py +15 -3
- package/skills/github-issue-to-pr/scripts/github_client.py +4 -0
- package/skills/github-issue-triage/.claude-plugin/plugin.json +1 -1
- package/skills/github-issue-triage/.codex-plugin/plugin.json +1 -1
- package/skills/github-issue-triage/.plugin/plugin.json +1 -1
- package/skills/github-issue-triage/README.md +7 -0
- package/skills/github-issue-triage/SKILL.md +26 -3
- package/skills/github-issue-triage/scripts/agent_conversation.py +15 -3
- package/skills/github-issue-triage/scripts/github_client.py +4 -0
- package/skills/github-issue-triage/scripts/worker.py +142 -26
- package/skills/github-pr-reviewer/README.md +16 -10
- package/skills/github-pr-reviewer/SKILL.md +12 -9
- package/skills/github-pr-reviewer/commands/pr-reviewer-setup.md +1 -1
- package/skills/github-pr-reviewer/scripts/agent_conversation.py +15 -3
- package/skills/github-pr-reviewer/scripts/github_client.py +4 -0
- package/skills/github-pr-reviewer/scripts/main.py +23 -5
- package/skills/github-pr-reviewer/scripts/maintainer_handoff.py +151 -0
- package/skills/github-pr-reviewer/scripts/worker.py +209 -21
- package/skills/github-pr-reviewer/tests/test_main.py +16 -0
- package/skills/github-repo-monitor/scripts/github_client.py +4 -0
- package/skills/index.js +6 -6
- package/skills/openhands-sdk/SKILL.md +3 -1
- package/tests/fixtures/automations/github-pr-reviewer.json +120 -26
- package/tests/github_automation_helpers.py +1 -0
- package/tests/test_agent_conversation_dispatch.py +35 -4
- package/tests/test_automation_setup.py +15 -0
- package/tests/test_code_review_risk_evaluation.py +2 -2
- package/tests/test_github_reviewer_delivery.py +320 -4
- package/tests/test_github_triage_delivery.py +200 -6
- package/tests/test_maintainer_handoff.py +198 -0
- package/tests/test_pr_review_prompt.py +6 -2
- package/tests/test_pr_review_review_context.py +144 -0
|
@@ -1,32 +1,99 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: custom-codereview-guide
|
|
3
|
-
description: Repository-specific
|
|
3
|
+
description: Repository-specific review guidance for OpenHands/extensions.
|
|
4
4
|
triggers:
|
|
5
5
|
- /codereview
|
|
6
6
|
---
|
|
7
7
|
|
|
8
|
-
#
|
|
8
|
+
# OpenHands/extensions review guide
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
Apply this guide with the general code-review skill and `AGENTS.md`. Approve the
|
|
11
|
+
current head when it has no material correctness, security, compatibility, or
|
|
12
|
+
acceptance-criterion defect. Comment only on concrete failures; do not withhold
|
|
13
|
+
approval for optional refactors, tone, style, or speculative improvements.
|
|
11
14
|
|
|
12
|
-
|
|
15
|
+
## Repository ownership and scope
|
|
13
16
|
|
|
14
|
-
|
|
17
|
+
This repository owns reusable skills, plugins, automation bundles, and integration
|
|
18
|
+
catalogs. Agent Server behavior, endpoints, and browser client code belong in
|
|
19
|
+
`OpenHands/software-agent-sdk`; Canvas UI belongs in `OpenHands/OpenHands`; and
|
|
20
|
+
scheduling, dispatch, run history, and sandbox lifecycle belong in
|
|
21
|
+
`OpenHands/automation`.
|
|
15
22
|
|
|
23
|
+
A content PR should remain focused on one extension or one shared mechanism that
|
|
24
|
+
multiple extensions actually use. Flag unrelated edits to another skill, plugin,
|
|
25
|
+
or automation. Shared runtime machinery belongs in the owning product repository,
|
|
26
|
+
not copied into extension content.
|
|
16
27
|
|
|
17
|
-
##
|
|
28
|
+
## Blocking checkpoints
|
|
18
29
|
|
|
19
|
-
|
|
30
|
+
### Executable instructions and runtime parity
|
|
20
31
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
32
|
+
Commands, imports, environment variables, endpoints, and setup steps in extension
|
|
33
|
+
content are executable contracts. Verify them against the released packages and
|
|
34
|
+
the actual local and cloud environments that claim support. Do not approve an
|
|
35
|
+
example that relies on an unreleased API, a developer-only dependency, a private
|
|
36
|
+
path, or a variable that the production runtime does not provide.
|
|
24
37
|
|
|
25
|
-
|
|
38
|
+
For a changed skill, plugin, hook, or automation, follow its documented entrypoint
|
|
39
|
+
in a clean environment far enough to exercise the changed behavior. Keep local
|
|
40
|
+
and cloud behavior identical unless the documentation names and explains a real
|
|
41
|
+
platform capability difference.
|
|
26
42
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
43
|
+
### Untrusted triggers and credentials
|
|
44
|
+
|
|
45
|
+
Treat repository events, issue and PR comments, chat messages, catalog fields,
|
|
46
|
+
and extension-provided arguments as untrusted. Verify who may trigger the action,
|
|
47
|
+
whose identity it runs as, which repository or organization it can affect, and
|
|
48
|
+
which secrets it receives. A trigger phrase alone is not authorization. Require
|
|
49
|
+
an explicit allowlist, permission check, or repository policy before performing
|
|
50
|
+
mutating or credentialed work.
|
|
51
|
+
|
|
52
|
+
Use only the minimum documented credential set. Never place secret values in
|
|
53
|
+
prompts, logs, generated files, examples, or persisted state.
|
|
54
|
+
|
|
55
|
+
### Sources of truth and generated artifacts
|
|
56
|
+
|
|
57
|
+
Identify the hand-authored source before reviewing a catalog or generated file.
|
|
58
|
+
A change should update that source once and regenerate every derived artifact
|
|
59
|
+
with the repository's existing sync/build command. Documentation must describe
|
|
60
|
+
the real direction of generation; do not call a generated asset the source of
|
|
61
|
+
truth or claim two runtimes read one asset when they do not.
|
|
62
|
+
|
|
63
|
+
Check the marketplace entry and generated command/catalog coverage required by
|
|
64
|
+
`AGENTS.md`. Do not add a parallel catalog, provider-specific copy, or manual
|
|
65
|
+
compatibility layer when the repository already has a generator or schema.
|
|
66
|
+
|
|
67
|
+
### Documentation claims
|
|
68
|
+
|
|
69
|
+
Test copy-paste commands and verify named tools, flags, package exports, URLs, and
|
|
70
|
+
installation mechanisms from authoritative sources. A plausible command is not
|
|
71
|
+
evidence. Documentation that teaches the wrong data flow or setup is a material
|
|
72
|
+
finding because agents execute it directly.
|
|
73
|
+
|
|
74
|
+
SDK documentation belongs in `docs.openhands.dev/sdk`; the generated
|
|
75
|
+
`skills/openhands-sdk/SKILL.md` remains a thin synchronized entrypoint. The
|
|
76
|
+
former `@openhands/extensions/mcps` catalog was experimental and pre-release, so
|
|
77
|
+
an explicitly coordinated replacement with the `integrations` catalog needs
|
|
78
|
+
consumer migration documentation but not compatibility aliases or a deprecation
|
|
79
|
+
window.
|
|
80
|
+
|
|
81
|
+
### Dependencies and supply chain
|
|
82
|
+
|
|
83
|
+
Apply the general seven-day release-recency guard to the exact dependency version,
|
|
84
|
+
regardless of the package's age or popularity. Validate installation with the
|
|
85
|
+
package manager and runtime used by the extension. Temporary git pins and
|
|
86
|
+
unreleased package APIs are blockers for merge unless the PR is an explicit,
|
|
87
|
+
coordinated stack that will replace them before release.
|
|
88
|
+
|
|
89
|
+
## Evidence and comment discipline
|
|
90
|
+
|
|
91
|
+
Evidence should exercise the extension as users invoke it: run the command, hook,
|
|
92
|
+
plugin, or automation entrypoint and show the relevant result. Static text checks
|
|
93
|
+
alone do not validate executable instructions. Require only the environments and
|
|
94
|
+
paths the change affects.
|
|
95
|
+
|
|
96
|
+
Do not comment on punctuation, preferred prose tone, optional DRY cleanup, or
|
|
97
|
+
hypothetical non-standard configurations without a supported failure mode. Before
|
|
98
|
+
raising a finding, verify that the referenced file and behavior are present in
|
|
99
|
+
the current PR head and have not already been addressed in review history.
|
package/AGENTS.md
CHANGED
|
@@ -16,6 +16,27 @@ Related repositories have distinct responsibilities:
|
|
|
16
16
|
|
|
17
17
|
Put reusable skills, plugins, automations, and integrations here; put backend execution behavior and typed API access in the SDK, application UI in Agent Canvas, and scheduling/dispatch lifecycle code in `automation`. If a PR is opened in the wrong repository, explicitly recommend closing and moving it to the owning repository. PRs must follow this repository's applicable contribution and code-review guidance.
|
|
18
18
|
|
|
19
|
+
## Review-Facing Extension Checklist
|
|
20
|
+
|
|
21
|
+
Before opening a PR:
|
|
22
|
+
|
|
23
|
+
- Keep a content change focused on one skill, plugin, automation bundle, or
|
|
24
|
+
integration. Put shared product runtime behavior in the repository that owns
|
|
25
|
+
it instead of copying machinery into extension content.
|
|
26
|
+
- Treat every command, import, environment variable, endpoint, setup step, and
|
|
27
|
+
package name as an executable contract. Test the documented entrypoint with
|
|
28
|
+
released packages in each local or cloud environment the extension claims to
|
|
29
|
+
support; do not rely on developer-only variables or private paths.
|
|
30
|
+
- For event-, comment-, or message-triggered work, define who may trigger it,
|
|
31
|
+
whose identity executes it, what scope it may mutate, and which minimal secrets
|
|
32
|
+
it receives. A trigger phrase is not authorization.
|
|
33
|
+
- Edit the hand-authored source once and regenerate derived catalogs, commands,
|
|
34
|
+
indexes, and package assets with the existing sync/build command. Document the
|
|
35
|
+
true generation direction and do not introduce a parallel source of truth.
|
|
36
|
+
- Verify copy-paste commands and factual documentation claims against the actual
|
|
37
|
+
tool or authoritative source. Extension instructions are executed by agents,
|
|
38
|
+
so incorrect setup or data-flow documentation is a functional defect.
|
|
39
|
+
|
|
19
40
|
## What this repo contains
|
|
20
41
|
|
|
21
42
|
- `skills/` — a catalog of skills, **one directory per skill**.
|
|
@@ -110,7 +131,7 @@ When editing or adding skills in this repo, follow these rules (and add new skil
|
|
|
110
131
|
- Agent-driven plugins (for example `plugins/pr-review` and `plugins/release-notes`) use `uv run --with openhands-sdk --with openhands-tools ...` and require an `LLM_API_KEY` in addition to `GITHUB_TOKEN`.
|
|
111
132
|
- For OpenHands Cloud API guidance, automations, and CLI integration, use `plugins/openhands`. It is the canonical unified OpenHands plugin covering the V1 Cloud API, Automations API, and CLI. The individual skills (`skills/openhands-api`, `skills/openhands-automation`) are also available standalone.
|
|
112
133
|
- When reviewing or editing `skills/openhands-sdk`, validate copy-paste imports against the released packages with `uv run --with openhands-tools --with openhands-workspace --with openhands-agent-server python ...`. In the current released workspace package, the exported remote workspace classes are `APIRemoteWorkspace` / `OpenHandsCloudWorkspace`; `RemoteAPIWorkspace` is not available.
|
|
113
|
-
- For agent-driven plugin scripts, prefer `from openhands.sdk.plugin import PluginSource` and pass `plugins=[PluginSource(source=...)]` into `Conversation`.
|
|
134
|
+
- For agent-driven plugin scripts, prefer `from openhands.sdk.plugin import PluginSource` and pass `plugins=[PluginSource(source=...)]` into `Conversation`. The current released SDK (`openhands-sdk` 1.49.x) exports both `PluginSource` and `Plugin` from `openhands.sdk.plugin`, so `Plugin.load(...)` imports also work (used by `tests/test_skill_plugin_loading.py`).
|
|
114
135
|
- `plugins/qa-changes/action.yml` now has a preflight guard for fork PRs in `pull_request` context: if the PR comes from a fork and `LLM_API_KEY` is unavailable (normal for forks), the action exits successfully with a clear skip notice instead of failing.
|
|
115
136
|
- `skills/bitbucket` should not tell agents to rewrite remotes proactively. In OpenHands, `BITBUCKET_TOKEN` is commonly kept in unencoded `user:token` form for API calls like `curl --user "$BITBUCKET_TOKEN" ...`; only split and URL-encode it when constructing a non-interactive HTTPS Git remote URL.
|
|
116
137
|
|
package/README.md
CHANGED
|
@@ -9,7 +9,7 @@ It contains reusable, shareable skills and plugins that customize agent behavior
|
|
|
9
9
|
|
|
10
10
|
## Repository boundaries
|
|
11
11
|
|
|
12
|
-
`OpenHands/extensions` is the public registry for reusable skills, plugins, automations, and integrations. [`OpenHands/software-agent-sdk`](https://github.com/OpenHands/software-agent-sdk) owns Agent Server execution
|
|
12
|
+
`OpenHands/extensions` is the public registry for reusable skills, plugins, automations, and integrations. [`OpenHands/software-agent-sdk`](https://github.com/OpenHands/software-agent-sdk) owns Agent Server execution, the canonical API, and typed browser access to it under `clients/typescript/`, [`OpenHands/OpenHands`](https://github.com/OpenHands/OpenHands) owns Agent Canvas UI, and [`OpenHands/automation`](https://github.com/OpenHands/automation) owns scheduling, webhooks, run history, dispatch, and sandbox lifecycle orchestration.
|
|
13
13
|
|
|
14
14
|
Put reusable extension artifacts here rather than in application repositories. If a PR is opened in the wrong repository, close and move it to the repository that owns the change.
|
|
15
15
|
|