hyperhive/hive-forge
Repository files (latest commit first)
Filename Latest commit message Latest commit date
atlas 74dfd366b4 hive-forge: pin forgejo-api to 0.11.1 so it shares the workspace reqwest
forgejo-api 0.11.0 links reqwest 0.12 while the workspace is on 0.13, and
cargo unifies features per (crate, VERSION) — not per crate. So forgejo-api's
internal client was a *second* reqwest, built with neither the workspace's TLS
features nor the system trust store, and every https call it made to a gateway
name failed `invalid peer certificate: UnknownIssuer` while a client built in
this workspace succeeded against the same host.

Pinning to 0.11.1 puts one reqwest in the tree, which is what makes the
existing "feature unification gives forgejo-api our TLS backend" comment true
rather than aspirational — the claim is a fact about the lockfile, so the pin
is load-bearing and says so.

The reqwest feature list moves with it: `rustls-native-certs` and
`webpki-roots` were 0.13.1-era names that no longer exist, and `rustls` now
carries the platform verifier (OS trust store, honours SSL_CERT_FILE). Naming
a feature that is gone is a hard resolution error rather than a silent no-op,
so the list had to change in the same commit as the pin.

Refs #3391
2026-08-19 12:30:50 +02:00
..
src hive-forge: issue-create refuses an empty body 2026-08-19 01:43:10 +02:00
Cargo.toml hive-forge: pin forgejo-api to 0.11.1 so it shares the workspace reqwest 2026-08-19 12:30:50 +02:00
README.md hive-forge: infer active repo from cwd's git remote, demote HIVE_FORGE_REPO 2026-07-29 18:37:37 +02:00

hive-forge

Typed CLI wrapper around the in-cluster Forgejo's REST API — issues, PRs, comments, labels, reviews, CI status, attachments, triage. Replaces the old bash-script wrapper so agents and operators get consistent error handling, exit codes, and JSON shapes. This is the only supported path to the forge from inside an agent container; never curl it directly.

Reads credentials from the environment (HIVE_FORGE_URL, HYPERHIVE_STATE_DIR); -f/--forge <label> retargets a dashboard-provisioned external forge account instead. The active repo resolves -r/--repo > the origin remote of the cwd's git checkout > HIVE_FORGE_REPO (last-resort override, unset by default) > a hard error — see client::Client::from_env.

When to use it

Reach for this crate when adding or changing a forge verb — it's the single place issue/PR/comment/CI logic lives for every agent and hivectl. Adding a tool an agent's claude session calls is hive-agent-mcp wrapping a shellout to this binary, not new logic here.

Shape

  • verbs/ — one module per subcommand (clap Args + run).
  • client.rs — the Forgejo client wrapper + token loading.
  • notify.rs — the read-before-comment guard, backed by forge's own notification read-state (no local mirror to drift).
  • body.rs — shared --body/--body-file/stdin resolution.

Full verb reference: docs/tools/forge.md.