e8ccfffc0b51440fabfc7a0596410ac8e94de59b
179 Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
b7cd1f084b |
fix(config): reader gate tracks every binding form and scans pm/
The reader gate only bound plain `name = <config path>` assignments and never scanned pm/, so direct local-file reads still passed it: `env_path, config_path = ...` then `config_path.exists()` in tools/send_message_tool.py, and pm/plugins_state.read_home_selection reading config.yaml with read_text(). The gate now binds tuple-unpacked elements, `self.<attr>` targets and for-loop targets; flags unbound `Path.<method>(p)`, shutil copies and pm's byte readers (read_bytes_or_none, file_digest); and scans pm/. Routed through the backend: send_message_tool's missing-config check and read_home_selection (same FileNotFoundError / OSError / YAMLError -> ValueError contract). Marked as file tooling: pm's byte-level compare-and-swap publication/eviction rewrite and the LKG backup copy, which operate on the local file itself. Known limit: bindings flow into nested scopes, not across sibling methods, so a `self.x` bound in `__init__` is not tracked in another method (pm/publication.PluginSelection.publish). |
||
|
|
e24f12c69f |
refactor(send): read send_message target syntax and standalone routing from the plugin registry
Delete the per-platform tables in tools/send_message_targets.py (_PLATFORM_PARSERS, 14 rows) and tools/send_message_tool.py (_PLUGIN_STANDALONE_MEDIA, _TEXT_SENDERS, plus the discord-always and whatsapp-mentions ladders). Each bundled plugin now declares them on its PlatformEntry: - target_ref_syntax_fn: the old parser, body unchanged. A new field rather than parse_target_ref_fn because that field is an authority (strict under pass_unresolved_references, no "not explicit" sentinel, not re-applied to channel-directory hits) and reusing it would change react/cron behaviour for ntfy/buzz/photon. - standalone_send: StandaloneSendPolicy (label, media, all_sends, captionable, empty_list_between_chunks, forward_force_document, mentions, text_direct). Shared builders and the NOT_EXPLICIT sentinel live in gateway/platforms/send_targets.py so plugins import no core-private helpers. Lookups discover plugins first when the name is not registered yet (fresh CLI/cron process). Differential oracle (33 platforms x 48 refs, 10 send cases each): base and head output identical. |
||
|
|
f066fa708c |
fix(send_message): the out-of-process fallback discovers plugins first
_send_via_adapter's standalone fallback read the platform registry without running plugin discovery. BlueBubbles left the dedicated routes in this branch and falls through to it, so a direct _send_to_platform from a fresh process returned "No live adapter for platform 'bluebubbles'" where main reached the sender. The shipped entry points (the tool, cron) discover first, so this was latent. The fallback now uses _plugin_standalone_sender, which discovers (idempotent). Live: fresh-process send against a fake BlueBubbles server, 0 sends before, 1 after. Also point ADDING_A_PLATFORM.md at the plugin paths of the Telegram and Discord reference adapters. Found by @unsupportedpastels' review of this PR. |
||
|
|
af9e553348 |
refactor(yuanbao): drop core wiring
(cherry picked from commit b3e3f85bdf21fe752ec608dbe628fa44a1a5c790) |
||
|
|
57a81d0304 |
refactor(qqbot): drop core wiring
Remove the QQ Bot _BUILTIN_ADAPTERS row, the core setup wizard function, the core _send_qqbot sender and the QQ-media branch in send_message; route QQ through the registry standalone sender (_PLUGIN_STANDALONE_MEDIA keeps native media + caption, #37315). (cherry picked from commit 76117fa60723f0226d2300312060325d26ef82d7) |
||
|
|
8665b79cf3 |
refactor(weixin): drop core wiring
Remove the Weixin _BUILTIN_ADAPTERS row, _send_weixin sender, the Weixin-first _send_to_platform branch (now routes to the plugin standalone sender, still first and still importing no other plugin), the static setup-wizard row, second_var entry, _setup_weixin and its facade re-exports. (cherry picked from commit f671dc8fdb164909b94d2d713e0b04247816b90b) |
||
|
|
f33b80d717 |
refactor(signal): drop core wiring
Remove Signal's _BUILTIN_ADAPTERS row and validate_signal_config special case (gateway/run.py), the core _send_signal sender (send_message_senders.py), the Signal max-length branch + _CHUNKED_ROUTES/_TEXT_SENDERS entries (send_message_tool.py; Signal now routes through _PLUGIN_STANDALONE_MEDIA and _registry_standalone_send, chunked at the registry max_message_length), and the static setup-wizard row, second_var entry and _setup_signal/_signal_line_input (gateway_setup_wizard.py + facade re-exports). Co-authored-by: Karl Johannisson <karl.johannisson@gmail.com> (cherry picked from commit 9742538f8383ad26a7c1636967ab66d8e766ccb8) |
||
|
|
fc6d679472 |
refactor(bluebubbles): drop core wiring
Remove the _BUILTIN_ADAPTERS row (gateway/run.py), the _send_bluebubbles sender and its _TEXT_SENDERS route (send_message now reaches the plugin's standalone_sender_fn through the generic registry path), and the static setup-wizard row + _setup_bluebubbles (hermes gateway setup lists the plugin from the registry). (cherry picked from commit 1c4bb211853c4939c5c3c680020d32963170e53b) |
||
|
|
d76cce4f11 | ci: apply all automatic linter fixes available | ||
|
|
e167fc33b7 |
feat(qqbot): add support for proactive media delivery via send_message
Introduced a new test suite for QQ Bot media handling, including file type detection and media routing. Enhanced the send_message_tool to support media uploads for QQ Bot, allowing for both direct media messages and text with media attachments. Updated error handling and added support for media delivery in C2C and group chats. |
||
|
|
f7689f40a4 |
fix: send_message to a Home Assistant target names the install command while its plugin is absent
With the homeassistant plugin missing, send_message to a `homeassistant:` target failed with "Unknown or unregistered plugin platform: homeassistant" and no way forward. Both unknown-platform errors (target resolution and platform config) now go through one helper that appends, for a platform that left core (a LEFT_CORE row's platform), the exact install command for the active home (`hermes [-p <profile>] plugins install homeassistant`). Other unknown names keep the bare message. |
||
|
|
a5bd246865 |
Old pre-decomposition import paths are gone: plugin compat layer removed on schedule (#126164)
* refactor(plugins): remove the Sep 2026 decomposition compat layer on schedule The PLUGIN-COMPAT layer ( |
||
|
|
314076ca63 |
fix(messaging): hermes send reports dropped MEDIA attachments instead of success:true
filter_media_delivery_paths kept only the survivors, so a MEDIA path that did
not exist on the host (or was denied by the delivery policy) vanished with a
host-side warning while the caller got success:true / exit 0 and booked a
delivery that never happened. _validated_delivery_path and
filter_media_delivery_paths take an optional `dropped` list that collects
{path, reason}; send_message_tool passes it and, when anything was dropped,
returns success:false + partial_success:true + media_dropped + an error line,
which hermes send already turns into a non-zero exit. Slim redo of #115913
(@fangliquanflq): same payload shape, out-parameter instead of a wrapper pair.
Co-authored-by: fangliquan <fangliquan@qq.com>
|
||
|
|
0b909a595e |
docs(prompts): model-facing tool descriptions stop suggesting /tmp
The kanban artifact examples, MEDIA: example, pdftoppm OCR hint, the background-poller tee hint and the Windows path note all showed the model a literal /tmp path, which it copied into its own commands on every platform. They now point at $TMPDIR (Hermes sets it to its scratch dir) or ~/.hermes/cache/scratch; the two Windows-note mentions that describe why /tmp is the wrong choice keep the literal with a no-tmp marker. |
||
|
|
8503ee4459 |
refactor(send): route WhatsApp mentions through the existing standalone chunker
Follow-up to the salvaged #92440 commit, shape-gate cleanup only; behaviour is unchanged (one mention-bearing payload per logical send, captioned media keeps its caption). - Fold `_send_whatsapp_with_mentions` into `_send_plugin_standalone` (it was a line-for-line copy of the caption split + `_send_chunks` loop); `mentions` is attached to the first payload only via a one-shot kwarg dict. - Drop the `inspect.signature(sender)` probe: the only registered WhatsApp standalone sender is the in-tree `_standalone_send`, which gains `mentions` in the same change; a foreign sender already surfaces as a TypeError through `_handle_send`'s error path. - Collapse `_normalize_outbound_mentions` to dedupe-only; its input is argparse `list[str]` already validated by the CLI. - Revert the `\d` -> `[0-9]` edit to `_BARE_PHONE_RE` / `to_whatsapp_jid`: unrelated to the feature (`normalize_whatsapp_mention_jid` already rejects non-ASCII via `isascii()`) and it changed output for nine other `to_whatsapp_jid` callers. - Split the single 137-line test into a `whatsapp_bridge` fixture + two invariants (rejections never reach the bridge; mentions ride the first payload only, stale bridge fails closed); drop the fabricated legacy-sender branch that only existed to cover the deleted probe. Mutation check: removing the first-payload gate turns the new test red. |
||
|
|
b34ebc084a |
feat(send): add WhatsApp native mentions
Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com> Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com> Co-authored-by: David Metcalfe <80915+DavidMetcalfe@users.noreply.github.com> (cherry picked from commit ba7fd43826f9e36d886cc294e072378d5d082aa5) |
||
|
|
2164221844 |
fix(send): name the default-root gateway and external secret sources in the 'not configured' error
Under `HERMES_HOME=<root>/profiles/<name>` the reporter's gateway ran from `<root>`, so `_not_configured_error` also reads `<root>/gateway_state.json`; when the platform is connected there under a live pid it appends "A gateway (pid N) running from <root> has <platform> connected; this shell is scoped to profile home <home> whose .env has no <VARS>." (#114272 step 5). The `--list` empty state likewise names the root's existing `channel_directory.json`. The consulted-sources list gains "external secret sources (<name>: enabled|disabled | none configured)" from agent.secret_sources.registry — names only. |
||
|
|
7a99c4d13c |
fix(send): the 'not configured' error lists the home and sources it consulted
The error now names the resolved home's `.env` (and whether the platform's token key is defined there), `config.yaml` (block absent / `enabled: false` / no token) and the environment variable(s) checked, so a Windows or profile home user can fix the file this process actually read. When a gateway started from the same home already has the platform connected, the message says its token lives only in that process's environment and which key to add to `.env`. Docstrings in `gateway/channel_directory.py` and `send_cmd._load_hermes_env` stop naming `~/.hermes`; the pipe-script-output guide documents the message. |
||
|
|
59e40220e2 |
fix(send): derive hermes send path hints from the resolved Hermes home
`hermes send --help`, the `--list` empty-state hint and the "Platform 'x' is not configured" error hardcoded `~/.hermes/...`, which does not exist on a Windows install rooted at `%LOCALAPPDATA%\hermes` or under a profile home. Build the strings from `get_hermes_home()` instead. Salvaged from #114297 (the `_load_hermes_env` secret-scope rewrite and its reload-based tests are dropped; see the PR body). |
||
|
|
0f76689076 |
fix(tools): scrub lone surrogates from the outbound send body
`hermes send MESSAGE` hands surrogateescape-decoded argv straight to send_message_tool; a lone surrogate then crashes the UTF-8 marshal inside platform SDK request bodies (feishu/lark) and the message is silently lost after the retries. Every send_message caller (model tool call, `hermes send`, dashboard console) enters _handle_send, so scrub there — before media extraction, the session mirror and the platform sender see the text. Model output delivered by the gateway/cron is already scrubbed by finalize_turn / the gateway reply boundary. Fixes #113799 |
||
|
|
a9838c2100 |
fix(multiplex): tool and memory-provider env reads stay inside the routed profile
Under gateway.multiplex_profiles, os.environ holds the DEFAULT profile's .env; a
secondary profile's values exist only in the per-turn secret scope. Every reader
below still read os.environ/os.getenv at call time, so a secondary profile's turn
silently used the default profile's value.
Credentials (F6): FIRECRAWL_API_KEY (read_file hosted OCR), OPENVIKING_API_KEY,
mem0-OSS OPENAI_API_KEY, MODAL_TOKEN_ID/SECRET and BROWSER_USE_API_KEY presence
gates, and the xAI video plugin's os.getenv("XAI_API_KEY") fallback AFTER the
scoped resolver had already missed — the exact fallback-after-miss shape
gateway/AGENTS.md forbids. Deleted, not re-scoped: the resolver is the scope.
Identity / tenant (F7): MEM0_USER_ID/AGENT_ID/HOST/MODE, SUPERMEMORY_CONTAINER_TAG,
RETAINDB_PROJECT, OPENVIKING_ACCOUNT/USER/AGENT (and the whole layered() env
read), HINDSIGHT_BANK_ID/MODE/retain shaping, HERMES_HONCHO_HOST. A raw read
put a secondary profile's memories into the default profile's account/bank/
project/tenant and recalled them back into the default's turns. Each now uses
get_secret with the provider's own per-profile default on a miss.
Endpoints (F8): OPENAI_BASE_URL (aux custom runtime + direct-alias expansion),
XAI_BASE_URL/HERMES_XAI_BASE_URL (aux OAuth), NOUS_INFERENCE_BASE_URL (#65941,
both the aux builder and hermes_cli.auth_nous._nous_inference_env_override),
GATEWAY_PROXY_URL (same UnscopedSecretError-only fallback shape as
GATEWAY_PROXY_KEY three lines below), FIRECRAWL_API_URL, BROWSERBASE_BASE_URL,
SUPERMEMORY/RETAINDB/HONCHO/HINDSIGHT URLs. The keys beside them were already
scoped, so a secondary's key was sent to the default profile's proxy or host.
Targets / display (F11): WEIXIN_HOME_CHANNEL (message posted into the default's
chat), HERMES_LANGUAGE, and agent/i18n's process-wide lru_cache of
display.language — now keyed by HERMES_HOME.
Outbound webhooks: hooks.outbound[].secret_env resolved from os.environ while
the gateway registers each profile's targets inside that profile's scope, so a
secondary's deliveries were signed with the default's secret or left unsigned.
Agent-cache eviction: _spawn_release_thread started a bare threading.Thread, so
commit_memory_session -> provider on_session_end ran with an EMPTY context. The
thread now runs copy_context() and, for the unscoped housekeeping sweep, enters
the owning profile's _profile_runtime_scope resolved from the session key
(agent:<profile>:...). The pressure batch does the same per key.
session_search (#82903): agent/inline_tool_executors.py::_session_search
forwarded every schema argument except `profile`, so a gateway agent could
never select a named profile's store. Forwarded; the ownership-scoping design
in #87779/#87847 is a separate design call and is not attempted here.
Live repro (/tmp/mux_audit/fix-tool-memory-reads/repro.py): 28 FAIL on
origin/main -> 0 FAIL with this change; 10 new invariant tests red on base.
Fixes #82903
Fixes #65941
Fixes #99121
Addresses #87779
Co-authored-by: webtecnica <75556242+webtecnica@users.noreply.github.com>
Co-authored-by: Michael Versluis (Berry) <michael@wve.nl>
|
||
|
|
866332bfb5 |
fix(relay): authorize send_message targets and surface egress declines (P5) (#99220)
* fix(relay): authorize send_message targets and surface egress declines
P5 of the relay egress-authorization workstream. The relay path
authenticated the SENDER but never authorized the DESTINATION, and the
gateway compounded it from both ends.
(a) send_message could silently name an arbitrary relay target. Its
`target` parameter is free-form ('platform:chat_id'), so a model could
name ANY chat id and the gateway would emit an outbound frame for it.
gateway/relay/egress.py adds an attestation floor: a relay-routed
destination must have a provenance this gateway can show -- the
operator's home channel, the channel directory, or its own gateway
session origins. Anything else is refused HERE, with a visible tool
error naming the target, before a frame is written. Non-relay platforms
and platforms served by a live native adapter in this process are
untouched (same precedence resolve_delivery_transport applies).
(b) Connector declines were swallowed into apparent successes. The
connector's egress floor answers an unauthorized destination with a
DEFINITE failure whose text is deliberately uniform (F-005). Several
relay lanes degrade a *transport drop* by design and were degrading an
*authorization refusal* the same way:
- _send_media returned None, sending the caller into
BasePlatformAdapter's text fallback -- a DIFFERENT op re-addressed at
the very chat the connector had just refused.
- _send_prompt returned None, so exec-approval / slash-confirm /
clarify reported "relay prompt op unavailable" (a wrong reason) and
ran their numbered-text fallbacks into the refused chat.
- task_card_stop discarded the error entirely.
- typing / delete / react / thread ops degraded silently at debug.
is_egress_decline() classifies THAT a decline happened (never why --
the uniform text is not parsed for reasons) and requires a definite,
non-ambiguous failure, so a lost-ack retry is still a transport
outcome. Lanes with an error-carrying contract now report the decline
verbatim; cosmetic bool/None lanes still degrade but log it at WARNING.
Advisory progress drops that legitimately degrade are unchanged: the
task_card send lane, the draft ambiguous/except branches, and every
transport-exception path keep their existing fail-open behaviour.
Tests: 21 mutations of the production source, all KILLED.
* fix(relay): authorize the RESOLVED target; declines must not fall back
Review round 1 (independently confirmed by a second reviewer) found three
blockers. Two are fixed here; the third (B-2, Telegram @username) is a policy
decision left open deliberately.
B-1 — THE FIX CAUSED THE OUTAGE IT PREVENTED (tools/send_message_tool.py)
The P5(a) guard ran ABOVE Slack user->DM resolution, so it authorized the
internal pseudo-id `_parse_target_ref` emits (`user_name:ben`, `user:U...`).
Provenances only ever hold RESOLVED conversation ids, so a fully attested DM
was compared as a handle against a set of `D...` ids and refused:
base slack:@ben SENT head(before) slack:@ben REFUSED
Every Slack DM by handle was broken. Moved the guard below resolution; it now
authorizes the destination that is actually sent to, and the refusal names the
resolved id. Position is load-bearing, so it is commented as such and pinned:
reverting the move turns exactly the four new cases red.
B-3 — A DECLINE IS NOT A LANE FAILURE (gateway/run.py)
`_approval_send_outcome` had only sent/failed/ambiguous, so a connector
decline collapsed into `failed` — which is the cue to run the plain-text
fallback into the chat the connector had just refused. The adapter fix in the
previous commit improved the error STRING while user-visible behaviour stayed
identical to base; the commit message overstated it. Fixed properly:
- new `declined` verdict, recognised via the shared `is_egress_decline`
contract (not string sniffing at the call site)
- exec-approval returns without the text fallback
- slash-confirm suppresses the text reply AND clears the registration, so a
card that never rendered cannot capture the user's next message
`send_clarify` was already correct (returns early inside the adapter).
MUTATIONS (production source; both directions)
classifier never returns 'declined' -> KILLED (4 cases)
ALL failures classified as 'declined' -> KILLED (2 cases)
guard moved back above Slack resolution -> KILLED (4 cases)
decline CODE changed (review M05) -> KILLED
marker match made case-sensitive (M10) -> KILLED
M05 was a tautology: the test asserted the imported constant against itself,
so changing the constant could not fail it. The wire contract is now pinned as
a literal, because the connector stamps that exact string and a one-sided
change is a silent cross-repo break.
REGRESSION CHECK: the 12 failures + 1 collection error in this test selection
are PRE-EXISTING cross-test contamination — the identical set fails at
|
||
|
|
d63e380324 |
compat(plugins): warn once per name when a plugin resolves an old import path; lint step restored in CI
Every PLUGIN-COMPAT __getattr__ now calls hermes_cli.plugin_compat.warn_once(facade, name, target) before
resolving, emitting a HermesPluginCompatWarning (FutureWarning) once per process per name: old path, new
path, removal target. Importing a facade for its live API stays silent; only resolving a moved name warns.
COMPAT_MANIFEST.md documents the warning and how to silence it during migration.
Verified the runtime never routes through a pointer: every entry point (run_agent, cli, hermes_cli.main,
gateway.run, tui_gateway.server, web_server, model_tools + tool discovery, hermes_state, cron.scheduler,
browser_tool, mcp_tool, kanban, auth) imports clean and `hermes doctor` runs end to end with the warning
promoted to an error.
Also restores the check_compat_pointers CI step to .github/workflows/lint.yml, which
|
||
|
|
2776813df3 |
compat(plugins): temporary import-path shims for external plugins — ONE commit, revert on schedule
The Sep 2026 decomposition (PR #102117) makes internal import paths a non-API: names now live in the focused modules that define them. This commit is the ONLY thing keeping the old paths alive, so external plugins have time to update. It is deliberately a single, unsquashed commit: git revert <this sha> removes every shim, stub and manifest at once on the announced date. Nothing in-tree may depend on these pointers: scripts/check_compat_pointers.py (wired into lint.yml) fails CI if it does. What it adds (see COMPAT_MANIFEST.md, compat_manifest.json): - 332 facade modules get one delimited `PLUGIN-COMPAT` block appended at the end of the file - 1,172 moved names resolved lazily via a module `__getattr__` (PEP 562) — never a top-level import, so no import cycles; facades that already had `__getattr__` get a chained one - 592 third-party/stdlib names the old modules used to expose, with their original import statements - 266 public definitions that had been deleted as unused, restored byte-for-byte from the pre-decomposition tree (+40 private helpers and 16 imports pulled in only because a restored definition needs them) - 3 deleted modules recreated as re-export stubs (gateway/startup_watchdog, hermes_cli/observability/ relay_runtime, tools/environments/modal_utils) - private names (`_x`) get no pointer: they were never API (3,792 skipped) Verified: all 335 touched modules import under a fresh HERMES_HOME and every manifest name resolves; the lint reports zero in-tree uses; ruff clean; targeted suites unchanged. |
||
|
|
707161e77b | simplify(compat): file_tools/send_message_tool/cronjob_tools/process_registry — drop 34 re-exports, repoint 5 callers + 27 test files | ||
|
|
e83816a4d1 |
review-fix(comments): restore lost #NNNN rationale comments across non-test source (mechanical sweep, condensed, code unchanged)
For each issue anchor present in BASE
|
||
|
|
691e2f7d9f | refactor(tools): send_message wave-2 cut — table-driven telegram media, shared platform-module guard, flattened slack/target resolution, compact docs | ||
|
|
19a479bc06 | refactor(tools): tidy signal retry logging and platform config guard | ||
|
|
dc79b0a11a | refactor(tools): compact send_message routing call sites | ||
|
|
0a9bc0f3e6 | refactor(tools): share _NO_DELIVERABLE, tighten telegram format helper | ||
|
|
4228d0f20a | refactor(tools): compact send_message literals and telegram media warnings | ||
|
|
51d44c5e32 | refactor(tools): fold small conditionals in send_message helpers | ||
|
|
c9d52c05b2 | refactor(tools): unify adapter media-method selection across matrix and live-adapter sends | ||
|
|
6260446b15 | refactor(tools): tighten send_message target/home/mirror helpers | ||
|
|
6b226dbce9 | refactor(tools): compact signal RPC builder and blank squeeze | ||
|
|
3106c534c2 | refactor(tools): extract telegram format + gateway-loop dispatch helpers, compact media descriptors | ||
|
|
37ae28f187 | refactor(tools): compact send_message docstrings and standalone fallback | ||
|
|
b99a74a3c7 | refactor(tools): share live-adapter lookup, prune unused re-exports, hug brackets in send_message | ||
|
|
79f0c28840 | refactor(tools): dedupe send_message helpers (success payloads, target resolve, signal batch, slack forms) | ||
|
|
6723628de9 | refactor(tools/messaging): split send_message into senders/targets tables; dedupe discord/bot_mode/relay helpers; extract feishu_lark shared plumbing; compact graph client/auth | ||
|
|
d4cec15b47 |
refactor(tools): first-wave simplification of tools/ (file ops split, lazy_deps, code_exec, approval, browser, delegate, mcp, skills, terminal, voice, media)
Behavior-neutral structural pass over tools/*: god-file extractions into sibling modules (file_operations_common/lint/search, file_tools_paths/ read_tracking/write, code_execution_env/rpc, tool_search_catalog/names/ validation, tts_command_provider, ...), duplicate helper unification, if/elif -> dispatch tables, dead-code removal, docstring compaction. Tool schemas (get_tool_definitions) verified byte-identical to base. |
||
|
|
fcd34e57a2 | fix(buzz): complete media-only delivery reporting | ||
|
|
9c25704257 | fix(buzz): verify live media delivery receipts | ||
|
|
37c943997b | fix(buzz): support media in standalone sends | ||
|
|
1885a40ad3 | fix(buzz): preserve literal mentions and exact UUID targets | ||
|
|
42dc0dea70 |
fix(send_message): cross-loop dispatch to live WeCom adapter
When send_message is invoked from the agent's worker thread (a different event loop than the gateway's), awaiting the WeCom adapter directly can hang because the adapter enqueues onto the gateway loop. Dispatch via run_coroutine_threadsafe onto the gateway loop when the caller loop differs, with caller-cancellation shielded so an already-enqueued send is not cancelled mid-flight (which would otherwise cause a false-failure retry -> duplicate). Recognizes WeCom native chat IDs as explicit send targets and whitelists WeCom for media delivery. Part of the async queue design this branch introduces. |
||
|
|
48f69e51d3 |
fix(signal): chunk long standalone sends and cover both delivery paths (salvage #57929 + #67279)
Follow-up to lkz-de's adapter chunking commit: long Signal messages no longer truncate on ANY delivery path. - tools/send_message_tool.py: register Signal's 8000-char limit in _MAX_LENGTHS (imported from the adapter module so the two paths can't drift) so hermes send / cron standalone / MCP sends split via the shared truncate_message() pass instead of signal-cli rejecting them. Standalone-path idea credited to @5L-hermes01 (#67279). - tests: regression test proving standalone Signal sends chunk at the adapter limit with no truncation footer (fails on pre-fix main). - docs: Long Messages section on the Signal page (en + zh-Hans). Both fixes verified by sabotage A/B (tests fail with the respective half reverted to origin/main) and a real-import E2E: 27k-char message with emoji + cross-boundary bold + code blocks -> 4 chunks, all styles in-range UTF-16, lossless reassembly. |
||
|
|
ed4f50de51 |
fix(send_message): hand unresolved cron and react targets to the adapter again
Restores pass-through behavior for cron delivery and react/unreact that was lost when |
||
|
|
d409f67485 |
feat(platforms): add typed plugin send paths
Route plugin target parsing, validation, and host-driven delivery through PlatformEntry across CLI and cron while preserving the host-only send_message policy. |
||
|
|
d3ebe14b03 | fix(send_message): constrain opaque plugin fallback |