Commit Graph

29765 Commits

Author SHA1 Message Date
Peter Steinberger
fa2ee2af85 test: enforce browser cdp policy before playwright 2026-04-10 17:21:19 +01:00
Gustavo Madeira Santana
0dd8ce72a2 Matrix: consolidate migration status routing (#64373)
Merged via squash.

Prepared head SHA: dfe29e36bb
Co-authored-by: gumadeiras <5599352+gumadeiras@users.noreply.github.com>
Co-authored-by: gumadeiras <5599352+gumadeiras@users.noreply.github.com>
Reviewed-by: @gumadeiras
2026-04-10 12:20:13 -04:00
Lellansin Huang
2ccd1839f2 fix: return real usage for OpenAI-compatible chat completions (#62986) (thanks @Lellansin)
* Gateway: fix chat completions usage compatibility

* Gateway: clarify usage-gated stream wait

* Gateway: preserve aggregate usage totals

* Agents: clamp usage components before total

* fix(gateway): bound usage stream finalization

* fix: add OpenAI compat usage changelog (#62986) (thanks @Lellansin)

* fix(agents): emit lifecycle terminal events after flush

---------

Co-authored-by: Ayaan Zaidi <hi@obviy.us>
2026-04-10 21:46:24 +05:30
Peter Steinberger
f64c84ab6b test: narrow command doctor helper coverage 2026-04-10 17:11:57 +01:00
Peter Steinberger
253982d05f test: keep command setup hook tests narrow 2026-04-10 17:08:38 +01:00
Peter Steinberger
be9bef32df perf: cache local tsgo checks 2026-04-10 17:06:28 +01:00
Peter Steinberger
aaf38acc07 test: keep legacy migration tests core-only 2026-04-10 17:03:38 +01:00
Devin Robison
48c0347921 fix: in the browser extension s tabs action route the (#310) (#63332)
* fix: in the browser extension s tabs action route the (#310)

* fix(browser): fail closed for tab close and CDP redirects

* fix(browser): sanitize tab SSRF policy errors

* chore(changelog): add browser tabs action policy enforcement entry

* fix(browser): differentiate CDP endpoint blocks from navigation blocks in error mapping

Split SsrFBlockedError handling so navigation-target policy failures
(from assertBrowserNavigationAllowed) surface as 'browser navigation
blocked by policy' while CDP endpoint policy failures (from
assertCdpEndpointAllowed) surface as 'browser endpoint blocked by
policy'. Both stay sanitized so raw policy details still do not leak
to callers.

- Add BrowserCdpEndpointBlockedError (extends BrowserError, 400).
- assertCdpEndpointAllowed now catches SsrFBlockedError and rethrows
  as BrowserCdpEndpointBlockedError so the route error mapping can
  route endpoint vs navigation failures to the right user-facing
  message without inspecting stack strings.
- toBrowserErrorResponse: raw SsrFBlockedError now maps to the
  navigation-blocked message; endpoint-blocked errors are handled by
  the existing BrowserError branch and keep the endpoint-blocked
  message.
- Update tests that exercised the endpoint path to assert the new
  error class instead of the raw SSRF message.

* fix(browser): move SSRF check after cache hit and thread ssrfPolicy through tryTerminateExecutionViaCdp

- connectBrowser: move assertCdpEndpointAllowed after cache lookup so
  transient DNS failures don't break active cached sessions.
- tryTerminateExecutionViaCdp: accept ssrfPolicy and run
  assertCdpEndpointAllowed before HTTP/WS I/O so the terminate path
  doesn't bypass SSRF policy enforcement.
- forceDisconnectPlaywrightForTarget: thread ssrfPolicy through to
  tryTerminateExecutionViaCdp.

* fix(browser): drop redundant pre-Playwright SSRF checks so cached sessions survive DNS blips

Remove assertProfileCdpEndpointAllowed() calls that precede
Playwright-backed tab operations (listPagesViaPlaywright,
focusPageByTargetIdViaPlaywright, closePageByTargetIdViaPlaywright)
since connectBrowser already runs the check on cache miss.

Keep the checks before raw CDP HTTP calls (fetchJson/fetchOk for
/json/list, /json/activate, /json/close) where there is no
connection cache.

Add comment on fetchCdpChecked explaining why redirect blocking
covers all CDP HTTP paths, not just probes.
2026-04-10 10:03:16 -06:00
Peter Steinberger
74f25c0e88 test: narrow doctor command warning coverage 2026-04-10 16:49:55 +01:00
Peter Steinberger
eddbc04f4b test: narrow command runtime config coverage 2026-04-10 16:46:09 +01:00
Peter Steinberger
8a5b7cf573 test: inject provider auth command fixtures 2026-04-10 16:41:10 +01:00
Peter Steinberger
d6ece7fb89 test: inject cli backend fixtures 2026-04-10 16:33:37 +01:00
Chunyue Wang
574bab80e5 fix(exec): disable onUpdate after run settlement to prevent gateway crash (#62821)
Squash-merged via maintainer prepare workflow.

Prepared head SHA: 431381ae1e

Co-authored-by: openperf <16864032@qq.com>
2026-04-10 23:33:25 +08:00
Peter Steinberger
eec19d5929 test: relax sandbox registry lock wait 2026-04-10 16:24:32 +01:00
neo1027144
2cf9ed782d fix(daemon): prevent systemd restart storm on config validation failure
Exit gateway configuration failures with EX_CONFIG and teach generated systemd units not to restart on that exit status.\n\nCo-authored-by: neo1027144-creator <neo1027144-creator@users.noreply.github.com>
2026-04-10 16:23:46 +01:00
Peter Steinberger
fc5a231e95 test: spread deterministic port blocks by process 2026-04-10 16:18:28 +01:00
Peter Steinberger
1628217114 test: avoid real signal exit in lock tests 2026-04-10 16:09:46 +01:00
Peter Steinberger
1000a85fb6 test: mock provider runtime in pi runner tests 2026-04-10 16:07:09 +01:00
Peter Steinberger
5c67fa7cc0 test: avoid plugin fallback in agents tests 2026-04-10 16:00:08 +01:00
evandance
4fb393980c feat(feishu): standardize request UA and register bot as AI agent (#63835)
- Set User-Agent to openclaw-feishu-builtin/{version}/{platform} for all
  Feishu API requests to comply with OAPI best practices
- Switch health-check probe to POST /bot/v1/openclaw_bot/ping to register
  the app as an AI agent (智能体) on the Feishu platform
- Update probe response parsing for new pingBotInfo response shape
2026-04-10 22:57:38 +08:00
Peter Steinberger
407da8edfc perf: trim tsgo input graph 2026-04-10 15:56:56 +01:00
Peter Steinberger
3522224b25 test: trim provider runtime from agents hotspots 2026-04-10 15:56:28 +01:00
Peter Steinberger
e9fb4c7f93 perf: skip tsgo declaration transforms 2026-04-10 15:52:07 +01:00
Peter Steinberger
56fc20fb7c test: align Vitest config path assertions 2026-04-10 15:49:37 +01:00
Nimrod Gutman
4b4ec4dbc2 fix(feishu): route /btw through out-of-band lanes (#64324)
* fix(feishu): route /btw through out-of-band lanes

* fix(feishu): bound btw out-of-band lanes

* fix: route feishu btw out-of-band (#64324) (thanks @ngutman)
2026-04-10 17:48:15 +03:00
Peter Steinberger
a1262e15a3 perf: reduce heartbeat prompt tokens 2026-04-10 15:38:39 +01:00
Peter Steinberger
3c0e5f0ea5 test: restore moved Vitest config paths 2026-04-10 15:38:14 +01:00
Peter Steinberger
a48eb84181 test: narrow nodes workspace guard imports 2026-04-10 15:37:48 +01:00
Peter Steinberger
1714e7bbe5 docs: credit Qwen tool-call text fix (#64214) (thanks @MoerAI) 2026-04-10 15:36:25 +01:00
MoerAI
a2fb063370 fix(text): strip Qwen-style XML tool call payloads from visible text (#63999) 2026-04-10 15:36:25 +01:00
Peter Steinberger
9fd08f9d0f refactor: remove type-only import cycles 2026-04-10 15:14:27 +01:00
Peter Steinberger
fe1fd055d5 fix: sanitize Gemini tool schema required fields (#64284) (thanks @xxxxxmax) 2026-04-10 15:01:37 +01:00
max
0dbcf81b34 fix: sanitize required fields in tool schemas for Gemini compatibility 2026-04-10 15:01:37 +01:00
Peter Steinberger
f621fb4aba refactor: centralize speech voice-note channel routing 2026-04-10 15:01:19 +01:00
Peter Steinberger
77bdf2f44d test: remove import-heavy files from unit-fast 2026-04-10 14:57:24 +01:00
Peter Steinberger
07e7222e28 test: split Claude CLI QA auth modes 2026-04-10 14:56:36 +01:00
Peter Steinberger
ddfd6c3401 fix: guard QA lab gateway health fetch (#64242) 2026-04-10 14:56:12 +01:00
Peter Steinberger
09a8e0f289 fix: keep bundled CLI backend fallback stable (#64242) 2026-04-10 14:56:12 +01:00
Peter Steinberger
beaff3c553 fix: clarify plugin command alias diagnostics (#64242) (thanks @feiskyer) 2026-04-10 14:56:12 +01:00
Pengfei Ni
8cb45c051e fix(config): give actionable guidance when command names are used in plugins.allow (#64191)
When users put a runtime command name like "dreaming" into `plugins.allow`,
validation now explains that it is a command provided by a specific plugin
(e.g. "memory-core") and suggests using the plugin id instead, rather than
the generic "plugin not found" warning that previously created a circular
trap with the CLI error message.

Similarly, running `openclaw dreaming` from the CLI now explains that
`/dreaming` is a runtime slash command (not a CLI command) and points users
to `openclaw memory` for CLI operations or `/dreaming` in a chat session.

Fixes two related UX problems:
1. `plugins.allow: ["dreaming"]` → validation warned "plugin not found"
2. `openclaw dreaming status` → CLI said "add dreaming to plugins.allow"
   (which then triggered problem 1)

Root cause: "dreaming" is a slash command registered by the memory-core
plugin via `api.registerCommand()`, not a standalone plugin or CLI command.
2026-04-10 14:56:12 +01:00
Alvin
65ef70b070 feat(matrix): add MSC4357 live streaming markers to draft-stream edits (#63513)
Merged via squash.

Prepared head SHA: 87a866a238
Co-authored-by: TigerInYourDream <48358093+TigerInYourDream@users.noreply.github.com>
Co-authored-by: gumadeiras <5599352+gumadeiras@users.noreply.github.com>
Reviewed-by: @gumadeiras
2026-04-10 09:47:43 -04:00
Peter Steinberger
3631ec1f54 fix: route Discord auto TTS as voice notes (#64096) (thanks @LiuHuaize) 2026-04-10 14:37:25 +01:00
liuhuaize
271d3b3bdb speech-core: fix TTS regression test typing 2026-04-10 14:37:25 +01:00
liuhuaize
b3d7fd166a speech-core: route Discord auto TTS as voice notes 2026-04-10 14:37:25 +01:00
Peter Steinberger
6286810388 test: add Claude CLI provider QA scenario 2026-04-10 14:23:19 +01:00
Peter Steinberger
1b1853f0cc test: restore moved Vitest config discovery 2026-04-10 14:20:39 +01:00
Peter Steinberger
d2b9d918af docs(changelog): thank @hanamizuki for #64172 2026-04-10 14:07:22 +01:00
Hana Chang
8c876e311f test(discord): prefer claude-sonnet-4-6 in thread-title fixture
Follow repo testing guideline to prefer sonnet-4.6 for Anthropic model
constants in tests (per CLAUDE.md, flagged by Greptile review on #64172).
2026-04-10 14:07:22 +01:00
Hana Chang
537479f5b0 fix(discord): raise thread title max tokens for reasoning models
When the simple-completion model selected for thread-title generation is a
reasoning model (e.g. MiniMax M2, Claude thinking models, OpenAI o-series),
the 24-token output budget is entirely consumed by the internal thinking
block before any user-visible text is emitted. extractAssistantText then
returns an empty string, generateThreadTitle returns null, and the
auto-thread rename is silently skipped while the feature appears to do
nothing.

Raise DISCORD_THREAD_TITLE_MAX_TOKENS to 512 so there is enough headroom
for a short thinking pass plus the 3-6 word title output. The generous
ceiling only matters when the provider actually reasons; non-reasoning
models still emit a short title and stop early at end-of-sequence.

Verified live against a MiniMax M2 reasoning model served through an
Anthropic-compatible API endpoint: before the fix, the rename never fired;
after the fix, the thread is renamed with a concise generated title.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-10 14:07:22 +01:00
ly85206559
13821fd54b fix(plugins): make service registration idempotent
Treat duplicate registerService calls from the same plugin id as idempotent so plugin snapshot and activation loads stop emitting spurious service already registered diagnostics.\n\nThanks @ly85206559.
2026-04-10 14:06:18 +01:00