24 Commits

Author SHA1 Message Date
Brooklyn Nicholson
2803e850d4 feat(tui): push-to-talk cuts in-flight TTS before arming the mic
The CLI record-key handler already cuts TTS on keypress so a stale reply
can't talk over the user, but the gateway's voice.record start path — the
one the TUI and Desktop PTT button drive — never did: pressing PTT
mid-reply left the agent talking while the mic armed.

Call _tts_stream_stop(user_barge=True) before start_continuous, which
also latches the interruption for the next turn's model note and stops
the file player, exactly as the CLI handler does.

Fixes https://github.com/NousResearch/hermes-agent/issues/40010
2026-09-27 19:04:20 -05:00
ethernet
a6ae6ace51 Merge remote-tracking branch 'origin/main' into ethie/pm-clean
# Conflicts:
#	.github/workflows/js-tests.yml
#	agent/model_metadata.py
#	apps/desktop/electron/main.ts
#	apps/desktop/scripts/bundle-electron-main.mjs
#	apps/desktop/src/app/settings/about-settings.tsx
#	apps/desktop/src/app/settings/gateway-settings.test.tsx
#	apps/desktop/src/app/settings/gateway-settings.tsx
#	apps/desktop/src/app/updates-overlay.tsx
#	gateway/shutdown_flush.py
#	hermes_bootstrap.py
#	hermes_cli/local_runtime/binaries.py
#	hermes_cli/main.py
#	hermes_cli/managed_uv.py
#	hermes_cli/update_cmd.py
#	hermes_cli/update_cmd_deps.py
#	hermes_cli/update_cmd_fleet.py
#	hermes_cli/update_cmd_maint.py
#	hermes_cli/update_receipt.py
#	hermes_cli/update_serve_obligations.py
#	hermes_constants.py
#	tests/hermes_cli/test_doctor.py
#	tests/hermes_cli/test_managed_uv.py
#	tests/hermes_cli/test_pending_supervisor_recovery.py
#	tests/hermes_cli/test_startup_fast_guards.py
#	tests/hermes_cli/test_update_desktop_stale_warning.py
#	tests/hermes_cli/test_update_fleet_restart_pending.py
#	tests/hermes_state/test_hermes_state.py
#	tests/tools/test_tirith_security.py
#	tools/bot_relay.py
#	tools/checkpoint_manager.py
#	tools/write_approval.py
#	website/docs/getting-started/updating.md
#	website/docs/reference/environment-variables.md
2026-09-18 17:26:10 -04:00
teknium1
f9d178f78e fix(tui_gateway): old app builds no longer stall the agent on clarify/approval; late approval choices count
Item 2 of #112548: a Desktop/dashboard build that predates server→client
requests has no response path, so every clarify/approval/sudo/secret/vault/
connection/bridge request sat for the full deadline (clarify: 300s). Only the
tour probed. Clients now advertise once per connection
(`client.capabilities {server_requests: true}`, sent by the shared TypeScript
channel on `gateway.ready`); `send()` / `send_async()` return the
error-response shape (None) at once when every WebSocket peer of the session
is a build that never advertised. Sessions with no client attached still wait
so the reconnect replay (`open_requests`) keeps working; the stdio TUI ships
with the backend and is not gated. The advertisement is dropped on disconnect.

Reviewer minors from #113227:
- tools/approval_gateway_wait.py: the verdict is the choice committed under
  the approval lock while leaving the queue, so an /approve that lands after
  the deadline check but before the entry is dropped is an answer, not a
  timeout (the client was already acked "ok").
- tests/tui_gateway/test_protocol.py: the error-fails-fast test that only
  restated pre-existing behaviour is replaced by the two capability
  invariants (never advertised → fails fast; advertised → frame written,
  waits, forgotten on disconnect).
- server_requests.send try/finally around event.wait already landed on main
  (4371ed34a9); nothing to change.

Docs: programmatic-integration.md (advertise once per connection; method
list), tui_gateway/AGENTS.md; contracts regenerated.
2026-09-17 09:04:38 -07:00
ethernet
92686159d1 fix(pm): integrate audited runtime and lifecycle repairs
Prepare dependency generations before selecting them. Keep shipped tool
bytes separate from writable additions, and store facts beside their entries.
Validate proposed plugin sets before config publication. Restore the previous
config if the facts write fails.

Consolidate duplicate updater, backup, setup, and voice helpers. Repair
launcher selection, dependency consumers, download ownership, update feeds,
and native Windows process and file handling.

Verification: 206 changed/prior-failing Python files reported 4630 passed,
one failed, and 330 skipped. Fix the remaining Hindsight fixture boundary.
The final targeted rerun reported 234 passed and two skipped. The store
review regression batch reported 83 passed and one skipped. Desktop
TypeScript checks, 56 selected Electron tests, 24 release tests, and the
removed-import/compatibility guards passed.

