docs: cover hermes chat --query-file and the file-based Bot Mode DM transport
Follows PR #89762: cli-commands reference and CLI guide document the new --query-file flag; bot-mode.md's DM and peer-dm recipes now show the file/stdin transport instead of inlining message bodies into the shell.
This commit is contained in:
@@ -112,6 +112,7 @@ Common options:
|
||||
| Option | Description |
|
||||
|--------|-------------|
|
||||
| `-q`, `--query "..."` | One-shot, non-interactive prompt. |
|
||||
| `--query-file PATH` | Read the one-shot prompt from a file (`-` = stdin). Nothing is shell-interpreted, so quotes, `$(...)`, and backticks arrive verbatim — use this for programmatic or untrusted message bodies (Bot Mode teammate DMs use it). Mutually exclusive with `-q`. |
|
||||
| `-m`, `--model <model>` | Override the model for this run. |
|
||||
| `-t`, `--toolsets <csv>` | Enable a comma-separated set of toolsets. |
|
||||
| `--provider <provider>` | Force a provider: `auto`, `openrouter`, `nous`, `openai-codex`, `copilot-acp`, `copilot`, `anthropic`, `gemini`, `huggingface`, `novita` (aliases `novita-ai`, `novitaai`), `openai-api`, `zai`, `kimi-coding`, `kimi-coding-cn`, `minimax`, `minimax-cn`, `minimax-oauth`, `kilocode`, `xiaomi`, `arcee`, `gmi`, `upstage` (alias `solar`), `alibaba`, `alibaba-coding-plan` (alias `alibaba_coding`), `deepseek`, `nvidia`, `ollama-cloud`, `xai` (alias `grok`), `xai-oauth` (alias `grok-oauth`), `qwen-oauth`, `bedrock`, `opencode-zen`, `opencode-go`, `commandcode`, `commandcode-anthropic`, `ai-gateway`, `azure-foundry`, `lmstudio`, `stepfun`, `tencent-tokenhub` (alias `tencent`, `tokenhub`). |
|
||||
|
||||
@@ -95,7 +95,7 @@ Bots message each other with attribution, and you can hand work off from any cha
|
||||
|
||||
- **@mentions** — type `@researcher have a look at this` in any chat and the active Bot hands the message off, waits for the reply, and reports back. Mention names are validated against the live roster, so an email address or an unknown `@` passes through untouched.
|
||||
- **@mentions across machines** — mentioning a Bot that lives on another registered connection (use its `@name-device` handle when names collide) delivers over the Connections registry in the background: the active Bot stays on this device, the desktop routes the message to the recipient's machine, and the reply is relayed back attributed to that agent. Your window's gateway never switches.
|
||||
- **Direct messages** — a Bot reaches a teammate's Bot Chat through the standard CLI: `hermes -p <bot> chat --in ~ -c "Bot Chat" --create-if-missing -Q -q "Message from 🤖 <sender> (@<sender>): ..."`. The receiving Bot sees the message the next time it runs and knows how to reply, because the messaging protocol is part of its Bot Chat system prompt.
|
||||
- **Direct messages** — a Bot reaches a teammate's Bot Chat through the standard CLI: it writes the message to a temp file (opening with the `Message from 🤖 <sender> (@<sender>):` prefix), then runs `hermes -p <bot> chat --in ~ -c "Bot Chat" --create-if-missing -Q --query-file <file>`. The file transport means nothing is shell-interpreted — quotes, `$(...)`, and backticks in the message arrive verbatim. The receiving Bot sees the message the next time it runs and knows how to reply, because the messaging protocol is part of its Bot Chat system prompt.
|
||||
|
||||
The backend teaches each Bot's canonical Bot Chat session the messaging protocol automatically at prompt-build time — including when a teammate opens it headlessly from the CLI. Only the canonical Bot Chat gets the protocol section; your regular sessions and your SOUL.md stay untouched. This is controlled by `agent.bot_mode_protocol` in `config.yaml` (default: on):
|
||||
|
||||
@@ -115,8 +115,8 @@ Bots on one machine can message Bots on **another machine's gateway** without an
|
||||
```bash
|
||||
hermes peer add spark --url http://spark.lan:8377 --key <API_SERVER_KEY>
|
||||
hermes peer list
|
||||
hermes peer dm spark "Message from 🤖 dixie (@dixie): disk status?"
|
||||
hermes peer dm spark/researcher "..." # named profile on a multiplexed peer
|
||||
hermes peer dm spark < /tmp/dm.txt # message body from a file (nothing shell-interpreted)
|
||||
hermes peer dm spark/researcher < /tmp/dm.txt # named profile on a multiplexed peer
|
||||
```
|
||||
|
||||
`hermes peer dm` delivers into the remote agent's canonical Bot Chat over the peer's existing API server, runs one agent turn there, and prints the reply on stdout — the exact cross-machine twin of the local `hermes -p <bot> chat` command.
|
||||
|
||||
@@ -25,6 +25,11 @@ hermes
|
||||
# Single query mode (non-interactive)
|
||||
hermes chat -q "Hello"
|
||||
|
||||
# Single query from a file or stdin — nothing is shell-interpreted, so
|
||||
# arbitrary text (quotes, $(...), backticks) arrives verbatim
|
||||
hermes chat --query-file prompt.txt
|
||||
hermes chat --query-file - < prompt.txt
|
||||
|
||||
# With a specific model
|
||||
hermes chat --model "anthropic/claude-sonnet-4"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user