Commit Graph

2965 Commits

Author SHA1 Message Date
Teknium
f41ac07695 fix(slack): early auth reject checks the session thread's routed profile
_early_reject_unauthorized dropped the decoded thread_id, so a thread-scoped
profile_routes entry checked the default profile's pairing store: a caller
approved only in the routed profile had slash commands (even /stop) and
messages in that thread dropped. Pass thread_id from both the slash and the
message path to _is_sender_authorized and the build_source fallback.
2026-10-16 14:22:13 -07:00
Teknium
0815b4ed4a fix(slack): concurrent slash commands of one session reach the gateway in arrival order
Names resolved for a slash turn are awaited before the handoff and Bolt runs
callbacks concurrently, so a /queue whose cold users.info answered late
reached the gateway FIFO after a later one. A slash now reserves its
session's slot before any lookup and hands over only after the slash ahead
returned from handle_message; a slash cancelled while waiting still chains
the one behind it. /stop, /approve, /deny, /pause take no slot.

Ported from #128722 (9b719083, eb546b6a) into adapter_slash_lane.py.

Co-authored-by: John Paul Soliva <soliva.johnpaul@icloud.com>
2026-10-16 14:22:13 -07:00
Teknium
a7010c4913 refactor(slack): slash payload decoding lives in adapter_slash_payload
Move the two pure slash-payload helpers (gateway text, thread anchor) out of
the adapter facade so the slash-turn parity fix keeps adapter.py under its
health cap. No behaviour change.
2026-10-16 14:22:13 -07:00
Teknium
e817ac8c8e fix(slack): /pause is handed over before any Slack lookup
/pause engages the emergency stop and starts no turn, like /stop and /approve,
so a cold users.info must not hold it back. Ported from 9b719083 in #128722
(its arrival-order handoff lane is left out).

Co-authored-by: John Paul Soliva <soliva.johnpaul@icloud.com>
2026-10-16 14:22:13 -07:00
John Paul Soliva
d2ac28c77d fix(slack): a slash command that stops or unblocks the running turn waits for no Slack lookup
The names the slash path resolves (users.info, conversations.info) were awaited
before the event reached the active-session dispatcher. With a shared channel
session, a second operator's /stop sat behind their uncached users.info while
the first operator's worker kept running.

/stop, /new, /reset (the interrupt-then-dispatch commands) and /approve, /deny
start no turn of their own, so they are handed over before any lookup. Commands
that do start a turn (/queue, /retry, /goal, ...) and free-form questions keep
the names and the channel prompt.
2026-10-16 14:22:13 -07:00
John Paul Soliva
bda86e96f6 fix(slack): a rejected slash-command sender costs no Slack lookup
The message path rejects an unauthorized sender before any lookup (5bb933eedf); the slash path now resolves the channel and user name, so a sender the gateway was going to reject cost a conversations.info and a users.info first. Ask the same early gate before resolving. In a channel the runner only drops such a sender, so stop there. In a DM it answers per unauthorized_dm_behavior (pairing code or decline), so the event still reaches it, without names, exactly as before this branch.

Docs: N/A, slack.md already says an unauthorized DM gets the pairing prompt.
2026-10-16 14:22:13 -07:00
John Paul Soliva
c1c2bab742 fix(slack): load channel skill bindings on slash-command turns
`/hermes <question>` can open a new session, and bound skills load only
when a session starts. The slash event carried no auto_skill, so a session
opened that way never loaded the channel's slack.channel_skill_bindings,
unlike one opened by an ordinary message. Resolve it the same way the
message path does.
2026-10-16 14:22:13 -07:00
John Paul Soliva
1424ffa429 fix(slack): carry channel prompt and source names on slash-command turns
_handle_slash_command built its MessageEvent without channel_prompt and its
source without chat_name/user_name, unlike the message path. A /hermes turn
ran without the configured channel_prompts and the bot identity line, and as
a human turn it re-pinned channel_pin to None and re-keyed the pinned
session-context prompt; the next ordinary message flipped both back, so every
slash turn cost two agent rebuilds and two prompt-cache misses. Synthetic
events copied from it (/retry, /queue, /steer fallback, /goal kickoff)
inherited the gap.

