Commit Graph

1253 Commits

Author SHA1 Message Date
Jeffrey Quesnelle
70f345c558 Merge pull request #99934 from afourniernv/docs/nemo-relay-integration-guide
Some checks failed
Deploy Site / deploy-vercel (push) Has been cancelled
Deploy Site / deploy-docs (push) Has been cancelled
auto-fix lint issues & formatting / Generate eslint --fix patch (push) Has been cancelled
auto-fix lint issues & formatting / Apply patch (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
Docs Search Monitor / probe (push) Has been cancelled
docs(relay): add the native integration guide
2026-11-17 14:50:31 -05:00
Austin Pickett
82e1b4553d docs: remove the legacy /docs/skills and /docs/plugins hub pages
The Hermes Marketplace replaces them and the portal already redirects both
routes there. The published feeds (plugins.json, skills.json, skills-index.json)
and their generators stay.
2026-11-17 11:27:30 -05:00
Alex Fournier
ff3f2408ac docs(relay): refresh guide for the current integration
Signed-off-by: Alex Fournier <afournier@nvidia.com>
2026-11-16 12:49:33 -07: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
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
08e252dd29 fix(import): --keep-host is one restore pipeline; undo is a faithful replace
`--keep-host` was a second restore wrapped around `hermes import`: a
`_KeepHostZip` proxy merged every member named config.yaml/.env, a separate
writer published auth.json members without the import's path checks, and a
prune ran after the maintenance reservation was released. Reviews of #156330
reproduced the results: a `../x/auth.json` member written outside the home, a
symlinked skills/ emptied through the link (and missing from Undo), a skill's
templates/config.yaml stripped, a destination-only profile half-emptied while
its gateway ran, comments lost, and an Undo that left the source's
cron/jobs.json behind.

Now keep-host is a per-member policy (`KeepHostImport`) inside
`_import_members_exclusive`, under the same `exclusive_maintenance`
reservation (which also covers every profile the archive writes into):

- Every member goes through the import's own normalize + resolved-root
  checks. Only the root home's config.yaml/.env and the root's and each
  profile's auth.json are merged; everything else, including a named
  profile's config and a skill's files, is copied unchanged.
- config.yaml is written onto the archive's own document with the
  comment-preserving `atomic_config_replace`; auth.json goes through the auth
  store's lock and writer (`_auth_restore_target`, `_save_auth_store`);
  .env under `_env_write_lock`. When the merge changes nothing (an undo), the
  archive's bytes are published as they are.
- Replace: after a restore with no errors, files the archive lacks are
  removed in the root home and in every profile the archive carries (the
  backup's own walk, so links are never entered), and a missing auth.json/
  .env/config.yaml leaves only the host-owned part. A profile only the
  destination has is left untouched. Databases, logs, runtime records,
  lock files, install_id, webapp/ and shared/nous_auth.json stay.
- A folder the archive writes into that is a symlink refuses the import
  before any write.
- The undo point is taken after the gateway drained, under the reservation,
  with the `hermes backup` collector (`_external/` memory-provider files
  included, plus the external files the archive will overwrite). The import
  owns its path and prints `Undo point: <path>`; the last 3 are kept. A
  restore that wrote files and failed leaves a marker; the next keep-host
  import reuses that first undo point. The hidden `--undo-point` flag is gone.
- "Import refused; no files restored" is printed only for a refusal before
  the first write (`KeepHostRefused`, `OwnershipConflict`).
- `s6-svc -O` runs inside the try; an unprobeable s6 slot refuses.

Includes kvnloo's `_external/` undo-point fix (cherry-picked as the previous
commit) and BearHuddleston's root-only merge, both folded into this design.

Co-authored-by: BearHuddleston <196404565+BearHuddleston@users.noreply.github.com>
Co-authored-by: kvnloo <7121943+kvnloo@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
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
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
unsupportedpastels
71e07ef273 feat(gateway): mint host-scoped interactive tickets in gateway tickets
tickets --serve answers purpose interactive with the WebSocket ticket Desktop's local connection asks for (session-ticket, scope host, the store's 30 s TTL), so an SSH client's one socket selects every profile the gateway serves. The probe lists the purpose. A profile on such a request is invalid_request. The ticket attach returns is unchanged.
2026-11-14 10:50:28 -05:00
unsupportedpastels
0ca6a15001 feat(gateway): per-profile and profile-management tickets in gateway tickets
A --serve request line may name another profile the same gateway serves ("profile"), and --serve
also mints native-profile-create and native-profile-registry: the grants Desktop's local
connection uses for ?profile= routes and for profile create/rename/delete, asked of the same
control socket. Without "profile" a request is answered exactly as before. --probe lists the new
purposes and reports windows_service_session. The gateway is unchanged.
2026-11-14 10:50:28 -05:00
unsupportedpastels
8dc4a59c3e feat(gateway): add hermes gateway tickets for clients that reach the gateway over SSH
`--probe --json` prints the protocol version and the ticket purposes and touches no
gateway. `--serve --json` finds the running gateway as `attach` does (never starts one),
prints a hello line with its endpoint, then answers each stdin request line with one
single-use native-http ticket until stdin closes.

