Repository navigation
Conversation
A host's status now says the questions it waits on (`pending`), how the last run to end ended (`ended`), and the run's `epic` and `task`. `hmz web` polls every workspace's host status every 2 s, without attaching, and turns what changed into notices (done, failed, stopped, asked, listening), served at `GET /api/notices?after=` and as `notice` events on `GET /api/notices/stream`. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Member
Author
|
Landed together in #385. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Unit 2 of the multi-daemon + notifications batch (contracts C3, C4).
What
Host.status()(and soDaemon.status()) addspending([{question, role, text, mode}]),ended({how, why, epic, at, run, flow, task}ornull),epicandtask.hmz.web.notices.Notices, held assite.notices, with.since(after),.heard(cb)(returns an unsubscribe callable),.last,.stream(),.look(),.start()and.close().GET /api/notices?after=returns{notices, last}.GET /api/notices/streamsends SSEnoticeevents and resumes fromLast-Event-IDor?last=. With no id given, the stream starts from now.ask) and listening (modelisten).Places.statuses()readsdaemon.daemons()and each.status()when runs are held apart. Otherwise it reads each in-process host'sstatus().Noticespolls it every 2 s._asks_the_daemonnow reusesPlaces.statuses().(pid, started), so a new host'sq1is still news.docs/reference/daemon.md(status keys) anddocs/reference/web.md(Notices API).Tests
tests/unit/web/test_notices.py: pure diffing against a fake status source.tests/unit/runtime/doing/test_hosting.py: the new status keys.tests/integration/test_web_notices.py: throughserved()and the stand-in agent, a chat produceslistening, stopping it producesstopped, and a one-turn flow producesdone. It also checksafter=and resuming the stream.hmz web --port 0with runs held apart. The chat produced alisteningnotice and thenstopped, both over curl on the SSE stream and on/api/notices.🤖 Generated with Claude Code