Hermes TUI startup queries execute slash, shell, interpolation, and multiline syntax before reaching the model. Run the prompt through literal one-shot mode, read its exact session ID from a private usage report, and resume that session in the TUI so arbitrary prompt text stays data while the conversation remains interactive. Co-Authored-By: Codex XHigh <noreply@openai.com>
22 lines
651 B
Bash
Executable File
22 lines
651 B
Bash
Executable File
#!/bin/bash
|
|
|
|
# omarchy:summary=Seed Hermes literally and resume the resulting interactive session
|
|
# omarchy:args=<prompt>
|
|
# omarchy:hidden=true
|
|
|
|
set -euo pipefail
|
|
|
|
prompt=${1:?usage: omarchy-agent-hermes <prompt>}
|
|
usage=$(mktemp)
|
|
trap 'rm -f "$usage"' EXIT
|
|
|
|
# TUI startup queries pass through Hermes' slash, shell, and interpolation
|
|
# dispatcher. One-shot treats the prompt literally and records its session ID.
|
|
HERMES_SESSION_SOURCE=tui hermes --yolo --usage-file "$usage" --oneshot "$prompt"
|
|
session_id=$(jq -er '.session_id | strings | select(length > 0)' "$usage")
|
|
|
|
rm -f "$usage"
|
|
trap - EXIT
|
|
|
|
exec hermes chat --yolo --tui --resume "$session_id"
|