Commit Graph

30639 Commits

Author SHA1 Message Date
Peter Steinberger
308af85991 fix(cli): harden generated completions 2026-05-24 03:55:49 +01:00
Peter Steinberger
459cee5315 fix(cli): reject malformed timeout options 2026-05-24 03:55:49 +01:00
Kaspre
96959ec3d7 fix(codex): defer native-hook-relay unregister to avoid cleanup race
Keep successful Codex native hook relays alive through a bounded grace window so late hook callbacks still reach OpenClaw enforcement, while interrupted, aborted, timed-out, and failed turns unregister immediately.\n\nCo-authored-by: Kaspre <kaspre@gmail.com>
2026-05-24 03:53:00 +01:00
NianJiu
0abedd546a fix(models): preserve source snapshots for SecretRef providers
* fix(models): preserve source snapshots for SecretRef providers

* docs: add models SecretRef changelog entry

---------

Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-05-24 03:48:05 +01:00
samzong
31145e0dd9 [Fix] Preflight runtime SecretRefs before config writes (#84454)
* fix(config): preflight runtime secret refs before writes

* fix(config): restore include rollback env

* docs(changelog): note SecretRef config preflight

---------

Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-05-24 03:40:15 +01:00
Shakker
81dee15406 test: narrow transcript rewrite message content access 2026-05-24 03:37:43 +01:00
Shakker
321d98b982 test: cover source reply media transcript backing 2026-05-24 03:37:43 +01:00
Shakker
39226ea35b fix: back source reply media in transcripts 2026-05-24 03:37:43 +01:00
Shakker
b074dc5395 fix: guard transcript source reply rewrites 2026-05-24 03:37:43 +01:00
Shakker
17fc1d1143 fix: ignore replayed empty TUI finals 2026-05-24 03:37:43 +01:00
Shakker
a5568ddfe0 fix: preserve source reply metadata through TTS 2026-05-24 03:37:43 +01:00
Shakker
a10e152519 fix: avoid duplicate media source reply transcripts 2026-05-24 03:37:43 +01:00
Shakker
a238f03521 fix: preserve reply metadata through media normalization 2026-05-24 03:37:43 +01:00
Shakker
6a0e030a47 fix: avoid double terminal chat events for source replies 2026-05-24 03:37:43 +01:00
Shakker
84d278ad81 fix: keep TUI watchdog runs active 2026-05-24 03:37:43 +01:00
Shakker
59b8aea09e fix: render late source reply finals in TUI 2026-05-24 03:37:43 +01:00
Shakker
84ac31b6db fix: broadcast source reply finals for chat runs 2026-05-24 03:37:43 +01:00
Shakker
bfcd8017c4 fix: preserve reply payload metadata 2026-05-24 03:37:43 +01:00
WhatsSkiLL
b13166bc0c fix: gracefully escalate process supervisor cancellations (#85865)
* fix: gracefully escalate supervisor cancellations

* fix: preserve process-tree cancellation during grace

* fix: satisfy signal monitor allSettled lint

* fix(process): split graceful cancel signal escalation

---------

Co-authored-by: JARVIS-Glasses <284122573+JARVIS-Glasses@users.noreply.github.com>
Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-05-24 03:35:37 +01:00
brokemac79
f55e98671a fix: preserve internal handoff status attribution [AI-assisted] (#85726)
* fix: preserve status attribution for internal handoffs

* fix: preserve internal handoff status attribution (#85726) (thanks @brokemac79)

* fix: surface internal fallback failures (#85726)

* fix: preserve internal handoff session continuity (#85726)

* fix: skip internal fallback auto overrides (#85726)

* fix: preserve direct internal handoff state (#85726)

* fix: authorize internal announce handoff (#85726)

* fix: preserve handoff accounting without hiding transcript (#85726)

* test: fix session-store cli backend fixture (#85726)

* fix: trust-gate handoff accounting preservation (#85726)

* fix: avoid stale preserve-mode session writes (#85726)

* fix: avoid preserve-mode session identity writes (#85726)

* fix: hide internal handoff usage footers (#85726)

---------

Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-05-24 03:24:27 +01:00
Peter Steinberger
12f82270cf perf: cache stable gateway metadata 2026-05-24 02:54:28 +01:00
Gio Della-Libera
1f28c3e42b fix(update): escape systemd update handoffs (#85414) 2026-05-23 18:44:01 -07:00
scotthuang
5dcbd385f7 fix(media-understanding): restore image description token default
Restore the describeImageWithModel default token budget to the helper-level 4096-token default instead of forcing 512 before resolution.

Add regression coverage for the default and for smaller model caps, and record the user-facing fix in the changelog.

Co-authored-by: scotthuang <scotthuang@tencent.com>
2026-05-24 02:42:18 +01:00
Peter Steinberger
a1f47bccb5 feat(gateway): steer realtime relay agent runs
Co-authored-by: Colin <colin@solvely.net>
2026-05-24 02:35:04 +01:00
Peter Steinberger
bbf9c45ba7 feat(talk): add realtime active-run control
Co-authored-by: Colin <colin@solvely.net>
2026-05-24 02:35:04 +01:00
Jason O'Neal
ee09481a88 fix(tui): handle German AltGr input (#83947)
Summary:
- The PR updates the TUI CustomEditor to ignore Kitty key-release events, decode German-layout AltGr printable CSI-u input, and adds regression tests plus a changelog entry.
- Reproducibility: yes. The PR body supplies a before/after PTY/raw-stdin path for the exact Kitty CSI-u bytes ... es to pi-tui, whose printable decoder rejects Alt/Ctrl AltGr input and can insert printable release events.

Automerge notes:
- PR branch already contained follow-up commit before automerge: Merge main into fix/issue-48897
- PR branch already contained follow-up commit before automerge: Merge upstream/main into fix/issue-48897
- PR branch already contained follow-up commit before automerge: chore: remove unrelated import churn from AltGr fix

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

Prepared head SHA: ccd1057c05
Review: https://github.com/openclaw/openclaw/pull/83947#issuecomment-4484076134

Co-authored-by: Jason O'Neal <jason.allen.oneal@gmail.com>
Co-authored-by: clawsweeper[bot] <274271284+clawsweeper[bot]@users.noreply.github.com>
Approved-by: takhoffman
Co-authored-by: takhoffman <781889+takhoffman@users.noreply.github.com>
2026-05-24 01:31:03 +00:00
Peter Steinberger
d92501dbf3 fix(pdf): move MiniMax PDF fallback policy to metadata 2026-05-24 02:26:47 +01:00
Neerav Makwana
4f95cc3dac fix(pdf): preserve image fallback precedence 2026-05-24 02:26:47 +01:00
Neerav Makwana
89bb62e2d7 fix(pdf): use MiniMax text model fallback 2026-05-24 02:26:47 +01:00
Andy Tien
aa050a6e95 fix(doctor): repair stale contextWindow for DeepSeek V4 Flash (#85840)
* fix(doctor): repair stale contextWindow for DeepSeek V4 Flash

Problem:
- Older releases configured deepseek-v4-flash with contextWindow: 200000
- Official DeepSeek V4 Flash context window is 1,000,000 (1M)
- Users switching from smaller models see incorrect progress bar (e.g.,
  50% instead of 10%) because stale config value overrides catalog

Fix:
- Add 'models.providers.*.models.*.contextWindow-stale' migration
- Detects deepseek-v4-flash models with 200K contextWindow
- Repairs to 1M to match catalog default
- Handles both bare and provider-prefixed model IDs
- 7 unit tests covering repair, passthrough, edge cases

Fixes: #85834

* fix(doctor): preserve custom DeepSeek context windows

* fix(doctor): detect stale DeepSeek context windows

* fix(doctor): scope DeepSeek context repair

---------

Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-05-24 02:22:53 +01:00
scotthuang
a66898209a Feat/fix dashboard timeout error display (#85815)
* fix(gateway): broadcast error to UI when chat.send fails synchronously

* test(gateway): verify broadcastChatError is called on chat.send error

* test(gateway): import GatewayRequestContext from local server-methods barrel

Fixes the chat error-broadcast regression test so it can resolve its
type import. The previous `../types.js` path does not exist in the
gateway tree; the shared types are re-exported from
`src/gateway/server-methods/types.ts`, so the test must use `./types.js`.

Addresses ClawSweeper review on PR #85815.

---------

Co-authored-by: scotthuang <scotthuang@tencent.com>
2026-05-24 02:22:32 +01:00
狼哥
f05f243824 fix(telegram): normalize durable group retry targets (#85656)
Summary:
- The PR normalizes legacy Telegram `group:<numeric>` durable retry targets before text/media/payload/poll sends and delivered-message pinning, with regression tests and a changelog entry.
- Reproducibility: yes. Source inspection shows recovery passes `entry.to` unchanged into the Telegram outbound path, and current send resolution rejects bare `group:-100...` as a non-numeric Telegram chat ID.

Automerge notes:
- PR branch already contained follow-up commit before automerge: fix(telegram): normalize durable retry pin targets
- PR branch already contained follow-up commit before automerge: fix(telegram): normalize durable group retry targets
- PR branch already contained follow-up commit before automerge: fix(clawsweeper): address review for automerge-openclaw-openclaw-8565…

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

Prepared head SHA: 272bc225dd
Review: https://github.com/openclaw/openclaw/pull/85656#issuecomment-4524463510

Co-authored-by: luoyanglang <hanwanlonga@gmail.com>
Co-authored-by: clawsweeper <274271284+clawsweeper[bot]@users.noreply.github.com>
Co-authored-by: clawsweeper[bot] <274271284+clawsweeper[bot]@users.noreply.github.com>
Approved-by: takhoffman
Co-authored-by: takhoffman <781889+takhoffman@users.noreply.github.com>
2026-05-24 00:30:11 +00:00
clawsweeper[bot]
fa39bef389 fix #84857: skip CLI runtime harness preflight during compaction (#85862)
Summary:
- The PR skips agent-harness compaction preflight for provider-owned or configured CLI runtime sessions, adds claude-cli regression coverage, includes a changelog entry, and applies small test/type cleanups.
- Reproducibility: yes. at source level. Current main still routes provider-owned `claude-cli` runtime compaction preflight through harness selection, where `claude-cli` is not a registered embedded harness.

Automerge notes:
- PR branch already contained follow-up commit before automerge: fix #84857: skip CLI runtime harness preflight during compaction
- PR branch already contained follow-up commit before automerge: fix(clawsweeper): address review for automerge-openclaw-openclaw-8487…

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

Prepared head SHA: 1dd8a88d21
Review: https://github.com/openclaw/openclaw/pull/85862#issuecomment-4526794976

Co-authored-by: 张贵萍0668001030 <zhang.guiping@xydigit.com>
Co-authored-by: clawsweeper <274271284+clawsweeper[bot]@users.noreply.github.com>
Co-authored-by: clawsweeper[bot] <274271284+clawsweeper[bot]@users.noreply.github.com>
Approved-by: takhoffman
Co-authored-by: takhoffman <781889+takhoffman@users.noreply.github.com>
2026-05-24 00:00:55 +00:00
Gio Della-Libera
1e2e614748 Policy: add tool posture conformance checks (#85482)
* feat(policy): add tool posture conformance

* fix(policy): attest tool alsoAllow posture
2026-05-23 16:44:42 -07:00
njuboy
a1eb765f0a fix(session-lock): enforce maxHoldMs in shouldReclaim during lock acquisition (#85764)
* fix(session-lock): enforce maxHoldMs in shouldReclaim during lock acquisition

- Adds optional maxHoldMs parameter to inspectLockPayload
- Inspect now marks locks as stale when held longer than maxHoldMs
- Passes maxHoldMs through inspectLockPayloadForSession
- acquireSessionWriteLock's shouldReclaim callback now passes maxHoldMs

This ensures that when a live process holds a lock for longer than
maxHoldMs (default 5min), other processes can reclaim it during
acquisition — matching the watchdog's existing enforcement.

Previously shouldReclaim only used staleMs (30min default), meaning
a lock held for 10+ minutes by a live PID would never be reclaimable,
causing 60s timeout failures and gateway freezes.

Closes #85762

* fix(session-lock): add dead-PID fast-path before retry loop

Adds a fast-path check at the top of acquireSessionWriteLock:
if the lock file's owner PID is dead, remove it immediately
before entering the retry loop. This saves up to timeoutMs (60s)
of futile waiting when the previous lock holder has died.

The shouldReclaim callback already handles this case, but only
iteratively through the retry loop. The fast-path eliminates
that unnecessary delay.

* fix(session-lock): enforce max hold during acquisition

* fix(session-lock): revalidate max hold safely

* fix(session-lock): honor holder max-hold policy

* fix(session-lock): keep cleanup from reclaiming live holders

* fix(session-lock): remove stale locks only when unchanged

* fix(session-lock): skip self-held max-hold reclaim

* fix(ci): refresh gateway protocol checks

---------

Co-authored-by: njuboy11 <njuboy11@users.noreply.github.com>
Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-05-24 00:38:01 +01:00
Peter Steinberger
a1c2d093c2 refactor: simplify channel catalog cache 2026-05-24 00:31:01 +01:00
Peter Steinberger
d4299dcbaa docs: codify gateway plugin metadata stability 2026-05-24 00:31:01 +01:00
Peter Steinberger
e5534dd2f3 perf: reduce gateway benchmark filesystem churn 2026-05-24 00:31:01 +01:00
Peter Steinberger
e2249d8d1e fix: order meeting notes startup around channels 2026-05-24 00:30:39 +01:00
Peter Steinberger
a0f6ce03ce fix: preserve sandbox skill overlay precedence (#85591) 2026-05-24 00:28:49 +01:00
Peter Steinberger
68487f494c fix: close remote sandbox skill symlink aliases (#85591) 2026-05-24 00:28:49 +01:00
Peter Steinberger
a8f68877a5 fix: guard remote sandbox skill roots (#85591) 2026-05-24 00:28:49 +01:00
Peter Steinberger
a3526789a4 fix: harden sandbox skill mounts (#85591) 2026-05-24 00:28:49 +01:00
Jason O'Neal
10942102e3 test(sandbox): allow remote writes under absent skill roots 2026-05-24 00:28:49 +01:00
Jason O'Neal
dd5fb1e71f fix(sandbox): filter remote skill mounts by existing roots 2026-05-24 00:28:49 +01:00
Jason O'Neal
07abb19431 test(sandbox): resolve skill roots read-only 2026-05-24 00:28:49 +01:00
Jason O'Neal
7152806950 fix(sandbox): block remote bridge writes to skills 2026-05-24 00:28:49 +01:00
Jason O'Neal
9e5b416130 fix(sandbox): block bridge writes to workspace skills 2026-05-24 00:28:49 +01:00
Jason O'Neal
1b7bf4a56f fix(sandbox): mount workspace skills read-only 2026-05-24 00:28:49 +01:00
Abdel Gomez-Perez
5c4a733912 fix(cli-runner): keep recent tail when reseed history exceeds maxHistoryChars (#83117)
* fix(cli-runner): keep recent tail when reseed history exceeds maxHistoryChars

`buildCliSessionHistoryPrompt` was prefix-slicing the rendered history,
dropping the most recent assistant turns from the reseed prompt. After
#80934 made the Claude-CLI reseed default-on, every Claude-CLI user is
exposed to this on session_expired when the rendered transcript exceeds
12288 chars. The truncation marker landed mid-word in real reproductions.

Fix:
- Tail-slice (keep the recent suffix, drop the older prefix)
- Pin the compaction summary as a prefix when present, only cap the
  post-summary transcript (loadCliSessionReseedMessages deliberately
  places the summary first)
- When the summary alone exceeds maxHistoryChars, head-slice the summary
  itself to honor the cap; drop the post-summary tail in that case
- Move the truncation marker to the lead since what follows is the
  recent tail, not what was dropped

Closes #83157

* fix(cli-runner): retain recent tail with oversize summaries

* fix(cli-runner): cap summary block plus marker against maxHistoryChars

ClawSweeper P2 on #83117 flagged that when `summaryRendered.length` is
less than `maxHistoryChars` but `summaryBlock.length` (summary + `\n\n`
separator) meets or exceeds it, the `remainingBudget <= 0` arm of
`buildCliSessionHistoryPrompt` appends the truncation marker after the
already-full summary block. A 199-char rendered summary under a 200-char
cap produced a 257-char history block — defeating the cap that prevents
reseeding fresh CLI sessions with unexpectedly huge prompts.

Fix the budget edge by truncating the summary in this branch as well so
`summary + separator + marker` stays within `maxHistoryChars`. The tail
still drops (the summary alone consumes the budget) and the marker still
leads its own line so the prompt announces what was discarded. Mirrors
the existing oversize-summary branch's pattern of head-slicing the
summary against an explicit budget that reserves marker + separator.

Add a focused regression in `session-history.test.ts` covering exactly
the gap the finding called out: `summaryRendered.length < maxHistoryChars`
with a non-empty post-summary tail. Asserts the rendered history block
stays within `maxHistoryChars` and the truncation marker is present.

* fix(cli-runner): keep tail for near-cap summaries

---------

Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-05-24 00:07:11 +01:00