Commit Graph

7312 Commits

Author SHA1 Message Date
clawsweeper[bot]
d44553dade fix(gateway): wire max_completion_tokens/max_tokens through openai-http (#81013)
Summary:
- The branch adds Chat Completions token-cap fields to the Gateway request type, forwards them as agent stream parameters, and documents/tests the behavior.
- Reproducibility: yes. Source inspection gives a high-confidence current-main path: send `max_completion_toke ... tokens` to `/v1/chat/completions` and observe that the current handler never sets `streamParams.maxTokens`.

Automerge notes:
- PR branch already contained follow-up commit before automerge: fix(gateway): wire max_completion_tokens/max_tokens through openai-http

Validation:
- ClawSweeper review passed for head a9c39f7d4a.
- Required merge gates passed before the squash merge.

Prepared head SHA: a9c39f7d4a
Review: https://github.com/openclaw/openclaw/pull/81013#issuecomment-4430303959

Co-authored-by: Bingsen <dingheng.huang@urbanic.com>
Co-authored-by: clawsweeper <274271284+clawsweeper[bot]@users.noreply.github.com>
2026-05-12 12:08:07 +00:00
Super Zheng
a92d5fe77d feat(agents): make run loop retry limits configurable in openclaw.json (#80661)
Merged via squash.

Prepared head SHA: d595d51a5a
Co-authored-by: medns <1575008+medns@users.noreply.github.com>
Co-authored-by: odysseus0 <8635094+odysseus0@users.noreply.github.com>
Reviewed-by: @odysseus0
2026-05-12 04:43:12 -07:00
Ayaan Zaidi
c025291df7 docs(docker): document auth profile key mount 2026-05-12 16:35:53 +05:30
Pavan Kumar Gondhi
da6f32bedf fix(gateway): honor minimal discovery mode for wide-area DNS-SD [AI] (#80903)
* fix: respect discovery mode for wide-area cli path

* addressing codex review

* docs: add changelog entry for PR merge
2026-05-12 16:03:50 +05:30
Ayaan Zaidi
b480b29dc7 fix(telegram): preserve supported html replies 2026-05-12 15:54:01 +05:30
kinjitakabe
09a2d6e571 fix(matrix): default markdown tables to bullets across Matrix clients
Matrix outbound markdown was hitting the shared `resolveMarkdownTableMode`
"code" fallback for every send because the Matrix channel plugin never
declared `defaultMarkdownTableMode` in its `messaging` block at
`extensions/matrix/src/channel.ts:452`. Tables were emitted as
`<pre><code>` fenced blocks across every Matrix client.

This change declares `defaultMarkdownTableMode: "bullets"`, matching the
Signal and WhatsApp precedent at `extensions/signal/src/shared.ts:111`
and `extensions/whatsapp/src/shared.ts:261`. The choice matches the
cross-client compatibility profile the issue filer surveyed:
Element X iOS squashes HTML `<table>` and Element X Android drops cell
text entirely (element-hq/element-x-android#1551), while bullet lists
render cleanly across every Matrix client. Operators wanting the
previous fenced-code rendering can set `channels.matrix.markdown.tables:
"code"` explicitly; clients that do render real tables can opt in with
`channels.matrix.markdown.tables: "off"` (markdown-it's `table` rule is
already enabled by default through the markdown-it default preset, so
raw markdown tables flow through to native HTML tables on that path).

Docs and the changelog entry list Matrix alongside Signal and WhatsApp
as a bullet-default channel.

Fixes #78990.
2026-05-12 15:15:05 +05:30
Mariano
d728ff8183 fix(codex): release quiet completed app-server turns (#80776)
Merged via squash.

Prepared head SHA: 59baf4110b

Reviewed-by: @mbelinky
2026-05-12 09:39:09 +02:00
B.K.
109493bcdd fix(update): mandatory post-core plugin convergence before gateway restart
Summary:
- validate active plugin payloads, including openclaw.extensions entry files, after core package updates
- treat corrupt active install records without installPath as convergence failures
- prevent managed gateway recovery restart when post-core plugin convergence fails

Verification:
- CI=true pnpm test src/cli/update-cli/plugin-payload-validation.test.ts src/cli/update-cli/post-core-plugin-convergence.test.ts src/cli/update-cli.test.ts src/commands/doctor/shared/missing-configured-plugin-install.test.ts src/commands/doctor/shared/update-phase.test.ts
- CI=true pnpm check:changed
- PR checks green for 2afa84dffe
2026-05-12 08:02:10 +01:00
Alex Naidis
a290cd633f fix(doctor): repair managed plugin peer links
Repair managed npm plugin OpenClaw peer links across doctor, install, and update flows.

- relink `peerDependencies.openclaw` packages under managed npm roots during doctor repair
- make read-only doctor preview broken peer links with a `doctor --fix` hint
- reject target plugin installs when their own peer link cannot be repaired, without blocking unrelated installs for stale sibling packages
- preserve update warning behavior for unrepairable package-local `node_modules`

Verification:
- `pnpm test src/plugins/plugin-peer-link.test.ts src/plugins/install.test.ts src/plugins/install.npm-spec.test.ts src/plugins/update.test.ts src/commands/doctor-plugin-registry.test.ts src/commands/doctor/repair-sequencing.test.ts -- --reporter=verbose`
- `pnpm exec oxfmt --check --threads=1 ...`
- `git diff --check`
- Crabbox/Testbox `tbx_01krde1jx199rnpm2rv1rdcj76`: focused tests + `pnpm check:changed`, exit 0
- Real CLI proof in PR body: read-only `openclaw doctor` warning plus `openclaw doctor --fix` symlink repair

Thanks @TheCrazyLex.
2026-05-12 07:49:08 +01:00
Kaspre
5375281974 fix(plugins): load untracked TS source plugins 2026-05-12 07:08:38 +01:00
remdev
5c87b692cb feat(openrouter): add inbound audio STT support 2026-05-12 06:50:12 +01:00
Peter Steinberger
c98698aa0e chore: release 2026.5.12-beta.1 2026-05-12 06:33:41 +01:00
Peter Steinberger
a4acd33097 ci: speed up beta release verification
(cherry picked from commit 7ca9b58a27)
2026-05-12 06:21:09 +01:00
Vincent Koc
d6d7b048ff docs(help): correct built-in opus/gpt aliases to match DEFAULT_MODEL_ALIASES 2026-05-12 11:04:19 +08:00
Kevin Lin
8954c03231 fix(codex): default plugin destructive actions on (#80792) 2026-05-11 16:50:15 -07:00
pashpashpash
3b44dfc367 Make OpenAI auth login use ChatGPT by default (#80790)
* fix(openai): default provider login to ChatGPT auth

* fix(openai): align auth login metadata and fast tests

* fix(openai): prefer setup auth providers for login

* fix(openai): reject unknown explicit auth methods

* fix(line): keep channel entry imports scoped
2026-05-12 08:17:14 +09:00
Omar Shahine
d7a9248620 fix(imessage): route inbound tapbacks as reactions
Route inbound iMessage tapbacks as untrusted reaction system events, add reaction notification configuration/docs, and cover reply-cache ownership matching for bot-authored targets.
2026-05-11 16:13:29 -07:00
Kevin Lin
f5b0eca12a docs: reorganize tools automation nav (#80116)
* docs: reorganize tools automation nav

* docs: add nav spec glossary terms

* docs: refresh nav spec validation

* docs: keep capabilities nav grouped

* docs: refactor tools overview

* docs: restore tools overview coverage

* add doc refactor skill

* docs: mark refactored docs schema

* docs: remove refactor specs from pr

* docs: rename tools overview header
2026-05-11 15:59:27 -07:00
Val Alexander
51b73b39a8 fix(auth): align operator bootstrap scopes
Preserve full shared-token operator sessions while reusing bootstrap/cached device-token scopes for handoff reconnects.

Surface device-token scope mismatches as AUTH_SCOPE_MISMATCH and stop reconnect retry loops without clearing valid stored tokens.

Fixes #79292.
Supersedes #79314, #79296, #79295.
2026-05-11 14:14:33 -05:00
Mariano
8c75ed3eaa Mirror Codex native subagents into task registry (#79512)
Merged via squash.

Prepared head SHA: 75bc96ad74
Co-authored-by: mbelinky <mbelinky@users.noreply.github.com>
Co-authored-by: marianobelinky <63976030+marianobelinky@users.noreply.github.com>
Reviewed-by: @pashpashpash
2026-05-11 20:52:41 +02:00
AI-HUB
578fad471a docs(subagents): document announce timeout (#75509)
Document agents.defaults.subagents.announceTimeoutMs in the sub-agent and configuration references, and align the exported type comment with the runtime default.

Thanks @akrimm702.

Co-authored-by: AI-HUB <144416483+akrimm702@users.noreply.github.com>
2026-05-11 19:33:50 +01:00
jesse-merhi
79c2ed9065 feat: make exec command highlighting optional 2026-05-12 03:59:30 +10:00
samzong
380a679313 feat(cron): add direct job lookup
Signed-off-by: samzong <samzong.lu@gmail.com>
2026-05-11 18:47:46 +01:00
Omar Shahine
efc8641393 fix: add channel status filtering (#80706)
Summary:
- Add `openclaw channels status --channel <name>` filtering through CLI, gateway protocol, and fallback status rendering.
- Document the BlueBubbles-to-iMessage cutover path so operators can probe iMessage without starting both monitors.
- Refresh generated Swift protocol model for the new optional channel status parameter.

Verification:
- `pnpm test src/gateway/server-methods/channels.status.test.ts src/commands/channels.status.command-flow.test.ts src/cli/program/routes.test.ts -- --reporter=verbose`
- `CI=true pnpm check:docs`
- `pnpm protocol:check`
- `git diff --check`
- `node scripts/check-changelog-attributions.mjs`
- CI head `45b27e3866`: focused/docs/protocol shards green locally; GitHub broad/scanner jobs queued for runners at merge attempt time; `Real behavior proof` failure is the maintainer-ignorable external-real-proof complaint.
2026-05-11 18:44:54 +01:00
samzong
df30515315 feat(acp): expose session lineage metadata
Signed-off-by: samzong <samzong.lu@gmail.com>
2026-05-11 18:32:46 +01:00
Peter Steinberger
309f000341 docs: format Codex harness options 2026-05-11 18:23:00 +01:00
Peter Steinberger
694f40fcee fix: constrain Codex app-server sandbox 2026-05-11 18:23:00 +01:00
Peter Steinberger
738f94b290 fix: clarify update warning states 2026-05-11 18:02:05 +01:00
Jerran C.
530b892f06 feat(tools): add per-sender tool policies (#66933)
Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-05-11 18:01:39 +01:00
Peter Steinberger
234ebf434f fix: honor configured media timeouts 2026-05-11 17:55:56 +01:00
Frank Yang
678b2510b2 fix: abort generic no-progress tool loops
Abort generic repeated no-progress tool loops at the configured critical threshold when identical calls keep returning identical outcomes.

Prepared head SHA: 7fa287cd0f
2026-05-12 00:29:10 +08:00
pandadev66
dfa1a11676 fix(gateway): fire typed session_end on shutdown/restart for active sessions (#57790)
`session_end` was only fired when a session was replaced, reset, deleted, or
compacted -- the gateway shutdown/restart paths closed the process without
enumerating active sessions, so downstream `session_end` plugins
(e.g. claude-mem) accumulated ghost rows in `active` state across restarts.
Issue reporter saw 11 orphaned sessions cause 63 timeouts/day from agent
pool exhaustion.

Add an in-memory active-session tracker
(`src/gateway/active-sessions-shutdown-tracker.ts`) populated by
`emitGatewaySessionStartPluginHook` and forgotten unconditionally by
`emitGatewaySessionEndPluginHook` (even when no plugin listens), so any
session that has already been finalized through the normal lifecycle is
never re-fired by the shutdown drain. The close handler then calls a new
`drainActiveSessionsForShutdown({ reason })` in `session-reset-service.ts`
between the `gateway:shutdown`/`gateway:pre-restart` lifecycle hooks and
the subsystem teardown steps; the drain races a bounded 2 s total timeout
so a slow plugin cannot block SIGTERM/SIGINT, surfacing the timeout as a
`session-end-drain` warning on the shutdown result.

Extend `PluginHookSessionEndReason` with `"shutdown"` and `"restart"` so
plugins can distinguish a graceful close from a planned restart; the close
handler picks `restart` when `restartExpectedMs` is set and `shutdown`
otherwise. Update `emitGatewaySessionStartPluginHook` to also accept
`storePath`, `sessionFile`, and `agentId` so the shutdown drain can build
the same `session_end` payload shape the normal lifecycle path emits, and
update the existing call sites in `session-reset-service.ts` and
`server-methods/sessions.ts` to pass those fields through.

Tests:

- `src/gateway/active-sessions-shutdown-tracker.test.ts` (new) -- tracker
  insert/forget/clear semantics, idempotent re-noting, empty-id guard,
  snapshot isolation.
- `src/gateway/drain-active-sessions-for-shutdown.test.ts` (new) -- drain
  fires `session_end` with the right reason for every tracked session,
  skips sessions already finalized via reset/delete/compaction, and still
  forgets sessions even when no `session_end` plugin is registered.
- `src/gateway/server-close.test.ts` -- four new cases covering the
  shutdown/restart drain wiring, the bounded timeout warning, and the
  drain-skipped-when-no-helper case.

Docs:

- `docs/plugins/hooks.md` documents the new `shutdown`/`restart` values
  on `PluginHookSessionEndReason`.
- `docs/automation/hooks.md` documents the post-`gateway:shutdown`
  `session_end` drain step and its bounded execution guarantee.

Fixes #57790.
2026-05-11 17:28:23 +01:00
Kaspre
8399ff888f docs(system event): document --session-key timing exception
Codex review on PR #78687 [P3] flagged that the docs say next-heartbeat
"waits for the next scheduled tick" while the patched timer collapses
next-heartbeat+sessionKey to an immediate targeted wake. Add a callout
describing the exception and pointing callers who want delayed delivery
back at the no-session-key path.

Refs #78687.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-11 17:24:30 +01:00
Kaspre
4ddd942f5f feat(wake): expose typed sessionKey on wake protocol + system event CLI
Adds an optional sessionKey to the WakeParamsSchema and threads it through
the gateway wake handler, CronService.wake(), and the underlying timer.wake()
ops so callers can target a specific session for async-task completion
relays instead of always hitting the agent's main session.

Also adds --session-key to `openclaw system event`.

The schema rejects empty/non-string sessionKey at the gateway boundary;
mismatched session keys (a key that does not belong to the resolving agent)
fall back to the agent's main session inside resolveCronSessionKey, which
is the existing safety path.

Refs #52305 (companion to PR #50818, which closes the related cron-run
remap slice at internal enqueue sites). Doesn't depend on #50818.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-11 17:24:30 +01:00
Neerav Makwana
5171c2654a fix(models/auth): preserve primary when login omits --set-default
Provider applyConfig patches merged during models auth login could replace
agents.defaults.model.primary even without --set-default. Snapshot the prior
defaults.model and restore it after the patch unless the user opts in.

Fixes #78162.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-11 16:16:49 +01:00
Jayesh Betala
0c9f34eac1 fix(telegram): honor forced document videos
Fixes #80389. Thanks @jbetala7.
2026-05-11 20:27:36 +05:30
FullerStackDev
b8e9492086 fix(bonjour): back off probing watchdog repairs 2026-05-11 15:42:39 +01:00
VACInc
a28bf10ce2 fix(codex): observe native tool completions 2026-05-11 14:23:46 +01:00
Val Alexander
42fc84f4b4 fix(control-ui): add static mount fallback
Summary:
- Add a plain HTML Control UI fallback when the module app never mounts.
- Document blank-page recovery guidance and keep the fallback retry-friendly.
- Cover the timeout path with iframe-isolated regression tests.

Verification:
- pnpm exec oxfmt --check --threads=1 ui/index.html ui/src/ui/mount-fallback.test.ts
- pnpm test ui/src/ui/app.talk.test.ts ui/src/ui/mount-fallback.test.ts
- pnpm ui:build
- pnpm check:changed
- GitHub CI for 8ef18e8bca completed without failures.
2026-05-11 08:03:49 -05:00
Peter Steinberger
da7cc2b11c fix(feishu): make manual setup the default 2026-05-11 13:29:13 +01:00
Peter Steinberger
fb11851c7f docs: refresh config baseline 2026-05-11 13:21:47 +01:00
Peter Steinberger
0362b75824 feat(discord): add voice channel allowlist 2026-05-11 13:21:47 +01:00
Peter Steinberger
1cbe6e271b fix(exec): address security floor review 2026-05-11 13:18:50 +01:00
Peter Steinberger
1f49d34c5f fix(gateway): preserve batched client tool calls 2026-05-11 13:06:05 +01:00
Lellansin
0e6aca34db fix(gateway): align OpenAI chat completions tool protocol
fix(gateway): remove unnecessary type assertion in buildAgentPrompt

fix(gateway): reject unsupported forced tool_choice modes

tool_choice=required and named function tool_choice are now rejected
with invalid_request_error until hard enforcement is implemented
at the agent runtime layer. Only auto and none remain supported.

docs: update Chat Completions tool_choice contract to match rejection behavior

Only auto and none are currently accepted; required and named
function tool_choice are rejected until hard enforcement exists.
2026-05-11 13:06:05 +01:00
Peter Steinberger
913c621adb ci: add plugin inspector prerelease advisory 2026-05-11 12:46:33 +01:00
pashpashpash
e9f8387a63 docs: align slash command btw contract 2026-05-11 12:41:21 +01:00
pashpashpash
ddc9581d00 fix(codex): preserve side thread tools 2026-05-11 12:41:21 +01:00
pashpashpash
cc95d4dd28 fix(codex): rotate auth profiles inside harness 2026-05-11 12:41:21 +01:00
pashpashpash
f447e5b9db fix(btw): keep Codex side questions tool-free 2026-05-11 12:41:21 +01:00