Resolve the names and the channel prompt with the same helpers the message
path uses.
2026-10-16 14:22:13 -07:00
Maciej Lisiewski
428f2e0202 fix(deps): bump @grpc/grpc-js 1.14.4 → 1.14.6 in photon sidecar (high, GHSA-482/481)
Latest 1.14.x release older than 3 days; clears the 1.14.5 floor.
2026-10-16 17:26:41 +02:00
Maciej Lisiewski
4bcf60191a fix(deps): bump undici 7.29.0 → 7.30.0 in photon sidecar (high, GHSA undici alerts)
7.30.1 is < 3 days old, so pin the override at 7.30.0 — the latest
release older than 3 days that clears the 7.29.1 floor.
2026-10-16 17:26:35 +02:00
Teknium
42762d6a64 refactor(signal): plugin wiring lives in register.py, like QQ Bot and Yuanbao
The registration hooks had grown the moved adapter past 1,000 lines and put
two forward-only wrappers next to the message code. register.py now holds
the configured/validate checks and register(), and registers the setup and
standalone-sender functions directly. adapter.py is back to 983 lines; no
behaviour change (composite live probe matches main).

Addresses the Greptile finding on this PR.
2026-10-16 07:09:45 -07:00
Teknium
0496f7e420 fix(signal): register under the canonical module name (one SignalAdapter class)
The loader executes the package as hermes_plugins.platforms__signal, and
`from .adapter import register` gave the registry that synthetic copy of the
adapter, while the adapter's own absolute sibling imports loaded a second
plugins.platforms.signal.adapter. The rate-limit scheduler stayed one object,
but SignalAdapter existed twice, so isinstance checks and monkeypatches on the
canonical path missed the live adapter, and every start imported it twice.
Register by the absolute name, as Yuanbao already does; a test pins both.

Also fix the namespace named in Yuanbao's __init__ comment.

Found by the independent review of this branch.
2026-10-16 07:09:45 -07:00
Teknium
38b5383270 chore(platforms): clear the code-health ratchet on the moved adapters
The six adapters now live at new paths, so the ratchet reads their moved
functions as new code held to today's targets:

- Standalone senders (bluebubbles, qqbot, weixin, yuanbao) are real
  catch-all boundaries that turn any failure into an error result; they now
  log the traceback at debug (behaviour unchanged).
- The Signal and Weixin setup wizards' catch-alls get reviewed waivers: any
  probe/QR failure is shown to the user, who decides.
- QQ Bot's media existence check runs off the event loop (ASYNC240).
- Yuanbao's registration block moves to plugins/platforms/yuanbao/register.py
  so adapter.py stays at main's size cap; it imports the adapter by its
  canonical name, keeping one YuanbaoAdapter class object.
2026-10-16 07:09:45 -07:00
Teknium
bdda3763cd fix(signal, weixin): setup menu reads .env-only credentials like the old core rows
The composite live pass showed `hermes gateway setup` listing Signal and Weixin as
"not configured" for a profile whose credentials live only in .env, while main shows
"configured". The old static wizard rows read get_env_value (.env-backed); the plugin
is_connected checks read only config + the scoped environment, which a plain CLI
process never fills from .env. QQ Bot already had this fallback.

Both now fall back to env_is_connected over the same credential pair. A test pins the
.env-only status for all six moved platforms (red for signal and weixin before this).
2026-10-16 07:09:45 -07: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
337ac57c6e refactor(yuanbao): plugin manifest, register() and import paths
(cherry picked from commit a576e12ba5dfb9d3e116137ad39963723628e3b4)
2026-10-16 07:09:45 -07:00
Teknium
346396c483 refactor(yuanbao): move adapter files into plugins/platforms/yuanbao
(cherry picked from commit 204bed25e4f78a107296f9d9d6c64af80da2177c)
2026-10-16 07:09:45 -07:00
Teknium
7ada20f7ad fix(qqbot): setup status reads .env like the old core wizard row
is_connected now falls back to env_is_connected(QQ_APP_ID, QQ_CLIENT_SECRET)
(.env-backed, scope-aware), so 'hermes gateway setup' shows QQ Bot as
configured for a .env-only profile, matching base.

