Commit Graph

970 Commits

Author SHA1 Message Date
unsupportedpastels
037fb51c92 docs(plugins): say a plugin socket checks the requesting profile's consent only
The SDK guide said the gateway refuses a plugin socket's upgrade when the
plugin is disabled for the gateway's launch profile. PLG-3 removed that
check: a socket is gated by its own profile's consent alone
(test_runtime_disable_refuses_new_grant_sockets_in_that_profile_only).
The sentence now says so, and that a secondary profile's plugin served by
its plugin host gets HTTP 501, because the host does not carry websockets
yet.

Refs #134889 (PLG-3)
Refs #139523
2026-10-16 19:15:07 -04:00
Mark S.
d87a8ba355 Merge pull request #139569 from unsupportedpastels/fix/gateway-p5-plugin-routes
fix(plugins): one consent gate for plugin websockets, and Desktop plugin sockets on a local gateway
2026-10-16 19:13:35 -04:00
Mark S.
be9427acc9 Merge pull request #139575 from unsupportedpastels/fix/gateway-p5-plugin-loading
fix(plugins): classic CLI plugin commands run in the gateway, and disable reaches the running gateway
2026-10-16 19:12:02 -04:00
unsupportedpastels
eccb1c3c13 fix(plugins): move a plugin socket to the new profile on a profile switch
pluginSocket read the active profile when it started a dial but never
re-checked it after the connection lookup or the grant mint resolved. A
profile switch during either await still dialed the old profile's URL, and
no dial for the new profile followed. A socket already open when the
profile changed also stayed bound to the old profile's grant: the scope
listener only reset the counters and re-dialed a stopped socket. The
gateway checks the grant's own profile, so consent held, but the plugin
view showed the other profile's stream.

Each dial now carries the generation it was started under. A connection
or profile change bumps the generation, closes an open socket, and dials
for the new scope. A lookup, mint, backoff timer or socket callback from
an older generation is dropped. It neither retries nor counts toward
MAX_REFUSED_PLUGIN_DIALS. Permission refusals still stop at the limit,
connection failures keep the capped retry, and the no-bridge/OAuth,
disposed and null-URL cases are unchanged. The SDK guide says a live
socket follows a profile switch.

Refs #134889 (PLG-1)
Refs #139523
2026-10-16 21:47:10 +00:00
John Paul Soliva
102c07403a fix(relay): a relayed Discord interaction carries the text lane's chat and user labels
A relayed Discord message carries connector-resolved chat_name / chat_topic and
user_display_name; a relayed interaction (slash command, component, modal) was
built from the raw body: user_name = raw username, no chat labels, and inside a
thread chat_type "group" with no thread_id / parent_chat_id. All of these feed
_ephemeral_change_key, so message -> interaction -> message re-rendered the
pinned session-context prompt each way, and a slash in a thread keyed another
session.

- the interaction names its user from its own payload: guild nick, else
  global name, else username (discord.py display_name order);
- the text lane's last (chat_name, chat_topic) per (guild, chat) is kept in a
  bounded map and recorded in state_meta when observed (off the loop,
  retryable when the database is away); the interaction lane reads the map,
  then the record after a restart;
- a thread interaction derives chat_type=thread, thread_id, parent_chat_id
  from the partial channel object;
- a cancellation before admission releases the inbound seen bit so the
  connector's replay is admitted.

