hermes-bsd/agent
Teknium 40e7a71c35 feat: enrich system-prompt environment hints with host + terminal-backend info
build_environment_hints() now emits a factual block describing the
execution environment on every prompt build:

* Local backend: host OS, $HOME, and cwd — so the agent stops guessing
  paths from the hostname. Windows also gets two specific callouts:
  - hostname != username (prevents C:\Users\<hostname>\... bugs)
  - `terminal` shells out to bash (git-bash/MSYS), not PowerShell

* Remote backend (docker/singularity/modal/daytona/ssh/vercel_sandbox):
  host info is SUPPRESSED — the agent's tools can't touch the host, so
  showing it is misleading. Instead we probe the backend once per
  process with `uname/whoami/pwd` and cache the result. On probe
  failure, fall back to a per-backend description that states only what
  we know from the backend choice itself (container type + likely OS
  family) without inventing user/cwd/$HOME.

Linux/Mac local users now get a small helpful 3-line host block instead
of an empty string. Zero change to the existing WSL hint paragraph.

Tests: 8 new/updated in TestEnvironmentHints, including a regression
guard that fails if a new remote backend is added without listing it in
_REMOTE_TERMINAL_BACKENDS.
2026-05-08 14:27:40 -07:00
..
transports feat: provider modules — ProviderProfile ABC, 33 providers, fetch_models, transport single-path 2026-05-05 13:40:01 -07:00
__init__.py
account_usage.py
anthropic_adapter.py feat(computer-use): cua-driver backend, universal any-model schema 2026-05-08 11:07:38 -07:00
auxiliary_client.py refactor(gmi): move User-Agent to profile.default_headers 2026-05-08 03:22:11 -07:00
bedrock_adapter.py fix(bedrock): preserve reasoningContent across converse normalization 2026-05-07 05:17:16 -07:00
codex_responses_adapter.py
context_compressor.py feat(computer-use): cua-driver backend, universal any-model schema 2026-05-08 11:07:38 -07:00
context_engine.py
context_references.py
copilot_acp_client.py fix(oauth,gateway): monotonic deadlines for polling/timeout loops 2026-05-07 05:09:39 -07:00
credential_pool.py fix(auth): shorten credential 401 cooldown 2026-05-07 06:15:33 -07:00
credential_sources.py
curator.py codebase: add encoding='utf-8' to all bare open() calls (PLW1514) 2026-05-08 14:27:40 -07:00
curator_backup.py
display.py feat(computer-use): background focus-safe backend — set_value, structured windows, MIME detection 2026-05-08 11:07:38 -07:00
error_classifier.py fix(tool-schemas): reactive strip of pattern/format on llama.cpp grammar 400s 2026-05-05 04:25:18 -07:00
file_safety.py
gemini_cloudcode_adapter.py
gemini_native_adapter.py
gemini_schema.py
google_code_assist.py
google_oauth.py
i18n.py feat(i18n): add Turkish (tr) locale 2026-05-05 17:29:12 -07:00
image_gen_provider.py
image_gen_registry.py
image_routing.py fix(image-routing): sniff magic bytes for image MIME, ignore misleading suffix 2026-05-07 05:58:11 -07:00
insights.py
lmstudio_reasoning.py
manual_compression_feedback.py
memory_manager.py fix: salvage batch — compaction guidance, memory authority, cache eviction after compression 2026-05-05 22:33:45 -07:00
memory_provider.py docs(agent): remove stale BuiltinMemoryProvider references from memory module docstrings 2026-05-05 13:33:49 -07:00
model_metadata.py codebase: add encoding='utf-8' to all bare open() calls (PLW1514) 2026-05-08 14:27:40 -07:00
models_dev.py fix(models): prefer image modalities for vision routing 2026-05-07 05:54:12 -07:00
moonshot_schema.py
nous_rate_guard.py codebase: add encoding='utf-8' to all bare open() calls (PLW1514) 2026-05-08 14:27:40 -07:00
onboarding.py
prompt_builder.py feat: enrich system-prompt environment hints with host + terminal-backend info 2026-05-08 14:27:40 -07:00
prompt_caching.py
rate_limit_tracker.py
redact.py feat(security): enable secret redaction by default (#17691, #20785) (#21193) 2026-05-07 05:10:33 -07:00
retry_utils.py
shell_hooks.py codebase: add encoding='utf-8' to all bare open() calls (PLW1514) 2026-05-08 14:27:40 -07:00
skill_commands.py
skill_preprocessing.py
skill_utils.py
subdirectory_hints.py
think_scrubber.py fix(agent): stateful streaming scrubber for reasoning-block leaks (#17924) (#20184) 2026-05-05 04:33:38 -07:00
title_generator.py fix: improve telegram topic mode setup 2026-05-04 12:07:17 -07:00
tool_guardrails.py
trajectory.py
usage_pricing.py fix(analytics): prevent silent token loss and add Claude 4.5–4.7 pricing (#21455) 2026-05-07 13:24:31 -07:00