(cherry picked from commit 19968fb98a96a99e59212fea7cf3129c81c5b7df)
2026-10-16 07:09:45 -07:00
Teknium
9189f6c69b fix(qqbot): keep the plugin a pure move
- plugin.yaml name qqbot-platform (bundled-plugin convention)
- drop env_enablement/apply_yaml_config hooks and platform_hint: core
  config_env _ENV_STEPS and PLATFORM_HINTS still own them, the hooks were
  new behaviour (markdown/env seeding) the move must not add
- drop validate_config/max_message_length: base never config-gated or
  chunked QQ in send_message (REST sender truncates at 4000)
- install_hint carries the old _BUILTIN_ADAPTERS warning text
- drop the _send_qqbot compat alias
- replace env-seeding tests with a registration-shape test

(cherry picked from commit b34a6d21e42d934555a2e6243c9a126dc0d5de42)
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
aa97f31477 refactor(bluebubbles): move adapter into bundled platform plugin
gateway/platforms/bluebubbles.py -> plugins/platforms/bluebubbles/adapter.py (git mv) plus
plugin.yaml/__init__.py and register(ctx): adapter_factory, check_fn (+ the old
_BUILTIN_ADAPTERS warning as install_hint), is_connected, required_env, setup_fn (the
former hermes_cli/setup_platforms._setup_bluebubbles), standalone_sender_fn (the former
tools/send_message_senders._send_bluebubbles), allowed_users/allow_all/cron env vars,
pii_safe, allow_update_command, emoji. Tests follow the new module path.

(cherry picked from commit 870d4a169e4f89cbb2689ccd1db555ad15cea216)
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
helix4u
39de69b19c fix(irc): give each inbound line a unique message identity 2026-10-16 02:27:48 -07:00
unsupportedpastels
4e59ac2b88 test(discord): pin when a role removed from YAML stops re-authorizing
Re-authorization re-reads config through load_gateway_config(), whose
Discord hook copies YAML allowed_roles into DISCORD_ALLOWED_ROLES (first
writer wins) outside multiplex, and env keeps precedence in _gate_raw.
So a role removed from YAML is revoked at once only for a multiplexed
profile (the copy is skipped); on a single-profile install it stays
granted until restart, as for ingress and as on main.

The revocation test passed only because its fixture deleted that env
var. Replace it with a parametrized test through the real loader: two
re-authorizations around a YAML edit, multiplexed (revoked) and single
profile (still granted, env holds the copy). Correct the comments that
implied immediate revocation. No behaviour change.

Refs #134889 (MSG-7)
Refs #139162
Refs #139148
2026-10-15 23:59:47 -04:00
unsupportedpastels
68b3b6af2e fix(discord): re-authorize durable role grants through the ingress gate resolver
The durable re-authorization read DISCORD_ALLOWED_ROLES from the scoped
env or the raw top-level `discord:` block only, so a profile that sets
its role allowlist under `platforms.discord` (flat or `extra`) admitted a
role-authorized member at ingress and then dropped the message with
permission_denied.

Recovery now resolves the gate with the same `_gate_raw` ingress uses,
applied to the Discord PlatformConfig that `load_gateway_config()` builds
for the transport profile at check time: scoped env first, then `extra`
with the loader's precedence (`platforms.discord.extra` over the flat
key and the top-level block). Reading current config instead of the
connect-time `self.config` keeps a config revocation effective.

Refs #134889 (MSG-7)
Refs #139162
Fixes #139148

Co-authored-by: 686f6c61 <6115107+686f6c61@users.noreply.github.com>
2026-10-15 23:59:47 -04:00
Ben Barclay
acc3cada0d fix(solstice): offer Gemini 4 Argon
gemini-4-argon is served on the per-user-quota endpoint (a bogus slug 404s; argon answers 429 quota on an account without headroom). Listed after 3.1 Pro so the default model and wire are unchanged.
2026-10-16 00:07:17 +02:00
Maciej Lisiewski
f732746bb4 Merge pull request #139222 from NousResearch/race-fixes-pt1
fix: 27 race / coarse-timestamp / lost-update bugs
2026-10-16 00:03:59 +02:00
Maciej Lisiewski
60f56a6b13 Merge pull request #139388 from NousResearch/fix-preexisting-test-failures
fix: 14 tests failing on main outside CI
2026-10-15 22:53:44 +02:00
Maximilian Kindshofer
825fdb7984 fix(mattermost): pass empty media lists so text posts pass native admission
The Mattermost adapter built inbound events with `media_urls or None` /
`media_types or None`, so every post without an attachment carried None.
Native admission (`_validate_native` in gateway/session_envelope.py)
requires both fields to be lists, as MessageEvent declares them, and
refused every plain text post with `invalid_params`. Commands bypass
admission, so /reset still worked while normal messages failed.