Squash-port of #128797 (six commits) onto current main, where
_discord_interaction_to_event lives in gateway/relay/adapter_discord_interaction.py;
_on_passthrough moves there with it to keep adapter.py under its health cap.
2026-10-16 14:21:00 -07:00
Teknium
968c87f6bc feat(sessions): auto-prune is opt-in again; ask once when the disk runs low
sessions.auto_prune goes back to false by default. Deleting history is the
user's call, but an install that never decides still needs to hear about it
when the disk holding state.db runs low, or state.db grows until the disk
fills (the reason #54189 turned it on).

While the user's config.yaml has no sessions.auto_prune key, every surface
asks once the disk is low (< 2 GiB free, or < 10% free with < 20 GiB left):

- classic CLI: a y / n / Enter(later) question at startup (TTY only)
- TUI and Desktop: one sticky notification.show per profile per process
- gateway: the question on each served profile's home channel, at most
  once per 7-day snooze window
- /autoprune on|off|later|status answers it on every surface (registry
  executor, so the text is identical); on/off writes the explicit key and
  the question never comes back, later snoozes a week

The prompt estimates what a prune would free (read-only count of ended
sessions past retention_days, scaled by their share of messages) and says
plainly when pruning will not fix the disk: no session old enough, or only
a small amount reclaimable.

The hot-path check is os.stat + shutil.disk_usage + one small YAML read;
the DB estimate only runs once that gate fires, off the prompt thread on
TUI/Desktop.

gateway/run.py and tui_gateway stay under their line caps: the media-cache
chore moves to the new gateway/run_housekeeping_disk.py with the prompt
chore.
2026-10-16 13:56:20 -07:00
unsupportedpastels
2f056af7c0 fix(plugins): keep retrying a plugin socket when the gateway connection can't be resolved yet
pluginSocket turned a failed or timed-out activeConnection() into null and
returned without scheduling another attempt. That lookup is part of the
restart path: getConnection re-ensures the gateway, which rejects while it
starts or drains, and a stale ticket forgets the cached descriptor before
re-ensuring. The socket then stopped for good, and since it was not marked
stopped, a connection or profile change did not revive it either.

A descriptor failure or timeout is now a connection failure like a dial
that never opened: the next attempt is scheduled with the same capped
backoff (500 ms base, 30 s cap) and does not count toward
MAX_REFUSED_PLUGIN_DIALS. A missing bridge and OAuth connections still stay
on polling, and permission refusals still stop at the limit. The SDK doc
now says the socket keeps retrying while the connection or grant can't be
resolved yet.

Refs #134889 (PLG-1)
Refs #139523
2026-10-16 16:18:50 +00:00
unsupportedpastels
8af0911efc docs(plugins): slash command handlers run in the gateway process
A plugin `/command` typed in the classic CLI now runs in the gateway that
owns the session, so `os.getcwd()` there is the gateway's directory and
`print()` goes to the gateway's stdout. The plugin docs did not say so.

The user guide (features/plugins.md) and the build-a-plugin guide now say
to return text instead of printing, to take the session's directory from
`agent.runtime_cwd.resolve_agent_cwd()`, and to read session identity with
`gateway.session_context.get_session_env()`. The real-daemon test's plugin
gains a `/probe-cwd` command that checks both helpers return the session's
values while `os.getcwd()` is the gateway's.

Refs #134889 (CLI-13)
Refs #134889 (PLG-7)
Refs #139523
2026-10-16 16:11:56 +00:00
unsupportedpastels
e35a654f44 docs(plugins): document plugin socket auth, its retry contract and two gate notes
- desktop-plugin-sdk.md: ctx.socket on a local gateway authenticates with
  the native grant its ctx.rest calls carry (minted by main, attached as a
  header to that one dial). Also when the socket keeps retrying, when it
  stops, and when it starts again.
- web_server_chat._ws_auth_reason: a socket that sends
  X-Hermes-Gateway-Ticket is judged by that header alone, so a core socket
  presenting it is refused even with a valid token query credential.
- web_server.py: why the web_server_dashboard import sits mid-module. It is
  not an import cycle (web_server_dashboard reaches back only inside
  functions); the load-bearing part is the middleware registration order.

Refs #134889 (PLG-1, PLG-8)
Refs #139523
2026-10-16 16:09:35 +00:00
Teknium
a84712b4cd refactor(gateway): finish the move of the last core messaging adapters
With signal, weixin, bluebubbles, qqbot, yuanbao and whatsapp_cloud now
bundled platform plugins, gateway/platforms/ keeps only the base class and
the HTTP ingress adapters (api_server, webhook, msgraph_webhook). (The
now-unused _gateway_platform_module helper and the setup wizard's
second-credential map were dropped while integrating the weixin and
yuanbao "drop core wiring" commits.)

- ffmpeg calls in the Signal and QQ adapters get stdin=DEVNULL: they now
  sit under plugins/, which check_subprocess_stdin scans (gateway/ is not
  scanned), and ffmpeg reads stdin for its interactive keys.
- Setup wizard: collapse the blank lines left by the removed static rows.
- Developer docs (EN + zh-Hans) describe gateway/platforms/ as core base +
  HTTP ingress adapters and list the six platforms under plugins/platforms/.
2026-10-16 07:09:45 -07:00
Teknium
90dff0c966 docs(yuanbao): adapter now lives in plugins/platforms/yuanbao
(cherry picked from commit 0b2b103c6f957170991056b0eb2209cf974ade32)
2026-10-16 07:09:45 -07:00
cxyhhhhh
0a2992af65 refactor(qqbot): move the built-in adapter into the bundled platform plugin
QQ Bot is a messaging platform, so its adapter, setup, and standalone sender belong in plugins/platforms/qqbot behind one register() entry. The core keeps the shipped-platform name lists, so webhook, cron, and prompt hints still treat qqbot as built-in.

(cherry picked from commit a7eb428aad0cc69ea098747b435e1e0e1d7e3b67)
2026-10-16 07:09:45 -07:00
Teknium
e36a291671 refactor(weixin): move adapter into bundled platform plugin
git mv gateway/platforms/weixin.py -> plugins/platforms/weixin/adapter.py with
plugin.yaml + register(): adapter_factory, check_fn (install_hint = old
_BUILTIN_ADAPTERS warning), is_connected, required_env, setup_fn (QR-login wizard
moved from hermes_cli/gateway_setup_wizard.py), standalone_sender_fn (native
text+media via send_weixin_direct, formerly tools/send_message_senders._send_weixin),
allowlist/cron env vars, emoji, allow_update_command. Tests import the plugin path.

(cherry picked from commit bdff38c4987cb6f6333b909d4949c68a3bd2a6a2)
2026-10-16 07:09:45 -07:00
Teknium
5276958511 refactor(signal): move Signal adapter into bundled platform plugin
gateway/platforms/signal{,_format,_rate_limit}.py -> plugins/platforms/signal/
(adapter.py + satellites, history-preserving renames). register(ctx) declares
the PlatformEntry hooks core used to hard-wire: requirements probe, config
gate (with the old 'SIGNAL_HTTP_URL or SIGNAL_ACCOUNT not configured' warning),
is_connected, allowlist/home env vars, max_message_length=8000, emoji, pii_safe,
allow_update_command. The out-of-process JSON-RPC sender (attachments still
ride the 'attachments' param, shared rate-limit scheduler) moves to
standalone.py as standalone_sender_fn; the setup wizard moves to setup.py as
setup_fn, unchanged flow. Tests repointed at the plugin path.

Co-authored-by: Karl Johannisson <karl.johannisson@gmail.com>
(cherry picked from commit eb9f7e730a39d702aea2505855631e3137ab509b)
2026-10-16 07:09:45 -07:00
Teknium
7e203f16a8 docs(bluebubbles): adapter now lives in plugins/platforms/bluebubbles
(cherry picked from commit 8f0e883c9cfd0d7db7eddc2431ba4a43a60a9ea5)
2026-10-16 07:09:45 -07:00
Teknium
f11062a837 refactor(whatsapp_cloud): move WhatsApp Cloud adapter into a bundled platform plugin
gateway/platforms/whatsapp_cloud.py -> plugins/platforms/whatsapp_cloud/adapter.py and
hermes_cli/setup_whatsapp_cloud.py -> plugins/platforms/whatsapp_cloud/setup_wizard.py (git mv).
register(ctx) wires adapter_factory, check_fn, is_connected, required_env, install_hint,
setup_fn (the same wizard `hermes whatsapp-cloud` runs), allowed_users/allow_all env,
cron_deliver_env_var, label/emoji. gateway/platforms/whatsapp_common.py stays in core
(shared with the Baileys plugin and CLI helpers). Tests and docs point at the plugin path.

Co-authored-by: sprmn24 <oncuevtv@gmail.com>
(cherry picked from commit a3b08efc0249c2dcd3472e4a25addc3f3a2b0d5c)
2026-10-16 07:09:45 -07:00
Teknium
0706401b80 fix(plugins): a newer server-declaration key no longer makes a plugin uninstallable
The portable loader raised on any key in extensions.com.nousresearch.hermes
.servers.<name> it did not know, so a plugin using a key added in a later
release could not be installed at all on an older one: REA's per-server
`timeout` broke every v0.22.2 install. Ignore unknown keys with a diagnostic
(logged at load, listed by `hermes plugins validate`), the same treatment
unknown top-level manifest fields already get. Known keys, `trust` included,
are still validated and applied.
2026-10-15 09:19:05 -07:00
Teknium
fe45cf6684 ci(release): start the Windows bundle when both arches are built, not after their smokes
Stable builds each Windows arch in its own desktop-bundled-release call and
assembles the universal bundle in a third call that needs both. Each per-arch
call also ran that arch's MSIX install-and-chat smoke, so assembly waited for
the slower arch's smoke after its build: on rc.2-v0.22.2 the bundle sat behind
the arm64 smoke from 07:16 to 07:28.

A new windows-smokes-with-bundle input moves both MSIX smokes into the
win32-bundle call. The smokes already fetch the staged package from the R2
handoff, so they run there beside assembly. The per-arch calls then only
build, the bundle call's phase result requires both smokes, and the candidate
manifest records the Windows smoke results from the bundle call, so a failed
smoke still blocks the release. Callers that build everything in one call
(canary, channel, commit builds) leave the input off and are unchanged.
2026-10-15 02:06:01 -07:00
kshitijk4poor
db44c46208 refactor(gateway): ask the workspace question without building the toolset list twice
- `_in_coding_workspace` used `coding_selection(...) is not None`, which
  built the posture list (MCP enumeration included) only to test it, and
  `_resolve_toolsets` built it again. New `coding_context.in_focus_workspace`
  answers yes/no (focus gate first, so the folder probe is still skipped).
- `RuntimeMode.toolset_selection` delegates to `focus_toolsets`: one
  builder for the posture's list.
- `focus_toolsets` is imported only on the posture branch of
  `_resolve_toolsets`.
- Docs list every caller that keeps the profile's toolsets (cron, A2A and
  hosted rooms included); the session.create test closes its store.
