Commit graph

2,457 commits

Author SHA1 Message Date
müde
261f02439b fix(forge): review fixes for the forgejo-api port 2026-07-07 14:42:43 +02:00
müde
5cfb33eeed docs(forge): note forgejo-api client + remaining raw-HTTP surfaces 2026-07-07 09:25:51 +02:00
müde
72415497aa style: treefmt reflow of time dep 2026-07-07 09:25:03 +02:00
müde
4636987469 refactor(hive-forge): port CLI verbs to forgejo-api 2026-07-07 09:24:53 +02:00
müde
b8a3927c43 refactor(hive-c0re): port forge module + knowledge hooks to forgejo-api 2026-07-07 09:11:15 +02:00
müde
4468e86e2d refactor(hive-ag3nt): port forge_notify to forgejo-api 2026-07-07 09:10:24 +02:00
müde
0f035ce1e9 build: add time + url deps for forgejo-api port 2026-07-07 08:50:35 +02:00
müde
39fe0f306a build: add forgejo-api workspace dep (sync feature for hive-forge) 2026-07-07 08:48:07 +02:00
müde
5b062dca55 refactor(hive-ag3nt): split hive bin into hive-agent / hive-agent-mcp / hive-agent-wake 2026-07-06 23:48:05 +02:00
müde
2486251b32 fix: close second review round on the queue-routed CLI
- subvol upgrade waits for the queued stop DAG before migrating (was
  snapshotting + swapping state under a live bind mount) and for the
  restart job after
- history trim gets a 5-min grace for fresh terminals so broad
  stop/start waits can't miss a failed DAG evicted by the per-template
  cap (cap still applies past the grace)
- restart-all returns its DAG ids so hivectl actually waits
- hard stops await their agent DAGs (bounded) before infra goes down,
  restoring the agents-before-infra invariant
- hivectl wait uses node-level terminality so the after-any recovery
  reconcile is watched to completion; infra render errors no longer
  skip watching already-queued agent DAGs