Pass the lists `_download_attachments` already returns. Mattermost was the
only adapter with this pattern.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
(cherry picked from commit c0f32ce5a5c0d633bf4e73a0581ad18b07ee4171)
2026-10-15 16:33:59 -04:00
Maciej Lisiewski
d5442d0a47 fix(google_meet): say-queue appends survive the speaker's rewrite
The bot's speaker re-reads say_queue.jsonl after speaking and rewrites it
without the spoken head; a meet_say append from the agent process landing
between the re-read and the rewrite was truncated away, so a request
reported as enqueued was never spoken. Appenders and the speaker's
re-read+rewrite now share a cross-process lock beside the queue file.
2026-10-15 22:12:28 +02:00
Maciej Lisiewski
c404c1ab50 fix(web): Parallel without a key reports the key, not the SDK install
_client ran pm.ensure_import("parallel-web") before cached_sdk_client
checked PARALLEL_API_KEY, so with no key and the SDK not installed (lazy
installs disabled) the search failed with "Parallel SDK not installed"
instead of the missing-key error. cached_sdk_client already resolves the
key first and then ensures the extra; drop the duplicate pre-check.
Fixes test_keyless_disabled_falls_through_to_key_error and
test_tier_paid_forces_keyed_without_key.
2026-10-15 21:16:40 +02: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
Teknium
7e85c68a0d feat(gemini): Gemini 4 Argon support with long decode
Adds gemini-4-argon to the Gemini, Vertex and OpenRouter/Nous catalogs and makes the
native Gemini client handle Google's long decode (up to 1M output tokens).

- Reasoning effort maps onto Gemini 4's thinkingLevel (low/medium/high). Argon always
  thinks, rejects "minimal" and rejects thinkingBudget alongside a level (400s, live):
  none -> low with thoughts hidden, minimal -> low, xhigh/max -> high.
- Effort above high buys a long-decode budget on the native endpoints only:
  xhigh -> 262,144 output tokens, max/ultra -> 1,048,576 (the API caps it at the
  window minus the input).
- generateContent (unary and streaming) follows finishReason CONTINUATION: the same
  request is resent with the continuationToken, hops are joined into one turn, one
  final finish chunk is emitted. Without this, a non-streaming Argon call that hit the
  32,768-token per-request cap came back truncated and reported as finish=stop.
- Usage is summed over hops for cost (matches google-genai and billing), while the
  first hop's prompt (initial_prompt_tokens) feeds compaction and the context meter,
  so a long-decode turn does not trigger an early compaction.
- Vertex express keys can reach global-only models: a project-scoped
  .../projects/<p>/locations/global base is now native (only .../endpoints/openapi
  stays OpenAI-compatible).
- 20 min read timeout on the native client and a 600 s stale floor for gemini-4,
  per Google's long-decode guidance.
- Pricing at the introductory $2 / $10 / $0.10 rates.
2026-10-13 12:04:33 -07:00
Teknium
954839a327 Merge origin/main (#46: 38 commits to 63d0b94120) into feat/unified-gateway-runtime
Previous merge base 3b63f7b0a4. Seven conflicts, all Desktop; each keeps
both sides' behaviour.

apps/desktop/src/app/chat/composer/hooks/use-composer-submit.ts
  main:    composer text answers ANY parked card through the new
           store/parked-card-answers registry (answerParkedCard), so
           answerSetupCard is no longer imported here.
  branch:  added `import type { BusyInputMode }` for the configured
           busy-input mode.
  merged:  both imports kept; answerSetupCard dropped (main's registry
           reaches it via clarify.ts answerClarifyText).

apps/desktop/src/app/chat/composer/hooks/use-composer-submit.test.tsx
  main:    "answers one question per submit while a busy turn waits"
           now expects clarify.lock (no steer) and adds "brings the card
           back when an earlier lock fails after the last answer cleared it".
  branch:  the old body of that test with onSteer(..., 'interrupt').
  merged:  main's body (main changed the contract: typed text is the
           answer, not a steer); the branch's busyInputMode harness and
           every other 'interrupt' assertion stay.

