Watch
0
0
Fork
You've already forked hyperhive
0
Commit graph hyperhive/hive-agent
Author SHA1 Message Date
iris
d516bb890c remove the forge links from the hive dashboard and the agent page
Each agent row on the hive dashboard, and the agent page's link menu, linked
to the agent's forge profile and its config repo. Both are gone, with what
only they used:

- hive-agent no longer builds the two links, the `Forge` link kind, or the
  `forge_public_url` field of its state, and no longer reads
  `HIVE_FORGE_PUBLIC_URL`. The agent page's link menu and the dashboard row's
  icon strip (which skips a forge link an agent not yet rebuilt still sends)
  drop their forge handling.
- hive-c0re's dashboard state no longer carries `forge_public_url`.
- `HIVE_FORGE_PUBLIC_URL` is no longer forwarded to agents through the meta
  flake (the forwarded-variable list, its test fixture, the controller's
  settings and the VM test), so the next meta flake render differs by that
  one line. hive-c0re still reads it for the forge URL a hive publishes, so
  `swarm.forge.publicUrl` stays, with its description corrected.
- The docs stop describing the links.
2026-11-07 13:43:44 +01:00
iris
0e84fe8bc4 docs: the handbook follows the three layers: swarm, hives, agents
The handbook's sections were agent-lifecycle, integrations, swarm, tools,
trust-boundary and web-ui, which do not follow how the system is built, so a
reader could not tell which layer a page is about. Its pages now sit in
swarm/, hives/ and agents/, with the accounts an agent can hold outside the
system in external-accounts/.

- swarm/: forge, matrix and the knowledge repo join the swarm pages, and so
  does the swarmctl reference.
- hives/: the dashboard, hivectl and its reference, and the operator/agent
  boundary, with a README that takes over the old web-ui and tools pages.
- agents/: the roster, persistence, config changes, the agent's own web page
  (was web-ui/agent) and the security model, with a README.
- external-accounts/: GitHub and GitLab.