2026-10-15 13:27:53 +05:30
kshitijk4poor
d4ab9fc18b fix(gateway): adopted legacy sessions keep the profile's toolsets
Legacy-row adoption (session_local_migration) passes the row's saved cwd
to build_policy, so under `focus` a migrated cli/tui/acp row in a code
folder froze the coding posture on adoption. The saved folder is no
fresh client pick; opt out like Kanban workers do. The developer docs
now name the sources that keep the profile's toolsets.
2026-10-15 13:27:53 +05:30
unsupportedpastels
aee5a705b2 fix(gateway): the gateway applies the coding posture when no toolsets were picked
build_policy (and a following session's current_toolsets) resolves agent.coding_context for the session cwd on every interactive surface, with the TUI/Desktop surface toolsets still folded in. An explicit toolsets pick still wins.

(cherry picked from commit 4c06d849abf4bff83db9402bbd845ce7066bc932)
2026-10-15 13:27:53 +05:30
unsupportedpastels
84662a1c2d fix(gateway): route the Ink and Desktop requests the shared gateway refused
- TUI-9: the Ink session picker called session.delete, which the gateway
  never had. It now resumes for the revision and sends session.mutate
  delete, as the classic CLI does; delete/close errors stay on screen
  instead of being wiped by the quiet poll.
- RT-4: message.react is served by the gateway (gateway/session_reactions.py)
  with session:submit and the profile check, on the conversation's current
  physical session.
- RT-5: session.control runs each goal/loop/heartbeat/subgoal button as the
  typed slash command it stands for, then returns the control snapshot.
  subgoal.add calls the goal manager directly so free text is never parsed
  as a /subgoal verb.
- RT-6: Ink /tools enable|disable now says it is not available on the shared
  gateway, matching the classic CLI, instead of showing the unchanged list.
- TUI-13: `type: exec` quick commands and plugin slash commands run through
  the messaging gateway's own dispatch (slash access policy, sanitized env,
  redacted output, plugin session env). They need session:control and read
  the session's own profile config; a launch-profile quick command never
  answers for another profile. An exec command is a host shell run in the
  session's folder (refused with cwd_unavailable if that folder is gone,
  never the gateway's own). It is not sandboxed.
