hermes-agent/agent
Teknium c6806a8e97
feat(approval): make invisible Unicode, control bytes, and padding visible in approval prompts
Inspired by Claude Code v2.1.223: 'Fixed permission prompts so commands
padded with tabs or invisible Unicode can no longer hide part of the
command from the approval dialog.'

A dangerous command rendered into an approval prompt could previously
lie to the human approver three ways:
- invisible/format Unicode (zero-width, bidi overrides/isolates,
  variation selectors, U+E0000 tag block) rendered as nothing
- raw control bytes (ANSI/OSC escapes, bare CR) could erase or
  overwrite the just-printed prompt line in the terminal
- long whitespace padding runs pushed the dangerous tail out of view
  or past platform preview truncation (~200 chars on gateway)

New agent.redact.sanitize_command_for_display() replaces hidden chars
with visible escape markers (\u202e, \x1b) and collapses padding runs
to explicit markers, preserving literal IOCs instead of deleting them.
Wired at every approval display-mint site: CLI prompt, gateway
dangerous-command + execute_code + tool-approval payloads, pending
fallbacks, and gateway _redact_approval_command. Display-only — the
executed command and pattern-key persistence are untouched.

25 new tests; redact (97), approval (103), gateway approval-format
suites green; E2E with real imports across CLI + gateway paths.
2026-08-07 17:13:54 -07:00
..
lsp
monitoring
pet
proxy_sources
secret_sources
transports
verify Integrate verify subsystem with the existing verification stack 2026-08-07 10:11:05 -07:00
__init__.py
account_usage.py
agent_init.py feat(agent): add skip_background_review flag to AIAgent constructor 2026-08-08 00:07:14 +05:30
agent_runtime_helpers.py fix(agent): preserve destroyed tool-call argument bytes in the WARNING log 2026-08-07 16:57:11 +05:30
anthropic_adapter.py
async_utils.py
aux_accounting.py
auxiliary_client.py fix(auxiliary): widen effective provider to relay, logging, and endpoint detection 2026-08-07 16:56:37 +05:30
azure_identity_adapter.py
backend_identity.py
background_review.py feat: /refine — run the memory/skill self-improvement review on demand 2026-08-05 22:40:51 -07:00
battery.py
bedrock_adapter.py
billing_links.py
billing_usage.py
billing_view.py
bounded_response.py
browser_provider.py
browser_registry.py
chat_completion_helpers.py fix(streaming): close the same mid-tool-call drop gap on the Anthropic path 2026-08-07 18:07:19 +05:30
codex_responses_adapter.py
codex_runtime.py fix(codex): split reasoning summary parts on summary_index 2026-08-06 22:02:46 -05:00
coding_context.py
context_breakdown.py
context_compressor.py refactor(agent): fold simplify findings — DB picker parity, single scan, canonical strip delegation 2026-08-07 19:44:35 +05:30
context_engine.py
context_references.py
conversation_compression.py fix: bind continuation-marker exclusions to the queried parent (fail-open fix) 2026-08-07 13:24:56 +05:30
conversation_loop.py refactor(agent): fold simplify findings — DB picker parity, single scan, canonical strip delegation 2026-08-07 19:44:35 +05:30
copilot_acp_client.py
credential_persistence.py
credential_pool.py
credential_sources.py
credits_tracker.py
curator.py
curator_backup.py
delegation_context.py
display.py
error_classifier.py fix: show explicit member spend cap message instead of 'no credits' 2026-08-07 19:47:40 +05:30
errors.py
estop.py feat(cli): global emergency stop — `hermes pause` / `hermes resume` 2026-08-07 08:58:14 -07:00
file_safety.py
gemini_native_adapter.py
gemini_schema.py
i18n.py
image_gen_provider.py
image_gen_registry.py
image_routing.py
insights.py
interrupt_compat.py
iteration_budget.py
jiter_preload.py
kanban_stop.py
learn_prompt.py feat(/learn): expansive knowledge-base skills for books and large corpora 2026-08-06 22:14:52 -07:00
learning_graph.py
learning_graph_render.py
learning_mutations.py
lmstudio_reasoning.py
manual_compression_feedback.py
markdown_tables.py
memory_manager.py
memory_provider.py
message_content.py
message_sanitization.py fix(agent): preserve destroyed tool-call argument bytes in the WARNING log 2026-08-07 16:57:11 +05:30
moa_loop.py
moa_trace.py
model_metadata.py
models_dev.py
moonshot_schema.py
nous_rate_guard.py
onboarding.py
oneshot.py
outbound_webhooks.py
plugin_llm.py
portal_tags.py
process_bootstrap.py
prompt_builder.py
prompt_caching.py fix(agent): make the send-path copy structural — close the write-through class 2026-08-07 16:57:11 +05:30
rate_limit_tracker.py
reactions.py
reasoning_summaries.py fix(reasoning): keep gpt-5.x summary parts as separate blocks on the chat wire 2026-08-06 22:02:37 -05:00
reasoning_timeouts.py
redact.py feat(approval): make invisible Unicode, control bytes, and padding visible in approval prompts 2026-08-07 17:13:54 -07:00
relay_llm.py
relay_runtime.py
relay_tools.py
replay_cleanup.py
retry_utils.py
runtime_cwd.py
secret_scope.py
session_activity.py
shell_hooks.py
skill_bundles.py
skill_commands.py
skill_preprocessing.py
skill_utils.py
ssl_guard.py
ssl_verify.py
stream_diag.py
stream_single_writer.py
subagent_lifecycle.py
subdirectory_hints.py
subscription_view.py
system_prompt.py
think_scrubber.py
thinking_timeout_guidance.py
thread_scoped_output.py fix: preserve session history when a turn crashes 2026-08-06 23:08:23 -05:00
title_generator.py
tool_dispatch_helpers.py
tool_executor.py refactor: fold /simplify-code findings 2026-08-06 17:03:10 +05:30
tool_guardrails.py
tool_result_classification.py
trace_upload.py
trajectory.py
transcription_provider.py
transcription_registry.py
tts_provider.py
tts_registry.py
turn_context.py fix(agent): stop reference-only compaction handoff from becoming the active turn 2026-08-07 19:44:35 +05:30
turn_finalizer.py feat(agent): add skip_background_review flag to AIAgent constructor 2026-08-08 00:07:14 +05:30
turn_retry_state.py
turn_summary.py
usage_pricing.py
verification_evidence.py Integrate verify subsystem with the existing verification stack 2026-08-07 10:11:05 -07:00
verification_stop.py Integrate verify subsystem with the existing verification stack 2026-08-07 10:11:05 -07:00
verify_hooks.py
vertex_adapter.py
video_gen_provider.py
video_gen_registry.py
web_search_provider.py
web_search_registry.py