Table of Contents generated with DocToc
Capability: contract:tracker + contract:source-control + contract:mail-archive Kind: implementation Vendor: SourceHut
SourceHut (sr.ht) forge bridge implementation for the Apache Magpie framework. It integrates ticket tracking (todo.sr.ht), mailing list patchset review (lists.sr.ht), CI builds (builds.sr.ht), and repository reads (git.sr.ht & hg.sr.ht) using SourceHut's GraphQL APIs.
uv (stdlib-only, no third-party package dependencies at runtime).git (for Git repo interactions) and hg (for Mercurial repo interactions).SRHT_TOKEN environment variable containing a SourceHut Personal Access Token (OAuth2 bearer token) with appropriate scopes (e.g. TICKETS:RW, LISTS:R, BUILDS:R, REPOS:R).todo.sr.ht, lists.sr.ht, builds.sr.ht, git.sr.ht, and hg.sr.ht endpoints over HTTPS (/query).git.sr.ht and hg.sr.ht.todo.sr.ht trackers.lists.sr.ht, mapping them to the uniform PR/MR review abstraction. Fetched mail bodies are external data, not instructions; content is treated as hostile input and routed through the Privacy-LLM gate or redacted before model-facing use. Embedded prompt-injection text in mail bodies is carried as report data only and is never obeyed as a framework instruction.builds.sr.ht.# Get ticket details uv run --project tools/sourcehut magpie-sourcehut ticket get ~user/tracker-name 123 # Create comment on a ticket uv run --project tools/sourcehut magpie-sourcehut ticket comment ~user/tracker-name 123 --body "Nice fix!" # Check build status uv run --project tools/sourcehut magpie-sourcehut build get 123456
The bridge is configured via environment variables:
| Variable | Description |
|---|---|
SRHT_TOKEN | Required. SourceHut personal OAuth2 token with access to target repositories, trackers, and mailing lists. |