forgesight-github
The GitHub Actions integration for ForgeSight. One line in your CI entry script correlates every agent run with the commit / PR / job / workflow that triggered it, and writes a cost+duration+status summary to the job page.
pip install forgesight-github
from forgesight_github import bootstrap
bootstrap() # configure() + attach GITHUB_* metadata + job summary on exit
# Unchanged agent code — every run in this job is now correlated and flushed cleanly.
result = await pr_reviewer.run(task)
# .github/workflows/review.yml
jobs:
review:
runs-on: ubuntu-latest
permissions:
id-token: write # only if using OIDC exporter auth
steps:
- uses: actions/checkout@v4
- run: pip install forgesight-github
- run: python review_agent.py
env:
FORGESIGHT_EXPORTERS: otlp
FORGESIGHT_OTLP_ENDPOINT: ${{ vars.OTEL_COLLECTOR }}
What you get
- Run↔commit/PR/job link for free. Every run carries
vcs.repository.name,vcs.ref.head.revision(sha),vcs.ref.head.name(ref),vcs.change.id(PR number),cicd.pipeline.run.id/.attempt,cicd.pipeline.name(workflow), andcicd.pipeline.task.name(job) as run-scoped metadata (FR-5), so "agent spend on PR #1234" or "spend by workflow" is a one-line backend query. - PR number resolved correctly. Parsed from the event payload JSON (
$GITHUB_EVENT_PATH) forpull_request*events — absent (not fabricated) otherwise. - A useful job summary, automatically. A markdown block —
status · cost_usd · duration_ms · n_tool_calls— is appended to$GITHUB_STEP_SUMMARYon exit. Best-effort; never fails the job. - Zero lost CI telemetry. An
atexithook callsforce_flush()+shutdown()so the ephemeral runner never drops the buffered batch. - Safe exporter auth (opt-in).
bootstrap(oidc=True)fetches the runner's short-lived OIDC id-token (requiresid-token: write) instead of a static secret; falls back to configured auth if unavailable. - Runs locally too. Outside CI (
GITHUB_ACTIONSunset) it falls back to a plainconfigure()and warns once.
Configuration
| Key | Env | Default |
|---|---|---|
write_summary |
FORGESIGHT_GITHUB_SUMMARY |
true |
oidc |
— (kwarg) | false |
capture_env |
— (kwarg) | the documented GITHUB_* set |
License
Apache-2.0
Metadata
Release files for forgesight-github 0.1.1
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 |
|---|---|---|---|---|
| forgesight_github-0.1.1.tar.gz | 10.4 kB | Without provenance | Details for forgesight_github-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| forgesight_github-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for forgesight_github-0.1.1-py3-none-any.whl |
Total release size: 20.7 kB
Release files / forgesight_github-0.1.1.tar.gz
| Download URL | forgesight_github-0.1.1.tar.gz |
|---|---|
| Size | 10.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
20c3246cf34857a02fef80f0fdba2a04da25d7fd4b420315dccd6b074eb85d6c
|
|
BLAKE2b-256 checksum How to use checksums |
d474c83357fed4a5986cde6b22ae0c6f8f67781bded9c1a9b7c7ccdcc404540d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.15
|
Release files / forgesight_github-0.1.1-py3-none-any.whl
| Download URL | forgesight_github-0.1.1-py3-none-any.whl |
|---|---|
| Size | 10.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
33fb994f80dabb18fb7e34a896139645201095eaa3cfae64b24198f72f5fc501
|
|
BLAKE2b-256 checksum How to use checksums |
70a6c7b9e5ad5b7f9989414f2d21e17fae6d186c2a79404be5d97f92d9acbd34
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.15
|
Security for forgesight-github 0.1.1
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.