Commit graph hyperhive/hive-ag3nt
Author SHA1 Message Date
atlas
f111dac231 fix(test): update effort_validation test to accept low and max levels
The test's invalid-values list included "low" which was valid before
this PR but is now a legitimate effort level. Replace with "lowest"
(still invalid) so the test keeps its coverage without false-failing.
2026-07-04 19:52:33 +02:00
atlas
742f4ef916 feat(#2220): add low and max effort levels
claude --effort now accepts low, medium, high, xhigh, max.
Expand EFFORT_LEVELS from 3 to 5, update NixOS enum + description,
and fix the stale doc comment in web_ui.rs.

Closes #2220
2026-07-04 19:52:33 +02:00
damocles
9b2d16ae6a fix(#2190): replace MANAGER_AGENT fallbacks with "operator" for attribution
- loose_ends.rs: NULL submitter on legacy approval rows → "operator"
- questions.rs: NULL submitter on cancel_loose_end → "operator"
- server.rs: HostRequest::RequestSpawn submitter → "operator"
- dashboard.rs: web-UI spawn submitter → "operator"
- socket_server.rs: submit_init_config with no declared parent → "operator"
- mcp.rs: drop MANAGER_AGENT exception from check_send_allowed; keep <parent> only
2026-07-04 18:56:16 +02:00
damocles
c708f698ee fix(#2175): return 409/400 not 500 for turn-in-flight + validation errors 2026-07-04 13:13:20 +02:00
damocles
a26bbb15fc feat(#2089): docs pointer via system-prompt line, drop CLAUDE.md mechanism 2026-07-04 12:07:17 +02:00
damocles
6267bf56d0 feat(#2089): additive claude.md pointer to in-container docs 2026-07-04 11:30:33 +02:00
damocles
3d5957c87b web-ui: deadline-bound all broker-backed fetches so a busy hive-c0re can't hang api/state (closes #2148) 2026-07-03 21:42:45 +02:00
damocles
be5b36911a recv: hoist RECV_BATCH_MAX into hive-sh4re, drop magic 5 in wake hint 2026-07-03 18:50:21 +02:00
damocles
78396c8189 recv: cap batch size at 5, default stays 1 (#2150 clarified) 2026-07-03 18:50:21 +02:00
damocles
ee45db6323 Revert "recv mcp tool: default max to a small batch of 5 (wire default stays 1)"
This reverts commit b8d608d4b6a7ed95faffdec8d8b3167ae8f3b39e.
2026-07-03 18:50:21 +02:00
damocles
d46d3c261b recv mcp tool: default max to a small batch of 5 (wire default stays 1) 2026-07-03 18:50:21 +02:00
atlas
8406a45275 feat(#1997): add prettier markdown formatter to treefmt
- .prettierrc: proseWrap=preserve (no prose reflow)
- .prettierignore: exclude hivectl-cli.md (auto-generated) + 11 docs
  with multi-line list-item continuations prettier would strip to col 0
  (CommonMark limitation in prettier's list handling)
- format 16 markdown files: cosmetic only (*→_, table alignment,
  heading normalisation) — verified no broken continuations, idempotent
2026-07-02 23:33:11 +02:00
iris
db85cdfdc2 docs(get_agent_meta): add matrix_accounts to tool description
The feat added matrix_accounts to the GetAgentMeta response in
commit 5b442796 but didn't update the MCP tool description string
that agents see when introspecting the tool. Add a brief note so
agents know to expect the field.
2026-07-02 16:38:42 +02:00
damocles
383bb3b083 make the forge-notify cursor bound explicit: shared fetch-limit const + assert + docs (closes #2117) 2026-07-02 12:57:55 +02:00
damocles
34374fd10a add ack_until: bulk-ack inbox messages by id + surface msg ids in wake prompts and recv (closes #2125) 2026-07-02 12:55:18 +02:00
damocles
c7bac398b2 address mara: drop CompactionMode, always checkpoint-then-compact 2026-07-01 19:05:24 +02:00
damocles
fc42f97691 parallelize graceful agent drains, serialize container stops on fast lane; unify shutdown+checkpoint+compact prompt 2026-07-01 19:05:24 +02:00
damocles
f6d9ca7f99 fold forge_cursor into hyperhive-harness.json + prose comments (mara/argus review) 2026-07-01 18:52:56 +02:00
damocles
2549cc51ba fix(#2106): persist forge-notify dedupe cursor to disk so rebuilds don't re-deliver the unread backlog 2026-07-01 18:52:56 +02:00
damocles
4a82ed02cf feat(#2038): render http mcp url when HYPERHIVE_MCP_HTTP_PORT set 2026-07-01 17:58:22 +02:00
damocles
ecba548787 feat(#2038): streamable-http mcp transport for hyperhive server 2026-07-01 17:55:44 +02:00
damocles
cd5b731884 refactor(#2058): drop claude.md docs pointer, keep nix option + --add-dir 2026-06-29 01:42:35 +02:00
damocles
362d392993 refactor(#2012): docs in own derivation, ship via claude --add-dir (no ~/.claude clobber) 2026-06-29 01:42:35 +02:00
damocles
72c4bb18c9 refactor(#2077): drop impl-history from broker/dashboard/mcp comments 2026-06-29 00:22:54 +02:00
iris
c580d721fb refactor(dash): fold active_model into hyperhive-harness.json, not a separate file
hive-c0re was reading harness/hyperhive-model directly to surface the
model badge on the dashboard. hyperhive-model is a runtime-override
file (not the resolved priority) and adds to the marker-file count.

Instead: mirror the fully-resolved model into hyperhive-harness.json
(the consolidated state file that already replaced hyperhive-rate-limited
/ hyperhive-needs-login). Written by hive-ag3nt on:
- Bus::new() startup (captures nix config > override > default)
- set_model() runtime change (MCP set-model call)
- emit_status() (keeps model current across rate-limit / auth flips)

hive-c0re reads active_model from hyperhive-harness.json, same dir +
same read path as rate_limited / needs_login. No new files.
2026-06-27 22:59:40 +02:00
damocles
c9115bdbf5 fix(#2019): pin harness claude session via --resume so choom can't clobber it 2026-06-27 20:53:36 +02:00
damocles
5972605aeb feat(#2039): drop is_primary from get_agent_meta matrix identities 2026-06-27 12:43:22 +02:00
damocles
5b442796ca feat(#2039): list matrix identities in get_agent_meta 2026-06-27 12:43:22 +02:00
damocles
e349416d1a fix(#2031): use Duration::from_hours(1) for clippy duration-suboptimal-units 2026-06-27 10:14:47 +02:00
damocles
601ed2429d fix(#2031): backtick paths in vacuum doc comments for clippy doc-markdown 2026-06-27 10:14:47 +02:00
damocles
49fc61212b fix(#2031): move bash-tasks + events vacuum agent-side (privsep ownership) 2026-06-27 10:14:47 +02:00
damocles
b231ed2392 feat(#1969): ship claude settings via /etc/claude-code/managed-settings.json 2026-06-26 23:06:04 +02:00
damocles
49db9d6e1c feat(#1990): surface pending recv() message count in get_loose_ends 2026-06-26 01:22:20 +02:00
damocles
9f40bd13f9 fix(#1896): remove dead forge_notify reason drop-list + auto-unsubscribe 2026-06-24 23:07:48 +02:00
damocles
ca44fd56df fix(#1896): drop self-authored issue/pr creation wakes in forge_notify 2026-06-24 22:19:32 +02:00
damocles
3d2e0ef561 feat(#1906): non-root weston gui on a fixed vnc port 2026-06-23 22:41:20 +02:00
damocles
00f682991c refactor(#1896): remove dead forge_notify reason plumbing + fix docs 2026-06-23 17:23:06 +02:00
iris
684c85686e feat(stats): add an 'all' time range to agent + hive stats
Adds a Window::All option to the per-agent stats page and the hive-wide
rollup, selectable as a new 'all' tab on both.

- hive-ag3nt (per-agent, time-bucketed): All ranges from MIN(started_at)
  to now (fallback to now on an empty table) with an adaptive bucket
  width laddered by span — hourly <=2d, daily <=90d, weekly <=2y, 30-day
  beyond — so the trend series stays bounded (~<=104 buckets) at any age.
- hive-c0re (swarm rollup, not time-bucketed): All sets from=0 so the
  aggregate covers every recorded turn across all agents.
- frontend: an 'all' button on both the agent stats and dashboard hive
  stats window selectors (createTabStrip + fetch already pass the window
  string through, so no JS change needed).

cargo check passes on both crates; FE builds clean. Fixes #1919.
2026-06-22 23:47:20 +02:00
damocles
1c84b3ef10 fix(#1916): direct the agent to end its turn on graceful stop instead of a fenced-empty recv 2026-06-22 23:24:54 +02:00
damocles
eb09ec4e28 forge_notify: record dedupe cursor inside the ok arm for clarity 2026-06-22 16:45:24 +02:00
damocles
f5ac6d79e3 forge_notify: leave delivered threads unread, dedupe wakes in-memory 2026-06-22 16:23:04 +02:00
damocles
55229fdf5b annotate mcp connect-refused as expected hive-c0re restart 2026-06-22 13:42:34 +02:00
atlas
f1d54ce12c agent surface: create_repo through hive-c0re (#1787)
Closes the #1787 loop — the sanctioned create path now that agents
can't create repos directly. Adds:

- wire: Request::CreateRepo{repo} + Response::RepoCreated{full_name,
  clone_url} (hive-sh4re).
- agent_server: dispatch_shared arm + handle_create_repo — validates the
  repo name, then forge::create_agent_repo (org-owned repo, agent=write
  collaborator, operator-team branch protection). Returns the full name
  + clone url so the agent can git clone immediately.
- MCP: create_repo tool + CreateRepoArgs in the harness.
- a new opt-in ToolGroup::Forge (=[create_repo]) so the operator
  controls which agents can spin up repos (least privilege).

Workspace clippy -D warnings, cargo test, nix fmt all green.
2026-06-21 22:36:45 +02:00
iris
5eacc99146 fix(dashboard): ctx·Nk card badge showed 0k — use context_tokens()
/api/dashboard-state reported ctx_tokens from raw ctx_usage.input_tokens,
which is only the *uncached* input. With prompt caching the bulk of the
prompt is cache-read, so input_tokens is ~0 and every SW4RM card showed
'ctx·0k'. Use ctx_usage.context_tokens() (input + cache-read + cache-creation
= the real window size) to match the agent page (ships the full ctx_usage)
and turn.rs's cache-TTL check. Doc comment updated.
2026-06-21 21:56:18 +02:00
iris
cd7846b348 bash-tasks page: live interval poll + spawn_blocking the dir scan (review)
Two fixes from review:
- Liveness: /api/state isn't polled while online (only during login), so
  hooking refreshBashTasks to it only populated on cold load. Bash tasks
  start + finish asynchronously between turns, so add a light ~4s interval
  to keep the tasks pill live; the /api/state-time call now just does the
  first-paint populate. Doc note corrected to match.
- Move the blocking dir scan + per-file reads in /api/bash-tasks off the
  async executor via tokio::task::spawn_blocking (damocles nit).
2026-06-21 13:28:37 +02:00
iris
ceb852e5b4 hive-ag3nt: add GET /api/bash-tasks endpoint for the agent page
Snapshot of the agent's in-flight bash tasks: reads the in-container
bash-tasks/ dir (the co-located hive-bash-mcp daemon writes one TaskFile
JSON per task), deserializes the canonical hive_sh4re::TaskFile, filters to
Pending/Running, and returns them running-first then oldest-first. Skips
unreadable/malformed files (and the daemon's .json.tmp scratch writes) so a
stray file can't fail the list. Snapshot-only for v1; the page polls it like
/api/loose-ends, SSE live-push is a possible follow-up.
2026-06-21 13:28:37 +02:00
damocles
03ea5d601b hive-c0re: graceful agent stop — quiesce harness, flush state, then stop 2026-06-19 11:50:59 +02:00
damocles
df96c21b0c prompt: document turn-as-checkpoint + request_next_turn to cut redelivery 2026-06-17 18:37:17 +02:00
damocles
e8d39ecb8b hive-sh4re: make harness_dir the single resolver; hive-ag3nt delegates (#1450) 2026-06-16 12:36:48 +02:00
damocles
41c4682f7a refactor(#1450): lift shared harness-path resolution into hive-sh4re 2026-06-14 21:34:58 +02:00