Commit Graph

12116 Commits

Author SHA1 Message Date
Peter Steinberger
df659d124d refactor(telegram): encode conversation binding mode 2026-05-27 03:26:31 +01:00
Agustin Rivera
06047005ef fix(browser): validate current tab before snapshots (#78526)
* fix(browser): validate current tab before snapshots

* fix(browser): reject snapshot selector before SSRF guard

* fix(test): stabilize plugin activation normalization

* fix(ci): fetch opengrep base history

* fix(snapshot): enforce snapshot ssrf policy

* docs(changelog): add unreleased entry for snapshot SSRF fix

* Revert "docs(changelog): add unreleased entry for snapshot SSRF fix"

This reverts commit 4f3031ff65.

* fix(changelog): record snapshot ssrf entry
2026-05-26 19:11:01 -07:00
Vincent Koc
d7d037b46f fix(codex): quarantine unsupported dynamic tool schemas 2026-05-27 04:02:07 +02:00
kesslerio
b8ea6d2aee fix(telegram): route plugin-bound topic messages 2026-05-27 02:52:25 +01:00
Vincent Koc
dfadc7b704 fix(ollama): normalize greedy top_p (#87049) 2026-05-27 02:41:30 +01:00
Michael Appel
10546e57dd clickclack: enforce inbound sender allowlist [AI] (#83741)
* fix: enforce clickclack sender allowlist

* addressing codex review

* test(clickclack): drop removed senderIsOwner from inbound test fixture
2026-05-26 18:41:12 -07:00
Shakker
c0f8224109 fix: resolve final codex mirror prompt 2026-05-27 02:38:58 +01:00
Shakker
2bd38da4b0 fix: mark final codex mirror user persistence 2026-05-27 02:38:58 +01:00
Shakker
c86214345f fix: keep user turn enrichment off dispatch 2026-05-27 02:38:58 +01:00
Shakker
696fb41c5b fix: restore user turn persistence checks 2026-05-27 02:38:58 +01:00
Shakker
44bdc521f7 refactor: carry prepared user turns on recorder 2026-05-27 02:38:58 +01:00
Shakker
ce465d4422 refactor: let recorder track runtime persistence pending 2026-05-27 02:38:58 +01:00
Shakker
51d3e363e3 fix: return persisted codex mirror user messages 2026-05-27 02:38:58 +01:00
Shakker
8caed9d66d fix: honor transcript hooks in user turn fallbacks 2026-05-27 02:38:58 +01:00
Shakker
dc692aa6f6 perf: avoid duplicate transcript idempotency scans 2026-05-27 02:38:58 +01:00
Shakker
209eadcd2d fix: notify codex prompt mirror persistence 2026-05-27 02:38:58 +01:00
Shakker
cf265732c7 fix: mirror prepared codex user turns 2026-05-27 02:38:58 +01:00
Agustin Rivera
42b8898e8e fix(filefetch): wrap fetched text as external content (#87062)
* fix(filefetch): wrap fetched text as external content

* fix(release): add file transfer changelog entry
2026-05-26 18:29:48 -07:00
Zee Zheng
e9823023f4 fix(memory-core): close providers created during shutdown
Refactor memory close provider draining so providers created during shutdown are closed through the same bounded retry path.

Co-authored-by: spacegeologist <zheng.zuo0@gmail.com>
2026-05-27 02:22:05 +01:00
Peter Steinberger
2035f38ab2 perf: trim gateway runtime hotspots 2026-05-27 02:17:29 +01:00
Peter Steinberger
1dbd9a3154 fix(codex): avoid false queued terminal idle timeout (#87096) 2026-05-27 01:57:08 +01:00
Peter Steinberger
a43da0c8c5 perf: reduce gateway cpu churn 2026-05-27 01:52:27 +01:00
JanusAsmussen
84e62824f6 fix(anthropic): pass system prompt on resumed claude-cli sessions
Summary:
- send Claude CLI system prompt files on resumed turns when backend policy is always
- set Claude CLI default systemPromptWhen to always
- add argv/unit coverage plus live ALPHA-to-BRAVO resume proof for #80374

Verification:
- pnpm test src/agents/cli-runner/helpers.system-prompt-resume.test.ts extensions/anthropic/cli-shared.test.ts src/agents/cli-backends.test.ts test/scripts/test-live-shard.test.ts -- --reporter=verbose
- OPENCLAW_LIVE_TEST=1 OPENCLAW_LIVE_USE_REAL_HOME=1 OPENCLAW_LIVE_CLI_BACKEND=true OPENCLAW_LIVE_CLI_BACKEND_MODEL=claude-cli/claude-haiku-4-5 node scripts/run-vitest.mjs run --config test/vitest/vitest.live.config.ts src/gateway/gateway-cli-backend.system-prompt-resume.live.test.ts --reporter=verbose
- /Users/steipete/Projects/agent-scripts/skills/autoreview/scripts/autoreview --mode local
- git diff --check
- gitcrawl gh pr checks 86433 --repo openclaw/openclaw --watch=false --required

Co-authored-by: JanusAsmussen <jjasmussen@outlook.com>
Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-05-27 01:31:13 +01:00
uday
0f18d52f16 fix(codex): raise dynamic tool timeout 2026-05-27 01:25:48 +01:00
Jason (Json)
ee655f4d94 fix: scrub serialized tool-call text from replies (#86924)
* fix: scrub serialized tool-call text from replies

* fix: consume xmlish tool parameters
2026-05-27 01:16:58 +01:00
Peter Steinberger
9cd1d27a89 fix(slack): fast-path wildcard open DM policy 2026-05-27 00:50:48 +01:00
Steven
bf8be79b88 fix(irc): use channel routes for group inbound targets
Fix IRC group inbound metadata so `To` uses the same `channel:#name` route shape as `From` and `OriginatingTo`.

This keeps IRC group message context consistent for reply/session routing metadata.

Verification:
- `git diff --check origin/main...FETCH_HEAD`
- `git merge-tree origin/main FETCH_HEAD`
- `node scripts/run-vitest.mjs extensions/irc/src/inbound.behavior.test.ts --run` (1 file / 4 tests passed)
- `gh pr checks 86721 --repo openclaw/openclaw --json name,state,link,bucket,workflow` (pass/skip only; no required checks reported)
2026-05-27 00:44:12 +01:00
Jason (Json)
532494b12a Preserve xAI usage limit errors in local TUI (#86614)
* fix: preserve xai usage limit errors

* fix: classify actual xai credit errors

* fix: classify xai 429 billing exhaustion

---------

Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-05-27 00:43:55 +01:00
Peter Steinberger
980d73dc5a perf: speed up test hotspots 2026-05-27 00:30:51 +01:00
Peter Steinberger
0f608bc497 test: speed up hot test fixtures 2026-05-27 00:11:23 +01:00
Peter Steinberger
84a33c743e fix: preserve whatsapp inbound batch order 2026-05-26 18:51:18 -04:00
Kevin Lin
7d6b7f434c feat(plugin-sdk): add reaction approval helpers (#86735)
* feat(plugin-sdk): add reaction approval helpers

* fix(signal): register target approval reactions

* Remove legacy WhatsApp approval reaction appender

* refactor(plugin-sdk): share native exec prompt suppression

* revert(discord): keep exec prompt suppression local

* refactor(plugin-sdk): share native approval fallback suppression

* fix(whatsapp): bind outbound approval reactions

* chore(plugin-sdk): refresh api baseline

* revert(imessage): defer reaction approval changes
2026-05-26 15:28:50 -07:00
Frederic David blum
1e1cf14da2 fix(gateway): reject RPCs from invalidated device-token clients durin… (#70707)
* fix(gateway): reject RPCs from invalidated device-token clients during rotation/revoke race

device.token.rotate, device.token.revoke and device.pair.remove all
respond 200 OK to the admin, then schedule disconnectClientsForDevice
via queueMicrotask so the response can flush before the socket close.
That microtask window plus the absence of a per-RPC re-check for
device-token auth (unlike shared-auth, which gets checked at
message-handler.ts:1444-1458) created a race: an attacker with RPCs
already pipelined in the WS socket buffer could land a few more
authenticated operations with the rotated/revoked token before the
socket actually closed.

Fix: add a cheap in-memory 'invalidated' flag on GatewayWsClient and
mark it synchronously *before* responding in the three handlers. Add
a mirror check at the start of the per-RPC dispatch that force-closes
the client if the flag is set, regardless of whether socket.close()
has taken effect yet. Disconnect still happens via queueMicrotask so
the admin's rotate/revoke response flushes normally.

Introduces context.invalidateClientsForDevice(deviceId, opts) as a
sync companion to the existing disconnectClientsForDevice. Also
defense-in-depth: disconnectClientsForDevice now sets the flag too,
so any other caller of the hard-disconnect path gets the per-RPC
gate for free.

* test(gateway): use vi.mocked instead of direct Mock casts in devices tests

check-test-types failed on the PR because direct 'as ReturnType<typeof vi.fn>' casts from RespondFn (or the optional context methods) don't structurally overlap with the Mock type — Mock has mockImplementation/mockReturnValue that RespondFn lacks, so strict tsgo rejects the conversion. vi.mocked() is the intended helper for reinterpreting an already-mocked function, and drops through to the Mock surface cleanly.

* test(gateway): align tests with upstream type/shape changes after rebase

After rebasing onto upstream main, two test surfaces drifted:

1. GatewayRequestContextParams gained two required fields upstream
   (getRuntimeConfig, broadcastVoiceWakeRoutingChanged). The
   makeContextParams test helper was missing them, so every consumer
   tripped tsgo with a missing-field error. Add both as vi.fn()
   stubs.

2. revokeDeviceToken's return shape changed upstream from a bare
   entry record to a discriminated union {ok: true, entry: ...} | {ok:
   false, reason}. The new device.token.revoke synchronous-invalidate
   test still mocked the old shape, so the production handler took the
   !revoked.ok branch and never reached the invalidateClientsForDevice
   call the test asserted. Update the mock to the new union shape.

Also fix three new Set([...] as never) sites in server-request-
context.test.ts that produced Set<unknown> rather than Set<never>.
Move the cast outside the Set constructor so the literal stays
inferred while the wrapper is type-erased to never, which is
assignable to the Partial<GatewayRequestContextParams> clients field.

* fix(gateway): export GatewayRequestContextParams for test access

* fix(ci): resolve check-test-types and lint failures from PR #70707 branch

- server-request-context.test.ts: hasConnectedMobileNode → hasConnectedTalkNode
  (field renamed in server-request-context.ts but test fixture not updated)
- status.summary.redaction.test.ts: add configuredModel/selectedModel/
  modelSelectionReason to createRecentSessionRow fixture
  (SessionStatus gained these fields in a13468320c; test was not updated)
- video-generation-providers.live.test.ts: replace empty {} fallbacks in
  conditional spreads with undefined (oxlint 1.65.0, 5 occurrences)
- music-generation-providers.live.test.ts: same fix for 4 occurrences

Remaining CI failures (FsSafeError/Python helper, media tests, Windows ACL,
session-memory hooks) are pre-existing infra failures unrelated to this PR.

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>

* fix(ci): add missing GatewayRequestContextParams fields to test fixture

chatDeltaLastBroadcastText, agentDeltaSentAt, and bufferedAgentEvents are
required fields in GatewayRequestContextParams but were absent from the
makeContextParams fixture, causing TS2322 in check-test-types.

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>

* fix(gateway): serialize credential invalidating RPCs

---------

Co-authored-by: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-05-26 23:09:56 +01:00
Thesaranshn8n
6729dea36f fix(codex): share native hook relay registry (#73950)
Co-authored-by: Sar Jeeves <sar-jeeves@example.com>
Co-authored-by: Kaspre <kaspre@gmail.com>
Co-authored-by: Dallin Romney <dallinromney@gmail.com>
2026-05-26 15:02:03 -07:00
Peter Steinberger
5a684c4553 fix(release): stabilize plugin prerelease tests
(cherry picked from commit ea42c1db8a)
2026-05-26 22:54:12 +01:00
Vincent Koc
c4b9f54b46 fix(diagnostics): flush OTel trace batches
Apply diagnostics.otel.flushIntervalMs to OpenTelemetry trace batching so short-lived Windows and QA runs do not lose late lifecycle/model spans. Also make the OTel QA smoke wait for required telemetry and print bounded failure diagnostics.
2026-05-26 22:46:39 +01:00
Peter Steinberger
d569e41c58 fix(memory): reject invalid CLI numeric options
Fixes memory CLI numeric parsing bugs found by clawpatch.

- memory CLI numeric options now reject non-finite values before command runtime.
- wiki apply `--confidence` now enforces the documented 0..1 range before metadata mutation.
- Commander parse-error UX is preserved without importing `commander` at bundled plugin runtime.

Proof:
- `node scripts/run-vitest.mjs extensions/memory-core/src/cli.test.ts extensions/memory-wiki/src/cli.test.ts`
- `pnpm exec oxfmt --check --threads=1 extensions/memory-core/src/cli.ts extensions/memory-core/src/cli.test.ts extensions/memory-wiki/src/cli.ts extensions/memory-wiki/src/cli.test.ts`
- `git diff --check`
- `.agents/skills/autoreview/scripts/autoreview --mode branch --base origin/main`
- Real CLI proof: invalid memory `--max-results` and wiki `--confidence` both fail with Commander parse errors before actions run.
- GitHub PR checks green: 67 success, 29 skipped, 1 neutral.
2026-05-26 22:42:48 +01:00
Peter Steinberger
5a7d5c6def fix(codex): bound app-server timeout fallout
Retire timed-out Codex app-server clients with lease-aware cleanup and keep harness-owned timeouts out of provider fallback.
2026-05-26 22:41:02 +01:00
Peter Steinberger
a818556dd9 fix: stabilize media-related tests 2026-05-26 17:30:34 -04:00
吴杨帆
77505daa85 fix(telegram): preserve command slots for aliases (#85270)
* fix(telegram): preserve command slots for aliases

* fix: report Telegram alias command overflow

* fix: preserve Telegram alias menu order

* docs: drop release-owned changelog entry

---------

Co-authored-by: wuyangfan <yangfan.wu@succaiss.com>
Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-05-26 22:24:03 +01:00
Peter Steinberger
cee8c8773b build: use rastermill 0.3.0 2026-05-26 21:55:57 +01:00
Peter Steinberger
50b98a1878 refactor: delegate image processing to Rastermill 2026-05-26 21:55:57 +01:00
Peter Steinberger
80655fe955 test: fix current suite drift 2026-05-26 16:40:08 -04:00
Peter Steinberger
d8a14e77c3 fix(deps): pin shrinkwrap patch drift to pnpm lock 2026-05-26 16:35:10 -04:00
Andy Ye
bf0228b5c2 fix(codex): project newer history on app-server resume (#86677)
Project newer external OpenClaw chat history into resumed Codex app-server threads when the saved binding is older than user-visible transcript messages, while filtering Codex-owned mirror records on consecutive resumes.

Thanks @TurboTheTurtle!
2026-05-26 21:07:07 +01:00
pashpashpash
3a64dc7623 fix(codex): keep turn timeouts inside Codex (#86476)
Keep Codex app-server turn timeouts within the Codex runtime boundary so they interrupt the active turn without retiring the shared app-server client, poisoning auth-profile cooldowns, or falling through to generic provider/model fallback.

Preserve concrete non-timeout provider failures for auth-profile rotation and fallback, and add regression coverage for prompt-stage timeouts, assistant idle timeouts, auth-profile cooldowns, and app-server timeout handling.

Thanks @pashpashpash.
2026-05-26 21:06:19 +01:00
Keshav's Bot
21c25bbb9d fix(codex): gate profiler timing and startup setup 2026-05-26 20:51:00 +01:00
Keshav's Bot
0afccc62ab fix(telegram): refine typing and progress drafts 2026-05-26 20:51:00 +01:00
rendrag-git
e9dd1c43c4 feat(discord): bucket large model picker menus
Summary:
- Add alpha-bucket selects when the Discord provider/model picker exceeds select-menu limits.
- Split bucket/runtime lookup helpers and keep compact recents runtime decoding provider-scoped.

Verification:
- node scripts/run-vitest.mjs --config test/vitest/vitest.extension-discord.config.ts extensions/discord/src/monitor/model-picker.test.ts extensions/discord/src/monitor/native-command.model-picker.test.ts
- node scripts/run-tsgo.mjs
- git diff --check origin/main...HEAD
- autoreview --mode local: no accepted/actionable findings
- CI run 26468173320, OpenGrep run 26468171525, CodeQL Critical Quality run 26468171885

Co-authored-by: rendrag-git <253747599+rendrag-git@users.noreply.github.com>
Co-authored-by: Vincent Koc <vincentkoc@ieee.org>
Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-05-26 19:52:50 +01:00
alexph-dev
aa117ec4de fix(telegram): derive DM topics from bot capability
Remove the Telegram DM thread reply policy config and use Telegram bot capability as the single source of truth for DM topic session splitting.

DM messages with message_thread_id now split into thread-scoped sessions only when Telegram getMe reports has_topics_enabled for the bot. Doctor removes retired dm.threadReplies and direct.*.threadReplies keys, docs explain the upgrade behavior, and startup keeps cached bot info as a non-auth fallback when a fresh probe fails.

Refs #86513.
Thanks @alexph-dev.

Verification:
- pnpm docs:list
- pnpm exec oxfmt --check --threads=1 extensions/telegram/src/channel.ts extensions/telegram/src/channel.gateway.test.ts extensions/telegram/src/doctor-contract.ts extensions/telegram/src/doctor.test.ts
- git diff --check
- node scripts/run-vitest.mjs extensions/telegram/src/channel.gateway.test.ts extensions/telegram/src/doctor.test.ts extensions/telegram/src/bot/helpers.test.ts extensions/telegram/src/bot-message-context.dm-threads.test.ts extensions/telegram/src/config-schema.test.ts
- pnpm config:channels:check
- pnpm config:docs:check
- .agents/skills/autoreview/scripts/autoreview --mode local
- GitHub Actions: CI 26468039803, Workflow Sanity 26468040057, OpenGrep 26468039472, Real behavior proof 26468036483, CodeQL 26468039466, CodeQL Critical Quality 26468039473

Known CI caveat: checks-windows-node-test failed before tests because Windows runner setup left Node 22.19.0 active while the job requested Node 24.x; the same setup failure is present on current main CI run 26468063947.
2026-05-26 19:52:17 +01:00