- Exec quick commands that time out after 30 s are now killed, on messaging
  too, instead of being left running.

Refs #134889 (TUI-9, RT-4, RT-5, RT-6, TUI-13)
2026-10-14 20:46:58 -04:00
Teknium
5486c3dd6c docs(compression): what happens to loaded skills across a compaction 2026-10-14 14:56:35 -07:00
Teknium
f30020ed5e fix(mcp): preserve server deadlines through outer tool execution 2026-10-14 14:09:29 -07:00
Teknium
fcc170b798 fix(plugins): honor portable per-server call deadlines 2026-10-14 14:09:29 -07:00
Teknium
2c01eb5958 Merge origin/main into feat/unified-gateway-runtime
48 commits from main (e8c8e46471). One conflict: hermes_cli/runtime_provider_custom.py, where both sides
added the `config=` keyword to _get_named_custom_provider; main's signature (config + resolve_credentials)
is taken whole.
2026-10-14 12:41:58 -07:00
ethernet
f9d8a74035 feat(release): split the Microsoft Store bundle into its own windows-store lane
`windows` used to build the signed MSIX, the universal bundle and the Store
bundle together, so skipping the signed pipeline meant skipping the Store too.
Now `windows` is the signed pipeline and `windows-store` the unsigned Store
bundle; both default on and the shared per-arch builds only make what the
lanes ask for.

- lanes: new `windows-store` lane and derived `windows-build` (either lane),
  which gates the shared candidates-win32-* jobs and handoffs.
- desktop-bundled-release: `skip-signed` builds only the Store variant and
  needs no Azure login, signing, metadata, smoke or receipt; `skip-store`
  builds and submits no Store bundle (replaces the old `store` input).
- manifest: a Store-only release has no package rows, only the Store bundle
  file; assemble() now takes the claim's lanes and checks each Windows bundle
  against its lane.
- claims record `lanesRevision: 2`. A lanes claim without it was cut when
  `windows` also meant the Store bundle (rc.2-v0.22.1), so it reads as
  windows + windows-store.
- release_artifacts: drop the unused `assemble` CLI command, which could not
  name the lanes.
2026-10-14 14:39:03 -04:00
ethernet
36a8ee18cd feat(release): choose what a stable release builds and tests with lanes
The skip and opt-in flags (--skip-bundles, --skip-tests, --include-macos-intel,
--include-termux) were four booleans in the claim, and every consumer
re-derived what they meant. A release is now a set of lanes, defined once in
scripts/releases/lanes.py: five build lanes (docker, windows, macos-arm64,
macos-intel, termux) and ten test lanes (ci, nix, docker-tests, pm-bundle,
windows-live, install-e2e, bootstrap-version, termux-checks, smoke, upgrade).
The default is every lane except macos-intel and termux.

  release.py release --only windows,docker      # the Store bundle + image, untested
  release.py release --with macos-intel --without install-e2e