The mint is the one `attach` already uses, moved into `mint_ticket` so both commands
share its error mapping. Adds the client contract page for SSH clients.
2026-11-14 10:50:28 -05:00
John Paul Soliva
eeb3c6acb5 fix(agent): /context shows a refused context file as skipped
A context file the containment check refused read as "", the same as a failed read, so the /context manifest stat'ed the path, followed the link to the refused target, and reported it as unreadable or empty. The refusal now returns None and the manifest lists it as skipped, without touching the target. The symlink tests skip on hosts without symlink privilege.
2026-11-14 16:16:34 +01:00
Teknium
f90b351d91 docs(config): scope the YAML-beats-inherited-env rule to bridged settings
Finding 'Precedence advice is too broad': a setting an adapter reads from its environment directly
(WHATSAPP_REPLY_PREFIX) still prefers the environment; the new order covers the YAML bridge only.
2026-11-14 05:00:31 -08:00
Teknium
da8e0d8c9d fix(gateway): an explicit config.yaml platform key beats an inherited env value
The YAML -> env bridge skipped any name already present in os.environ unless
its ownership marker matched. A value merely inherited from the launcher
(TELEGRAM_REACTIONS=true from a parent process, not .env, not a previous
bridge write) therefore beat platforms.telegram.reactions: false, against
configuration.md's "config.yaml wins for non-secret settings".

