Model-facing text, startup tips (all 17 locales; the tips probe needs contiguous keys, so the
five stale tips are rewritten to live browser.* features), .env.example, developer-guide file
maps and the provider parity script still named browser_navigate/vision/console, record_sessions,
agent-browser/AGENT_BROWSER_* and the deleted browser_tool* modules.
browser_exec is the only core browser tool (plus browser_cdp, browser_dialog,
browser_vault, all CDP). Deleted: browser_navigate/snapshot/click/type/
scroll/back/press/get_images/vision/console and every module that served
them (browser_tool_session/_lifecycle/_cloud/_cdp/_real_profile/
_lightpanda_fallback/_eval_policy/_origin/_snapshot/_vision) plus
browser_camofox*.py (Camofox ships as the catalog plugin 'camofox').
tools/browser_tool.py and tools/browser_tool_install.py shrink to the
frozen old-updater stub warm_agent_browser_npx_cache.
toolsets: _HERMES_CORE_TOOLS / browser toolset list only the CDP tools.
model_tools: browser_tools legacy alias and the browser_navigate /
browser_type schema rewriters removed. Cloud providers no longer request an
install post_setup hook (nothing to install).
Move today's delegation routing (every child follows the delegation section,
else the parent's route) out of core into plugins/delegation/default, a bundled
kind: backend plugin that registers through ctx.register_delegation_provider
like any other strategy. Core keeps only the name 'default' as the fallback
selection; no built-in provider class and no reserved name remain.
The registry loads a bundled strategy on first use when the plugin sweep never
registered it (runtimes that pinned discovery with zero plugins), so
delegate_task never depends on the sweep; plugins.disabled still wins and a
disabled default is a clear refusal. Config names are validated before they
become a path.
Resolves the desktop i18n conflicts: main moved en/ru errorCodes into
en_error_codes.ts / ru_error_codes.ts, so usage_window moves there; ar/ja/zh/
zh-hant keep both usage_window and main's workspace_unavailable. _keys.desktop.json
regenerated.
The Singularity/Apptainer backend (tools/environments/singularity.py) now ships
as the official 'singularity' plugin in NousResearch/hermes-official-plugins,
registered through the terminal-environment provider seam under the same
backend name and config keys (terminal.backend: singularity,
terminal.singularity_image / TERMINAL_SINGULARITY_IMAGE, terminal.container_*).
- 'singularity' leaves BUILTIN_BACKEND_NAMES so the plugin can register it;
every hardcoded classification set drops it (the provider declares
is_remote/is_container/supports_streams instead).
- LEFT_CORE gains a singularity row: homes whose terminal.backend (or .env
TERMINAL_ENV) is singularity get the catalog plugin once, on hermes update
or agent/gateway start. An unknown-backend error for 'singularity' names
the install command (new row field terminal_backend).
- A plugin backend receives its per-task '<backend>_image' override; batch
runs register one for the active backend.
- BaseEnvironment's sudo-probe knob is renamed _passwordless_sudo_probe_supported:
plugin backends set it, and the old spelling trips the install scanner.
- Core's scratch-dir disk warning and process-exit sweep were Singularity-only
and move to the plugin; the singularity setup row, dashboard probe/row and
config defaults/bridges go too. Docs point at the plugin.
`hermes mcp serve` (mcp_serve.py) moves to the official mcp-serve plugin in
hermes-official-plugins, which registers `hermes mcp-serve` and also carries
the `--tools` mode from #83364.
- delete mcp_serve.py and tests/test_mcp_serve.py (the suite moved with it)
- drop the serve subparser, its dispatcher branch, the mcp agent-subcommand
row and the inline MCP discovery path only `mcp serve` reached
- LEFT_CORE row (command + old_command): `hermes mcp serve` and a bare
`hermes mcp-serve` without the plugin print the new spelling and the
install line on stderr. MCP clients live outside Hermes, so no home shows
the feature in use and nothing installs automatically.
- docs, locale tips and the bundled cli-reference point at the plugin
agent/transports/hermes_tools_mcp_server.py stays: the codex_app_server
runtime launches it as its hermes-tools MCP server.
The tool gateway now tags execute results with dataUse.requires (no_training,
zero_retention). Hermes keeps that as `data_use` metadata on the tool message
(content unchanged; a batch carries the union), persists it inside the existing
display_metadata column (no migration; /branch, resume and compaction copies
keep it), and strips it from every provider request. The Nous profile reads the
union over the outgoing messages and sends provider.data_collection=deny (+ zdr
for zero_retention) on both the chat-completions and Anthropic Messages paths;
no other provider sees it. A 403 data_policy_denied classifies as its own
non-retryable reason with no fallback and copy that tells the user to switch
model, compress, or start a new session.
Direct dispatch passes image_gen.model to generate() explicitly, like the
managed path, so a KREA_IMAGE_MODEL override naming Krea 2 made the schema
hide Krea 3's thinking/resolution controls and describe edit inputs as style
references while Krea 3 ran.
Folds the two IPv6 server classes into one: every IPv6 host gets
AF_INET6, and V6ONLY=0 makes the :: wildcard answer IPv4 too.
A dual-stack socket reports an IPv4 peer as ::ffff:a.b.c.d, so the
shared-token / no-token identity became ip:::ffff:127.0.0.1 and an
A2A_TRUSTED_PEERS entry written as ip:127.0.0.1 no longer matched
(403 "peer not trusted"). _client_ip unmaps it. The test drives a
token-gated :: bind over both stacks plus an IPv4 tasks/list call
behind an IPv4 allow-list.
A2A_HOST=[::1] was not recognised as loopback (no-token runs fell back
to 127.0.0.1 with a misleading warning), failed to bind with a token, and
advertised http://[[::1]]:port/. Strip URL brackets when capturing the
host, and pin the Host-less advertised URL in the IPv6 test.
A2A_HOST=::1 is an accepted loopback bind, but ThreadingHTTPServer is
AF_INET only, so the listener failed with bind_failed. An IPv6 host now
uses the AF_INET6 server, and the Agent Card URL brackets the literal.
What this fixes: A2A_HOST=:: is the conventional IPv6 wildcard (one socket,
both stacks). stdlib ThreadingHTTPServer is AF_INET-pinned and cannot bind
:: at all (gaierror 11001 on Windows) - A2A stays down. The AF_INET pin is
the root cause.
Change: when host == ::, swap in an AF_INET6 + IPV6_V6ONLY=0 subclass; one
dual-stack socket, matching the aiohttp DM bind on 8642. Other hosts keep
the standard family. Failed binds stay loud via the existing bind_failed
fatal/retry path.
Test: regression test - with A2A_HOST=::, connect a live adapter, assert
dual-stack class + AF_INET6 + V6ONLY=0, GET the agent card over [::1] on
the bound port. Placed in TestBindSafety (default lane) because the repo
addopts -m "not integration and not live" deselect the integration class;
self-skips on hosts without IPv6. Verified against the upstream adapter
before the change: the same live bind fails (getaddrinfo EAFNOSUPPORT on
Linux; the same failure class as gaierror 11001 on Windows).
Related work: complements #126285 (IPv6 literal bind + bracketed agent
card URL) by making the A2A socket dual-stack (V6ONLY=0) so :: answers on
both stacks.
Base: 865ba906 (main).
The edit revision was edit_date, whole seconds, so a second edit of the
same message within that second reused the first edit's request id with
different text and still replied admission_conflict (#140845).
Key the edit on its update_id, which Telegram assigns once per edit and
keeps on redelivery; with no update id, edit_date plus a digest of the
edited text. A replayed edit still admits once.
The cursor write deferred behind a held busy burst re-read the live
channel state when it fired. By then the serial reader had already marked
the next event seen (and advanced last_ts) before its dispatch committed,
so a restart restored a cursor past an event with no admission row.
The write now carries the cursor snapshotted when it was scheduled, and a
write older than one already landed is skipped so the file never moves
back. The invariant test holds e2 inside _resolve_user_name while e1's
burst commits and asserts every saved cursor names only admitted events.
de526521ab left Buzz out of serial_receive_loop on purpose: Buzz saves its
channel cursor after _handle_events returns, and a serial reader returns while
the busy input is only held for the burst window, so the flag alone (#141389)
lets the saved cursor pass an input with no admission row. A restart inside
the hold window would then never replay it.
Keep the flag, and save the cursor only once every input the reader returned
on is committed (session_ingress_burst.when_returned_inputs_durable: held
bursts, burst commits and busy inputs released before their commit). Inline
when nothing is pending, so the idle path is unchanged; otherwise a tracked
task, so the reader still reads on.
The cursor-file helpers move to plugins/platforms/buzz/buzz_cursors.py
(BuzzCursorMixin) to keep adapter.py under the file-size ratchet.
Native admission keyed every message by its platform message_id. A Telegram
edit re-sends that same id with new text, so the ledger saw a changed replay
of the original send and refused it with admission_conflict, which reached the
user as "Sorry, I encountered an error (RuntimeStoreError)".
Edits stay turns, as they were before the unified runtime (pinned by
test_replay_is_admitted_once_before_dispatch[text-edit]). The adapter now stamps
MessageEvent.edit_revision from the edit's edit_date, it rides in the native
envelope, and _admit_native keys the edit as <message_id>:edit:<revision>. A
redelivered edit is still an exact replay of that edit; a second edit is its
own input.
Buzz was left out of the #140973 sweep that marked the other
await-per-event readers: both the WebSocket listener and the poll
sweep await _handle_events before reading the next batch, so a busy
split text or a photo burst commits each message as its own follow-up
turn and holds the account's single reader. Declare
serial_receive_loop and add the split-text regression beside the
Signal/IRC ones (#141378).
Message.date of an edit is the ORIGINAL send time, so an edit of a root-DM
message sent before the topic creation passed the send-time window (negative
gap) and was adopted into the new topic, consuming the record the real opener
needed. A message dated before the creation is now left alone and the record
stays for the opener.
Found by Greptile on #141751.
Live (real gateway + Telegram stand-in): edit an old lobby message right after
creating a topic, then send the opener. At 5e0eb93 the edit went to the new
topic; now the edit stays in the previous topic and the opener lands in the
new one. Slow-photo, split, interleaved-DM and late-lobby cases unchanged.
The 5 s follow window was read from time.monotonic() when each handler ran.
PerChatUpdateProcessor holds a chat's next update until the previous handler
returns, so a thread-less photo whose download (or STT, or a document's
caching) outlasted the window pushed the text sent right after it out of the
new topic, into the previous topic or the root DM.
The window now compares Telegram's Message.date stamps (set when the user
sent the message, untouched by queueing). A creation without a date is not
recorded. The local clock only bounds memory (records older than 600 s are
pruned; the oldest is evicted at the 256 cap).
Found by Greptile on #141751; root-caused and fixed in a proposed diff by
@PRELVAS94, adapted here.
Live (real gateway + Telegram stand-in, photo download held 7 s, text sent
right after): before, the text went to the old topic; after, both land in the
new topic. Split opener, interleaved DM and late-lobby cases unchanged.
Co-authored-by: PRELVAS94 <86016656+PRELVAS94@users.noreply.github.com>
The adoption of a client-created topic's thread-less opener required
message_id == creation + 1. Private-chat message ids come from ONE sequence
shared by every private chat of the bot account (bot replies included,
core.telegram.org/api/updates "Common message ID sequence"), so any message
in another DM, or a bot reply, between the creation and the opener broke
adjacency and the opener misrouted to the previous topic again. One-shot
adoption also split a long opener the client sends as several messages:
chunk 1 went to the new topic, chunk 2 back to the old one.
Now a thread-less message from the creator adopts the new topic while it
arrives within 5 s of the creation or of the previous adopted message; a
stamped message or a longer gap ends the follow. Per-chat FIFO update
processing (PerChatUpdateProcessor) means nothing from this chat lands in
between, so adjacency bought no safety.
Also drops the duplicated identity helpers the mixin redefined from the
adapter and restores the unrelated _cache_dm_topic_from_message move.
Live (real gateway + Telegram stand-in, DM topic mode, production batching):
main misroutes all four cases; the pairing as proposed misroutes the
interleaved-DM and split-opener cases; this lands every case in the new topic,
and a lobby message 7 s later still recovers to the bound topic.
The forum_topic_created handler cached the user-chosen topic name (e.g.
"New Chat") in _dm_topics. _get_dm_topic_info treats any _dm_topics hit
as an operator-declared topic, so _rename_telegram_topic_for_session_title
silently skipped every dynamically created topic and session-title
auto-rename stopped working.
Keep only the pending-creation record (opener adoption is unchanged) and
leave _dm_topics to operator config. Topics declared in extra.dm_topics
stay protected from auto-rename.
Tests: real PTB creation -> thread-less opener -> runner rename path
renames once; a config-fixed topic is not renamed; a creation stays
pending without populating _dm_topics. The opener test that pinned the
cache side effect now asserts its absence.
Builds on the salvaged #137348 commits above. The pairing store accepted
any private-chat forum_topic_created service message and kept records
whose opener arrived already threaded until the TTL ran out.
- Record a creation (and cache its topic name) only when the service
Message carries message_thread_id, has a non-bot sender, and passes
the existing intake prefilter _is_user_authorized_from_message, so a
rejected user cannot populate adapter state.
- Cap the store at _NEW_TOPIC_OPENER_MAX_PENDING (256), evicting the
oldest stamp after the TTL prune.
- The first later message from the same chat and sender consumes the
record whether it is adopted, already threaded, non-adjacent or
expired; adoption still requires a thread-less, adjacent, fresh
opener. Other chats and senders neither adopt nor consume it.
Tests: adds real PTB Update.de_json -> connect() -> process_update
cases for unauthorized, bot, missing thread/sender, healthy consume,
non-adjacent consume, other chat/sender, expiry and the cap. Phase 1
of test_pending_created_topics_stays_bounded now expects the five
healthy records to be consumed (it previously pinned the leak), and an
unused unpacked `delivered` is renamed to satisfy RUF059.
Adapted from a local field-tested patch; the PTB service+opener
pairing design is from #137348 (PRELVAS94), and reading the topic id
from Message.message_thread_id rather than ForumTopicCreated follows
e756b3b in #136581 (liuhao1024).
The _pending_created_topics map grows unboundedly: records whose opener
arrives already threaded (the healthy path) return early before any pop,
and records that simply never get claimed are never revisited. Prune
expired records at record time inside _pending_created_topics_store.
Adds a regression test that demonstrates the leak (10 distinct keys all
survive), the prune (negative TTL evicts all), and the routing contract
(fresh record still claims its opener).
Also cleans stale update receipts in the test's connected() fixture so
the admission controller doesn't drop updates across test runs.
Telegram normally stamps a new private-chat topic's opening message with the new
message_thread_id, but it sometimes delivers that opener with no thread id at all.
A forum_topic_created service message carries no text, so no core handler matched it and
the new topic id was never learned: the opener arrived lobby-shaped and gateway topic
recovery (gateway/run_topics.py) pinned it to the most recently bound topic, leaving the
new topic with no session, binding or auto-rename.
- telegram_topic_routing.py: narrow handler for filters.StatusUpdate.FORUM_TOPIC_CREATED
records (chat_id, sender_id) -> (new thread id, creation message id, stamp) for private
chats and caches the topic name; the opener adopts that thread id in _build_message_event
(one-shot, only for the message immediately after the creation, inside a 120s window).
- adapter.py: wire the handler + mixin in, and drop the now-unreachable
forum_topic_created branch in _resolve_topic_binding.
- tests/plugins/test_telegram_forum_topic_created_opener.py: real PTB dispatch coverage.
Fixes#136567
fal_client's SyncRequestHandle.get() drains iter_events() at its default
interval=0.1, i.e. a status GET every ~0.3-0.5 s including RTT. Through the
Nous tool gateway (200 requests per fixed one-minute window) a single 12 s
image cost 42 requests (~208 req/min), so a second concurrent job — or the
same user's video job — trips RATE_LIMIT_EXCEEDED on submit, status and
result calls.
Add tools.fal_common.wait_fal_queue_result(): drain iter_events() at
FAL_QUEUE_POLL_SECONDS (2 s), then call get(), whose first status check now
sees Completed and goes straight to the result GET. Public SDK API only, no
monkeypatching. The image tool's interrupt-aware _wait_fal_result and both
FAL video waits (generation + SeedVR upscale) use it.
Live, one gpt-image-2.5 flare image via the gateway: 42 -> 9 requests,
12.1 s -> 12.5 s wall clock.
Test fakes that modelled the handle with only get() gain an empty
iter_events(); two touched test files also get encoding="utf-8" on their
config write_text (windows-footguns).
_enqueue_text_event cancels the key's previous flush task on every new chunk,
even after that task has popped its batch and is dispatching it. With
dm_topic_auto_transfer on, a second root-DM message arriving while
createForumTopic for the first was in flight cancelled the dispatch: Telegram
had already created the topic, Hermes lost its ID, and the hold-queue replay of
the still-root message created a second topic, leaving the first empty.
_flush_buffered now leaves the per-key task slot once it pops the batch, so a
newer chunk re-arms a fresh flush instead of cancelling it. Committed flushes
are tracked per (family, key): a later flush for the same key waits for the
earlier one to settle, keeping order. Disconnect teardown still cancels them
(and the cancel path still holds the popped event).
Test: a fake Bot pauses createForumTopic while a second root message arrives;
no event is held, the first keeps topic 777, and every created topic gets its
message.
Builds on the salvaged #139188 (@KoNit-K). The salvaged commit ran the transfer in the runner's
_hmwa_resolve_session, which is too late through the real adapter. By then the adapter has keyed
the session on the root-DM source, and _handle_message has already answered with the lobby
reminder. So with the key on, no topic was ever created, and every root-DM message got the
"main chat is reserved" notice.
- The transfer now runs in TelegramAdapter.handle_message before session keying
(telegram_topic_transfer.py), through a runner hook (_transfer_telegram_root_dm) wired in
_wire_adapter_handlers next to topic recovery.
- If topic creation fails, the hook returns the lobby-recovery topic (fallback). Commands,
internal wakes, routed events and unauthorized senders are never moved.
- The first reply in the new topic carries no reply anchor (the root message lives outside the
topic), via reply_anchor_override="". This replaces the base.py metadata flag.
- With the key unset (default), behaviour is unchanged and the v0.22 lobby recovery stays
(#136567).
- The top-level `telegram: dm_topic_auto_transfer` YAML key is bridged into extra, like
disable_topic_auto_rename.
- Documented in the Telegram multi-session docs.
Refs #139136
Refs #134889 (MSG-15)
Refs #141321
Signal and IRC await handle_message before they read their next input.
A busy photo or queue-mode text was held for the burst window and the
call returned only after the durable commit, so the burst's next input
could arrive only once the burst had committed alone: two turns where
main merged one, and the reader stalled about 0.38 s per busy input.
An adapter now declares serial_receive_loop when it delivers a chat's
next input only after handle_message returns and returning triggers no
acknowledgement. For it, dispatch_busy_burst returns as soon as the
input is held, as main returned once the input was merged into the
pending slot. The burst still commits once and in order, and a failed
commit is logged. Every other adapter keeps commit-before-return.
The reader still never runs ahead of what it returned on:
- a command first waits until every earlier input of that reader has
committed (/stop, /new and /reset drop their own chat's held burst),
so /restart cannot close admission under a held input and /new
cannot miss one still committing;
- a chat holds at most one uncommitted burst: the next one waits for
that commit, as main's reader waited at its first commit.
Flagged: Signal, IRC, email, Matrix, Mattermost, ntfy, Photon, SimpleX,
WeCom, WhatsApp and Feishu. Buzz is left out: it saves its cursor only
after the call returns.
Refs #134889Fixes#140538
(cherry picked from commit e72e05a1e6e415ff54426b205dcc6b6f408417cf)
The Nous credential exchange builds its TLS context in
hermes_cli/auth_device_flow._default_verify, which on macOS pinned
certifi.where() directly. That made it a second trust stand outside
agent/ssl_verify, so an install-environment rotation could hand it the
cacert.pem of a deleted environment and every credential refresh failed
until the gateway restarted (#137255, seen in the wild on a launchd
gateway).
_default_verify now asks agent.ssl_verify for the bundle, which
re-derives a path the rotation invalidated. The same one-line move
covers the other three direct certifi.where() consumers — the Weixin
and WeCom aiohttp connectors and the Actual relay's ssl_ca_cert — so
no pin in the tree bypasses the re-derivation.
A process that imported certifi before the package manager replaced its install
environment keeps the deleted directory in `certifi.where()` for the rest of its
life: the path is derived from the imported module's `__file__` and nothing
re-derives it. httpx builds every SSL context through that path, so
`httpx.Client(verify=True)` raises FileNotFoundError at construction — the
OpenAI-compatible client factory turns that into `RuntimeError: Failed to
initialize OpenAI client: [Errno 2] No such file or directory`, and every TLS
tool that process owns fails until it restarts. `requests` fails one step
further out: its DEFAULT_CA_BUNDLE_PATH is a string frozen when requests is
imported, so a rotated environment leaves every call raising `OSError: Could not
find a suitable TLS CA certificate bundle`.
- agent/ssl_verify.py: certifi_bundle_path() re-executes the imported certifi
module against the live sys.path when its bundle is gone, logs one WARNING
naming the dead path and the recovered one, and reports None when there is
nothing to re-resolve. resolve_httpx_verify() hands the platform context over
in that case instead of the bare `True` httpx would resolve through the dead
path; requests_verify() gives requests call sites a bundle that exists now.
- plugins/browser/_common.py, plugins/web/keenable/provider.py: pass that bundle
to the two requests call sites that inherit requests' frozen default.
- tests/agent/test_ssl_verify.py: the rotation is simulated by importing certifi
from a stand-in environment, deleting its directory and then building a client
(no package manager involved).
Platform setup_fn code (bundled QQ Bot, Weixin, Signal and the community QQ
plugin) imported _print_setup_header, _confirm_reconfigure,
_offer_home_channel, _save_env_values and _prompt_csv from
hermes_cli.gateway_setup_wizard. They are now print_setup_header,
confirm_reconfigure, offer_home_channel, save_env_values and prompt_csv; every
internal caller moves (no aliases). Bundled QQ setup drops the private _gw()
facade for hermes_cli.setup / cli_output / config primitives.
Every bundled adapter built its client from three private pieces:
gateway.platforms.base._ssrf_redirect_guard, tools.url_safety's
create_ssrf_safe_async_client and _http_client_limits.platform_httpx_limits.
The redirect guard becomes public (ssrf_redirect_guard; callers renamed, no
alias) and gateway.platforms.helpers.platform_http_client(**kw) composes all
three, with the guard ahead of any caller response hooks. QQ Bot and WeCom
move to it.
Adapters rendering native clarify buttons (core Discord/Telegram, base
send_clarify, the community QQ plugin) read tools.clarify_gateway._entries
under _lock to learn whether a request is still pending and its choices.
get_pending(clarify_id) returns the entry while it awaits an answer, else
None; internal readers move to it.
Two authz behaviours were hard-coded on Platform.QQBOT/TELEGRAM/... in
gateway/authz_mixin.py (_GROUP_CHAT_ENV, _ALLOWLIST_SUPPRESSES_PAIRING), so a
plugin-registered platform could not get them and removing the bundled QQ
adapter would silently drop QQ_GROUP_ALLOWED_USERS gating and change pairing.
PlatformEntry gains group_allowed_chats_env and allowlist_suppresses_pairing;
authz_mixin reads them through authz_field (live entry, else the bundled
gateway_env.AUTHZ). Every bundled platform that was in the old tables declares
them in its AUTHZ, so behaviour is unchanged.
On a multiplexed gateway every served profile's agents share one process.
Each agent's MemoryManager owns its own provider instance, but nothing stopped
a tool call or lifecycle hook from another profile's context, or from a
context naming no profile, from reaching it. Nothing stopped two agents being
handed one shared instance either. The in-repo providers also bound their
stores from the ambient home rather than the one the manager passed.
MemoryManager.initialize_all records the profile home (and agent_identity) it
bound its providers to. Then:
- Tool calls and every lifecycle hook (prefetch, queue_prefetch, sync_turn,
on_turn_start, on_memory_write, on_session_end, on_session_switch, the
session boundary, on_pre_compress, on_delegation) run only when the caller
explicitly names that profile: the context's HERMES_HOME override, or the
home its secret scope was built for. On a multiplexed process a caller that
names no profile is refused, never resolved to the process's own profile.
A refused checkpoint compression raises, so the transcript stays
uncompressed.
- Background hooks run under the owning profile's HERMES_HOME, set
explicitly in the worker.
- An instance another profile's manager already bound is dropped, not
re-initialized (logged as memory_provider_instance_shared). Claims are
tracked by instance identity, never by the provider's own hash or
equality; on a multiplexed process an instance that can't be tracked
(no weak reference) is refused too.
- handle_tool_call passes hermes_home / agent_identity next to the previous
commit's caller_gsk. A provider with the two-argument handle_tool_call gets
only what it declares; caller_gsk alone made every call to it a TypeError.
- The model sees a generic "refused, check gateway.log". gateway.log keeps
memory_caller_profile_unresolved and both homes.
ByteRover and RetainDB now bind their store from initialize()'s hermes_home.
Both already kept their bindings on the instance and hold no profile state at
module level.
The provider side of the rule is documented on MemoryProvider and in the
memory-provider plugin guide: a new instance per load, every binding from
initialize()'s hermes_home, no profile state at module or class level, no
per-call rebinding. Core cannot see inside an external provider; one that
keeps a process-wide binding still mixes profiles' memories.
The previous commit's two MagicMock tests in test_run_agent.py move into
tests/agent/test_memory_provider_caller_profile.py (test_run_agent.py is over
its line cap and may not grow). That file drives both dispatch paths and
every hook with real managers and two profiles interleaving on threads;
tests/plugins/memory/test_provider_multiplex_contract.py does the same for
ByteRover and RetainDB with a fake backend.
Refs #134889 (PLG-11)
Refs #140208
Refs #140058
Google Chat's HTTP callback awaits the dispatch before it answers, so
unlike Pub/Sub (acked on hand-off) the delivery is not acknowledged yet.
The parked-profile refusal still answered HTTP 200 with nothing
admitted, and the message id stayed in the adapter's dedup cache, so
Google had no reason to retry and a manual resend would be the only way
back.
dispatch_http_event now runs the dispatch inside
parked_route_refusal.retryable_ingress(). Inside that scope,
drop_rejected_route records the refusal instead of sending an in-chat
notice. The adapter then releases what ingress recorded for the
unadmitted delivery (its dedup claim and the DM thread count) and raises
the named ParkedRouteRefused, which the platform-event callback answers
as 503 profile_parked with Retry-After. _dispatch_message swallows
exceptions, so the refusal is carried by the scope, not raised from the
shared helper. Pub/Sub keeps the in-chat notice.
A redelivery of the same event after the profile is served again is
admitted exactly once, and reads its DM thread as the first delivery.
Refs #134889 (GW-12)
Refs #140018
The round-1 health offset moved safe_url_for_log and the scoped-lock
release pair into siblings but re-exported them from gateway.status /
gateway.platforms.base, and status_scoped_locks read gateway.status
privates at call time while gateway.status re-exported the sibling's
privates (_unusable_lock_dir, _warned_unusable_lock_dirs). AGENTS.md:
no re-export shims for internal moves.
- gateway/status_lock_dir.py: the unusable-lock-dir report
(ScopedLockDirUnusable + public unusable_lock_dir / _recovered /
reset / reported). gateway.status imports it; it imports nothing back.
- gateway/status_scoped_locks.py: only the release pair, reading
gateway.status at call time; gateway.status no longer imports it.
- Every importer points at the real home: base.py, run_bootstrap.py,
the Feishu and Slack adapters, and the tests that patch them
(gateway.status_scoped_locks.release_*). safe_url_for_log comes from
gateway.platforms.base_log_safety; base.py imports it only for its
own use.
- classify_changes: status_lock_dir.py rides with gateway/status.py on
the e2e_upgrade lane.
code_health: 0 blocking (status.py stays under its main value).
Review finding by @unsupportedpastels on #140490 (minor 4) and by
@alt-glitch on #140490 (suggestion 4)
Refs #134889 (W2)
Refs #140337