Pages are moved whole; none is split yet. Every reference follows: relative
links in the docs, `docs/2-handbook/...` paths in code comments, the nix
checks that regenerate the CLI references and the ignore list, and docs/README.md,
whose handbook section is now by layer.
2026-11-07 12:19:36 +01:00
damocles
fca7f669f5 hive-agent: poll, do not sleep, for the positive case in the accept-limit test 2026-11-07 09:41:00 +01:00
damocles
e9940be983 hive-agent: cap concurrent connections on the in-agent todo socket 2026-11-07 09:41:00 +01:00
damocles
4b08dde82e docs: two comments no longer mention the removed send allow-list 2026-11-07 09:26:24 +01:00
damocles
934ba3a9c5 hive-agent: test the state status computation 2026-11-07 08:32:11 +01:00
damocles
ac3b3cfcd3 hive-agent: the agent has no login flow of its own, credentials come from the swarm 2026-11-07 08:32:11 +01:00
atlas
e9025823d9 agent: export swarm-queue connected gauge and skipped-publish counter, with dashboard panels 2026-11-07 07:56:17 +01:00
iris
0e10473e6f fixup! docs: sort the top-level directories into five sections by what the reader wants 2026-11-06 18:46:57 +01:00
iris
6739bb903d docs: sort the top-level directories into five sections by what the reader wants
Every docs directory moves under 1-getting-started, 2-handbook,
4-implementation or 5-project; the options reference (section 3) comes from
the website and has no directory here. trust-boundary stays whole under the
handbook for now. web-ui, swarm and tools split between handbook and
implementation, and the command-line references move to
2-handbook/reference. Links, path references in code and nix, and the docs
index follow the moves; no page content changes.
2026-11-06 18:46:57 +01:00
iris
23f4f1823b hive-agent: the per-agent page has no message box; its send route and the broker's operator message are removed
The page's composer (its input, slash commands and completion), POST /send in
hive-agent, the OperatorMsg request of the agent socket and its handler in
hive-c0re, and the broker-error helper only the send route used are deleted:
writing to an agent is the swarm UI's terminal. cancel turn, new session and
log out stay in the state badge's menu; POST /api/compact stays, with nothing
on the page calling it. The request-line limit keeps its size, and its comment
says it is a generous bound now. The docs describe the actions in place of the
footer and the prompt.
2026-11-06 01:13:44 +01:00
iris
23c2527199 harness metrics for tool calls, bash commands, reminders and first-turn context, on the agents board
The per-agent /stats page read these from its sqlite; the swarm board had
none of them. hive-agent now counts the tools a turn called, the commands
bash tasks ran (from the bash daemon's own table, newer rows only),
reminders scheduled and delivered, and records the first turn of a fresh
session; the turns tab shows them, with fresh sessions per agent. Claude's
own export has no tool-call counter, so the docs no longer say it does.
2026-11-03 16:05:49 +01:00
damocles
4d21b6bd1f system prompt: one sentence per line, and no restating of the hyperhive tool list the MCP schema already gives. Refs #6002 2026-11-03 08:32:24 +01:00
atlas
b55b61b1e0 tell agents to talk to peers over matrix, send for hive-local use 2026-11-03 07:47:10 +01:00
iris
5e9a22cb38 remove the hive dashboard's stats page and the price table behind it
The ST4TS page (/stats.html), GET /api/stats-hive, hive-c0re's hive_stats
rollup and the modelPrices option that only fed its cost estimate are
gone. Each agent's own /stats page and the turn-stats database it reads
are unchanged. Setting modelPrices now fails evaluation with a message
saying so.
2026-11-03 07:45:51 +01:00
iris
aecde1dc75 agents board: a turns tab, and turn duration bounds past 10 s
The per-agent /stats page shows what the swarm agents board lacked about
turns. The new tab reads the turn count and duration the harness already
records: average duration, cache hit rate, tokens per turn, turns per hour
by agent and by model, duration percentiles, and the wake source and result
mixes. The duration histogram used the SDK default buckets, which stop at
10 s while a turn averages 24 s, so every p95 read a flat 10 s; it now has
explicit bounds up to an hour.
2026-11-03 00:20:45 +01:00
atlas
47c2acb640 deploy the closure the swarm declares, read no forge head, drop the update badge 2026-11-02 07:55:10 +01:00
atlas
99752f81d9 remove the needs_update system event: nothing emits it
Refs #5948
2026-11-01 23:08:12 +01:00
atlas
329d556ab9 order grant mirror writes by direction, re-mirror every five minutes, gate on the agent's own harness 2026-11-01 18:40:36 +01:00
damocles
d572a63d95 prompt: propose a config change with an agit PR from the clone 2026-11-01 17:02:12 +01:00
damocles
3c09e14a76 drop the config and /applied mounts: an agent reads its config by cloning agent-configs, and the prompt says so 2026-11-01 17:02:12 +01:00
atlas
08b8eb3f73 export an open-todos gauge and chart it on the agent dashboard 2026-11-01 15:24:33 +01:00
atlas
81439fa710 run agent containers on an ephemeral root, salvaging the old one first
hive-priv copies a stopped container's root to the agent's work dir and
renames it aside before passing nspawn --ephemeral; the agent's nix state
moves to the persistent profiles bind. Adds the agent-ephemeral-rootfs vm
test and a module-eval case for the nix state redirect.
2026-10-28 20:00:12 +01:00
damocles
21a217c75c hive-agent: test the turn-end events and the claude error mapping 2026-10-27 11:24:32 +01:00
atlas
7dd5d30da8 remove the /shared bind from agent containers 2026-10-26 21:33:05 +01:00
atlas
0c6e8fc5a2 move hiveName to deploy.hive-controller; only a hive host needs a name 2026-10-26 18:47:49 +01:00
atlas
e592078868 move client-cert gauges behind an otel feature of swarm-secret-client, drop the crate 2026-10-25 19:02:49 +01:00
atlas
078696aaee export bao client-cert not_before/not_after gauges and alert past 80% of lifetime 2026-10-25 19:02:49 +01:00
atlas
4aa11b3a94 build agents only from internal/meta; delete the hive's local meta flake
The hive no longer renders, locks or commits a meta flake. A rebuild's
MetaSync node picks the internal/meta commit and records it with the
hyperhive and config pins it holds; Prebuild, Swap and Create build from it,
and a head that does not pin the agent's current config fails the build
naming the agent. hive-priv's meta_rev is required.

Removed: meta.rs sync/lock/render, the manual-rebuild relock, the boot
sweep's hyperhive bump (MetaLock), the update-meta-inputs form and its
panel, MetaWindow, the hive's hyperhive_rev setting.

Kept: agent_set::refresh holds what sync_agents also did (topology.json, the
gateway's agent-socket map and nginx include), called from spawn, destroy,
rebuild and the migration.

The boot reconcile and the stale-start upgrade compare the agent's marker
with the hyperhive pin of internal/meta; the dashboard's deployed chip reads
the config marker a successful build writes.
2026-10-25 15:32:16 +01:00
atlas
2f00f9041f agent permissions: drop hive-c0re's swarm-agent-permissions.json fallback, fail closed before the first read
Removes the HiveCopy hand-off: hive-c0re no longer writes each agent's
entry from swarm-agent-permissions.json into its runtime dir as
swarm-permissions.json, and the harness and subagent daemon no longer
read it. hive-c0re keeps the file as its own last read of the swarm for
the manage_root_agent mounts. Also removes permissions_import::pending(),
its only caller being the hand-off. No nix provisioned the copy, so no
nix option is removed and no tombstone is needed.

Rule after this change: until an agent's first successful read of its
key it holds no permissions (no execution, so no bash), and a subagent it
starts holds the same. After a read a set key wins, [] holds none and an
unset key is the default. A failed read keeps the last value, so an
unreachable queue at start keeps the agent closed until a read succeeds.
The harness logs once at warn that it starts closed.

Fixes #5315
2026-10-25 02:17:32 +02:00
damocles
6bcffb0ebb todo socket: pause after a failed accept instead of spinning 2026-10-24 14:47:56 +02:00
atlas
0f7b403803 agents get a todo when assigned to an issue or PR, rewritten when unassigned and cleared on close
A new swarm service, swarm-notify-router, in its own container on the host
that sets deploy.notify-router.enable (defaulted on by allSwarmServices where
the host has the router's store leaf, like the claude login minter).

- swarm-controller registers instance-wide hooks for `issues` +
  `issue_assign` and `pull_request` + `pull_request_assign`, updates the
  event list of a hook already registered with fewer (leaving its active flag as it is), and keeps each
  verified body unchanged in the SWARM_EVENTS stream on
  $SWARM.events.forge.<X-Forgejo-Event-Type>, deduped by X-Forgejo-Delivery.
  A delivery the stream did not keep answers 503.
- swarm-notify-router drains its durable consumer on that stream, runs its
  flows (source -> match -> todo sink, stored as nodes plus edges and checked
  to be a tree) and queues each op on $SWARM.router.todo.<agent> in the
  work-queue stream ROUTER_TODOS. Built-in flows: assigned, unassigned (same
  key, rewritten) and closed (prefix-clears every holder's router todos). A
  per-issue snapshot in its notify-router-state bucket holds the last
  assignees and the todo holders; only agents in the agent-status bucket get
  ops, and an assignee that was not one is left out of the snapshot so the
  next assign event retries it. After the first event that must be retried,
  the rest of the batch is nakked so redelivery keeps stream order.
- hive-agent creates its own durable consumer todo-<agent> and applies each
  op to its todo store as subsystem `router`, then acks; a refused op stops
  the rest of its batch the same way. The store's (subsystem, key) dedup
  makes a redelivery harmless. New Todos::clear_prefix.
- swarm-nats-auth: a --notify-router-client arm; the controller may publish
  $SWARM.events.forge.*; each agent gets three {agent} templates (extended
  consumer create whose filter the server checks, MSG.NEXT, ACK).
- Credentials: a notify-router store leaf minted by glue-bao-tls, a
  swarm-notify-router bao policy (read on its own queue client secret), an
  authelia machine client, the secret publisher entry, a journal forwarder
  route. No manual step.

hive-forge-notify is unchanged, so agents also still get forge's own
notifications.

Refs #5571
2026-10-22 07:28:53 +02:00
damocles
a32c144b80 turn test: build the bus inside with_harness_dir so it passes without HYPERHIVE_HARNESS_DIR 2026-10-22 00:08:14 +02:00
damocles
a1a70e257c agent prompt: point the forge condition at HIVE_FORGE_TOKEN_FILE instead of a state-dir file 2026-10-21 23:55:44 +02:00
damocles
9d1a8c0d9a screen relay: close the websocket when the vnc side hangs up and stop the surviving task 2026-10-21 23:55:24 +02:00
damocles
71e303ed62 db migrate: retry the legacy reminders copy while the legacy file is still there 2026-10-21 23:07:23 +02:00
damocles
ac0bed47e9 hive-agent: correct doc comments that describe sentinel files, session flags and outcomes the code no longer has 2026-10-21 22:56:31 +02:00
damocles
8f8217100b disk watch: a footprint walk that ran out of budget counts as unknown, not small 2026-10-21 22:05:54 +02:00
damocles
25f93d41e1 login session: only the child exiting finishes it, not one output pipe closing 2026-10-21 21:59:04 +02:00
damocles
c3ff0815ff turn: clear the resolved model on a turn that parsed nothing 2026-10-21 21:57:43 +02:00
damocles
62ab45297c hive-agent: run the event store in WAL and give turn-stats writes a busy timeout 2026-10-20 12:08:30 +02:00
atlas
839efd1642 agent_permissions, agent_term and subagent_term take their wire contracts from swarm-wire 2026-10-19 18:30:44 +02:00
atlas
fc72bea151 swarm-wire: take notices's wire types, fmt the moved imports 2026-10-18 22:50:02 +02:00
atlas
e111807f59 swarm-wire: take agent_schedules's wire types 2026-10-18 22:50:02 +02:00
atlas
266be0a5db swarm-wire: take wanted's wire types 2026-10-18 22:50:02 +02:00
atlas
c6b1364684 swarm-wire: take agent_icon's wire types 2026-10-18 22:50:02 +02:00
atlas
6084fb6329 move the send and turn row markers into hive-types 2026-10-18 22:13:37 +02:00
atlas
e4a9005468 move Permission into hive-types, drop swarm-controller's hive-sh4re dep 2026-10-18 21:40:01 +02:00
atlas
04786da58f the system prompt tells agents to attach, inline or send files instead of handing out state-dir or /shared paths 2026-10-18 21:07:47 +02:00
atlas
c6d26a0904 the port-bind test no longer loses its released port to other sockets 2026-10-18 21:06:34 +02:00