- The claim records `lanes`. A claim cut before lanes existed still parses:
  skipBundles/skipTests/include* translate to the lane set that gated the
  same jobs, because the sequencer reads every claim tag ever cut.
- `admit` emits `lanes` and `jobs` (a run flag per lane-controlled job). Each
  job's `if` reads its own `jobs` entry and the gates derive their expected
  skips from the same table, so the workflow and the gates cannot drift.
  tests/ci/test_stable_release_graph.py evaluates every `if` against 37 lane
  sets.
- A release may build any subset: the candidate manifest carries exactly the
  claim's targets, and the final tag records null for the docker digest or the
  manifest digest when the claim built neither.
- The protected desktop channel, feeds, APT index and upgrade baseline move
  only when the claim built windows and macos-arm64. A partial set is staged,
  verified and (with windows) submitted to the Store, and leaves the channels
  on the previous release. A release that moves no channel is finished once
  public.
- publish-bundles passes `store` so a claim without windows submits nothing
  to the Microsoft Store.

Not exercised end to end: no real release was cut with a partial set.
2026-10-14 11:03:26 -04:00
Teknium
0715474bfd Merge origin/main into feat/unified-gateway-runtime
375 commits from main (0e427d788d). 24 files conflicted; the resolutions that carry a decision:

- /initiate-setup: main removed the command (25bf722063). Its gateway rewrite, CLI handler and the
  Desktop kickoff go with main; this branch's command-layer admission of it is dropped too
  (gateway/session_commands.py _PROMPT_COMMANDS, its slash.exec test row, the parity doc row), and
  the Desktop slash dispatcher loses the `hidden` option that only the kickoff used.
- Code this branch moved out of its old file, carrying main's edits to the moved copy:
  first-contact notes (gateway/run_turn.py -> run_turn_prepare.py: no message/setup_command),
  the TUI agent factory (tui_gateway/server.py -> agent_factory.py: onboarding toolsets at build,
  setup_beat/set_theme lifecycle cards, no cli platform extras on a coding selection), the serve
  lifespan (web_server.py -> web_server_app.py standalone_lifespan: first-install probe before the
  state.db reconcile, onboarding due answer after the setup bootstrap), and the compression child
  publish (the shared _publish_compression_child_on_conn reads the parent's model_config).
- agent/auxiliary_client.py: both import changes (_route_key from main; this branch's move of
  _without_structured_output_format).
- Desktop: main's onboarding run (decideOnboarding, OnboardingEnd, card-waiting Send) replaces the
  kickoff; this branch's prepared-submission slash path, request_id on session.create and
  PreparedImageRecovery stay. Pool-limits imports are dropped (this branch removed the pool).
  createBackendSessionForSend takes main's (preview, overrides) signature.
- ci.yaml detect job: main's `ref: inputs.commit` plus this branch's sparse checkout.
- package.json / lock: main's vitest 4.1.11 plus this branch's ws 8.21.1.
- Generated: gateway-contract.openrpc.json regenerated; parity doc regenerated.
2026-10-14 05:52:49 -07:00
ethernet
667e6639af feat(release): dispatch Stable Release from the default branch
Stable ran on its claim tag, so its Actions caches lived in a scope no
later claim could read. Every attempt rebuilt wheels and re-signed every
Windows payload file. Canary already runs from the default branch with the
tag as an input. Stable now does the same.

- `check_claim` reads the commit from the claim tag. It requires the
  default-branch dispatch of stable-release.yml instead of GITHUB_REF and
  GITHUB_SHA.
- The protected publisher accepts stable-release.yml on the default branch.
- `release.py` and the release entrypoint dispatch on the default branch.
- Runs are matched to a claim by their run name. Every run now has the same
  head branch. Runs that started on the tag still match.
- `release_artifacts` reads RELEASE_COMMIT before GITHUB_SHA. The publish
  and Store jobs now set it to the admitted commit.
2026-10-13 21:22:30 -04:00
Siddharth Balyan
56b10be733 feat(metrics): count connector file-input refusals by error class
A refused path counts as not_allowed, a missing or oversized file as
invalid_arguments, and a failed upload as connector_backend.
2026-10-14 02:14:52 +05:30
alt-glitch
f5ea924b7e docs: remove the initiate-setup and first-task skills and the setup docs
Both optional skills go, and generate-skill-docs.py prunes their pages, the
optional-skills catalog rows and the sidebar entries (the sidebar would point at
missing pages otherwise). slash-commands, toolsets-reference, delegation,
tools-reference, configuration's Onboarding section and the desktop setup-chat
section return to their 889eddcd86 text; the one inbound anchor to that desktop
section lived in the two pages restored here. The shared-metrics consent note
drops the setup profile too.

(cherry picked from commit e7a2af52bb23c02032529d823b64b24e5a79c6d8)
2026-10-14 00:29:11 +05:30
Teknium
894c437b7a fix(desktop): /undo /retry /steer /queue run on a canonical session, as in the TUI
Desktop sent these typed commands as slash.exec, which the shared gateway refuses
(unsupported_command). They are now local actions mirroring the Ink TUI on the same gateway:

- /undo [N]: session.resume snapshot -> session.rewind (session.mutate rewind) on the Nth
  newest human user turn's durable row id; trims the rendered transcript, puts the removed
  text back in the composer, prints the removed-message count.
- /retry: the same rewind of the newest turn (a media/unknown-part turn is refused before
  anything is archived), then resubmits the rewound turn's own text via submitPromptText.
- /steer (/s): session.steer while the target session's turn runs; when no turn runs or the
  steer is not accepted the text becomes the next turn. Empty arg prints usage.
- /queue (/q): enqueues on the composer's next-turn queue (the owner FIFO via a queued
  admission on a canonical session, the local composer queue otherwise); bare /queue counts.

