Watch
0
0
Fork
You've already forked hyperhive
0
hyperhive/hive-agent/src
Repository files (latest commit first)
Filename Latest commit message Latest commit date
atlas ae9ca4331e swarm: keep an agent's terminal rows and replay them on attach
swarm-controller now creates `term-main-<agent>` for every live agent, in
the same one-minute pass and with the same config style as
`term-sub-<agent>` (#4897): subjects `$SWARM.term.<agent>` only, max_age
24h, max_bytes 64 MiB, discard Old, max_message_size from the queue's
max_payload. An existing stream is opened as it is. The agent keeps its
plain publish on `$SWARM.term.<agent>` and gets no JetStream subject.

`GET /api/agents/{name}/term/stream` creates an ephemeral push consumer on
that stream starting 100 rows back, so a swarm-ui terminal opens with
recent history and then follows new rows, in order, from one
subscription. Each SSE event carries the row's stream sequence as its id,
and a reconnect's Last-Event-ID resumes after it. Without the stream the
route falls back to the live core subscription it used before.

The stream is `term-main-<agent>`, not `term-<agent>`: an agent may be
named `sub-x`, whose `term-<agent>` would be agent `x`'s subagent stream.
Its one literal subject cannot match `$SWARM.term.<agent>.sub.>`, which
needs more tokens, so the two streams never overlap.

The reader gains `$JS.API.CONSUMER.CREATE.*.*.$SWARM.term.*`, the
extended create form whose last tokens are the consumer's filter. Checked
against nats-server 2.14.4, the trailing `*` also admits a literal `*` or
`>` filter, so a consumer under it reaches any terminal row, main or
subagent; those are rows the reader already subscribes to and reads with
`STREAM.MSG.GET.*`.

Closes #4826
2026-10-11 12:35:31 +02:00
..
web_ui Merge forge/main into atlas/5034-s4-remove-hive-model 2026-10-11 03:42:22 +02:00
boot_announce.rs hive-agent: only wake the boot-announce todo when it actually changed 2026-10-04 19:16:59 +02:00
claude_md_watch.rs hive-agent: warn + emit an OTEL gauge on a grown CLAUDE.md 2026-08-26 18:34:36 +02:00
claude_usage_watch.rs hive-agent: warn on usage responses with no recognisable windows 2026-09-30 20:53:03 +02:00
db_migrate.rs todos: reopen an acked keyed row when the caller says so 2026-08-13 12:55:20 +02:00
disk_watch.rs disk_watch: drop bare tracker tag from test doc-comment 2026-10-04 15:18:32 +02:00
events.rs agents: remove the hive-level /effort control too 2026-10-11 01:28:44 +02:00
harness_state.rs agents: remove the hive-level /effort control too 2026-10-11 01:28:44 +02:00
identity.rs docs: restructure into topic subdirectories, collapse duplicated index 2026-09-02 01:55:37 +02:00
login.rs hive-c0re: render the new agent option paths into generated agent flakes 2026-09-17 20:19:30 +02:00
login_session.rs refactor(#2464): rename hive-ag3nt crate to hive-agent, collapse lib into main 2026-07-15 16:09:39 +02:00
main.rs swarm: per-agent inference settings (model, effort, subagent_models) in KV 2026-10-09 23:13:13 +02:00
mcp_config.rs remove the get_host_journal MCP tool and its capability 2026-09-21 19:31:45 +02:00
otel_turn_metrics.rs hive-agent: export ACP-reported cost and context fill over OTLP 2026-09-30 22:24:06 +02:00
paths.rs hive-agent: compact tests set the harness dir like the other Bus tests 2026-10-11 03:36:34 +02:00
plugins.rs topology: drop the parent field and the hierarchy it fed 2026-09-21 22:08:47 +02:00
prompt.rs hive-c0re: render the new agent option paths into generated agent flakes 2026-09-17 20:19:30 +02:00
reminder_timer.rs docs/hive-c0re: fix ask/answer removal doc gaps argus caught on #3741 2026-08-30 03:02:31 +02:00
reminders.rs hive-c0re: remove the approvals subsystem 2026-10-04 23:55:32 +02:00
schedule_timer.rs hive-agent: the swarm queue connection is required; retry, then exit 2026-10-04 22:24:51 +02:00
serve_common.rs hive-agent: dashboard Cancel and idle stalls for ACP agents 2026-09-29 23:25:48 +02:00
state_entry_watch.rs fix hint text per argus review: group into subdirs, not split into more top-level files 2026-08-18 22:07:05 +02:00
stats.rs hive-c0re: remove the approvals subsystem 2026-10-04 23:55:32 +02:00
swarm_agent_icon.rs hive-agent: the swarm queue connection is required; retry, then exit 2026-10-04 22:24:51 +02:00
swarm_agent_state.rs hive-agent: test the turn-state refresh's re-send decision 2026-10-10 17:37:23 +02:00
swarm_inference.rs Merge forge/main into atlas/5034-s4-remove-hive-model 2026-10-11 03:42:22 +02:00
swarm_input.rs hive-agent: the swarm queue connection is required; retry, then exit 2026-10-04 22:24:51 +02:00
swarm_queue.rs swarm CA: describe the store's pki root as the only anchor in docs and comments 2026-10-05 21:17:10 +02:00
swarm_term.rs swarm: keep an agent's terminal rows and replay them on attach 2026-10-11 12:35:31 +02:00
term_msg.rs swarm: show subagent terminals in the swarm UI 2026-10-03 01:34:01 +02:00
todo_server.rs hive-sh4re: one saturating_age for every loose-end producer 2026-09-02 14:20:25 +02:00
todos.rs todos: reopen an acked keyed row when the caller says so 2026-08-13 12:55:20 +02:00
turn.rs hive-agent: compact tests set the harness dir like the other Bus tests 2026-10-11 03:36:34 +02:00
turn_stats.rs swap hive-claude to the crates.io registry dependency (#2931) 2026-08-02 14:19:26 +02:00
vacuum.rs docs: restructure into topic subdirectories, collapse duplicated index 2026-09-02 01:55:37 +02:00