chp-adapter-github
GitHub inspection as governed Capability Host Protocol
capabilities. Read-only first slice: repositories, pull requests, issues, CI
workflow runs, and PR reviews — each exposed as chp.adapters.github.<op> with a
full execution evidence chain.
Built on the canonical chp-core adapter template (BaseAdapter + @capability),
the same pattern as chp-adapter-mcp.
Install
pip install chp-adapter-github
Usage
from chp_core import LocalCapabilityHost, register_adapter
from chp_adapter_github import GitHubAdapter, GitHubConfig
host = LocalCapabilityHost()
register_adapter(host, GitHubAdapter(GitHubConfig())) # token from GITHUB_TOKEN
pr = host.invoke("chp.adapters.github.get_pull_request", {
"owner": "capabilityhostprotocol", "repo": "chp-core", "number": 1,
})
print(pr.data["state"], pr.data["mergeable_state"])
Capabilities (read-only)
| Capability | Purpose |
|---|---|
chp.adapters.github.get_repo |
Repository metadata |
chp.adapters.github.list_pull_requests |
List PRs (state filter) |
chp.adapters.github.get_pull_request |
Single PR + merge/CI detail |
chp.adapters.github.list_issues |
List issues (PRs excluded) |
chp.adapters.github.get_issue |
Single issue |
chp.adapters.github.list_workflow_runs |
GitHub Actions CI status |
chp.adapters.github.list_pr_reviews |
Reviews on a PR |
Each returns a curated projection — a capability, not a raw API mirror.
Auth
GitHubConfig.token (or the GITHUB_TOKEN / GH_TOKEN env var). A token is
optional for public reads but raises the rate limit. The token is sent in the
Authorization header and never appears in evidence payloads.
Design notes
- A fresh
httpx.AsyncClientis created per call: the host runs handlers viaasyncio.run(a new loop perhost.invoke), and an AsyncClient is loop-bound. GitHubConfig.transportaccepts anhttpxtransport (e.g.httpx.MockTransport) for tests — no network required.- Write operations (create issue, comment, etc.) are a deliberate later slice; they carry a higher risk tier and policy gates.
Metadata
Release files for chp-adapter-github 0.53.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| chp_adapter_github-0.53.0.tar.gz | 16.3 kB | Without provenance | Details for chp_adapter_github-0.53.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| chp_adapter_github-0.53.0-py3-none-any.whl | Python 3 | none | any | Details for chp_adapter_github-0.53.0-py3-none-any.whl |
Total release size: 29.5 kB
Release files / chp_adapter_github-0.53.0.tar.gz
| Download URL | chp_adapter_github-0.53.0.tar.gz |
|---|---|
| Size | 16.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1a2bba44f2f6df284ed1d471b11b9f3151c4b4975258ff929ecc6c6420c982dd
|
|
BLAKE2b-256 checksum How to use checksums |
4688ce5e004eadea3c9b240939d6721b86598b33b7224f11fe18cc31d370356e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.7
|
Release files / chp_adapter_github-0.53.0-py3-none-any.whl
| Download URL | chp_adapter_github-0.53.0-py3-none-any.whl |
|---|---|
| Size | 13.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
443cd78ed814b0673ba12f402b7554ef3d6af8e910cf9d051955ea04af49b080
|
|
BLAKE2b-256 checksum How to use checksums |
34ef963a0174a7a1cf209aae30dcfbb02e26e25f8a647052f4834948bd1134a7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.7
|
Security for chp-adapter-github 0.53.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.