Legacy (non-owner) gateways keep the slash-worker route for /undo and /retry. New copy lives
in a typed sibling (promptNotices.sessionCommands) translated in every bundled locale; the
parity doc is regenerated (Desktop column: action: undo/retry/steer/queue).
2026-10-13 02:51:44 -07:00
Teknium
88d56fcd87 fix(gateway): /skills review verbs run the messaging handler for a local session
Desktop exposes exactly the write-approval review slice (desktop_subcommands
pending/approve/reject/diff/approval) and sent it as slash.exec, which the
owner refused; Ink's bare/pending forms hit the same refusal. The gateway's
own _handle_skills_command already serves that slice (the hub stays
CLI-only and answers its "Search/install are CLI-only" line), and its
`approval on|off` writes skills.write_approval to the profile's config.yaml,
which is where main's CLI wrote it too. Admitted: bare/pending/diff as reads,
approve/reject/approval as controls; anything else (install, search, ...)
stays unsupported_command.

Proof: test_session_read_commands runs /skills pending, /skills reject and the
refused /skills install on a real daemon; parity table regenerated.
2026-10-13 02:51:42 -07:00
Teknium
3c21c4133a fix(desktop): a typed /approve or /deny runs on the owner, as on every surface
The owner now resolves a local session's waiting approval from the typed
command (6a7fb042ad9). Ink already forwards unknown-to-Ink commands to
slash.exec; Desktop blocked both as desktop="messaging". Dropping that
disposition makes them plain exec rows (registry dump regenerated), so one
text command behaves the same in the CLI, Ink and Desktop. The approval card
keeps answering through approval.respond.

Proof: desktop-slash-commands.test.ts (red on the old dump), the daemon test
in tests/gateway/test_session_approval_commands.py for the owner side.
2026-10-13 02:51:26 -07:00
Teknium
5707483e83 fix(gateway): /toolsets and /platforms read on the owner for a local session
Neither has a messaging handler; main's classic CLI and its TUI slash worker
printed them from the process holding the agent, which on the shared gateway
is the owner. Ink and Desktop got unsupported_command. The report bodies move
verbatim into hermes_cli/cli_info_lines.py (byte-identical CLI output,
checked old vs new), and slash.exec runs them for a local session
(gateway/session_info_reads.py): /toolsets marks THIS session's toolsets
(policy.current_toolsets), /platforms reads the owning profile's gateway
config. One text on every surface.

Proof: test_session_read_commands runs both through slash.exec on a real
daemon (session created with toolsets=['todo']).
2026-10-13 02:51:17 -07:00
Teknium
0d93ab57fa docs(gateway): the parity table's Classic CLI column is main's HermesCLI
`hermes chat` is main's HermesCLI with a gateway-backed agent and session
store (hermes_cli/gateway_agent.py, gateway_session_store.py); the column
still described the retired thin client (gateway_chat_commands.VIEW_ROUTES),
which now only fronts --stream-json and the safe-mode bypass. The generator
reads HermesCLI._slash_handler for every registry command and names the main
handler it runs in-process; gateway-only commands read "messaging-only:
unknown command". The header says which client is which, and the
/approve /deny control verdict cites its test. Table regenerated.
2026-10-13 02:51:03 -07:00
Teknium
74e6dab052 fix(tui): bare /personality lists through the owner's /personality handler
On the shared gateway a bare /personality printed nothing (live hermes --tui check); it is the
owner's /personality listing now, the same text every surface shows.

(cherry picked from commit 4fabce2a64ba2d197f3cbd85b49456a857fd98b1)
2026-10-13 02:43:13 -07:00
Teknium
ada38db216 fix(gateway,tui,desktop): the setting writes Ink and Desktop still refused run on the owner
config.set on the owner now serves the keys the clients refused before the wire, each through the
code its slash command runs:

- `reasoning` (show/hide/reset/levels, `scope=global` = `/reasoning --global`): the /reasoning
  handler's _apply_reasoning_selection for this session.
