mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-11-06 05:17:15 +00:00
docs(cli): /queue's shared gateway queue, move refusal, lost-answer note
The /queue docs said move acts on the pending queue mid-run; it is refused for prompts the gateway holds. They now also say that /queue list|rm|edit|clear act on the session's shared gateway queue (every window's and automation's queued prompts), that queue-mode Enter uses the same queue, and that a slash command typed after your own /queue prompt waits briefly for its turn. Code notes: what a QueueOutcomeUnknown leaves behind (the turn runs once but is not painted live here), and why an unknown /queue admission stays tracked and is re-read once per pending list. Refs #134889 (N5)
This commit is contained in:
1 parent
95dfcd5cdb
commit
d439b578d1
4 files changed
+14
-3
No files matched your search
@@ -26,7 +26,13 @@ def _state(cli, store):
|
||||
|
||||
|
||||
class QueueOutcomeUnknown(GatewayClientError):
|
||||
"""The submit was sent but no answer came back (timeout, disconnect): the owner may hold it."""
|
||||
"""The submit was sent but no answer came back (timeout, disconnect): the owner may hold it.
|
||||
|
||||
No admission id came back, so nothing enters ``queued_inputs``. If the owner did queue it, the row
|
||||
shows in ``/queue list`` (from the owner's published list) and runs once, but this CLI never adopts
|
||||
its turn: the reply lands in the session's history, not painted live here. The user is told to
|
||||
check ``/queue list`` instead of re-sending. This is rare (two lost answers in a row).
|
||||
"""
|
||||
|
||||
|
||||
def submit_queued(cli, store, text: str) -> str:
|
||||
|
||||
@@ -149,7 +149,10 @@ def recover_queued(cli, store) -> None:
|
||||
state.missed.discard(admission)
|
||||
continue
|
||||
if status not in ("started", "terminal"):
|
||||
continue # unknown: the owner resolves it; nothing to paint yet
|
||||
# unknown: the owner resolves it (``/discard`` or recovery settles it terminal, and the next
|
||||
# read forgets or paints it). Until then it stays here and is re-read once per new pending
|
||||
# list, never every tick; the row is rare and the read is one receipt.
|
||||
continue
|
||||
adopted = {"admission_id": admission, "execution_generation": receipt.get("execution_generation"),
|
||||
"recovered": True}
|
||||
if status == "terminal":
|
||||
|
||||
@@ -49,7 +49,7 @@ Type `/` in the CLI to open the autocomplete menu. Built-in commands are case-in
|
||||
| `/diff [staged\|all\|session] [--stat] [path...]` | Show git changes in the working directory. Default: unstaged changes plus untracked files. `staged` shows what's staged for commit, `all` everything since HEAD, and `session` the cumulative diff of everything Hermes changed here (from the earliest retained checkpoint baseline — requires checkpoints to be enabled; complements `/rollback diff <N>`). `--stat` prints just the changed-file summary; path arguments restrict the diff. |
|
||||
| `/snapshot [create\|restore <id>\|prune]` (alias: `/snap`) | Create or restore state snapshots of Hermes config/state. `create [label]` saves a snapshot, `restore <id>` reverts to it, `prune [N]` removes old snapshots, or list all with no args. Database restores write through SQLite's backup API so live processes (gateway, dashboard) see the restored data safely; if that path fails while another process still holds the database open, the restore refuses instead of risking corruption — stop the holder and retry. |
|
||||
| `/stop` | Kill all running background processes |
|
||||
| `/queue <prompt>` (alias: `/q`) | Queue a prompt for the next turn (doesn't interrupt the current agent response). In the CLI, `/queue` with no arguments lists the pending queue, and `/queue list`, `/queue edit N <new prompt>`, `/queue rm N`, `/queue move A B`, and `/queue clear` inspect and manage queued prompts before they are sent. Prompts that begin with a management word can be force-queued with `/queue add <prompt>`. |
|
||||
| `/queue <prompt>` (alias: `/q`) | Queue a prompt for the next turn (doesn't interrupt the current agent response). In the CLI, `/queue` with no arguments lists the pending queue, and `/queue list`, `/queue edit N <new prompt>`, `/queue rm N`, `/queue move A B`, and `/queue clear` inspect and manage queued prompts before they are sent. Prompts that begin with a management word can be force-queued with `/queue add <prompt>`. On the gateway's session, prompts queued mid-run live in the gateway's shared queue for the session: `list`/`rm`/`edit`/`clear` act on every prompt queued there (other windows' too), and `move` is refused for prompts the gateway holds, because it runs them in order. |
|
||||
| `/steer <prompt>` | Inject a mid-run note that arrives at the agent **after the next tool call** — no interrupt, no new user turn. The text is appended to the last tool result's content once the current tool completes, giving the agent new context without breaking the current tool-calling loop. Use this to nudge direction mid-task (e.g. "focus on the auth module" while the agent is running tests). |
|
||||
| `/goal <text>` | Set a standing goal Hermes works toward across turns — our take on the Ralph loop. After each turn an auxiliary judge model decides whether the goal is done; if not, Hermes auto-continues. Subcommands: `/goal status`, `/goal pause`, `/goal resume`, `/goal clear`. Budget defaults to 20 turns (`goals.max_turns`); any real user message preempts the continuation loop, and state survives `/resume`. See [Persistent Goals](../user-guide/features/goals.md) for the full walkthrough. |
|
||||
| `/subgoal <text>` | Append a user-supplied criterion to the active goal mid-loop. The continuation prompt surfaces all subgoals to the agent verbatim, and the judge factors them into its DONE/CONTINUE verdict — so the goal isn't marked done until the original goal **and** every subgoal are met. Subcommands: `/subgoal` (list), `/subgoal remove <N>`, `/subgoal clear`. Requires an active `/goal`. |
|
||||
|
||||
@@ -446,6 +446,8 @@ display:
|
||||
|
||||
Whatever the mode, `/queue <prompt>` queues a follow-up turn explicitly, and `/queue list`, `/queue rm N`, `/queue edit N …` and `/queue move A B` act on the pending queue immediately, even mid-run. The live work dock lists what is waiting.
|
||||
|
||||
When the CLI runs on the gateway's session (the default local setup), a prompt queued while a turn runs, by `/queue` or by queue-mode Enter, goes into the gateway's own queue for the session. It survives a gateway restart and runs once, in the order you entered it. Image follow-ups still wait in the CLI. That queue is shared: `/queue list`, `rm`, `edit` and `clear` show and change every prompt queued on the session, including ones another window or an automation queued. The gateway runs its queue in order and cannot reorder it, so `/queue move` refuses to move a prompt the gateway holds. A slash command typed while busy after your own `/queue` prompt runs after that prompt's turn starts; it waits at most a couple of seconds, so a paused queue never blocks typing.
|
||||
|
||||
You can also change it inside the CLI:
|
||||
|
||||
```text
|
||||
|
||||
Reference in new issue
Block a user