Now only a .env / managed .env / external secret source value is kept over
the YAML key (#109032); any other preset value is replaced and the bridge
takes ownership via its marker. Removed-key retraction is unchanged: it only
drops the bridge's own marked values.

Fixes #110295
2026-11-14 05:00:31 -08:00
Teknium
444c045f78 fix(gateway): a Telegram voice follow-up inside the grace window no longer drops the reply being written
The post-start grace (HERMES_TELEGRAM_FOLLOWUP_GRACE_SECONDS, default 3s)
only held TEXT follow-ups. A voice note sent ~3s after the previous one
interrupted the turn already answering it: that turn's response was thrown
away, and only the merged later voices got a reply (voice 2 of 2-3-4 silently
lost). Voice now gets the same grace on both the legacy busy path
(_hm_busy_telegram_grace_queue) and the durable FIFO preempt path
(_hm_busy_preempt): it queues, merging its audio into the pending slot, and
the running turn finishes and sends.

Fixes #31328
2026-11-14 04:45:43 -08:00
Teknium
0913dd0f22 fix(update): --force stops gateways concurrently through their supervisors
Review fixes on #155524:
- systemd/launchd gateways are stopped through their supervisor from the start, so
  Restart=/KeepAlive cannot respawn one while another is still being killed, and a
  system unit gets the sudo path instead of a silently refused SIGTERM.
- Each gateway is stopped on its own thread against its own 12 s deadline, so the
  bound no longer grows with the fleet.
- The kill of a supervised survivor goes through systemctl kill.
- Help and docs: the immediate stop is Linux/macOS (Windows keeps its drain), and
  --force is chosen when starting an update, not to interrupt one already waiting.
- Tests gate on platforms("posix").
2026-11-14 01:11:55 -08:00
Teknium
e038cce570 feat(update): hermes update --force stops the gateways at once instead of draining
`hermes update` waits up to agent.restart_after_turn_timeout (30 min by default) for every
gateway's in-flight work before it moves the checkout. --force is the explicit "stop
everything now": the POSIX pre-swap pause names what each gateway was running, asks it to
stop immediately (the force control-socket verb when the gateway answers it, else the
planned-stop marker + SIGTERM, which enters stop() at once), SIGKILLs anything still alive
after 12 s, then the update runs and the paused set restarts on the new code as before.

The Windows meaning (proceed past a concurrent hermes.exe) is kept under the same flag;
--force-venv is unchanged.
2026-11-14 01:11:55 -08:00
Maciej Lisiewski
97a6c2fc33 docs(webhook): subscribe prints a masked secret
Point readers at webhook_subscriptions.json for the full value, and fix
the troubleshooting step that sent them to `hermes webhook list`,
which never printed it.

Refs #68040
2026-11-13 17:46:33 -08:00
Siddharth Balyan
33e9504e93 fix(agent): external-process providers are not local servers (#129153)
is_local_endpoint() reads process://<name> as an unqualified LAN host, so
DirectSDK and every other external_process provider took the single-slot
local-server branches: a "prompt is too long" with no token count failed the
turn with "wait and /retry" instead of compressing (the session stayed stuck
until /new), and init/context resolution ran the Ollama/llama.cpp probe
waterfall against a child process.

agent/process_transport.py adds two predicates keyed on the provider
profile's auth_type, never on the URL:
- is_local_server(base_url, provider): a local HTTP server. Used where the
  call site means one request slot, a local server to probe, or local-server
  copy (overflow rejection, stream load notice, Ollama num_ctx, local context
  probes, minimum-context remedy copy, reasoning carriers, Ollama vision
  probe, stale-aux pins, the dashboard local_endpoint flag, the local-model
  metrics bucket, the CLI banner fix hint).
- waits_like_local(base_url, provider): silent before the first token. Used
  where the call site means patience (stream stale ceiling, stream read
  timeout, aux first-token window), so external-process providers keep the
  900 s budget they had by accident, now on purpose.

Builds on the salvaged C#129157 (dskwe), which added the process:// string
check at the overflow site; that check is replaced by the auth_type rule and
its test now covers acp:// too.
2026-11-14 05:44:33 +05:30
Victor Kyriazakos
3845dbb76c feat(plugins): ctx.register_idle_task runs a plugin job on the curator's idle schedule
A plugin with session-less background work (re-scoring its own data,
suggesting a cleanup) had to run its own timer. register_idle_task(name, fn,
*, interval_hours, min_idle_hours=2, first_run="defer") puts it on the skill
curator's scheduler instead:

- polled from every site that drives the curator (gateway housekeeping per
  served profile, CLI/TUI startup maintenance, the hermes serve maintenance
  tick) through one run_idle_jobs(): the curator, then the active profile's
  plugin tasks;
- the curator's gates via agent/idle_schedule: the min-idle check, the
  interval (floored to 1 h) whose first observation seeds last_run_at and
  defers one interval (first_run="immediate" opts out), and the O_EXCL claim
  file so a task never overlaps itself across threads or processes;
- state per (profile, plugin, task) in <plugin data dir>/idle-tasks/<name>.json
  (last_run_at, run_count, paused, last_summary, last_status, last_error);
  a manager polled outside its own home runs nothing;
- exceptions are logged and recorded, never raised into housekeeping;
- the registration is a PluginRegistration, so unload stops the polling;
- `hermes plugins idle-tasks [plugin] [--pause TASK | --resume TASK]`.

fn receives plain data (name, idle_for_seconds, last_run_at, run_count) and
reaches its ctx through its closure, so the payload also crosses the isolated
plugin host. No capability: the scheduler only calls the plugin's own
function; model calls inside it go through ctx.llm's existing gate.

plugins.py and gateway/run.py are over the file-size cap, so the mixin lives
in hermes_cli/plugins_idle_tasks.py and neither file grows.
2026-11-13 15:30:30 -08:00
Maciej Lisiewski
ba850b39e4 Merge pull request #154637 from NousResearch/sec/46006-public-share-summary
fix(debug): public debug paste is an allowlisted summary; full logs only via --nous
2026-11-13 22:42:58 +01:00
Maciej Lisiewski
11df01a4c7 Merge pull request #154562 from NousResearch/sec/144353-bridge-ownership
fix(gateway): an edited platform allowlist takes effect after restart and on the next event (supersedes #153421)
2026-11-13 20:44:09 +01:00
Maciej Lisiewski
2add11956e docs(debug): bare /debug only shows the privacy notice; /debug upload uploads
Since #94876 bare /debug uploads nothing; tip t346 (all locales), the zh-Hans
/debug rows and the cli-commands /debug mention still said it did.

Co-authored-by: BearHuddleston <196404565+BearHuddleston@users.noreply.github.com>
2026-11-13 20:20:47 +01:00
Maciej Lisiewski
ebca7335c9 docs(debug): /debug descriptions, tips and issue templates describe the summary
Slash-command descriptions (all locales), tip t346, slash-commands docs and
the bug/setup issue templates still said the public paste carries logs.

Co-authored-by: BearHuddleston <196404565+BearHuddleston@users.noreply.github.com>
2026-11-13 20:20:47 +01:00
Maciej Lisiewski
adee619279 fix(debug): public debug paste is an allowlisted summary; full logs only via --nous
The public paste (hermes debug share, gateway /debug, dashboard
POST /api/ops/debug-share) uploaded secret-redacted log tails and full
logs. Subtractive redaction cannot recognise IPs, room IDs, display
names or message bodies, so those reached a public URL. The public
upload is now built from an allowlist in hermes_cli/debug_summary.py:
versions, install kind, platform/built-in toolset names, config.yaml
key shape (no values; user-named keys counted), and WARNING+/exception/
HTTP-status counts. --no-redact can no longer put logs on the public
paste; --nous and --local keep the full redacted bundle.

Refs #46006
2026-11-13 20:20:45 +01:00
unsupportedpastels
2570a16785 fix(terminal): log a one-time note when a sudo password goes to a non-local backend
A sudo password (SUDO_PASSWORD, terminal.sudo_password or the interactive
prompt cache) is sent to whichever terminal backend runs the command. For
container, cloud sandbox, SSH and plugin backends, programs running in that
backend can read it there. Hermes sent it without saying so.

BaseEnvironment._prepare_command, which every backend goes through (managed
Modal included), now passes its result to
tools/environments/sudo_password_note.note_sudo_password_sent. The first time
a non-empty password is sent to a backend whose is_local is False, it logs one
WARNING per process per backend class, naming the backend (derived from the
class name, e.g. docker, ssh, vercel_sandbox) and advising a password that is
only valid there, or passwordless sudo in that environment's image. The
password itself is never logged. A lock guards the once-only state. Which
backends receive the password, the command text and the sudo stdin are all
unchanged.

The sudo docs in tools.md, cli-config.yaml.example and .env.example, and the
SUDO_PASSWORD row in the environment variable reference, now give the same
advice.

Tests (tests/tools/test_sudo_password_backend_note.py) go through real
execute / _prepare_command calls with a cached password: a non-local backend
logs exactly one warning across two commands, docker and ssh each log their
own, LocalEnvironment, a command without sudo, no password and an empty
password log none, and the message never contains the password. A control
test checks that the command text and stdin match the base output for
docker, ssh and local.
2026-11-13 13:18:51 -05:00
Teknium
64930e62cf Merge origin/main into sec/144353-bridge-ownership
Resolves the docstring conflict in tools/environments/local_env_policy.py
additively: keeps main's HERMES_MODEL/DELEGATION/CUSTOM/PROVIDER key names and
this branch's HERMES_BRIDGED_* marker note.
2026-11-13 09:41:46 -08:00
Maciej Lisiewski
b51a30c461 Merge pull request #154165 from NousResearch/sec/91424-update-lock-convergence
fix(pm): move plugin generations onto core's newer lock pins
2026-11-13 17:50:35 +01:00
Maciej Lisiewski
618811e488 Merge pull request #155104 from NousResearch/fix/nit-150301-pnpm-pin-guard
test(js): make pnpm pin guard tests ignore the user's ignore-scripts; narrow user-agent docs
2026-11-13 17:49:02 +01:00
Maciej Lisiewski
b25847c75e Merge pull request #154633 from NousResearch/sec/76932-isolated-profile-scope
fix(dashboard): list only the launch profile on an isolated named-profile serve
2026-11-13 17:16:18 +01:00
Maciej Lisiewski
174d753663 test(js): keep the pnpm pin guard tests independent of the user's ignore-scripts
The real-pnpm cases spread process.env into pnpm, which also reads the
developer's global config; with ignore-scripts on there (or in
pnpm_config_ignore_scripts) pnpm skips the root preinstall and both cases
fail as if the guard broke. Pin ignore-scripts=false in the child env.

Narrow the docs sentence on pnpm_config_user_agent: the preinstall checks
the agent pnpm reports, so an override naming the pinned version passes.

Follow-up to #150301 (review nits).

Co-authored-by: BearHuddleston <196404565+BearHuddleston@users.noreply.github.com>
2026-11-13 17:05:49 +01:00
Maciej Lisiewski
a1245eee47 fix(pm): move only the pins core moved, and only on the host's fork
core_lock_upgrades compared core's lock with the seed alone, so a plugin
holding a core transitive below core's pin (allowed within core's ranges)
was -P'd onto core's pin on every later rebuild, evicted, re-admitted by
the bisect retry and evicted again; `hermes pm install` raised
ResolutionConflict. Each fresh generation now records the core uv.lock it
was built from (core-uv.lock beside the resolved lock); a pin moves only
when core's lock moved past that record too. Generations built before this
keep the seed-only comparison.

`uv lock -P` unpins a name in every fork, so a core bump to a fork the
installing interpreter never selects floated the host's fork to the newest
index release. Forks whose resolution-markers do not hold for the
installing python are skipped.

Co-authored-by: BearHuddleston <196404565+BearHuddleston@users.noreply.github.com>
2026-11-13 16:59:25 +01:00
Maciej Lisiewski
a5ea8d9e39 Merge origin/main into sec/144353-bridge-ownership 2026-11-13 16:55:43 +01:00
Maciej Lisiewski
950c35d0ef fix(pm): move plugin generations onto core's newer lock pins
A generation with plugin members is seeded from the previous generation's
lock, and uv keeps every seeded pin that still resolves, so a transitive
core's uv.lock bumped (a security release) never reached a plugin-enabled
install. The lock step now passes `-P name==<core version>` for each index
package core's lock holds above every seeded pin; plugin-only pins and
plugin-vs-plugin choices keep the incumbent. A plugin that cannot take the
new pin fails the resolve and the update's existing eviction disables it.
Member-less, repair and replay builds stay frozen and unchanged.

Fixes #91424
Fixes #91931
2026-11-13 16:54:41 +01:00
Maciej Lisiewski
d352a19670 docs(debug): document debug-share consent, parity verdict and 1-day --expire default
Refs #94876
2026-11-13 14:05:03 +01:00
Maciej Lisiewski
d182c8793b fix(debug): translate desktop upload consent and disclose dpaste fallback lifetime
The desktop and dashboard consent dialogs promised 6-hour deletion, but a paste.rs
failure falls back to dpaste.com (1 day, not deletable early); say so. Translate the
two new desktop keys in every locale overlay (overlay-completeness ratchet), use an
interface for DebugShareButton props, and scope the /debug nous upload docs to the
classic CLI: TUI and desktop reach the gateway handler, which refuses it.

Refs #94876
2026-11-13 14:04:55 +01:00
Maciej Lisiewski
f7983a45be fix(debug): refuse /debug nous upload on the gateway instead of publishing it
The gateway only has the public paste, so a consent that names private Nous
storage must not be honoured there; point to hermes debug share --nous.

Fixes #94876
2026-11-13 14:04:52 +01:00
Maciej Lisiewski
ebd3434ee9 fix(debug): require explicit consent before /debug uploads anything
A bare `/debug` (classic CLI, TUI slash worker, gateway/messaging, Desktop
slash) and an empty POST /api/ops/debug-share (Desktop Maintenance "Debug
share", dashboard) uploaded logs to a public paste immediately; the privacy
notice was printed only after the paste existed. Typing a diagnostic command
is not consent to publish session logs.

- `/debug` and `/debug nous` now print the privacy notice and upload nothing;
  `/debug upload` / `/debug nous upload` is the explicit consent. `/debug
  local` is unchanged. The CLI parsing moves into hermes_cli/debug.py
  (run_debug_slash) next to the share core.
- /api/ops/debug-share refuses (400) unless the body carries consent: true.
  Desktop and the web dashboard ask through a destructive confirm dialog
  first and only then send the marker.
- `hermes debug share` (TTY prompt / --yes) and the Nous diagnostics RPC
  (caller-side consent) already gated correctly and are unchanged.

Fixes #94876
2026-11-13 14:04:50 +01:00
Maciej Lisiewski
5f7e841876 Merge pull request #154542 from NousResearch/sec/143574-empty-toolsets-no-mcp
fix(tools): explicit empty platform_toolsets merges no MCP servers
2026-11-13 13:49:35 +01:00
Teknium
a1f8b4767e fix(gateway): bridge markers hold a digest and never reach agent subprocesses
Review finding (blocking): each HERMES_BRIDGED_* marker stored the plain bridged
value and the HERMES_ prefix passed the subprocess scrub, so a credential-bearing
telegram.proxy_url and the allowlists the scrub strips reached the agent's terminal.
The marker now stores sha256 of the value; _is_hermes_internal_secret drops the
markers from every child env, strip_launch_profile_env drops them for routed homes,
and served_profile_child_env re-adds them only on the launch profile's own restart
child for values it still carries.

Review should-fix: the bridge now skips any load for another home (HERMES_HOME
override or a secret scope stamped with another home), not only a multiplexed
secondary's scope, so such a load cannot refresh or retract the launch profile's
allowlist.
2026-11-13 01:43:47 -08:00
Leegenux
fb26094526 fix(gateway): retract removed bridge-owned YAML settings after successful loads 2026-11-13 01:43:40 -08:00
Leegenux
7ccac5af39 fix(gateway): refresh a bridged platform setting when its YAML changes
yaml_env_setter() skipped any name already in os.environ, and a CLI-started gateway hands its environment to the restart child (DAEMON_STRIPPED_ENV lists no TELEGRAM_*), so a bridged value outlived the config that produced it: telegram.reactions: true while the process still held the bridged false.

Record the written value next to the var; a name still holding that value is the bridge's own leftover and is refreshed, while any other preset value stays the operator's (#109032, blank counts as unset). A .env entry that happens to equal the bridged string is the one case where the value alone cannot tell them apart, so launch_dotenv_keys() wins that argument.
2026-11-13 01:43:38 -08:00
Teknium
8bce07e4c8 docs(telegram): TELEGRAM_GUEST_MODE is the @mention bypass for non-allowlisted groups
Some checks failed
Deploy Site / deploy-vercel (push) Has been cancelled
Deploy Site / deploy-docs (push) Has been cancelled
auto-fix lint issues & formatting / Generate eslint --fix patch (push) Has been cancelled
auto-fix lint issues & formatting / Apply patch (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
Docs Search Monitor / probe (push) Has been cancelled
Review should-fix: the row described reading groups without membership; the adapter's
_telegram_guest_mode and the Telegram guide's guest_mode section say non-allowlisted
groups may trigger only by an explicit @mention. Also notes observe_unmentioned is
allowlisted chats/topics only.
2026-11-13 00:16:34 -08:00
Teknium
ed51b32ded docs(telegram): drop HTTP timeout rows main already documents
The HERMES_TELEGRAM_HTTP_* / _INIT_TIMEOUT / _DISABLE_FALLBACK_IPS variables
gained rows in the HERMES_* table of environment-variables.md after this PR
was opened; keep that single entry instead of two.
2026-11-13 00:16:34 -08:00
Luna
1cc1954305 docs(telegram): correct TELEGRAM_ALLOW_BOTS values and default
The authz_mixin gate checks for 'mentions'/'all' against a 'none'
default, not a boolean. Update the env-var reference to match the
actual code contract.

Co-authored-by: René Rosenkranz <ninso112@proton.me>
2026-11-13 00:16:34 -08:00
Luna
28357fb73e docs(telegram): document TELEGRAM_WEBHOOK_HOST and other undocumented adapter env vars
Add TELEGRAM_WEBHOOK_HOST (webhook bind host, fixes IPv6-only
deployments such as Fly.io 6PN) to the env-var reference table and the
Webhook Mode configuration section of telegram.md.

Also document the previously undocumented adapter-read env vars:
HERMES_TELEGRAM_HTTP_POOL_SIZE / POOL_TIMEOUT / CONNECT_TIMEOUT /
READ_TIMEOUT / WRITE_TIMEOUT, HERMES_TELEGRAM_INIT_TIMEOUT,
HERMES_TELEGRAM_DISABLE_FALLBACK_IPS, TELEGRAM_ALLOW_BOTS,
TELEGRAM_GUEST_MODE, TELEGRAM_OBSERVE_UNMENTIONED_GROUP_MESSAGES.

Verified against plugins/platforms/telegram/adapter.py on main.

Closes #78697

Co-authored-by: René Rosenkranz <ninso112@proton.me>
2026-11-13 00:16:34 -08:00
Maciej Lisiewski
232e4e7d6d Merge pull request #153681 from NousResearch/sec/91308-aux-openai-key-host-gate
fix(aux): gate OPENAI_API_KEY on OpenAI hosts for custom endpoints
2026-11-12 22:23:57 +01:00
Maciej Lisiewski
6035ecba1a fix(dashboard): list only the launch profile on an isolated named-profile serve
`hermes -p <name> serve|dashboard --isolated` now stops advertising sibling
profiles: /api/profiles, /api/status profiles (+ new `isolated_profile`), the
unified /api/profiles/sessions{,/sidebar} fan-outs and gateway `profiles.list`
answer for the launch profile only, so Desktop's profile rail, sessions sidebar
and SOUL editor show just that profile.

This is listing UX, not a boundary: per the maintainer decision, `--isolated`
is a routing/ops convenience (SECURITY.md §2.2/§2.6). ?profile=<sibling>,
/api/fs/* and the agent's own tools still reach sibling homes; the docs and
SECURITY.md now say so and point tenants at separate OS users or containers.

The scope is captured once at start_server as the canonical launch home (not
get_active_profile_name(), whose default/custom sentinels collide with real
ids), before multi-profile activation can mirror a turn's profile into
HERMES_HOME. The root home and Desktop-owned backends (its SSH serve --isolated
multiplexes every profile per connection) stay unscoped. Launch-path idea from
#91381.

Refs #76932
Refs #91330

Co-authored-by: KeyArgo <daniel.laforce@argobox.com>
2026-11-12 21:12:00 +01:00
Maciej Lisiewski
416f7ae746 test(tools): pin MCP controls around an explicit empty platform list; document it
An absent key, a non-empty list and a list naming a server keep their MCP
behaviour, so the fail-closed guard for [] cannot overshoot. Documents the
no_mcp / named-server / empty-list semantics next to the MCP toolsets.

Fixes #143574
Fixes #147025
2026-11-12 19:57:42 +01:00