Skip to main content

chp-adapter-git

CHP capability adapter for local Git repository inspection and operations.

Capabilities

Capability ID Risk Description
chp.adapters.git.status low Working tree status: branch, staged/unstaged/untracked counts
chp.adapters.git.inspect_repo low Repository overview: branch, HEAD SHA, remotes, commit count
chp.adapters.git.log low Recent commits list (sha7, author, subject, date)
chp.adapters.git.diff_summary low Diff statistics: files changed, insertions, deletions
chp.adapters.git.precommit_check low Staged file list + unstaged/untracked counts
chp.adapters.git.checkout_branch medium Create or switch to a branch
chp.adapters.git.commit medium Stage files and commit with a message

Evidence Hygiene

  • Diff content (patch text): never in evidence
  • File content: never in evidence
  • Commit messages: not in evidence (only sha7/count in events)
  • Commit subjects truncated to 80 chars in log output

Usage

from chp_core import LocalCapabilityHost, SQLiteEvidenceStore
from chp_adapter_git import GitAdapter, GitConfig

store = SQLiteEvidenceStore("evidence.db")
host = LocalCapabilityHost(store=store)
host.register_adapter(GitAdapter(config=GitConfig(default_repo_path="/path/to/repo")))

result = await host.ainvoke("chp.adapters.git.status", {})
print(result.output)  # {"branch": "main", "staged": 0, "unstaged": 1, "untracked": 2, "clean": False}

Testing with Injectable Backend

class FakeGitBackend:
    def run(self, *args, cwd=None):
        return {"rev-parse --abbrev-ref HEAD": "main"}.get(" ".join(args), "")

adapter = GitAdapter(config=GitConfig(backend=FakeGitBackend()))

Metadata

Release files for chp-adapter-git 0.28.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for chp-adapter-git 0.28.0
File Size Uploaded Provenance
chp_adapter_git-0.28.0.tar.gz 10.7 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for chp-adapter-git 0.28.0
File Interpreter ABI Platform
chp_adapter_git-0.28.0-py3-none-any.whl Python 3 none any Details

Total release size: 18.2 kB

Release files / chp_adapter_git-0.28.0.tar.gz

Download URL chp_adapter_git-0.28.0.tar.gz
Size 10.7 kB
Tags Source
SHA-256 checksum
How to use checksums
e8b69bd2b3d0cc79df6a6b32afcf83ea5b12b9372514bc4c85e92dbcf08eb453
BLAKE2b-256 checksum
How to use checksums
7f3eee1f0d4b2927469c0faacc2800258536dac01db8c791a8652eee25a896d2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.7

Release files / chp_adapter_git-0.28.0-py3-none-any.whl

Download URL chp_adapter_git-0.28.0-py3-none-any.whl
Size 7.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2db04273a1cd166a0119fa893c17766969aa0d635186b3f573a7794087b377a9
BLAKE2b-256 checksum
How to use checksums
e820d79a56424db2327fc36c80f842c797ca50b33ade2429e59f55ef096763ff
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.7

Security for chp-adapter-git 0.28.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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page