Repo File-preflight
Check lightweight metadata for a path in a public GitHub repository at an optional ref. It does not clone or download large file contents.
Forest exposes this capability as a deterministic machine-readable API for software agents. Discovery is free; execution uses the canonical paid endpoint below. The live x402 challenge is the source of truth for payment terms.
$0.002 / callPOST /repo/file-preflightx402 · Base
Typical agent tasks
This capability is intended for bounded machine decisions such as:
- does this file exist in the repository
- check public file metadata
- find the download link for this repository file
What Forest guarantees
- bounded normalized public-source lookup
Boundaries
- provider-specific guarantees
- unpublished facts
Machine contract
The request and response schemas are published in the canonical OpenAPI document. This page shows a representative input from the same production manifest.
Input example
{
"repository": "octocat/Hello-World",
"path": "README",
"ref": "master"
}
Canonical paid endpoint
https://http--forest-gas-station-mainnet--lcjl27p8lmjs.code.run/repo/file-preflight
Related capabilities
- Repo Actions-state — Normalize the latest public GitHub Actions workflow/run state. Reads only; dispatch, rerun, cancellation, private repositories and customer OAuth are unsupported.
- Repo Changed — Cheaply detect material public repository state changes with a deterministic hash of existence, branch and archive state. Timestamps and unrelated metadata do not trigger a change.
- Repo Commit-state — Resolve a public GitHub ref to commit metadata without fetching a diff. Verification is reported as published by GitHub and is not independently re-signed by Forest.
- Repo Preflight — Resolve the current public GitHub repository state without cloning or customer OAuth. Archived, fork, branch and license fields reflect only public API facts; private repositories are unsupported.
- Repo Branch-state — Check whether a named branch exists in a public GitHub repository and return the branch current head commit SHA and URL without cloning. This is a read-only branch-state lookup; branch protection stays unknown when the public API does not expose it.
- Commerce Availability — Resolve public product or listing availability with explicit normalized states. It reports only provider evidence and never infers inventory, reserves items or places an order.