Commit graph

666 commits

Author SHA1 Message Date
iris
7f97acf19e dashboard: render META INPUTS as a full tree with bulk select
Remove the depth-2 cap in walk_meta_inputs so every fetched input
at every depth is surfaced, not just two levels (issue #275). The
uncapped walk needs a guard: a visited-node set makes it a spanning
tree — each fetched node walked once, at its shallowest path — so
shared subtrees don't re-walk and a cycle can't recurse forever.
A two-pass walk (claim a node's direct inputs before descending)
keeps shallow inputs at a shallow path.

Frontend: renderMetaInputs indents each row by its slash-path depth
and shows the leaf segment (full path on hover), plus a select-all /
select-none control so a long input list isn't ticked box by box.
2026-05-22 23:50:20 +02:00
damocles
dd3a820e57 hive-forge: reject empty/whitespace-only comment bodies (closes #297, closes #299) 2026-05-22 23:41:20 +02:00
lexis
631356f2f8 docs: update forge.rs entry for meta read access
added clarification that forge mirrors include meta read access for
agents as read-only collaborators on core/meta.
2026-05-22 23:05:09 +02:00
damocles
06cb87917d docs: add agent configuration section to README (supersedes #302) 2026-05-22 23:00:08 +02:00
damocles
2ac77a416b hive-forge pr-create: set allow_maintainer_edit=true by default (closes #308) 2026-05-22 22:52:36 +02:00
lexis
40589c8510 docs: update spawn flow docs for apply_commit handling first spawn (follow-up to 66f1568) 2026-05-22 22:34:42 +02:00
lexis
3abb00c327 docs: add request_update_meta_inputs to manager tools (follow-up to 3e098c5) 2026-05-22 22:34:42 +02:00
lexis
96f93f3b5e docs: add request_next_turn to turn-loop.md (follow-up to c99261b) 2026-05-22 22:34:42 +02:00
iris
4a27ef7304 dashboard: derive ctx badge thresholds from the model context window 2026-05-22 22:32:32 +02:00
damocles
cbd4b71322 fix #296: auto-generate GPG signing key for Forgejo on first boot 2026-05-22 22:29:57 +02:00
damocles
a94b504883 forge_notify: skip-reasons drop-list filter, configurable via agent.nix 2026-05-22 22:29:32 +02:00
damocles
b0f6bd8ece fix: self-calibrate context window from API result event
the stream-json result event carries modelUsage.<model>.contextWindow
which is the actual per-inference active window the model enforces.
for claude-sonnet-4-6 this is 200k even though the full prompt cache
can hold millions of tokens via accumulated cache reads.

with the nix-configured sonnet = 1000000 the proactive compact watermark
sat at 750k and was never reached. agents grew context until prompt_too_long
at ~170k — reactive compact, no checkpoint turn.

changes:
- bus gains api_context_window field seeded from modelUsage.*.contextWindow
  in each turn's result event. authoritative; falls back to env var, then 200k.
- new effective_context_window(bus) helper used by both watermark functions
- compact_watermark (75%) and auto_reset_watermark (50%) call effective_context_window
- context_tokens() docstring clarified: all three token fields (input +
  cache_read + cache_creation) count against the per-inference contextWindow
  limit. the large cache_read values seen in the result event are cumulative
  across all inferences in a turn, not per-inference.
- /api/state context_window_tokens now reflects the calibrated window

closes #129
2026-05-22 22:20:07 +02:00
damocles
3e94914569 fix #289: full forge sync on rebuild (extract sync_agent, use in rebuild_agent)
extract per-agent forge logic from ensure_all() into sync_agent()
so both the startup sweep and rebuild_agent call identical code.
rebuild now runs: ensure_user_for + ensure_config_repo + push_config
+ meta_read_access + ensure_meta_remote — same as the boot sweep.
missing tokens and drift in any forge state are fixed by rebuild,
not just hive reboot.
2026-05-22 22:18:05 +02:00
damocles
7ad9809207 fix #289: re-seed forge token in rebuild_agent
if forge_after_first_spawn fails transiently on first spawn the
token is missing. rebuild_agent now calls ensure_user_for so
a manual rebuild (or the startup auto-update scan) recovers
the missing token — no full hive reboot needed.
2026-05-22 22:18:05 +02:00
iris
2f1b846baf dashboard: show meta-update progress in the META INPUTS panel
post_meta_update returns 200 immediately and runs the nix flake
update + agent-rebuild ripple in a background task, so the META
INPUTS panel looked idle for the whole multi-minute window (#259).

Track in-flight runs with a Coordinator atomic counter, exposed via
an RAII MetaUpdateGuard held across run_meta_update. Surface it as
the meta_update_running snapshot field plus a MetaUpdateRunning SSE
event (flipped only when the count crosses 0, so concurrent runs
flip the flag once). The panel shows a pulsing in-progress banner
and disables the update button while a run is active.
2026-05-22 21:54:28 +02:00
damocles
20d2b48fe5 hive-forge: fix comment --body flag swallowing, add comment-edit verb 2026-05-22 21:35:08 +02:00
damocles
3f08051bda lifecycle: seed applied repo at template commit, not main, for first-spawn diff 2026-05-22 21:29:52 +02:00
damocles
93bf91535f hive-forge: add --milestone to issue-edit 2026-05-22 20:31:13 +02:00
damocles
66ec8390e1 hive-forge: add comment-show <id> [--json] [repo] 2026-05-22 20:21:05 +02:00
iris
a9a10b631f dashboard: show when an approval was requested (closes #272) 2026-05-22 20:06:45 +02:00
damocles
908cadb151 docs: add missing #[must_use], # Errors, # Panics across public api 2026-05-22 19:41:27 +02:00
damocles
748536203b refactor: split long functions per review feedback; remove all #[allow] attributes 2026-05-22 19:24:44 +02:00
damocles
bbe2112dc9 fix: use try_from for i64/u64 casts; split format_notification into helpers 2026-05-22 19:14:22 +02:00
damocles
484cea62c7 fix #265: resolve all remaining clippy warnings (cast, too_many_lines, doc nits) 2026-05-22 19:11:40 +02:00
damocles
30d82148e0 clippy: apply auto-fixable warnings across workspace (closes #265 partial) 2026-05-22 18:55:57 +02:00
damocles
56d0b02c2f nix: drop unused weston-rdp.nix (closes #263) 2026-05-22 17:30:32 +02:00
damocles
4a0d08154e forge_notify: detect review requests via requested_reviewers (closes #253) 2026-05-22 16:54:29 +02:00
damocles
845fafdf1b forge_notify: show assignees and reviewers unconditionally (closes #256) 2026-05-22 16:45:41 +02:00
iris
9b9277db78 fix: vendor marked UMD build so window.marked is defined (issue #244) 2026-05-22 16:33:13 +02:00
damocles
b283768f26 forge: replace curl shell-outs with reqwest http helper (closes #249) 2026-05-22 16:26:44 +02:00
damocles
5c360e8293 forge_notify: filter self-notifications, detect PR reviews (closes #230, closes #231) 2026-05-22 15:29:38 +02:00
damocles
bbe4cdb872 add meta read access and remote for agents on forge 2026-05-22 15:28:06 +02:00
damocles
4bc5237bea harness: fix sandbox-fallback conflict with lib.mkForce (closes #247) 2026-05-22 15:24:48 +02:00
damocles
7426654a74 crash_watch: track prev_sub_agents to fix needs_login for newly spawned agents 2026-05-22 12:31:18 +02:00
damocles
55fe2856b9 actions: emit needs_login after first spawn, fix update_meta_inputs arity 2026-05-22 12:31:18 +02:00
damocles
6ca72074c4 docs: move sandbox threat model to docs/security.md, add code reference 2026-05-22 12:28:04 +02:00
damocles
a6bd4cf502 harness: document sandbox threat model and credential permission requirements 2026-05-22 10:57:13 +02:00
damocles
66f1568e8f apply_commit handles first-time spawns, request_spawn deprecated 2026-05-22 10:52:02 +02:00
damocles
6974634326 harness: set sandbox-fallback = true to fix nix builds in containers (fixes #196) 2026-05-22 10:51:10 +02:00
damocles
3e098c56ff update_meta_inputs: require operator approval, rename to request_update_meta_inputs 2026-05-22 10:49:20 +02:00
damocles
597e4ba03a manager: add update_meta_inputs tool to update flake.lock on demand (closes #235) 2026-05-22 10:49:20 +02:00
iris
15e44955a8 web: clickable links in terminal rows and dashboard messages (issue #233) 2026-05-22 01:17:38 +02:00
damocles
4b51c198d5 forge_notify: add repo slug to notification header for multi-repo disambiguation 2026-05-22 00:50:19 +02:00
damocles
20bb343f27 forge_notify: add issue/PR number to header, drop repo: line, show assignee on new items (closes #225) 2026-05-22 00:50:19 +02:00
damocles
c99261b042 harness: add request_next_turn MCP tool — immediate self-continuation (closes #216) 2026-05-22 00:35:13 +02:00
damocles
de6ff3da29 hive-forge: add milestone verb (list/create/close), closes #226 2026-05-22 00:18:45 +02:00
damocles
02ace544bc hive-forge: restore issue-edit verb lost in rebase 2026-05-21 23:47:18 +02:00
damocles
0615b0521f hive-forge: add pr-create and issue-create verbs, closes #209 2026-05-21 23:44:27 +02:00
damocles
5de795c55f hive-forge: drop notifications/notif-read verbs — conflict with forge_notify daemon 2026-05-21 23:39:11 +02:00
damocles
c8b544d340 hive-forge: add diff, notifications, notif-read, subscription verbs (closes #214) 2026-05-21 23:35:41 +02:00