- fold hive-bash-mcp's last local now_unix into wire_time
2026-07-06 22:57:28 +02:00
müde
0e4b5a1120 refactor(hive-c0re): group src-root files into submodules
stores/ (sqlite-backed host stores + db helper), stats/, agent_config/,
workers/ — pure git-mv moves; crate-root re-exports keep every
crate::<module> path compiling. flake_check stays at root (synchronous
approval-flow validation, not a background worker)
2026-07-06 22:38:47 +02:00
müde
b489454dc2 feat(hivectl): queue-routed lifecycle verbs with wait + DAG progress
every agent lifecycle verb on the admin socket (rebuild / restart /
restart-all / kill / stop / start) now submits job-queue DAGs and
returns their ids; hivectl polls the new HostRequest::QueueDag and
prints a live node-chain progress line per DAG (fan-out children
included), exiting non-zero on failure — --no-wait opts out. DagView
and the queue wire enums move to hive_sh4re::jobs (wire types live in
the shared crate); the last fused rebuild path (lifecycle::rebuild)
is gone. tracker: #2166
2026-07-06 22:30:49 +02:00
müde
dc6a37b29a style: import ordering + blank lines after now_unix sweep (treefmt) 2026-07-06 22:08:40 +02:00
müde
a17015f01e refactor(hive-c0re): split forge into submodules
mod.rs keeps the shared admin/http helpers + ensure_all/sync_agent;
user/token provisioning, repo/org/mirror ops, and the trust-boundary
PR-merge primitives move to users.rs / repos.rs / pr_merge.rs
2026-07-06 22:08:22 +02:00
müde
8cdebb1752 fix(hive-ag3nt): drop attribute orphaned by now_unix removal 2026-07-06 22:07:39 +02:00
müde
b0736e6f3e refactor(hive-ag3nt): split mcp into submodules
mod.rs keeps the #[tool_router] impl + server wiring untouched;
rendering/format helpers move to mcp/render.rs, the 24 tool arg
structs to mcp/args.rs
2026-07-06 22:00:30 +02:00
müde
c84028ddcf refactor: single now_unix in hive_sh4re::wire_time
replaces 15 per-module copies (now_unix/now_secs) across hive-c0re and
hive-ag3nt; wire_time already owns the epoch-seconds convention
2026-07-06 21:58:32 +02:00
müde
d190420946 refactor(hive-c0re): shared additive-migration helper in db
db::apply_migrations runs ALTER lists and ignores duplicate-column
errors (turn_stats' pattern); approvals, operator_questions, broker
reminders, and scheduled_prompts drop their hand-rolled
pragma_table_info guards. broker's acked_at migration stays bespoke —
its backfill must only run when the column was just created
2026-07-06 21:53:48 +02:00
müde
34b21b8038 refactor: drop kind_to_str wrapper, call ApprovalKind::as_str directly 2026-07-06 21:49:46 +02:00
müde
f74c1984d7 refactor: ApprovalKind::as_str owns the kind→string mapping
replaces three hand-rolled six-arm matches (actions.rs ×2,
state_snapshot.rs); approvals::kind_to_str delegates. a new kind can
no longer silently miss one of them
2026-07-06 21:48:55 +02:00
müde
084e12503c fix(hive-c0re): close review findings on the job-DAG queue
- deploy-window gate (meta::exclusive) + path-limited meta commits:
  a perm/lock/topology commit can no longer sweep an ApprovalDeploy's
  staged flake.lock and neuter abort_deploy (regression test included)
- cancel surfaces now buffer terminal roll-ups the scheduler drains,
  so a queued approval DAG cancelled by the operator resolves its
  approval instead of dangling, and cancelled power ops revert their
  wanted flip to the observed state
- hivectl restart / restart-all ride the queue (lease serialization,
  transient guard) and restart sets wanted=Up like the old kill+start
- exactly one Rebuilt event per rebuild DAG, emitted at terminal
- StopForUpdate pre-seeds a missing agent_power row from the pre-stop
  observation so a rebuild can't strand an unknown agent offline
- history trim keeps terminal fan-out parents with live children
- audit_log back on db::open; swarm.js badge for reconcile DAGs
2026-07-06 21:44:43 +02:00
müde
58e86a3adf refactor(hive-c0re): shrink dashboard mod root
convert to dashboard/mod.rs; state snapshot, meta inputs, tombstones,
and misc api handlers move to their own files
2026-07-06 21:05:52 +02:00
müde
3ee87d394c refactor(hive-c0re): split lifecycle into submodules
mod.rs keeps the container verbs + priv_run plumbing; git helpers,
repo/dir setup, and host drop-in config move to their own files
2026-07-06 21:05:52 +02:00
müde
9e7af3b6bf refactor(hive-c0re): split socket_server into submodules
mod.rs keeps dispatch + messaging/guards; schedules, reminders,
config approvals, and lifecycle handlers move to their own files
2026-07-06 21:05:52 +02:00
müde
380c6ad47f refactor(hive-c0re): shared sqlite open helper with busy timeout
one db::open owns the parent-dir + connection + busy_timeout dance for
every host-side store (broker/approvals/questions/schedules/power in
broker.sqlite, build_logs, audit_log); schema + migrations stay per
store. same-file connections now wait out concurrent writers instead
of risking SQLITE_BUSY.
2026-07-06 20:46:57 +02:00
müde
604e1c2557 docs: job-DAG queue model; fold agent_power table into broker.sqlite
coordinator.md rewrites the queue section (node inventory, DAG shapes,
resources, desired-state reconciliation, boot reconcile); approvals.md
+ persistence.md + hivectl --graceful help updated to match. agent_power
lives in broker.sqlite like approvals/questions (own connection + busy
timeout) instead of a separate db file.
2026-07-06 20:36:57 +02:00
müde
8349e6f621 feat(dashboard): node-aware queue render + buildSlots option
each queue card now shows its DAG's node chain (per-node state, step,
build-log link), fixing 'queue jumps don't show on the dashboard'.
live-log panel keys off the running node's log. new
services.hyperhive.c0re.buildSlots option (default 1) threads the
concurrent nix-build count into serve.json.
2026-07-06 20:36:57 +02:00
müde
7946e03fde feat(hive-c0re): replace rebuild queue with generic job-DAG queue
jobs are now DAGs of primitive nodes (prebuild, stop-for-update, swap,
reconcile, signal, drain, ...) driven by one scheduler with N build
slots + per-agent lifecycle leases. per-agent power intent (wanted
up/offline) is durable in agent_power.sqlite; Reconcile nodes converge
observed state to it. kills the graceful-stop watcher thread, the
deferred-start follow-up, and the cascade pre-enqueue (fan-out on
MetaLock completion instead). tracker: #2166
2026-07-06 20:36:57 +02:00
müde
79a3993def commit the lock file agents forgot about manually like an animal 2026-07-06 19:57:53 +02:00
müde
50d801b6c9 fix(hive-claude): don't scan model-authored assistant/user content for CLI failure markers 2026-07-06 00:15:42 +02:00
müde
25540755f4 fix(hive-claude): match session by parsed top-level customTitle, not transcript substring 2026-07-06 00:09:36 +02:00
müde
8a78b8a464 docs(agent): clarify cred-file set + settings doc pointer, fix forge_notify cross-ref 2026-07-06 00:03:43 +02:00
müde
b4f54a194b fix(agent): don't eat /compact flag on failed turn; restore ctx fallback; requeue on SessionNotFound 2026-07-06 00:01:15 +02:00
müde
dd51d02bc2 fix(hive-claude): report Progress.created on first-turn overflow, compacted only when compact succeeded 2026-07-05 23:42:57 +02:00
müde
216eb8ae9b docs(turn-loop): split into index + claude-invocation/config/mcp sub-pages, condense the loop 2026-07-05 23:04:48 +02:00
müde
746f518250 fix(agent): show Compacting state during in-flight operator /compact 2026-07-05 22:54:20 +02:00
müde
59dd7955aa fix(stats): last_usage orders by id (insertion order); clarify Window default 2026-07-05 22:53:16 +02:00
müde
f2f104627d refactor(agent): drop vestigial install_configured param, non_empty_env helper, explicit infallible expect in client 2026-07-05 22:49:45 +02:00
müde
9cebc128e2 refactor(web_ui): Bus::effective_context_window, sigint_claude + per-connection hello, relocate fetch_reminder_stats, drop redundant guard 2026-07-05 22:47:14 +02:00
müde
77f31b44bb refactor(agent): fire_and_forget helper, drop dead default_model + compact_percent fallback, fix stale comment 2026-07-05 22:43:23 +02:00
müde
9721be7bc3 docs(turn_stats): mark unread columns as forward-capture, not consumed 2026-07-05 22:39:45 +02:00
müde
f490e07509 refactor(prompt): drop unreachable role-block defensive branches; keep marker grammar 2026-07-05 22:36:10 +02:00
müde
20ff891962 refactor(forge_notify): share render_body_excerpt across formatters; fix nits + docs 2026-07-05 22:32:00 +02:00
müde
dd7f8c5ebb docs(turn-loop): document PromptTooLong archive+requeue, TurnOutcome=Result, credential-file session detection 2026-07-05 22:27:09 +02:00
müde
90af3e8d0b refactor(mcp): split claude launch-config layer into mcp_config.rs 2026-07-05 22:24:46 +02:00
müde
e1e3bda94a style: apply nix fmt 2026-07-05 22:24:42 +02:00
müde
9a0d525fdf refactor(mcp): drop vestigial SocketReply, match hive_sh4re::Response directly; remove dead code 2026-07-05 22:12:45 +02:00
müde
543177ed74 refactor(mcp): collapse repeated failure-arm triplet into reply_err helper 2026-07-05 22:05:06 +02:00
müde
785a36b907 refactor(web_ui): share one broker_request helper; /send timeout now 409 not 500 2026-07-05 21:55:28 +02:00
müde
d83d03e4c0 fix(agent): key session detection off credential filenames; own clear_session in login.rs 2026-07-05 21:48:56 +02:00