This is an integration checkpoint, not full audit acceptance. The complete
Python suite has not run on this fixed tree. Crash-atomic plugin publication,
generation cleanup, receipt correlation, and packaged lifecycle acceptance
remain open in docs/pm-audit-status.md.
2026-09-05 22:36:48 -04:00
Teknium
0515997887 simplify(compat): voice_mode/transcription_common — drop 9 re-exports + the _configured_stop_phrases seam, repoint 3 callers + 4 test files 2026-09-03 13:30:31 -07:00
Teknium
fc9ed6973e simplify(compat): tts_tool — drop 57 re-exports/aliases, repoint 10 callers + 23 test files 2026-09-03 13:20:22 -07:00
Teknium
e83816a4d1 review-fix(comments): restore lost #NNNN rationale comments across non-test source (mechanical sweep, condensed, code unchanged)
For each issue anchor present in BASE 63279301bc non-test .py and absent on HEAD, the BASE comment/docstring block was re-attached at the HEAD location of the code it explained (matched by the distinctive code line / enclosing def). Sentences already covered by an existing HEAD comment were deduped; the issue number always survives. Insert-only: no code lines changed.
2026-09-03 09:44:26 -07:00
Teknium
f1d6a19873 refactor(tui_gateway): W4 wave2 pass 20 — voice.record + roster row folds 2026-09-03 03:14:09 -07:00
Teknium
c5e7d319b1 refactor(tui_gateway): W4 wave2 pass 18 — config.get profile/project/thinking folds 2026-09-03 03:09:24 -07:00
Teknium
cb31284395 refactor(tui_gateway): W4 wave2 pass 16 — profile asset/configure folds, voice tts setter 2026-09-03 03:04:57 -07:00
Teknium
db7b8c7d02 refactor(tui_gateway): W4 wave2 pass 12 — record_repos pairs comprehension, voice.tts/tts_stop folds 2026-09-03 02:57:32 -07:00
Teknium
8d1714018a refactor(tui_gateway): W4 wave2 pass 8 — split prompt/personality/skin setters, nest single-use voice helpers 2026-09-03 02:49:40 -07:00
Teknium
dfd0a56ee9 refactor(tui_gateway): W4 wave2 pass 7 — fd_trip/deliver fold, describe_toolsets loop, voice banners 2026-09-03 02:45:12 -07:00
Teknium
0b937a599c refactor(tui_gateway): W4 wave2 pass 6 — full-duplex listener predicates 2026-09-03 02:42:03 -07:00
Teknium
b7cd04cb6a refactor(tui_gateway): W4 wave2 pass 5 — readiness probe stamp, config.get session getters, wake.start compaction 2026-09-03 02:39:10 -07:00
Teknium
0548956da0 refactor(tui_gateway): W4 wave2 pass 4 — profile/config_set docstring+comment compaction, mirror helpers 2026-09-03 02:36:23 -07:00
Teknium
b7747dce42 refactor(tui_gateway): W4 wave2 pass 3 — config.set toggle-setter table, voice.record inlined, wake.status/feed compaction 2026-09-03 02:31:38 -07:00
Teknium
b263a6f977 refactor(tui_gateway): W4 wave2 pass 2 — wake owner-result helper, profile asset magic table, config.set/get compaction 2026-09-03 02:25:37 -07:00
Teknium
f334f61523 refactor(tui_gateway): W4 wave2 pass 1 — config.get table, config.set guard decorator, voice/profile helper folds 2026-09-03 02:15:41 -07:00
Teknium
10b426272f refactor(tui_gateway): projects.* error shell decorator, shared wake frame fields, secret-copy helper 2026-09-02 23:47:08 -07:00
Teknium
bd770ab70b refactor(tui_gateway): compact voice/config/profiles docstrings, hug payloads, squeeze body blanks 2026-09-02 23:43:54 -07:00
Teknium
f997235f1b refactor(tui_gateway): dedupe config/voice/profiles helpers, collapse ladders and hug payloads 2026-09-02 23:02:07 -07:00
Teknium
99433742dc refactor(tui): extract the prompt turn into prompt_turn.py; compact methods_*/session_*/agent_callbacks; split _start_agent_build into scope/wiring helpers
- server.py 7663 -> 5319: _run_prompt_submit and its goal/loop/voice/scope
  phases move to tui_gateway/prompt_turn.py (bound via method_ctx.bind_module);
  _start_agent_build split into _bind/_release_build_profile_scopes,
  _deferred_build_agent_kwargs, _wire_session_agent, _start_session_services;
  _load_enabled_toolsets split (_enabled_mcp_server_names, _resolve_explicit_toolsets).
- methods_slash: _LIVE_SLASH_OUTPUT dispatch table; methods_tools: _SLASH_BUILTINS,
  _guarded; tool_progress: _PROGRESS_HANDLERS; methods_config_set:
  _REASONING_DISPLAY_WORDS; methods_voice: _VOICE_TOGGLE_ACTIONS.
- Unified: _denied_source (methods_session) replaces _WORKER_SOURCES in
  methods_profiles; _compress_live_with_feedback / _compute_host_slash shared by
  the slash mirror and /compress; _end_voice_chat shared by stop-phrase paths;
  _watcher_mtime_ns; _reaper_session_is_detached_idle; _notif_* helpers.
- Dead: _profile_dir_or_err, _resume_info, _slash_builtin_table (refs.py: 0 hits).
- acp_adapter/server.py: docstring compaction only (AST-identical).
- Every file semantically reviewed hunk-by-hunk for wire/log/lock/order parity.
2026-09-02 14:09:13 -07:00
Teknium
518a19b22d refactor(tui): move voice/TTS/wake-word handlers + state into methods_voice.py 2026-09-02 14:09:04 -07:00