Commit Graph

4295 Commits

Author SHA1 Message Date
Teknium
6802b44be8 fix: disclose a wake-hidden fallback on the next user turn, quiet wake recovery lines
Review findings on the wake-turn notice skip.

A quota or billing failure keeps the fallback serving for a cooldown, so the
next turn the user sends makes no new switch: after a switch hidden on a wake
turn, the user's turn ran on the backup with no notice at all. The hidden notice
is now held; the next non-wake turn announces it before it runs if the fallback
is still serving, and drops it if the primary came back (the user never saw it
leave).

The turn-start "Primary model restored" line also fired on wake turns, so each
wake during an outage restored, re-failed and posted it again. It is now skipped
on wake turns and for a switch the user never saw. The restore line moves into
agent/fallback_notice.py beside the switch notice.

The test now drives real run_conversation turns against a loopback provider
(primary 402, backup streaming): two wakes, then a user turn, and a wake after
the cooldown. Both cases fail on main and on the previous head.
2026-11-17 02:08:41 -08:00
Teknium
9301e1690a fix: no fallback notice on background wake turns
Since the fallback notice moved to the moment of the switch, every background
wake turn (a finished background process, a plugin's scheduled check) that
falls back posts it into the chat, and most of those turns then end silent.
One plugin posted it on 27 of 27 wakes during a primary outage (#137738).

Whether a turn is a wake is known when it starts (its persisted display kind),
so the notice is skipped there and logged instead. A turn the user sent still
gets it at the switch. A switch decided before a wake turn stays pending for
the next turn the user sees.

Holding the notice until the final reply is known (#137749's shape) would bring
back the at-the-end timing on every turn, which Teknium ruled against.

Refs #137738; supersedes #137749 by @KoNit-K.
2026-11-17 02:08:41 -08:00
Teknium
c637730ec3 fix: show the model fallback notice when the switch happens, with the provider's error
A fallback switch was announced only after the fallback finished answering, so a
long turn ran on the backup model while every surface still showed the pick (a
two-hour task looked like it ran on Qwen and had run on Grok). The notice also
named only a category ("provider failure"), never the provider's error.

The switch now posts its notice at the switch, before the fallback model is
called, and quotes the provider's own error (the summary the error handler
already computes, redacted and capped at 200 chars). A switch decided before the
turn (primary credentials failed at build) is announced at turn start. The notice
stays display-only and still obeys display.suppress_warning_notifications.

The notice wording moves to agent/fallback_notice.py, which also takes
chat_completion_helpers.py back under its line cap.
2026-11-17 00:31:01 -08:00
Teknium
9d70683b82 fix(transfer): name the Messaging page, not "Settings → Messaging"
Messaging is its own page (sidebar, command palette), not a Settings tab, so a user who opened
Settings looking for it would not find it. Every line this PR adds now names the Messaging page:
the confirm and done screens, the user guide, the CLI reference, the import's printed hint.

Co-authored-by: BearHuddleston <196404565+BearHuddleston@users.noreply.github.com>
2026-11-16 10:29:52 -08:00
Teknium
826d9a878b fix(import): a transfer never removes the cloud agent's workspace or HOME dotfiles
Hermes Cloud runs with HOME set to the Hermes home, so the agent's workspace/, home/ and the
container's dotfiles (.ssh, .gitconfig, .config, ...) sit in the root home, and no backup from
another machine carries them. The replace pruned them all. The root's workspace/, home/ and
non-Hermes dot-entries are now never pruned (transfer and undo alike); Hermes' own root
dot-files (.env, .op.env, .anthropic_oauth.json, .hermes_history) are still replaced.

Co-authored-by: BearHuddleston <196404565+BearHuddleston@users.noreply.github.com>
2026-11-16 10:29:52 -08:00
Teknium
5342a0a91f feat(import): transferred messaging bots arrive switched off on the cloud agent
A bot token answers to one running Hermes at a time. The transfer now
brings Telegram, Discord, Slack and every other messaging bot over with
its token and settings but switched off, so the computer it came from
keeps answering until the user switches each bot over by hand.

`hermes import --keep-host --messaging-off` (the Desktop transfer route
always passes it; the undo never does): in the root home and in each
profile the archive carries, every bot the archive would run (an
`enabled: true` block, or a token in that home's .env with no `enabled`
set) gets `platforms.<id>.enabled: false`, the switch Settings >
Messaging writes, inside the same merged config.yaml the keep-host
restore publishes. The explicit false sets the gateway's
_enabled_explicit marker, so the env token cannot re-enable it, and
turning the switch on in Settings > Messaging is the only step needed.

The import prints `Messaging switched off: <names>`, the action status
returns them as `messaging_off`, and the Desktop done screen names them.
The confirm note says the bots come over switched off.
2026-11-16 10:29:52 -08:00
Teknium
d2e3304016 fix(desktop): tell the user to turn local bots off only after the transfer
The confirm screen said to stop the local bots, which reads as "before".
Someone talking to Hermes through Telegram would then cut themselves off
before the cloud agent is ready. The confirm note, the done screen and
the docs now say: keep using them here until the transfer is done, then
turn them off in Settings → Messaging.
2026-11-16 10:29:52 -08:00
Teknium
f01a8a9e7c fix(desktop): stream the transfer, keep Undo on failure, honest Cancel, Webapp sign-in
- Transfer streams: each 8 MiB base64 chunk read off the source is posted to
  the cloud agent's /api/ops/transfer/chunk as it is (retry with backoff,
  offset_gap re-sync), then /transfer/restore. Peak memory is one chunk; no
  multipart, so a first native Cloud sign-in (cookie session only) uploads
  over the same JSON path every other call uses.
- A cloud agent without `import_keep_host` in /api/status gets "This cloud
  agent needs a Hermes update before it can receive a transfer." before
  anything is read or uploaded (BearHuddleston's finding and test idea).
- The undo point reaches the UI from the import's status as soon as it
  exists, also on failure; the error screen offers Undo next to Retry, and
  Undo always restores the FIRST undo point of that agent (a retry never
  replaces it). An import that finished without one is an error.
- Cancel is offered while backing up and copying only; once the restore is
  requested it is gone (it cannot be stopped).
- One backup implementation: hermes-cloud-agents `backup()` reuses runBackup;
  the save downloads /api/ops/backup/download from the backend that wrote the
  archive (never /api/fs/download, which an SSH backend serves remotely).
- Webapp: sign-in reuses the connection the saved-connection OAuth created
  (no duplicate save); "Sign in" sends a signed-out Webapp to Settings >
  Providers; the remote-browser paste field is mounted in the transfer card.

Co-authored-by: BearHuddleston <196404565+BearHuddleston@users.noreply.github.com>
2026-11-16 10:29:52 -08:00
Teknium
0695cbbbab feat(import): hermes import --keep-host replaces a cloud agent, keeps its host setup
The restore half of Settings > Backup & Transfer. `hermes import <zip> --keep-host` restores a
`hermes backup` archive over an agent whose host provisioned part of it (a Hermes Cloud agent):

- auth.json: the destination keeps its Nous Portal sign-in (providers.nous, nous pool rows,
  active_provider when nous); every other login comes from the archive. Merged against the live
  store under the auth lock; the archive's Nous tokens never land on disk.
- config.yaml: HOST_CONFIG_KEYS (model, providers, fallback*, auxiliary, nous, auth, web, image_gen,
  video_gen, tts, stt, dashboard, webapp, cron, session caps) keep the destination's value.
- .env: NOUS_*, HERMES_*, TOOL_GATEWAY_*, API_SERVER_KEY keep the destination's lines, in place.
- skills/ and memories/ become exactly the archive's (replace, not merge).
- A full backup of the destination is written first (backups/pre-transfer-*.zip, the undo point);
  `hermes import <it> --force --keep-host` puts the agent back.
- In the s6 container the gateway owns state.db, so a plain import refuses it. --keep-host marks the
  gateway's slot run-once, asks it to drain and exit over its control socket (pause-for-update), waits
  for the profile lock, restores, and starts the slot again.

REST: POST /api/ops/import-upload and /api/ops/import take keep_host and answer the undo archive;
the upload gets a 32 GiB bound instead of the 100 MB managed-file cap. GET /api/ops/backup/chunk reads
a dashboard-written backup in base64 slices (JSON-only clients such as Desktop OAuth connections).
GET /api/cloud/agents lists the Nous account's Hermes Cloud agents for a Webapp tab.

Co-authored-by: SHL0MS <SHL0MS@users.noreply.github.com>
2026-11-16 10:29:52 -08:00
alt-glitch
c4635985a0 refactor(core): delete unreached send_message actions, clarify/session helpers and backend aliases
Removed. A search for callers by name, attribute and string (Python, TypeScript,
docs, the plugin API list and the frozen old-updater list) finds no supported
path that reaches any of them:
- tools/send_message_tool.py: _handle_list, _handle_react and the action
  dispatch in send_message_tool (every caller, including the external
  hermes-snooze plugin, passes action="send")
- tools/bot_failure_reasons.py: is_auto_retryable
- tools/clarify_gateway.py: _notify_cbs, _coerce_text_response,
  attempt_text_response_for_session, resolve_text_response_for_session
- tools/cronjob_tools.py: the unused task_id parameter of cronjob()
- tools/interrupt.py: is_thread_yield_requested
- toolsets.py: create_custom_toolset
- tools/tool_backend_helpers.py: prefers_gateway, REMOVED_BACKENDS,
  removed_backend_note, normalize_modal_mode (callers use coerce_modal_mode)
- hermes_cli/config_value_checks.py: _validate_web_backends (only read the
  always-empty REMOVED_BACKENDS map)

Tests that existed only for these symbols are deleted; tests that also
cover live behaviour now call the canonical live names
(attempt_text_response, _coerce_text_response_detailed, consume_yield).

The shared-bot route-gate tests that reached the gate through the deleted
react action now call _shared_bot_target_allowed directly, so the origin
rules (guild-only, thread-under-channel and user_id routes, Telegram topics,
the turn's sender in a shared channel) keep their coverage. The two error
hints and one comment that named send_message(action='list') now name
`hermes send --list`; the stale send_message row in the zh-Hans tools
reference goes.

Also:
- test_messaging_slash_command_fifo spies on clarify_gateway.attempt_text_response,
  the name gateway/run_inbound.py calls, so its [clarify] case can fail again
- send_message_tool: an action other than 'send' returns an error that names
  `hermes send --list` for listing targets
- multi-profile-gateways.md no longer says send_message sends reactions; the zh-Hans
  simplex.md and tools-reference.md match the English pages
2026-11-16 15:40:08 +05:30
alt-glitch
782e0b42c9 refactor(code-files): delete unreached sandbox gate, checkpoint helpers, py shell linter
Removed. A search for callers by name, attribute and string (Python, TypeScript,
docs, the plugin API list and the frozen old-updater list) finds no supported
path that reaches any of them:

- tools/code_execution_tool.py::SANDBOX_AVAILABLE (constant True) and its
  two `if not SANDBOX_AVAILABLE` branches; the duplicated gateway-lifecycle
  comment in execute_code
- tests: test_windows_returns_error (only flipped the constant) and the
  constant's monkeypatch in test_execute_code_lifecycle_guard_deadline
- tools/checkpoint_manager.py: the no-op `store = _store_path(base)` /
  `_ = store` pair in _migrate_legacy_store; unused imports
  clear_stale_tmp_packs, rmtree_readonly, Dict, List, Set, Tuple;
  _list_project_refs (test-only) and its one assertion
- hermes_cli/cli_auto_maintenance.py::_run_checkpoint_auto_maintenance
  (imported by cli.py, never called), its cli.py import, its orphaned
  `threading` import and its no-op test monkeypatch
- tools/file_operations.py::ShellFileOperations._run_python_snippet
- tools/file_operations_lint.py: the '.py' entry in LINTERS (the in-process
  LINTERS_INPROC['.py'] always answers first)

- test_profile_rename_checkpoints: assert the migrate-identity retry deletes the leftover old checkpoint ref (via _ref_tip), replacing the deleted _list_project_refs check.
- docs(checkpoints-and-rollback): auto-prune runs only on the gateway housekeeping tick; the CLI never runs it.
2026-11-16 15:22:48 +05:30
Gille
8a349cc3ae fix(desktop): take the SSH connect and forward timeouts from config.yaml
Moves the override from two HERMES_* environment variables to
desktop.ssh_connect_timeout and desktop.ssh_forward_timeout, in whole
seconds up to 120. These are non-secret behavior settings, so they belong
in config.yaml. They are read once before the first window, the same way
desktop.ssh_path is, and passed to every SSH connection the app opens.

The value is validated in full. Only a positive whole number counts.
Values like "45s" or "1.5" are ignored with a startup warning and the
15 second default is kept, instead of being read as a numeric prefix.

Refs #132508
2026-11-16 00:47:42 -05:00
Teknium
58886fc81e fix(cache): coverage deadlines, guaranteed vs estimated ends, durable generation
The clock modelled every route as "expires = last touch + tier", which is wrong for OpenAI
GPT-5.6+: a read refreshes coverage to at least 30 minutes after it and never restarts a
12h write. It also treated documented minimums as expiries and lost or revived saved state.

- Coverage deadlines per tier with per-route refresh rules: Anthropic family restarts the tier
  on read; OpenAI keeps max(existing, read + 30m) and a 12h deadline stays at write + 12h.
- Windows carry guaranteed_until (earliest deadline, so mixed tiers in one response are only as
  warm as the shorter) and estimated_until (OpenAI: last touch + 24h retention ceiling; pre-5.6
  in_memory 1h). cache_certainly_warm / cache_certainly_cold are the two consumer helpers.
  /context: warm until / may still be warm until / expired / unknown.
- Events bind to the session's durable context generation (rows a compaction or prune archived,
  SessionDB.prompt_cache_generation), kept as saved on restore; a resumed agent restores and
  validates the saved event before folding its first response.
- Route identity is provider + normalize_route_base_url (scheme, host, port, path) + model.
- Agentless session.context_breakdown reads the saved clock (stored_cache_window).
- Codex app-server activity is recorded as an explicit unknown (it sets its own cache options).
- MoA records the resolved aggregator route and the payload the MoA client sent.
- effective_cache_ttl applies the route ceiling on the measured-provider path too.
2026-11-15 12:04:54 -08:00
Teknium
4a89bc6c02 feat(cache): one prompt-cache clock per session; Nous 5m ceiling as data
Every consumer that needs "when does this session's cached prompt expire?" now reads one
answer, agent/prompt_cache_clock.py:cache_window(), instead of re-deriving it from _cache_ttl.

- Per successful attempt the clock records the tier actually on the wire (cache_control ttl,
  prompt_cache_options.ttl, prompt_cache_retention, read from the sent payload), the send time,
  and the tier the response proved: Anthropic cache_creation.ephemeral_5m/1h_input_tokens,
  OpenAI Responses cache_write_tokens_details.ttl_30m/12h_tokens. normalize_usage keeps that
  split as CanonicalUsage.cache_write_by_ttl instead of dropping it.
- Per-route rules are a dict of small handlers: native Anthropic proves via the split;
  OpenRouter Claude is declared (live-probed to honour 1h); routes with a ceiling are clamped;
  other Anthropic-wire gateways assume 5m; OpenAI GPT-5.6+ proves via ttl_30m/12h or declares
  the documented 30m minimum; pre-5.6 assumes ~30m (5m on in_memory); implicit caches are
  unknown. expires = latest read-or-write send time + the written tier. A route switch,
  fallback, session rotation or compaction makes it unknown.
- Route TTL ceiling is data: ProviderProfile.prompt_cache_max_ttl (Nous ships "5m", because
  the Portal's upstream drops 1h after ~7 min and bills 5m), overridden per provider by config
  prompt_caching.route_ttl_ceilings. effective_cache_ttl uses the same helper, so Hermes stops
  asking Nous for 1h. A custom endpoint at the Portal host gets the Nous ceiling.
- Persisted as nullable sessions.prompt_cache_clock (JSON) through the existing token batch;
  restored lazily on resume, falling back to the newest assistant row (assumed).
- Codex app-server: read cacheWriteInputTokens instead of hard-coding cache_write_tokens=0.
- /context shows "Prompt cache: warm until HH:MM (…; 1h, proven)", "expired … ago" or
  "unknown (…)". The surface is absorbed from #142387 (render/duration helpers, the
  SessionContextBreakdownResult.prompt_cache contract and translations), reworked onto the clock.

Co-authored-by: Teknium <127238744+teknium1@users.noreply.github.com>
2026-11-15 12:04:54 -08:00
Teknium
69aa7b1db6 docs: terminal/process waits outlive the generic tool deadline 2026-11-15 11:49:27 -08:00
Maciej Lisiewski
d236cbe069 Merge pull request #155470 from NousResearch/sec3/141346-osascript-approval
fix(approval): always ask a human before osascript can discard unsaved work
2026-11-15 18:00:15 +01:00
Maciej Lisiewski
e0e3b2a864 Merge pull request #155442 from NousResearch/sec3/124999-credential-file-redaction
fix(redact): mask secrets when reading well-known credential files
2026-11-15 17:49:57 +01:00
Maciej Lisiewski
b06016ccdf fix(approval): read osascript programs through AppleScript layout
`do ¬<newline>shell script`, `do (* x *) shell script`, `--`/`#` comments
and a phrase split across two `-e` arguments hid the multi-word risky
phrases from the classifier. The program is now also matched with `¬`
continuations and nested/line comments replaced by spaces (string
literals and |identifiers| skipped, so their `--`/`(*` cannot swallow
code); the raw reading is kept, so this only adds findings.

Also flags Terminal's `do script` (runs a shell command), classifies
osacompile's `-e`/`-l` program like osascript's, and only counts
`osascript` as a whole word when deciding a carrier runs it, so
`python3 -m pytest tests/test_osascript_bridge.py` no longer prompts.

Fixes #141346
2026-11-15 17:24:03 +01:00
Teknium
01ee1b34fb fix(approval): always ask a human before osascript can discard unsaved work
The salvaged commits flagged `osascript ... saving no` and kept that key away
from the smart guardian. On current main that still left most of the incident
open. The regex only saw a bare `osascript` with the phrase on one line, so it
missed `quit`, `delete`, keystrokes, `do shell script "rm ..."` (which also
surfaced first as a guardian-reviewable rm rule), heredocs, pipes, carriers
and expansions. A "session" answer also pre-approved every later close.

Replace the regex with a small classifier in tools/approval_applescript.py that
fails closed and does not parse AppleScript:

- it finds each osascript at command position (paths, wrappers, quote and
  escape spellings) and reads its program from -e arguments, here-strings
  and heredoc bodies;
- a program that uses a verb that can close, quit, save, delete, move, write,
  click, send keystrokes or run a shell is flagged, and so is any JXA program;
- a program this command line does not show is flagged: a script file, stdin
  from a pipe or redirect, $VAR/$(...)/backtick expansion, an unquoted
  heredoc, or osascript run through sh -c, eval, env -S, ssh, xargs,
  find -exec or an interpreter.

Detection runs before the flat pattern table, so these manual-only keys come
first in the findings. The gate checks every pending key (not only the
combined description), skips the guardian for them, and offers once/deny
only on every surface: CLI, gateway card, selected transport and pending
record.

Read-only literal scripts are not flagged, as on main. That covers the
frontmost-app query the macOS `open` raise-ladder runs, `activate`,
`display notification` and `get the name of every disk`.

Fixes #141346
2026-11-15 17:24:02 +01:00
686f6c61
2d4513abd4 fix(approval): always ask before AppleScript closes a document without saving
`osascript` can drive an application the agent never opened, and the
document it names — `active presentation`, `front document` — belongs to
the operator. `close … saving no` throws that document away and takes the
app's AutoRecovery with it, so the loss has no recovery path; nothing in
the dangerous-pattern table matched an AppleScript payload, so smart
approval had no reason to flag it and auto-approved.

Detect the spellings AppleScript and JXA accept for "close or quit
without saving" (`saving no`, `without saving`, `saving: false`) when
`osascript` sits at command position, so `saving yes`, a plain `save`,
and the phrase quoted as another command's argument stay unflagged.

Detection alone is not enough here: in smart mode the guardian LLM would
still get the last word, and an auxiliary model's APPROVE is not the
consent of the person whose unsaved work it is. Those descriptions now
skip the guardian (`SMART_MANUAL_ONLY_DESCRIPTIONS`) and go straight to
the human prompt — the same shape as the hardline floor, but a prompt
instead of a block.
2026-11-15 17:23:52 +01:00
Maciej Lisiewski
fd0655ab84 fix(redact): mask quoted/spaced credential-store values, cover ~/.aws/config and _netrc
Follow-up to the salvaged credential-store classification:

- netrc quoted passwords ("a b c") and INI values with internal spaces
  (configparser keeps them) were masked only up to the first space, leaving
  the rest of the secret visible.
- ~/.aws/config holds aws_secret_access_key / aws_session_token too, and
  _netrc is the Windows name curl and git read; both are now secret-bearing
  (and _netrc joins the write denylist through the shared basename list).
- Drop the salvaged URL-userinfo pattern: _redact_userinfo_passwords (#125664)
  already masks .git-credentials lines on every read, and the extra regex
  masked docs placeholders it deliberately keeps.
- Tests move to tests/agent/test_redact_credential_stores.py (size ratchet)
  plus a live read_file + terminal cat E2E per store format.

Fixes #124999
2026-11-15 16:05:45 +01:00
Adolanium
03593a3538 fix(redact): mask secrets when reading well-known credential files
read_file and terminal cat only treated .env files, shell rc files and the
Hermes config.yaml as secret-bearing. Reading ~/.aws/credentials, .netrc,
.pgpass, .npmrc, .pypirc or .git-credentials returned the stored secrets
in clear text.

Classify these files as secret-bearing (credentials only under a .aws
parent) using the same list the write denylist already uses. Most of these
files are not KEY=value, so add a secret-file-only pass for their line
formats: netrc password tokens, pgpass fields, URL user:password,
npmrc _authToken and INI "password = x". The terminal path now passes
secret_file too, so both surfaces use the same passes.
2026-11-15 16:05:33 +01:00
Maciej Lisiewski
9dfb72fac3 docs(security): note the Clear-Disk -WhatIf preview exemption
Refs #87419
2026-11-15 16:01:16 +01:00
Maciej Lisiewski
66e0095606 docs(security): note the literal -Include exemption on the Windows drive-root row
Refs #87419
2026-11-15 16:01:16 +01:00
Maciej Lisiewski
479b89fe15 fix(approval): keep a plain Restart-/Stop-Computer -WhatIf preview approvable
`-WhatIf` only reports what the cmdlet would do, but the new PowerShell
power-off floor refused it with no override. Exempt it only when
`-WhatIf` is a bare parameter of the same invocation: a quote, variable,
splat, subexpression, comment or line continuation before it, any
`-WhatIf:<value>`, or a following command keeps the hardline. The
exempted preview is classified as on main (no prompt directly; the
script-execution prompt behind pwsh -c).

Refs #87419
2026-11-15 16:01:13 +01:00
Maciej Lisiewski
efead701d6 fix(approval): hardline Windows drive-root deletes, Clear-Disk; anchor the Windows rules
The salvaged Windows hardline rules matched anywhere in the command, so
`git commit -m "never format c:"` hit the floor (the #93392 class). Anchor
them to command position, optionally behind a powershell/pwsh/cmd launcher
(cmdlets are only reachable that way from git-bash), and add the drive-root
analogues of the POSIX root-rm rule: rd/del/Remove-Item recursive deletes
of `C:\`, `C:\*`, `C:\*.*`, plus `rm -rf C:/`. Deeper paths stay in the
approvable tier. The Windows-path detection variant now also gets its
command starts marked so `Get-Date; rd /s /q C:\` is seen. diskpart and
cipher /w stay dangerous-only (interactive / free-space only).

Hardening (SECURITY.md §3.2), not a new boundary.

Fixes #87419
2026-11-15 16:00:46 +01:00
unsupportedpastels
ce4de3cdc2 fix(tts): a command provider never receives the caller's output path
Some checks failed
Deploy Site / deploy-vercel (push) Has been cancelled
Deploy Site / deploy-docs (push) Has been cancelled
Skills Index Freshness Check / check-freshness (push) Has been cancelled
Skills Index Freshness Check / check-catalog-cors (push) Has been cancelled
The text_to_speech tool lets the model choose output_path, and the command
provider substituted it into the operator's shell template. Quoting covers
the template's own quote context, but a template that re-parses its
placeholders (sh -c '... {output_path}', or backticks) hands the value to a
second shell parse, where $(...) and backticks in the path ran.

The command now writes a Hermes-named file in its temp directory, which is
moved to the requested path afterwards, so no caller-chosen text reaches the
shell in any template shape.

Reported-by: directorboint-arch
2026-11-15 06:58:39 -05:00
Maciej Lisiewski
3e9c9506b7 Merge pull request #155471 from NousResearch/sec3/143365-comfyui-token-env
fix(comfyui): pass model download tokens via child env, not persisted --set-* argv
2026-11-14 22:31:23 +01:00
Maciej Lisiewski
6543046a41 Merge pull request #155530 from NousResearch/sec3/149056-gws-token-read-deny
fix(file-safety): read- and write-deny the google-workspace skill's credential files
2026-11-14 22:29:52 +01:00
Maciej Lisiewski
2c52a8ad45 Merge pull request #155490 from NousResearch/sec3/145548-claude-code-bypass-worktree
docs(skills): claude-code — a worktree is not a sandbox for --dangerously-skip-permissions
2026-11-14 22:28:40 +01:00
Maciej Lisiewski
d689185aa8 Merge pull request #155435 from NousResearch/sec3/119852-egress-url-params
fix(redact): mask credential-named URL query params at archival egress sinks
2026-11-14 22:26:43 +01:00
Maciej Lisiewski
17bb833679 Merge pull request #155374 from NousResearch/sec3/108353-inbound-secret-compare
fix(gateway): timing-safe inbound secret compares, replay windows, uniform webhook 404
2026-11-14 22:21:00 +01:00
Maciej Lisiewski
7cbc7ad288 docs(security): list the google-workspace credential files as protected
Refs #149056

Co-authored-by: BearHuddleston <196404565+BearHuddleston@users.noreply.github.com>
2026-11-14 21:08:34 +01:00
Maciej Lisiewski
69872713e6 docs(skills): tie claude-code bypassPermissions mode to the opt-in rule
`--permission-mode bypassPermissions` is the same bypass as
`--dangerously-skip-permissions`; the flags table now says so and points
at the "Opt-in" section. Fold the claude-code contract into the
test_document_obligations table instead of a standalone test, and
require the new clause there. Regenerate the docs page.

Refs #145548

Co-authored-by: BearHuddleston <196404565+BearHuddleston@users.noreply.github.com>
2026-11-14 21:03:23 +01:00
Maciej Lisiewski
fe5650a37c docs(skills): stop presenting a worktree as safe for claude-code bypass
A git worktree only separates where edits land; it adds no filesystem,
network or credential boundary, so the claude-code skill must not offer
it as the place where --dangerously-skip-permissions is acceptable.
Scope bypass to an explicit request with the whole process in a
container, VM or the sandbox runtime as non-root, and regenerate the
docs page.

Fixes #145548
2026-11-14 21:03:23 +01:00
Maciej Lisiewski
fd6af813a9 fix(comfyui): pass model download tokens via child env, not --set-* argv
auto_fix_deps.install_model() appended --set-hf-api-token /
--set-civitai-api-token, which comfy-cli persists to config.ini, and
run_cmd() logs the full argv, so a one-off download token was both
written to disk and echoed into agent-visible output. comfy-cli reads
HF_API_TOKEN / CIVITAI_API_TOKEN from its environment without
persisting, so the token now rides in the child env, scoped to the
provider host of the download URL; node installs get no overlay, and
supplied values are redacted from returned child output. Docs examples
switch to the env form; --set-* stays documented as explicit
persistent config.

Fixes #143365
2026-11-14 21:03:17 +01:00
Maciej Lisiewski
faa5ad003d fix(redact): URL query mask drops the _value suffix like the JSON rule; pin closed-list names
_is_sensitive_url_param now strips _JSON_VALUE_SUFFIX_RE before the
affixed-key check, as _json_affixed_key_secret does, so ?api_key_value= and
?passwordValue= are masked on redact_url_credentials=True paths. Tests pin
the closed-list-only names (mysql_pwd, sshpass, client-key-data). Docstring
and memory-provider docs state the shared caller scope and the image-URL
behaviour.

Refs #119852

Co-authored-by: BearHuddleston <196404565+BearHuddleston@users.noreply.github.com>
2026-11-14 21:01:00 +01:00
Maciej Lisiewski
d6815cb03c fix(redact): keep provider tool-arg URLs intact; URL query mask follows the JSON-field names
Provider tool arguments now skip the URL query mask: a memory tool may fetch the URL it
is given (openviking's viking_add_resource indexing a pre-signed S3 or SAS link), so
masking ?X-Amz-Signature=/?key=/?sig= broke it. Storage-only hand-offs keep urls=True.

The URL query pass also masks every name the JSON-field rule treats as a secret
(accessToken, x-api-key, auth_token, private_token, secret_key, passwd, ...), via the
same closed list and affixed-key policy, so the two passes agree.

Refs #119852
2026-11-14 21:01:00 +01:00
Maciej Lisiewski
24434acb87 fix(redact): mask credential-named URL query params at archival egress sinks
Memory-provider sync and telemetry export now opt into the strict URL pass via
redact_for_egress(urls=True), so a prefix-less ?api_key=<opaque> is no longer
archived verbatim. Chat delivery and delegation keep it off: there the agent
hands the user magic links / OAuth URLs that must stay usable.

Fixes #119852
2026-11-14 21:00:59 +01:00
alt-glitch
110ce30a43 fix(plugins): a linked plugin gets an update hint that works, not adopt
A plugin directory that is a link to a git checkout elsewhere is classed
as self-cloned, so `hermes plugins update` printed "run `hermes plugins
adopt` first". `adopt` then refused with "resolves outside the plugins
directory": `_sanitize_plugin_name` resolves links on purpose, so that no
plugin verb updates or deletes files outside the plugins directory.

The guard stays. The update check now says where the checkout is and to
pull updates there, and every named verb (`adopt`, `update <name>`,
`remove`) that reaches the guard through `_require_installed_plugin` says
the same and that deleting the link removes the plugin, instead of the
bare path error.
2026-11-15 01:22:06 +05:30
Maciej Lisiewski
98390f6205 Merge pull request #155556 from NousResearch/sec3/152218-schtasks-xml-principal
fix(gateway): register the Windows Scheduled Task from its XML principal only
2026-11-14 20:30:43 +01:00
Maciej Lisiewski
866e19cddf Merge pull request #155541 from NousResearch/sec3/147986-lock-record-fail-closed
fix(skills): an unreadable lock record fails closed on write_file/patch/terminal
2026-11-14 20:29:49 +01:00
Maciej Lisiewski
219593a330 Merge pull request #155487 from NousResearch/sec3/145241-peer-local-collision
fix(tools): refuse a bare message_agent target that names both a local bot and a peer
2026-11-14 20:27:17 +01:00
Teknium
1d18278d71 fix(mcp-elicit): skipping every field of an optional form declines
The all-skipped guard only fired when the form had a required field, so a user
who skipped every field of an all-optional form (no defaults) sent "accept"
with empty content. Any fully skipped form without defaults now declines.
2026-11-14 11:26:33 -08:00
Teknium
8b7c2eddfa docs(mcp): describe form elicitation on the clarify surface
The elicitation section still described the yes/no approval prompt. It now
explains how fields are asked and checked, the fallback, and what the timeout
covers.
2026-11-14 11:26:33 -08:00
Maciej Lisiewski
9686b9ec1d Merge pull request #155491 from NousResearch/sec3/145613-box-oauth-secret-relay
docs(box): keep OAuth code/state and Client Secret in user-run CLI prompts
2026-11-14 19:15:36 +01:00
Maciej Lisiewski
c1e3e4055a Merge pull request #155426 from NousResearch/sec3/140051-hosted-plugin-set-cookie
fix(plugins): drop Set-Cookie from hosted dashboard plugin answers
2026-11-14 19:13:15 +01:00
Maciej Lisiewski
2ade9ee3cd Merge pull request #155390 from NousResearch/sec3/126038-context-file-symlink
fix(agent): skip project context files that resolve outside the project
2026-11-14 19:12:34 +01:00
Maciej Lisiewski
bbe745a1cf docs(webhook): a rejected signature now gets 404, not 401
Refs #108353
2026-11-14 17:16:35 +01:00
Maciej Lisiewski
99b14b3cbb fix(gateway): adapt salvaged inbound-auth fixes to current main
Rejecting a bad webhook signature now returns the same 404 as an unknown
route, so the pin/V1/forged-challenge tests and the docs that still named
401 for signature rejections follow. The Feishu replay-window case ran only
with lark_oapi installed although the signature check never needs it, and
the quota tests signed with a fixed 2023 timestamp that the new window
refuses. The shared-helper test still imported BlueBubbles from its old
gateway/platforms path.

Fixes #108353
Fixes #108388
Fixes #127901
Fixes #136768
2026-11-14 17:16:33 +01:00