hyperhive/hive-forge
Repository files (latest commit first)
Filename Latest commit message Latest commit date
atlas 8e690c0694 feat(forge): search + milestone filters, and a page trailer that can't lie
`list` already built its query with `q: None, milestones: None` — both
fields were on the request it was sending. So full-text search over
title and body is a flag, not a new verb, and a text match is only
useful composed with the other filters anyway.

The trailer was the real defect. It fired on `count == limit`, but the
forge clamps page size to its own `api.MAX_RESPONSE_ITEMS`: ask for 400,
get a full 50, and `50 != 400` kept it silent — suppressing the warning
in precisely the case where the truncation is invisible. It now reports
the real total from `X-Total-Count`, which the response header struct
already parsed and the call site discarded. The requested limit is not
clamped client-side: that ceiling is the remote's configuration, not
ours.
2026-08-05 18:45:17 +02:00
..
src feat(forge): search + milestone filters, and a page trailer that can't lie 2026-08-05 18:45:17 +02:00
Cargo.toml hive-forge: shell out to git for origin-remote inference instead of hand-parsing config 2026-07-29 18:44:28 +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.