Commit graph

2,861 commits

Author SHA1 Message Date
damocles
174e277340 add reminder delivery timer + main.rs wiring (#2635 inc 1) 2026-07-23 00:12:30 +02:00
damocles
92276e4e14 add harness-local reminder store (#2635 inc 1) 2026-07-23 00:12:30 +02:00
damocles
18d21237bf add reminder ops to the in-agent socket protocol (#2635 inc 1) 2026-07-23 00:12:30 +02:00
damocles
94a172cba3 docs: stop claiming tracker-tag/comment-block lint are non-required 2026-07-23 00:10:59 +02:00
atlas
03eb64cb5c feat(#2591): hive-jobq Node lifecycle — started/finished timestamps + failure reason
Node gains started_at/finished_at (chrono DateTime<Utc>, serialized
RFC 3339 on the wire per hive_sh4re::wire_time) plus error (String).
Graph::set_state self-stamps started_at on the first Running transition
and finished_at on the first terminal one, via an internal now_utc()
clock (keeps settle/complete signatures stable). Outcome::Failed(String)
carries the failure reason, set on the terminal transition.

hive-c0re complete_node builds Outcome::Failed(msg); its node_rt
side-table stays i64 for now (double-write) until #2637 reads the Node.

Toward #2637: the jobq graph becomes the source of truth for per-node
lifecycle so the queue can be sent to the client as-is.
2026-07-22 23:58:30 +02:00
atlas
30a2a2e9de feat(#2641): sudoless hivectl via a hive-admin group on the host socket
The host admin socket `/run/hyperhive/host.sock` was `0660 root:root` (no
SocketGroup), so hivectl needed sudo. Group-own it by a new `hive-admin`
group and add a `services.hyperhive.c0re.adminUsers` allowlist: listed users
join `hive-admin` and drive hivectl without root.

- `SocketGroup = "hive-admin"`, `SocketMode = "0660"` on the hive-c0re.socket
  unit.
- `/run/hyperhive` -> `0751` (traverse-only, no listing) so the group can reach
  the socket path; the socket's own `0660 hive-admin` mode gates the
  connection, and the per-agent subdirs keep their own restrictive perms.
- Empty `adminUsers` (the default) leaves `hive-admin` memberless -> root-only,
  as before.

The admin socket is full hive control (spawn/kill/destroy/deploy), so
`adminUsers` is an explicit, opt-in trust grant. Documented in
docs/boundary.md (host admin socket access) + docs/tools/hivectl.md.
2026-07-22 22:50:27 +02:00
damocles
c4deca99db fix(#2639): cancel_loose_end kind="todo" clears without a bash round-trip
Adds a real MCP-side path for the workaround #2639 documented: dial the
in-container HIVE_AGENT_SOCKET directly from cancel_loose_end (kind:"todo")
instead of shelling out via a tracked bash task (nc -U ...), which is what
was spawning a fresh completion todo on every clear and cascading forever.

hive-agent-mcp/src/mcp/render.rs: renamed local_todos's socket-dial guts
into a shared dial_agent_socket(req) helper, added mark_local_todo_done(id)
on top of it (MarkTodoDone request already existed server-side, unused
until now). mod.rs wires kind:"todo" into cancel_loose_end ahead of the
question/reminder/approval parse. args.rs + render.rs + docs/tools/bash.md
text updated to point at the new path instead of the old raw nc invocation.
2026-07-22 21:46:16 +02:00
damocles
4989bcdb5e type Message.from as Ident 2026-07-22 21:10:17 +02:00
damocles
76647415af type Approval.agent as Ident 2026-07-22 21:10:17 +02:00
damocles
8c1979f05c type get_agent_meta target as Ident (#2621) 2026-07-22 21:10:17 +02:00
damocles
3df565789c type ask to target as Ident (#2621) 2026-07-22 21:10:17 +02:00
atlas
0ab6b764be docs(#2591): fix stale Claim.agent doc + explain cancel's container roll-up (argus review) 2026-07-22 19:47:30 +02:00
atlas
600bc051e1 refactor(#2591): move the perm-change payload onto the WritePermFile node 2026-07-22 19:47:30 +02:00
atlas
be2dfa8cd3 refactor(#2591): make NodeKind the queue payload — drop JobPayload, agent into variants 2026-07-22 19:47:30 +02:00
atlas
2294cd4516 feat(#2591): auto-complete the DAG container + run terminal hooks inline 2026-07-22 19:47:30 +02:00
atlas
a78280feed refactor(#2591): model a DAG as a container node — grouping side-tables become graph walks 2026-07-22 19:47:30 +02:00
atlas
8834161fb9 feat(#2591): add NodeKind::Dag DAG-container variant 2026-07-22 19:47:30 +02:00
atlas
50172d1716 refactor(#2591): derive PartialEq/Eq/Serialize on TransientKind 2026-07-22 19:47:30 +02:00
atlas
456847eaa1 fix(#2591): validate() rejects out-of-bounds/forward parent index (argus review) 2026-07-22 19:47:30 +02:00
atlas
a5c321a1a0 feat(#2591): port hive-c0re job_queue onto the hive-jobq crate
Replace the in-tree scheduler with the domain-agnostic hive-jobq crate
(merged in #2615): parent-axis grouping + borrow/subtree-reservation
resource model + roll-up completion (State::Finishing).

Host adaptation:
- NodeSpec gains an explicit `parent` axis; templates declare grouping +
  sibling ordering directly (deps order execution, parent groups a subtree
  whose resource the descendants borrow).
- Rebuild is a nested two-root subtree: Prebuild (root, owns the build slot
  for the whole subtree, lease-exempt) -> StopForUpdate (child, owns the
  agent lease) -> Swap/PostSwap (children, borrow both); Reconcile is a
  separate top-level root (AfterAny Prebuild) so it survives the cancel-
  cascade of any failed step (recovery-start invariant) and converges to
  the persisted `wanted` on a fresh lease. This is the multi-root
  correction to the single-root-chain sketch: node0=root broke lease-
  exemption (hoisting the lease onto Prebuild) and recovery-reconcile
  (root failure cancels all children).
- Spawn / perm-change / power-ops (stop/start/restart) group-rooted the
  same way; per-agent power-op subgraphs stay independent roots so a
  multi-agent DAG runs them concurrently, each on its own lease.
- insert_group honours the explicit parent axis (no lease hoisting); the
  DAG terminal node deps AfterAny on every group root and runs once the
  whole op rolls up. Drop the old Graph::add_dep terminal wiring.

36/36 job_queue tests, full hive-c0re suite green, clippy --all-targets.
2026-07-22 19:47:30 +02:00
damocles
e58457da17 feat(#2621): tighten bash task names to a valid ident ([a-z0-9-]) 2026-07-22 18:13:47 +02:00
iris
d0ac48299a fix(#2632): drop stale /api/bash-tasks reference from api_todos doc 2026-07-22 18:02:01 +02:00
iris
88f17320b6 fix(#2632): remove /api/loose-ends endpoint; drop refreshLooseEnds (address argus/mara review)
Both old endpoints removed. refreshLooseEnds() call sites cleaned up;
lastLooseEnds stays as empty [] for reconcileAskBinds (no-op now that
the loose-ends source is gone).
2026-07-22 18:02:01 +02:00
iris
3780f674f4 fix(#2632): remove /api/bash-tasks endpoint (address mara review) 2026-07-22 18:02:01 +02:00
iris
4905b688be feat(#2632): switch agent page loose-ends pill to todos; remove bash-tasks pill
- Add GET /api/todos backend endpoint (connects to HIVE_AGENT_SOCKET,
  calls ListTodos, returns { todos: [...] } — LooseEnd::Todo items).
- Register route in web_ui/mod.rs.
- index.html: replace loose-ends pill (🪢) + bash-tasks pill (⚙)
  with a single todos pill (📋, id=todos-pill).
- agent.css: add .header-pill-todos count colour (green, same as old tasks).
- app.js:
  - refreshTodos() fetches /api/todos, drives renderTodos/buildTodosList.
  - refreshLooseEnds() becomes background-only (no pill); still drives
    reconcileAskBinds for inline ask-form wiring.
  - Remove refreshBashTasks / buildBashTasksList / renderBashTasks.
  - Cold-load and turn_end both call refreshTodos; 4s interval replaces
    the old bash-tasks interval.
2026-07-22 18:02:01 +02:00
damocles
b68d91269f refactor(#2629): fix stale self-filter doc comments + flatten the sender-check let-chain 2026-07-22 17:51:34 +02:00
bitburner
71cc545cb2 fix(#2629): exclude agent's own messages from unread sweep
Gate the unread sweep on sender: skip rooms where the latest unread message
was sent by the agent itself. This prevents self-authored messages from
triggering an unread notification and causing a self-wake loop.

Fixes: #2629
2026-07-22 17:49:45 +02:00
damocles
3188e50ab8 docs(#2628): update bash tool descriptions, docs, and system prompt for the todo model (trim impl details for agent) 2026-07-22 17:34:12 +02:00
damocles
4c36343f04 refactor(#2628): one keyed todo per task transitions running→done (mara: same id changes to done, not a keyless one-off) 2026-07-22 00:15:39 +02:00
damocles
7be37f388e fix(#2628): forge_notify falls back to default_agent_socket when hive_agent_socket unset (argus review) 2026-07-22 00:01:12 +02:00
damocles
a1352376d8 refactor(#2626): retire the file-based mcp-loose-ends scanner (todos own it now) 2026-07-21 23:52:47 +02:00
damocles
17a9a156c2 feat(#2628): migrate bash producer to the in-agent todo socket (keyed active + keyless done, not wakes) 2026-07-21 23:51:35 +02:00
damocles
1e1ca50da3 feat(#2626): migrate forge_notify to the in-agent todo socket (per-thread todos, not wakes) 2026-07-21 00:47:07 +02:00
damocles
ade7be46c2 feat(#2569): wire HIVE_AGENT_SOCKET for the harness, mcp-http, and matrix services 2026-07-20 23:29:26 +02:00
damocles
0977006ec6 refactor(#2569): remove the c0re todo store + handlers (todos now owned in-container) 2026-07-20 23:29:26 +02:00
damocles
21f1569a04 feat(#2569): migrate matrix producer to the in-agent todo socket (unread + invites); drop dead mcp.sock/wake plumbing 2026-07-20 23:29:26 +02:00
damocles
a2d44c7eb6 feat(#2569): merge harness-local todos into get_loose_ends 2026-07-20 23:29:26 +02:00
damocles
86d16efa07 feat(#2569): drive a turn on a local todo signal (serve-loop select) 2026-07-20 23:29:26 +02:00
damocles
713d7f424c feat(#2569): serve the in-agent todo socket from the harness 2026-07-20 23:29:26 +02:00
damocles
993e0bbd4a feat(#2569): add the harness-local todo store 2026-07-20 23:29:26 +02:00
damocles
d85e1895dc feat(#2569): add the in-agent hive-agent-sock crate (todo wire types) 2026-07-20 23:29:26 +02:00
damocles
795dd882bb refactor(#2569): rename hive-agent-sock to hive-core-agent-sock 2026-07-20 21:58:28 +02:00
damocles
84b750fba5 refactor(#2302): type socket wire fields as ident, validated by serde on deserialize 2026-07-20 21:46:18 +02:00
damocles
bf644cc126 feat(#2302): thread &Ident through agent path builders 2026-07-20 21:46:18 +02:00
damocles
1286029947 feat(#2302): migrate dashboard to the single hive-host-sock Ident newtype 2026-07-20 21:46:18 +02:00
damocles
384dcae5f4 feat(#2302): add validated Ident newtype in hive-host-sock 2026-07-20 21:46:18 +02:00
damocles
d4e91bfeeb feat(#2302): fold is_plain_ident into PlainIdent newtype 2026-07-20 21:46:18 +02:00
damocles
cfac917b4d feat(#2302): parse agent names into AgentName newtype at dashboard boundary 2026-07-20 21:46:18 +02:00
iris
427328c4eb style(hive-screen-mcp): nix fmt — trailing semicolon in match arm 2026-07-20 21:18:57 +02:00
iris
cb4421228e fix(hive-screen-mcp): address argus review 🟡 items
- mouse_click: error on unrecognised button name instead of silently
  treating it as left click; "left" now explicit in match arm
- rfb_handshake: cap ServerInit name-length at 256 bytes to prevent
  a multi-GB allocation from an aberrant server response
2026-07-20 21:17:17 +02:00