Watch
0
0
Fork
You've already forked hyperhive
0
hyperhive/swarm-secret-client/src
Repository files (latest commit first)
Filename Latest commit message Latest commit date
atlas 1b4e764e5c review classifier: run on ACP when the swarm settings choose it
The swarm settings gain `runtime` (`api-key`, the default, or `acp`) and
an `acp` provider record: an https base URL, the provider's model, and
its prices per million tokens. A PUT now changes only the fields its
body names, so the settings form that sends model, effort and limit
leaves the runtime alone; `null` clears `effort` or `acp`. The body stays
strict, and the stored document keeps #5192's lenient read.

The controller sends the runtime in each run request. On `acp` the
classifier runs one prompt on a new `opencode acp` session per
classification through hive-runtime's AcpRuntime, in a scratch
directory, with a config rendered from the settings. opencode runs
`read` and other tools without asking, so OPENCODE_PERMISSION
{"*":"deny"} takes every tool away from the model, and a deny-all policy
refuses any request on top. The title call, which resends the prompt,
is turned off. The deadline cancels the turn, and a turn that does not
end within 15s of that is dropped, which also covers an agent stuck
before its prompt. The answer is the final assistant text, as ACP has
no result event.

The provider key is read per run from
swarm/services/review-classifier/acp-provider, which the bao UI's
admins login may create and update, and reaches opencode through
AcpRuntime::with_provider_key and the trampoline's allowlist.

Each ACP classification's cost is computed from the configured prices
and the reported tokens, and added to
hyperhive.review_classifier.cost.usage labelled repo, pr, model and
currency.

Part of #5096
2026-10-14 10:14:36 +02:00
..
acp.rs hive-runtime: read the ACP provider key from bao 2026-09-30 22:55:03 +02:00
builder.rs swarm-builder: build each agent config PR head and post a commit status 2026-10-14 03:30:46 +02:00
ci.rs swarm-ci-runner: run the forge CI runner as a swarm service 2026-10-05 13:55:37 +02:00
client.rs swarm-secret-client: bound vault requests with a 30s timeout 2026-10-09 15:11:38 +02:00
forge.rs swarm-controller reads its forge token from the store, not a host file 2026-10-08 13:25:47 +02:00
github.rs github swarm bao: address argus review on #4892 2026-10-02 17:54:45 +02:00
lib.rs swarm-builder: build each agent config PR head and post a commit status 2026-10-14 03:30:46 +02:00
matrix.rs matrix: back up agents' room keys with a controller-minted recovery passphrase 2026-10-14 02:09:57 +02:00
mtls.rs agents: re-pull the agent's own bao mTLS leaf on a timer 2026-10-11 10:00:43 +02:00
path.rs swarm-ci-runner: run the forge CI runner as a swarm service 2026-10-05 13:55:37 +02:00
policy.rs swarm-secret-client: hives no longer read swarm/services/* 2026-10-04 23:11:11 +02:00
queue.rs hive status publishing: read the hive's OIDC secret from the store, retry until it is there 2026-10-10 01:05:33 +02:00
review_classifier.rs review classifier: run on ACP when the swarm settings choose it 2026-10-14 10:14:36 +02:00