apps/desktop/src/app/session/hooks/use-message-stream/gateway-event/input-requests.ts
  main:    connectionRequestNoticeBody() (display card with no targets
           falls back to connectors.title) + ConnectionRequest type import.
  branch:  handlePromptSettledEvent() for approval/clarify.settled.
  merged:  both functions, adjacent.

apps/desktop/src/app/session/hooks/use-session-actions/index.ts
  main:    moved desktopSessionCreateParams verbatim into
           session-create-request.ts and imports it from there.
  branch:  added the resume-owner import block.
  merged:  resume-owner imports + `{ createGatewaySession,
           desktopSessionCreateParams }` from session-create-request
           (the branch's copy of the function was byte-identical to the
           base and is removed by main's hunk).

apps/desktop/src/components/assistant-ui/clarify/pending.tsx
  main:    seenLocks state so a newly locked answer (composer text)
           replaces the staged pick while a seen one leaves card edits.
  branch:  per-requestId card reset (submit latch + staged picks) when
           the canonical gateway reuses the row for the next card.
  merged:  both; the card reset also clears seenLocks so the next
           card's locks are treated as new.

apps/desktop/src/i18n/ja.ts, apps/desktop/src/i18n/ru.ts
  main:    jaConnectors / ruConnectors split files.
  branch:  jaBoot / ruBoot split files.
  merged:  union of imports (key spreads auto-merged).

Lost-line check: every non-blank line main added since 3b63f7b0a4
(79 files) is present in the merged tree.
2026-10-12 21:34:28 -07:00
Ben Barclay
1883e6c742 Revert "fix(solstice): use the gemini-3.1-pro-preview model ID"
gemini-3.1-pro is the correct slug; the 404 seen in testing came from an account
without Pro access.
2026-10-12 20:00:01 -07:00
Ben Barclay
e5723d4dc9 fix(solstice): use the gemini-3.1-pro-preview model ID
The per-user-quota endpoint answers 404 NOT_FOUND for gemini-3.1-pro; the
preview ID resolves.
2026-10-12 20:00:01 -07:00
Ben Barclay
b605c79ab2 fix(solstice): offer Gemini 3.1 Pro, 3.8 Flash and 3.5 Flash Lite
The per-user-quota endpoint exposes no model listing to user tokens, so the
picker shows the hardcoded fallback list. Replace the older flash aliases with
the current models; lite stays last as the quota reserve.
2026-10-12 20:00:01 -07: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
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
thewhitemage.
3278fbd281 feat(plugins): submit Tameru 1.4.1 through the plugin catalogue
Replace the in-tree vendor copy with a community catalogue entry pinned
to the tested standalone source at 9a3642f. Keep contributor attribution.
The entry discloses host compatibility and recovery requirements.
Verified: all 12 repository checks pass; catalogue schema valid; pinned
plugin admission checks safe; standalone real-Hermes suite 1386 passed.
2026-10-12 03:45:30 -07:00
thewhitemage.
475e0d0120 fix(context): sync Tameru 1.4.1 and preserve Hermes call contracts
Forward compressor kwargs including bypass_cooldown; derive multimodal
user queries from text parts. Stamp both manifests and add discovery-path
regressions, proven red on the old adapter. Verified: 322 Hermes tests
passed; Ruff, compilation and vendor drift checks pass.
2026-10-12 03:45:30 -07:00
Benjamin Ang
eb65981990 style(plugins): sync vendored tameru ruff-clean under ruff.toml (engine b2b1b19)
Upstream tameru-compaction-system b2b1b19: behaviour-neutral lint fixes
(FURB167, FURB188, SIM114, UP031, RUF046, RUF022, UP037, RUF100) so the
vendored package passes this repo's blocking `ruff check .` (ruff 0.15.10).
Synced via scripts/sync_to_harness.py (byte-identical, --check in sync).
2026-10-12 03:45:30 -07:00
Benjamin Ang
5752d16a7d feat(plugins): sync vendored tameru to 1.4.0 + 1.4.1 candidate fixes
Upstream tameru-compaction-system branch tameru-1.4.1 (engine source at
91f00e0):

- agent tool output: numbered reads (cat -n, read_file), unified diffs,
  grep/rg output and pytest/jest/go/cargo test output are recognised;
  log ERROR/FAIL exemplars survive; a 650 KB log takes under a second
- lossless folding (ANSI, redraws, identical-line runs, pretty JSON)
  and JSON array briefs
- plugin-facing helpers: gap_marker, recursion_markers, content_hint,
  error_fingerprints, brief_context, contains_secret, tool-payload
  envelope helpers, ENGINE_VERSION
- 1.4.1 candidate: pytest captured-log sections collapsed around the
  failure, saturated rg keeps definition lines, CLI flags are not query
  selectors, opt-in inline_short_gaps, secrets screen without code
  false positives

Synced via scripts/sync_to_harness.py (byte-identical to upstream);
plugin.yaml stamped 1.4.0, extractive alias stamped via --stamp-only.
The context-engine glue is unchanged apart from its docstring.
2026-10-12 03:45:30 -07:00
Benjamin Ang
ec321d8fff feat(plugins): vendored tameru gains ceiling + derived objective
Upstream ba8b995: inspect_compressibility reports guaranteed_savings_pct
and ceiling_class; compress_context gains derive_query — a conservative
deterministic task descriptor for empty/generic queries, marked in the
receipt via query_source/derived_terms with a medium risk floor.

Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-10-12 03:45:30 -07:00
Benjamin Ang
649b0fa698 feat(plugins): sync vendored tameru to 1.3.0
Upstream tameru-compaction-system 1.3.0:

- dependency closure: dropped blocks sharing a rare term with a kept
  block AND carrying a qualifier (except/unless/only/until/if...) or
  definition cue are restored — cutting them would invert the kept
  block's meaning. Budget-bound in fixed mode; trust-risk and
  frozen-drop blocks are never resurrected.
- qualifier-aware structured trim refusal: long JSON string values whose
  cut tail carries a qualifier cue are kept whole.
- transcript.timing_gate (on by default): suppresses pruning while tool
  calls are pending (mid-derivation) and on stuck loops (3 identical
  assistant calls — diagnose, don't erase evidence).
- compress_context accepts an iterable query (plan-aware union scoring).

Synced via scripts/sync_to_harness.py; plugin.yaml stamped 1.3.0
(extractive alias stamped via --stamp-only, glue unchanged).

Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-10-12 03:45:30 -07:00
Benjamin Ang
6931094fd8 refactor(context): vendor generic transcript adapter (Tameru 1.2.1)
Synced via scripts/sync_to_harness.py from upstream 1b54ec6. The adapter
formerly named hermes_extractive_engine is now tameru.transcript — the
code was always harness-agnostic (OpenAI-style role/content dicts);
hermes_extractive_engine remains as a compat shim so existing imports
keep working.
2026-10-12 03:45:30 -07:00
Benjamin Ang
8cd0a0bb55 feat(context): sync vendored Tameru to 1.2.1 hardened engine
Syncs plugins/context_engine/tameru/compress_context.py with
0xWhiteMage/tameru-compaction-system@1b4f8bb. New deterministic
capabilities available to the engine:

- pin_recent positional pinning, min_savings_ratio savings floor,
  degraded_view bounded scoring on size-limit breaches
- secrets screen before CCR archival (complements ccr=False here)
- recursion guard refuses to recompact Tameru output markers
- fixed-mode budgeting exempts pinned blocks from the ratio base
- list_ccr + paginated retrieve for CCR recall
- receipts report the deciding selection path
- strategy="auto": extract-first ladder, escalate to summarise on
  fail-open

Upstream: https://github.com/0xWhiteMage/tameru-compaction-system
2026-10-12 03:45:30 -07:00
0xWhiteMage
106d5c45bd feat(context): industrialize Tameru plugin v1.2.0 2026-10-12 03:45:30 -07:00