Fix auto-start launcher: use hermes chat --tui -q

Top-level hermes has no -q flag, so the kickoff string was parsed as
a subcommand and failed. Query must go on hermes chat.
This commit is contained in:
domfelipe 2026-08-03 00:15:51 -03:00
parent 3b98cb7253
commit 29c3fa703b
4 changed files with 12 additions and 11 deletions

View file

@ -119,7 +119,7 @@ hermes doctor
# 4. onboarding interativo (agente fala primeiro — Phase 1)
hermes-client-onboarding
# ou: hermes --tui -s hermes-client-onboarding -q "Inicie AGORA o onboarding…"
# ou: hermes chat --tui -s hermes-client-onboarding -q "Inicie AGORA o onboarding…"
# completar fases 16 com chaves reais de teste
# 5. smoke telegram
@ -155,7 +155,7 @@ O bootstrap instala `~/.local/bin/hermes-client-onboarding`, que abre o TUI com
hermes-client-onboarding
```
Isso usa `hermes --tui -s hermes-client-onboarding -q "…"` — o Hermes **envia a primeira mensagem sozinho** e continua interativo.
Isso usa `hermes chat --tui -s hermes-client-onboarding -q "…"` — o Hermes **envia a primeira mensagem sozinho** e continua interativo.
`hermes chat -s …` sem `-q` / sem launcher espera o usuário falar primeiro.
## Licença

View file

@ -219,11 +219,11 @@ launch_hermes_onboarding() {
exec "${HOME}/.local/bin/hermes-client-onboarding"
fi
fi
# Fallback without launcher binary
# Fallback without launcher binary (-q only works on `hermes chat`)
if [[ -r /dev/tty ]]; then
exec hermes --tui -s "$SKILL_NAME" -q "$KICKOFF_MSG" </dev/tty
exec hermes chat --tui -s "$SKILL_NAME" -q "$KICKOFF_MSG" </dev/tty
else
exec hermes --tui -s "$SKILL_NAME" -q "$KICKOFF_MSG"
exec hermes chat --tui -s "$SKILL_NAME" -q "$KICKOFF_MSG"
fi
}
@ -233,7 +233,7 @@ launch_conductor() {
skip)
log "Skill pronta. Rode depois (agente fala primeiro):"
echo " hermes-client-onboarding"
echo " # ou: hermes --tui -s ${SKILL_NAME} -q \"${KICKOFF_MSG}\""
echo " # ou: hermes chat --tui -s ${SKILL_NAME} -q \"\""
need_cmd codex && echo " codex \"${KICKOFF_MSG}\""
return 0
;;
@ -266,7 +266,7 @@ main() {
if [[ "$NO_LAUNCH" -eq 1 ]]; then
log "Done (--no-launch). Start with (agent speaks first):"
echo " hermes-client-onboarding"
echo " # ou: hermes --tui -s ${SKILL_NAME} -q \"…\""
echo " # ou: hermes chat --tui -s ${SKILL_NAME} -q \"…\""
exit 0
fi

View file

@ -79,10 +79,10 @@ Preferred launch (agent auto-starts):
```bash
hermes-client-onboarding
# or:
hermes --tui -s hermes-client-onboarding -q "Inicie AGORA o onboarding…"
hermes chat --tui -s hermes-client-onboarding -q "Inicie AGORA o onboarding…"
```
Plain `hermes chat -s hermes-client-onboarding` without a kickoff waits for user input — avoid that for demos.
Plain `hermes chat -s hermes-client-onboarding` without `-q` waits for user input — avoid that for demos.
### Phase 1 — Context & Goals

View file

@ -13,9 +13,10 @@ if ! command -v hermes >/dev/null 2>&1; then
exit 1
fi
# TUI: -q becomes HERMES_TUI_QUERY — first turn auto-submits, session stays interactive.
# Must use `hermes chat` subcommand: -q is not a top-level flag.
# With --tui, -q becomes HERMES_TUI_QUERY — first turn auto-submits, session stays interactive.
if [[ -t 0 && -t 1 ]]; then
exec hermes --tui -s "$SKILL_NAME" -q "$KICKOFF" "$@"
exec hermes chat --tui -s "$SKILL_NAME" -q "$KICKOFF" "$@"
fi
# Non-TTY fallback (CI/scripts): one-shot only