- `yolo` with `scope=global` (Desktop's Shift+click zap): approvals.mode off / manual, as main.
- `approvals.mode` / `approval_mode`: /approvals' run_approval_mode_command for the profile.
- `display.message_reactions|in_app_tips|in_app_tours` and `voice.voice_chat_mode`: config.yaml
  leaves with main's validation (tui_gateway/server.py::_DISPLAY_TOGGLE_KEYS).

Ink drops its /reasoning (--global, display words) and `/voice tts` refusals: the first goes through
config.set reasoning, the second through slash.exec to the /voice handler (gateway state; recording
and playback stay in the terminal). Desktop's CANONICAL_CONFIG_KEYS opens those keys and the
`reasoning`/`yolo` scope. Contracts regenerated (CanonicalConfigSetParams.scope).

(cherry picked from commit 8f5fe27957d7636b5209692a2d57509381e0527e)
2026-10-13 02:43:13 -07:00
Teknium
d3cd685fb6 fix(gateway): per-session setting commands run their messaging handler for a local session
slash.exec admits /reasoning /voice /approvals /codex-runtime /footer /busy /verbose /yolo /fast
/personality and runs the same _handle_<name>_command a messaging chat runs. Only what made that
handler wrong for a LOCAL session changes (gateway/session_setting_commands.py finds its LiveSession):

- /reasoning <level>: the session override now reaches a local turn (current_reasoning_config honours
  it before the frozen policy), config.get reasoning and session.info; `--global` saves AND applies to
  this frozen session; show/hide sets the session's streamed reasoning; a session.mutate reasoning
  pick clears a typed override.
- /fast: the session's tier is read from its policy; `--global` applies to this session too.
- /busy: applied to the session (config.get busy) besides the saved default.
- /verbose: no messaging opt-in gate for a local session; cycles its own tool-progress mode
  (off/new/all/verbose, no messaging-only `log`).
- /footer: parsed its argument from a field MessageEvent does not have, so `status|on|off` toggled.

Proof: tests/gateway/test_session_setting_commands.py runs every handler on a real local session
against a loopback model, reads back through config.get and the next turn's request
(reasoning_effort high, then low after --global).

(cherry picked from commit 64e27e54954b5c5a80ca781d7fabcc7b8ea78df7)
2026-10-13 02:43:13 -07:00
Teknium
88056a7556 docs(gateway): parity table rows for the admitted authoring and goal-family commands
Regenerated by scripts/gen_gateway_command_parity.py: /plan /learn /init /initiate-setup /moa
/blueprint /egress /goal /subgoal /loop /heartbeat /review /refine /debug /curator /login are
``control`` on slash.exec, so the classic CLI, Ink and Desktop columns reach them. The stale
"/curator has no gateway handler" note is gone (``_handle_curator_command`` exists now).
2026-10-13 01:58:38 -07:00
Teknium
2efe028116 fix(tui,gateway): /status, /context and /cron read as main's TUI on the shared owner
A TUI session's slash.exec reached the messaging gateway's handlers:
/status printed "📊 **Hermes Gateway Status**" markdown, /context the
gateway's gauge instead of the category table, and /cron was refused
(FINDINGS rows 17 / 19 / 21).

For a session created with source 'tui' the owner now renders main's
TUI text itself (gateway/session_tui_reads.py), inside the owning
profile's scope and the session's workspace:
- /status: main's session.status lines (status_report.build_status_fields)
  from the stored row and the live agent;
- /context: main's _format_live_context_output, the conversation counts,
  then render_context_breakdown_lines(grid=False) off the live agent;
- bare /cron and /cron list [--all]: the classic CLI's text, now built by
  cron_overview_lines / cron_list_lines in cli_commands_mixin (the CLI
  prints the same lines). Every /cron write stays refused.
Other surfaces keep the gateway handlers. The parity table records the
TUI reads.

Live (tmux, fake provider): all three pages match MAIN line for line,
apart from the session id format.
2026-10-13 00:35:44 -07:00
Teknium
82b96df55c docs(gateway): regenerate the command parity table for the TUI lane's verbs
The Ink column was stale on the PR head: /agents, /bg, /btw, /fast,
/indicator, /personality and the other TUI picks now route through the
owner's delegation.pause, prompt.background/btw and config.set verbs.
Output of scripts/gen_gateway_command_parity.py; no code change.
2026-10-13 00:35:44 -07:00
unsupportedpastels
4ef87f4c4c fix(desktop): authorize native profile creation with a dedicated grant 2026-10-13 01:38:59 +00:00
Teknium
a51f98ebd4 Merge remote feat/unified-gateway-runtime (2171365a3f) into the banner push
unsupportedpastels pushed 2171365a3f (canonical picker keeps native legacy history)
while the banner merge was being verified; it merges without conflicts.
2026-10-12 18:08:34 -07:00
unsupportedpastels
2171365a3f fix(tui): retain native legacy history in canonical session picker 2026-10-13 00:53:30 +00:00
Teknium
a89f374d7c Merge origin/main (#45: 255 commits to 3b63f7b0a4) into feat/unified-gateway-runtime
Conflicts (2 files, 1 hunk each); every main-side change is kept, ported to
where the branch moved the code:

hermes_cli/kanban_db.py (build_worker_context helpers _ctx_cap .. _ctx_comments)
  main:   f5a6651231c/d56e357556f coerce foreign/text timestamps on read; in
          _ctx_role_history the "Recent work" stamp became
          _ctx_stamp(_to_epoch(row['ended_at']) or 0, now) instead of int().
  branch: moved the whole _ctx_* helper block into hermes_cli/kanban_db_context.py
          (kanban_db.py imports it back), deleting it from kanban_db.py.
  merged: kept the branch's deletion in kanban_db.py and applied main's change in
          kanban_db_context.py::_ctx_role_history as
          _ctx_stamp(_kb._to_epoch(row['ended_at']) or 0, now). Main's other
          timestamp coercions in kanban_db.py (Task/Run/Comment/Attachment/Event
          from_row, _TASK_EPOCH_COLUMNS, release_stale_claims,
          _extend_live_stale_claim, task_age) auto-merged unchanged.

hermes_cli/web_server.py (_lifespan)
  main:   d7830c6f42 reworded one comment in the free-tier bootstrap block
          ("the ONE place its identity is created" -> "the one boot-time creator
          of its identity"; guests are now also created on first connector use).
  branch: moved _lifespan's body into hermes_cli/web_server_app.py::app_lifespan.
  merged: kept the branch's relocation and applied main's comment rewording in
          web_server_app.py.

Merge-induced health fix (no conflict marker; the combination tripped the ratchet):
apps/desktop/src/app/session/hooks/use-cwd-actions.ts::changeSessionCwd
  main:   63ed3caa4ba/dbc538547fc grew the function (statusbar cwd change for the
          focused chat / tile runtime ids) to CC 20.
  branch: added the session_busy refusal mapping (sidebar.projects.moveBusy) in
          its catch, +1 branch -> CC 21 > target 20 (scripts/check health blocking).
  merged: both behaviours kept; the busy-error mapping moved verbatim into a
          module-level cwdChangeError(err) helper. Health back to 0 blocking.

Check: every line main added between 1fd1827726 and 3b63f7b0a4 (317 files) is
present in the merged tree.
2026-10-12 16:55:20 -07:00
Teknium
562fda904c fix(pm): plugins may move transitive core packages again (revert #137110 overreach)
#137110 pinned every core-locked package to its exact locked version in
the generated plugin workspace (`_trust_core_lock`). That overrode PM's
deliberate rule that a plugin may move a transitive core package within
core's declared ranges (only core's exact pins are fixed), and #137110
rewrote PM's test for that rule to assert the opposite. Five catalog
plugins stopped installing: cognee, loreconvo, mnemosyne, omnivoice and
radio-dm-gateway.

Remove `_trust_core_lock` and restore
tests/pm/test_workspace_build_inputs.py byte-for-byte from before #137110.
What #137110/#137159 got right stays: generated workspaces carry no
release-age cutoff, so users' machines never check upload dates and
mirrors without them keep working; the 3-day check still runs at
`hermes pm lock` and in CI.
2026-10-12 16:26:19 -07:00
Teknium
cdf5732af6 refactor: move Langfuse out of core into the langfuse catalog plugin
The bundled observability/langfuse plugin now ships as the official catalog plugin `langfuse`
(NousResearch/hermes-official-plugins, subdir langfuse) with the same hooks, HERMES_LANGFUSE_* /
LANGFUSE_* env vars and capture modes. Same pattern as the Home Assistant and Spotify moves: a
LEFT_CORE row installs and enables the plugin on `hermes update` / first start for every profile
home that had observability/langfuse (or its bare name) in plugins.enabled and not in
plugins.disabled. Keys alone are not use: the plugin was opt-in.

- left_core_migration: langfuse row + langfuse_in_use; HERMES_LANGFUSE_SECRET_KEY stays a stripped
  child-process secret and the public key / base URL stay private env, exactly as core stripped them
  while it shipped the plugin. New plugin_key field: `hermes plugins enable observability/langfuse`
  (what every pre-move doc said) now names `hermes plugins install langfuse` for this home.
- Core drops the plugin, the `hermes tools` Langfuse category and its post-setup hook (the plugin
  prompts for its keys at install), the OPTIONAL_ENV_VARS / _EXTRA_ENV_KEYS rows, the `langfuse`
  extra + its PM anchor (uv.lock regenerated with CI's uv 0.12.13), and the
  plugin's tests (they moved to the plugin repo).
- Docs (en + zh-Hans): built-in plugins and env-var reference point at the catalog plugin.
2026-10-12 14:00:32 -07:00
Teknium
0290081fa4 docs(plugins): catalog rule 9 notes validate warns on private core imports 2026-10-12 13:11:28 -07:00