hermes-agent/tools
Ben Barclay 76ac204846 fix(wake): run openWakeWord on tflite on macOS ARM64
openWakeWord's ONNX backend returns near-zero scores on Apple Silicon
(dscripka/openWakeWord#336), so "Hey Hermes" never crossed the 0.5
threshold: the listener armed, the microphone worked, and nothing fired.

Bisecting the pipeline puts the fault in exactly one stage — feeding the
same audio through both backends, the melspectrogram front-end is
bit-identical (maxdiff 0.00000) and the wake classifier agrees on
identical features, while the shared embedding model diverges by 45.44.
Cross-feeding confirms it: tflite features scored through the *onnx*
classifier give 0.9948 vs 0.000009 for onnx features. A telling
secondary symptom is that scores fall as input gets louder (0.5x ->
0.00031, 8x -> 0.000066), which is garbage inference rather than a weak
detection.

Selecting tflite in config alone does not fix it. openWakeWord hardcodes
`import tflite_runtime.interpreter` but declares tflite-runtime for
`platform_system == "Linux"` only; on macOS the equivalent wheel is
ai-edge-litert, so that import always fails and model.py silently
downgrades back to onnx. The result is a detector that reports itself
listening and can never fire.

- default the backend per platform (tflite on macOS ARM64, onnx
  elsewhere) instead of hardcoding onnx, and pick the matching bundled
  model artifact
- bridge tflite_runtime -> ai_edge_litert through sys.modules, in-process,
  with no writes to site-packages
- refuse the silent onnx downgrade on macOS ARM64 and report the missing
  runtime through check_wake_word_requirements() so the GUI surfaces an
  actionable hint rather than arming a dead ear
- lazy-install ai-edge-litert via its own feature key, because lazy-dep
  specs cannot carry PEP 508 markers (_spec_is_safe rejects ";")

An explicit `inference_framework` in config still wins, so anyone pinning
a backend keeps it.

Verified on macOS 26.5.2 / M-series: "hey hermes" scores 0.0005 on onnx
and 0.9423 on tflite from the same clip, with cross-phrase controls at
0.0003. Live over-the-air through the real microphone fires 4/4
utterances (peak 0.9532).
2026-07-28 13:35:37 +10:00
..
computer_use fix(update): never blind-reinstall cua-driver during hermes update 2026-07-26 13:47:35 -07:00
environments fix(environments): exclude multiline session env from terminal snapshots 2026-07-26 19:30:02 -07:00
neutts_samples
wakewords feat(voice): bundle the trained "hey hermes" model as the out-of-the-box default 2026-07-24 09:52:02 -07:00
__init__.py
ansi_strip.py
approval.py fix(approval): detect recursive rm when flags follow operands 2026-07-26 20:58:52 -07:00
async_delegation.py feat(delegation): structured stall metadata + live per-child status in /agents 2026-07-26 17:13:52 -07:00
binary_extensions.py
blueprints.py
browser_camofox.py
browser_camofox_state.py
browser_cdp_tool.py fix(browser): stop stale cdp_url from stalling every startup by 10+ seconds 2026-07-27 14:32:05 -07:00
browser_dialog_tool.py
browser_supervisor.py
browser_tool.py fix(browser): stop stale cdp_url from stalling every startup by 10+ seconds 2026-07-27 14:32:05 -07:00
budget_config.py
checkpoint_manager.py feat(diff): cross-surface /diff with staged/all/session modes 2026-07-26 18:28:20 -07:00
clarify_gateway.py feat(clarify): extend multi-select to gateway text fallback and TUI bridge 2026-07-26 17:46:55 -07:00
clarify_tool.py fix(clarify): route multi_select through current dispatch paths and harden callback detection 2026-07-26 17:46:55 -07:00
close_terminal_tool.py
code_execution_tool.py fix(kanban): harden delegated-child mutation boundary 2026-07-23 07:33:36 -07:00
computer_use_tool.py
credential_files.py fix(credentials): hoist read-guard import, fail closed loudly (#67665) 2026-07-20 09:21:08 -07:00
cronjob_tools.py fix(cron): reconcile external provider after a claimed direct run (#70479) 2026-07-24 13:37:04 +10:00
daemon_pool.py
debug_helpers.py
delegate_tool.py nous portal anthropic wire 2026-07-27 11:53:48 -04:00
delegation_live_log.py fix(delegation): redact credentials in live subagent transcripts 2026-07-20 06:50:31 -07:00
desktop_ui.py feat(desktop): agent can focus panes + shared desktop-UI event bridge 2026-07-22 12:13:01 -05:00
discord_tool.py
env_passthrough.py
env_probe.py fix(windows): re-fit env_probe console suppression to the temp-file _run + add no-window tests (#67690 follow-up) 2026-07-23 18:20:24 -07:00
fal_common.py
feishu_doc_tool.py
feishu_drive_tool.py
file_operations.py
file_state.py
file_tools.py
focus_pane_tool.py feat(desktop): agent can focus panes + shared desktop-UI event bridge 2026-07-22 12:13:01 -05:00
fuzzy_match.py fix(tools): normalize Unicode space family and minus sign in patch fuzzy matching 2026-07-26 20:58:43 -07:00
homeassistant_tool.py
hook_output_spill.py
image_generation_tool.py
image_source.py
interrupt.py
kanban_tools.py fix: scope kanban auto-subscriptions to active profile 2026-07-26 16:27:52 -07:00
lazy_deps.py fix(wake): run openWakeWord on tflite on macOS ARM64 2026-07-28 13:35:37 +10:00
managed_tool_gateway.py fix(windows): sweep remaining bare read_text/write_text sites + linter rule 2026-07-24 17:10:39 -07:00
mcp_dashboard_oauth.py
mcp_oauth.py
mcp_oauth_manager.py
mcp_stdio_watchdog.py
mcp_tool.py feat(mcp): fnmatch glob support in tools.include/exclude filters 2026-07-26 08:26:09 -07:00
memory_tool.py fix(memory): close second-read drift race and treat invalid UTF-8 as unreadable 2026-07-24 15:58:01 -07:00
microsoft_graph_auth.py
microsoft_graph_client.py
neutts_synth.py
open_preview_tool.py feat(desktop): agent can focus panes + shared desktop-UI event bridge 2026-07-22 12:13:01 -05:00
openrouter_client.py
osv_check.py
patch_parser.py
path_security.py
process_registry.py fix(process_registry): reader loop no longer hangs when an orphaned grandchild holds the stdout pipe 2026-07-24 15:59:02 -07:00
project_tools.py
read_extract.py
read_terminal_tool.py
registry.py
schema_sanitizer.py fix(tools): rename provider-illegal property keys in tool schemas, reverse-map at dispatch 2026-07-26 08:26:09 -07:00
send_message_tool.py fix(gateway,tools): add missing .3gp and .webm to video extension sets 2026-07-26 12:52:31 -07:00
session_search_tool.py fix(session-search): allow scrolling compacted lineage history 2026-07-26 16:18:31 -07:00
skill_manager_tool.py fix(skills): fail closed on unknown curator ownership 2026-07-25 20:15:37 -07:00
skill_provenance.py
skill_usage.py fix(curator): make the autonomous write policy consistent (#67140) 2026-07-25 19:27:17 -07:00
skills_ast_audit.py
skills_guard.py
skills_hub.py fix(skills): parse stored GitHub credentials without scanner false positives 2026-07-26 20:59:26 -07:00
skills_sync.py fix(skills): parse stored GitHub credentials without scanner false positives 2026-07-26 20:59:26 -07:00
skills_tool.py fix(skills): scope 60-char description enforcement to the create path 2026-07-24 07:54:21 -07:00
slash_confirm.py
terminal_tool.py fix(kanban): keep delegated results in worker turn 2026-07-23 08:33:55 -07:00
thread_context.py
threat_patterns.py
tirith_security.py fix: add explicit UTF-8 encoding to all subprocess text=True calls (#53428) 2026-07-24 11:45:57 -07:00
todo_tool.py fix(compression): preserve synthetic user provenance 2026-07-22 06:56:53 -07:00
tool_backend_helpers.py
tool_output_limits.py
tool_result_storage.py
tool_search.py feat(tool_search): probe-validate blind tool_call args against the deferred schema 2026-07-26 20:59:36 -07:00
transcription_tools.py fix(tools): utf-8 decode for STT/TTS command-provider popen_kwargs 2026-07-24 15:47:12 -07:00
tts_streaming.py feat(voice): speech-interrupted latch in the TTS streaming core 2026-07-22 17:53:06 -05:00
tts_tool.py fix(tools): utf-8 decode for STT/TTS command-provider popen_kwargs 2026-07-24 15:47:12 -07:00
url_safety.py fix(url_safety): harden proxy DNS delegation — literal IPs stay fail-closed + regression tests 2026-07-24 10:37:29 -07:00
video_generation_tool.py
vision_tools.py fix(security): pin DNS resolutions for SSRF-safe fetches 2026-07-23 11:44:43 -07:00
voice_mode.py fix: add explicit UTF-8 encoding to all subprocess text=True calls (#53428) 2026-07-24 11:45:57 -07:00
wake_word.py fix(wake): run openWakeWord on tflite on macOS ARM64 2026-07-28 13:35:37 +10:00
web_tools.py fix: add encoding="utf-8" to Path.write_text() calls (P1) 2026-07-24 17:10:39 -07:00
website_policy.py
working_diff.py feat(diff): cross-surface /diff with staged/all/session modes 2026-07-26 18:28:20 -07:00
write_approval.py
x_search_tool.py docs(xai): clarify x_search vs xurl routing without schema cross-refs 2026-07-23 21:06:47 -07:00
xai_http.py fix: add UTF-8 encoding to read_text/write_text in tools/ and agent/ 2026-07-24 17:10:39 -07:00
xai_video_tools.py
yuanbao_tools.py