Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 7 additions & 8 deletions apps/desktop/src/plugins/hermes-bots/plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -2837,21 +2837,20 @@ function messagingProtocolSection(name, roster) {
'into it, like a DM. To message a teammate, run:',
'',
'```',
'hermes -p <agent-name> chat --in ~ -c "Bot Chat" -Q -q "Message from \uD83E\uDD16 ' + handle + ' (@' + handle + '): your message"',
'hermes -p <agent-name> chat --in ~ -c "Bot Chat" --create-if-missing -Q -q "Message from \uD83E\uDD16 ' + handle + ' (@' + handle + '): your message"',
'',
'Run the send with background=true and notify_on_complete=true on the',
'terminal tool, then finish your turn — the reply arrives later as a',
'background process notification. Never block waiting for it.',
'```',
'',
'(`--in ~ -c "Bot Chat"` resumes their canonical conversation in the home',
'workspace. `-Q` keeps output clean. Always open with the',
'(`--in ~ -c "Bot Chat" --create-if-missing` resumes their canonical',
'conversation in the home workspace, creating it if the target has no',
'"Bot Chat" yet. `-Q` keeps output clean. Always open with the',
'"Message from \uD83E\uDD16 ' + handle + ' (@' + handle + '):" prefix so they know',
'who is talking (the @handle lets the app show your avatar to them).',
'Their reply prints to stdout — relay the relevant part back to the',
'user, and say which agent it came from. In the rare case the target',
'has no "Bot Chat" yet, send once WITHOUT -c, then',
'`hermes -p <agent-name> sessions rename <session-id> "Bot Chat"`.)',
'user, and say which agent it came from.)',
'',
'If a message in YOUR chat starts with "Message from \uD83E\uDD16 <name>", it is',
'a teammate messaging you, not the user. Answer it directly — your reply',
Expand Down Expand Up @@ -6682,8 +6681,8 @@ export default {
const note =
'\n\n[@mention handoff — for each mentioned agent (' + mentioned.map(botHandle).join(', ') + '): ' +
'COMPOSE a message from you (' + senderName + ') to that agent conveying what the user wants — do not forward this text verbatim (avoid double quotes in your composed message). Send it with exactly one terminal call, run with background=true AND notify_on_complete=true (the recipient may take minutes; the user must not be blocked):\n' +
mentioned.map(n => '`hermes -p ' + shellQuote(n) + ' chat --in ~ -c "Bot Chat" -Q -q "Message from \uD83E\uDD16 ' + shellDoubleQuote(senderName) + ' (@' + shellDoubleQuote(botHandle(active)) + '): <your composed message>"`').join('\n') +
'\nAfter dispatching, tell the user the message was sent and END YOUR TURN — do not wait or poll; when the background process completes, its notification carries the reply — relay it then, attributed to that agent. If it fails with "No session found matching \'Bot Chat\'", send once without the -c flag, then run `hermes -p <agent> sessions rename <session_id from the output> "Bot Chat"`. ' +
mentioned.map(n => '`hermes -p ' + shellQuote(n) + ' chat --in ~ -c "Bot Chat" --create-if-missing -Q -q "Message from \uD83E\uDD16 ' + shellDoubleQuote(senderName) + ' (@' + shellDoubleQuote(botHandle(active)) + '): <your composed message>"`').join('\n') +
'\nAfter dispatching, tell the user the message was sent and END YOUR TURN — do not wait or poll; when the background process completes, its notification carries the reply — relay it then, attributed to that agent. ' +
'Relay the reply back to the user, attributed to that agent.]'

return { ...draft, text: text + note }
Expand Down
2 changes: 1 addition & 1 deletion tools/bot_mode_probe.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ def _build_section(home: Path) -> str:
"terminal tool (background=true, notify_on_complete=true), then finish your "
"turn — the reply arrives later as a new message:\n"
"```\n"
f'hermes -p <agent-name> chat --in ~ -c "Bot Chat" -Q -q "Message from 🤖 {handle} (@{handle}): your message"\n'
f'hermes -p <agent-name> chat --in ~ -c "Bot Chat" --create-if-missing -Q -q "Message from 🤖 {handle} (@{handle}): your message"\n'
"```\n"
f'Always open with the "Message from 🤖 {handle} (@{handle}):" prefix so they '
"know who is talking. When YOU receive a message with that prefix, you are "
Expand Down
Loading