Commit Graph

29915 Commits

Author SHA1 Message Date
Marcus Castro
faaff35f1e fix: complete whatsapp forced document delivery 2026-05-16 23:27:37 -03:00
itsuzef
e37460474d fix(whatsapp): align CLI surface and prompt snapshots with forceDocument schema
Follow-up to the previous commit on this branch. The agent message-tool
schema now describes forceDocument/asDocument as a cross-channel knob,
so the public CLI help and the user-facing CLI docs need to match, and
the regenerated prompt snapshot fixtures need to drop the stale
"Telegram only" string the schema no longer emits.

* src/cli/program/message/register.send.ts: rephrase the `--force-document`
  CLI option help from "Send media as document to avoid Telegram
  compression (Telegram only)" to "Send media as document to avoid
  channel compression (Telegram, WhatsApp)" so `openclaw message send
  --help` no longer claims Telegram exclusivity.
* docs/cli/message.md: change the per-flag entry under `send` from
  "Telegram only: --force-document (...avoid Telegram compression)" to
  "Telegram + WhatsApp: --force-document (...avoid channel compression)"
  so the public docs match both the schema and the CLI help.
* test/fixtures/agents/prompt-snapshots/codex-runtime-happy-path/*:
  regenerate via `pnpm prompt:snapshots:gen` so the captured tool
  descriptions, dynamic-tools JSON, and rough-token counts reflect the
  new schema strings. Six fixtures change in lockstep:
  - discord-group-codex-message-tool.md
  - telegram-direct-codex-message-tool.md
  - telegram-heartbeat-codex-tool.md
  - codex-dynamic-tools.discord-group.json
  - codex-dynamic-tools.telegram-direct.json
  - codex-dynamic-tools.heartbeat-turn.json

Verified locally:

* `pnpm prompt:snapshots:check` reports 7 files current.
* `pnpm exec oxfmt --check --threads=1` is clean for both touched ts
  files plus docs/cli/message.md and CHANGELOG.md.
* `pnpm test extensions/whatsapp/src/send.test.ts
  extensions/whatsapp/src/inbound/send-api.test.ts` keeps the 51-case
  WhatsApp send/inbound suite green, including the three new
  forceDocument/asDocument cases from the previous commit.
2026-05-16 23:27:37 -03:00
itsuzef
eb7601ab11 fix(whatsapp): honor forceDocument flag end-to-end
`ChannelOutboundContext.forceDocument` and the agent `message`-tool
`asDocument` alias were documented as cross-channel knobs to "send
image/GIF as document to avoid channel compression", but on the
WhatsApp side the flag was silently dropped between the outbound
context and the Baileys payload selector. Telegram honored the same
flag through its own outbound, so any agent that asked for an
uncompressed image hand-off worked on Telegram and got a compressed
JPEG on WhatsApp instead.

This change wires the flag through the existing layers without
introducing a new contract:

* extensions/whatsapp/src/outbound-base.ts: destructure forceDocument
  from ChannelOutboundContext.sendMedia and forward it to send().
* extensions/whatsapp/src/send.ts: sendMessageWhatsApp options gain
  forceDocument; documentFileName is set regardless of media.kind
  when the flag is true; sendOptions exposes asDocument so the
  inbound send-api layer can pick the document payload shape.
* extensions/whatsapp/src/inbound/types.ts: ActiveWebSendOptions
  gains asDocument so the payload selector can short-circuit on
  the flag instead of inferring intent from fileName alone.
* extensions/whatsapp/src/inbound/send-api.ts: payload-shape
  selector guards `asDocument === true` ahead of MIME branches and
  builds the document content with caller-supplied filename and
  mimetype, falling back to "file" only when nothing is supplied.
* extensions/whatsapp/src/outbound-media-contract.ts: preserve
  caller-supplied fileName on canonical media for non-document
  kinds. Without this, an image+forceDocument hand-off lost the
  filename inside normalizeWhatsAppLoadedMedia before send.ts
  could promote it.
* src/channels/plugins/outbound.types.ts and
  src/agents/tools/message-tool.ts: drop the now-misleading
  "Telegram only" qualifier from the public JSDoc and the agent
  schema descriptions for forceDocument and asDocument so the
  surface stops lying about WhatsApp support.

Tests: extensions/whatsapp/src/send.test.ts gains
"forces document branch when forceDocument is true with image media"
and "falls back to a default filename when forceDocument media has
no fileName"; extensions/whatsapp/src/inbound/send-api.test.ts gains
"sends as document when sendOptions.asDocument is true regardless of
MIME". Existing 48 cases in those two files unchanged.

Changelog: single-line Channels/whatsapp Fixes entry under the
Unreleased section.
2026-05-16 23:27:37 -03:00
Peter Steinberger
c1bc6adfaa fix: restore busy TUI draft 2026-05-17 03:26:33 +01:00
Harry Xie
2c7200f542 fix(tui): preserve draft while chat is busy 2026-05-17 03:26:33 +01:00
Peter Steinberger
ab595dec0f fix: normalize malformed assistant replay content (#82748) 2026-05-17 03:26:04 +01:00
IWhatsskill
ad8ae05f37 fix(agents): normalize malformed assistant content 2026-05-17 03:26:04 +01:00
Peter Steinberger
1896f8a330 fix: resolve installed plugin facade dist surfaces 2026-05-17 03:25:42 +01:00
gleb
9f112a1a7a fix: include checked credential source in missing auth errors
Include the checked credential source in missing API key errors so users can see which env var, profile, or config path to fix.

Fixes #82785.

Co-authored-by: gleb <116607327+loeclos@users.noreply.github.com>
2026-05-17 03:21:57 +01:00
Gio Della-Libera
6821fbcfba Clarify MEMORY guidance over generic TTS hints (#81930) 2026-05-16 19:21:24 -07:00
Peter Steinberger
9e67f53b91 fix(cli): resolve web command SecretRefs
Fix CLI web search/fetch command SecretRef resolution for provider-scoped plugin credentials.

- Carry command provider overrides through gateway and local secret resolution.
- Mark the selected web provider targets active and unrelated plugin refs inactive.
- Cover Tavily, DuckDuckGo, legacy Firecrawl fetch, protocol overrides, and runtime command-secret behavior.
- Add public plugin-sdk test mock exports needed by existing plugin tests after CI boundary enforcement.

Fixes #82621.
Replacement for #82699.

Co-authored-by: 吴杨帆 <39647285+leno23@users.noreply.github.com>
2026-05-17 03:00:39 +01:00
Vincent Koc
d62e443b36 fix(plugins): honor parent bundled source overlays 2026-05-17 09:52:19 +08:00
Vincent Koc
817f0cd6c8 fix(plugins): preserve bundled source overlay probes 2026-05-17 09:52:19 +08:00
Vincent Koc
c8b5757303 fix(plugins): try runtime package-state probes before source 2026-05-17 09:52:19 +08:00
Vincent Koc
662fcb81c9 fix(plugins): align bundled runtime surface roots 2026-05-17 09:52:19 +08:00
Vincent Koc
77f7c8df8d fix(plugins): contain bundled entry paths 2026-05-17 09:52:19 +08:00
Peter Steinberger
2a7f9f3546 fix: avoid Copilot replay item ID collisions 2026-05-17 02:43:44 +01:00
Vincent Koc
d350ac3feb test: use platform spy helpers 2026-05-17 09:24:42 +08:00
Peter Steinberger
7ee5fe011b refactor(agents): share model manifest context 2026-05-17 02:24:07 +01:00
Galin Iliev
4537b89da6 fix(agents): normalize Copilot replay tool IDs
Normalize GitHub Copilot Responses replay tool-call IDs before dispatch so resumed sessions with historical overlong item IDs no longer fail Copilot schema validation.

Closes #82749.
2026-05-16 18:22:10 -07:00
Peter Steinberger
f453904165 feat: add fal and OpenRouter music generation (#82789)
* feat: add fal and OpenRouter music generation

* fix: repair music generation CI gates

* chore: refresh proof gate
2026-05-17 02:05:22 +01:00
Peter Steinberger
a6225060f1 fix(memory): abort timed-out embedding requests (#82770)
* fix(memory): abort timed-out embedding requests

* test: stabilize gateway ci shards

* test: pin control ui origin fixture

* test: stabilize gateway ci fixtures

* test: isolate forged origin fixture

* test: decouple setup code from gateway net mocks

* test: repair run-node and config preaction CI

* test: fix run-node progress fixture typing

* test: remove unused pairing setup helper

* fix: stabilize embedding timeout errors
2026-05-17 02:04:17 +01:00
Vincent Koc
54c9820ed9 test(agents): cover anthropic reasoning replay 2026-05-17 08:58:52 +08:00
Sunnyone2three
5fe4e09b68 fix: extract reasoning_content from thinking blocks instead of non-existent top-level field 2026-05-17 08:58:52 +08:00
Sunnyone2three
8e21b3c9a6 fix: preserve reasoning_content in anthropic-messages transport for proxy providers 2026-05-17 08:58:52 +08:00
Vincent Koc
e0c3c80ebc test: share Windows platform spy helpers 2026-05-17 08:56:56 +08:00
Josh Avant
2416de1421 Fix infer SecretRef resolution for provider-backed commands (#82798)
* fix infer secretref resolution

* chore changelog for infer secretrefs
2026-05-16 19:55:39 -05:00
Shakker
f5904392e9 fix: scope plugin metadata to workspace context 2026-05-17 01:55:16 +01:00
Shakker
193bfd3a4d fix: avoid stale workspace metadata reuse 2026-05-17 01:55:16 +01:00
Shakker
bfceb0d7f9 fix: keep metadata reuse scoped to agent turns 2026-05-17 01:55:16 +01:00
Shakker
121cd054ef fix: reuse plugin metadata in local agent turns 2026-05-17 01:55:16 +01:00
Shakker
c90e42aaa7 fix: reuse plugin metadata during runtime loading 2026-05-17 01:55:16 +01:00
Shakker
20704ffab7 fix: reuse manifest metadata in model selection 2026-05-17 01:55:16 +01:00
Josh Avant
fba250d4a2 Fix Discord reply context at LLM boundary (#82801)
* fix: preserve current reply context

* docs: add reply context changelog
2026-05-16 19:54:24 -05:00
Vincent Koc
5911b5bf2d fix(qa-lab): stabilize mock qa-channel regressions 2026-05-17 08:50:31 +08:00
Galin Iliev
7c151b212b fix(agents): prioritize manual session turns (#82765)
* fix(agents): prioritize manual session turns

* docs: update changelog for session priority

---------

Co-authored-by: Galin Iliev <Galin.Iliev@microsoft.com>
2026-05-16 17:49:48 -07:00
Josh Avant
ad450a7dfb Fix Windows image model event loop stalls (#82799)
* fix media image model event loop stalls

* changelog for image event loop fix

* fix async auth test mock
2026-05-16 19:49:11 -05:00
Peter Steinberger
80848fc040 fix(config): accept gateway remote port 2026-05-17 01:41:17 +01:00
Miya
5239b20089 fix telegram polling and message action scopes 2026-05-17 01:34:54 +01:00
Josh Avant
8d3027dffa Remove OAuth sidecar credential runtime support (#82777)
* fix(auth): remove oauth sidecar runtime support

* docs(changelog): note oauth sidecar removal
2026-05-16 19:33:30 -05:00
Ayaan Zaidi
d1280a3de9 fix(discord): preserve room event history until delivery (#82573)
Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-05-17 01:24:33 +01:00
Peter Steinberger
d7ad12dde4 test(cli): force progress test out of CI mode 2026-05-17 01:13:24 +01:00
Peter Steinberger
e19f05b79b test(cli): repair startup progress checks 2026-05-17 01:13:24 +01:00
Peter Steinberger
97abe0f0c0 fix(gateway): harden origin and pairing checks 2026-05-17 01:13:24 +01:00
JARVIS-Glasses
2c4287b6df fix(telegram): honor catch-all mentions for captionless media 2026-05-17 01:13:24 +01:00
Peter Steinberger
12debcb05e fix(cli): improve config startup progress 2026-05-17 00:37:39 +01:00
吴杨帆
cc9117f729 fix: validate limit edge cases and voicecall numeric flags (#82679)
Fix diagnostics/session usage limit handling and voice-call numeric CLI validation.

- Treat explicit zero, negative, and non-finite diagnostics/session limits as empty results instead of falling back to defaults.
- Reject invalid, non-finite, and fractional voice-call numeric flags.
- Add focused tests and a live repro proof for the canonical edge cases.

Fixes #82646, #82650, #82651, #82653.

Co-authored-by: wuyangfan <1102042793@qq.com>
2026-05-17 00:11:46 +01:00
Josh Avant
99a269f8b4 fix(agents): mark interrupted sessions before restart (#82772)
* fix(agents): mark interrupted sessions before restart

* docs: add restart recovery changelog

* fix(agents): satisfy restart recovery type checks
2026-05-16 18:11:35 -05:00
Peter Steinberger
0190f4ae1e fix: finish inbound event rebase (#82606) 2026-05-17 00:10:29 +01:00
Peter Steinberger
d0efaceb97 fix: keep room events quiet across legacy helpers 2026-05-17 00:10:29 +01:00