Commit Graph

30973 Commits

Author SHA1 Message Date
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
9fc71e9076 fix(agents): keep model browse normalization bounded
Keep model browse/list visibility consistent with runtime-normalized allowlist entries while keeping unrestricted default browse off plugin/runtime hydration. Add regression coverage for catalog visibility, `/models` browse data, and the replay sanitizer mock isolation that made the agents shard order-sensitive.

Verification:
- pnpm test src/agents/pi-embedded-runner.sanitize-session-history.test.ts src/agents/model-catalog-visibility.test.ts src/auto-reply/reply/commands-models.test.ts src/auto-reply/reply/model-selection.test.ts src/agents/model-selection.plugin-runtime.test.ts -- --reporter=verbose
- OPENCLAW_VITEST_MAX_WORKERS=2 pnpm exec node scripts/test-projects.mjs test/vitest/vitest.agents-core.config.ts
- .agents/skills/autoreview/scripts/autoreview --mode local
- GitHub Actions CI run 26476126784
2026-05-26 22:34:37 +01:00
Peter Steinberger
a818556dd9 fix: stabilize media-related tests 2026-05-26 17:30:34 -04:00
Peter Steinberger
acd3ce00ea test(agents): pin native anthropic replay policy 2026-05-26 22:29:46 +01:00
Fermin Quant
0a085bf15e fix(status): surface systemd gateway hygiene (#86976) 2026-05-26 22:29:20 +01:00
Andy Ye
f3e61580bd Fix status JSON plugin scan (#87001)
* fix status json plugin scan

* fix status json metadata imports

* fix channel metadata repair fallback

* fix runtime channel id normalization fallback

* fix status json env channel detection

Co-authored-by: Peter Steinberger <steipete@gmail.com>

* fix signed thinking legacy tool repair

* fix: preserve first signed replay turn

---------

Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-05-26 22:24:25 +01: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
94fb547fe2 fix(agents): handle deferred maintenance drain
Ensure deferred context-engine maintenance rejects cleanly when the gateway command queue is draining, including coalesced active-run requests. This prevents budget compaction from treating an unscheduled deferred maintenance run as successful and leaving the context engine alive.

Verification:
- pnpm exec oxfmt --check --threads=1 src/process/command-queue.ts src/agents/pi-embedded-runner/compact.queued.ts src/agents/pi-embedded-runner/context-engine-maintenance.ts src/agents/pi-embedded-runner/context-engine-maintenance.test.ts
- pnpm test src/auto-reply/reply/agent-runner-memory.test.ts src/agents/pi-embedded-runner/compact.hooks.test.ts src/agents/pi-embedded-runner/context-engine-maintenance.test.ts src/tasks/task-flow-registry.store.test.ts src/auto-reply/reply/commands-compact.test.ts src/agents/pi-embedded-runner/compact-reasons.test.ts
- .agents/skills/autoreview/scripts/autoreview --mode branch --base origin/main
- GitHub Actions CI run 26475226442: relevant Node/Linux, lint, type, security, CodeQL, OpenGrep, Socket, Real behavior proof, and build jobs passed; Windows job failed before tests due current runner image Node 22.19.0 vs required 24.x, matching current main infra failure.
2026-05-26 22:17:19 +01:00
Peter Steinberger
72bc429f60 test: keep legacy tool-result error proof 2026-05-26 22:13:19 +01:00
Peter Steinberger
b546998b9b ci: fix post-merge Rastermill checks 2026-05-26 22:11:50 +01:00
Peter Steinberger
8523d3268a fix(agents): mark repaired legacy tool results errored 2026-05-26 17:01:12 -04:00
Peter Steinberger
acb942f634 fix: keep EXIF normalization best-effort (#86923) 2026-05-26 21:55:57 +01:00
Peter Steinberger
a3325c9fb4 refactor: use unified rastermill encode API 2026-05-26 21:55:57 +01:00
Peter Steinberger
4f728f8321 refactor: delegate image limits to Rastermill 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
4e45b11983 fix(agents): repair legacy tool results before replay 2026-05-26 16:53:32 -04:00
Josh Avant
3c16648ad7 fix(config): narrow profiled tool section doctor repair (#87030)
* fix(config): repair profiled tool section grants

* fix(config): narrow profiled tool section doctor repair

* fix(config): satisfy doctor warning lint

---------

Co-authored-by: Vincent Koc <vincentkoc@ieee.org>
2026-05-26 13:50:22 -07:00
Peter Steinberger
80655fe955 test: fix current suite drift 2026-05-26 16:40:08 -04:00
Alix-007
daa7b1d06b fix(lock): require owner identity proof before stale removal
Fixes #86814.

Reclaims stale plugin lock files only when the previous owner is provably gone or the recorded process start time proves PID reuse. Timestamp age alone now stays fail-closed for PID-owned locks, preserving mutual exclusion for long-running writers while still allowing pidless expired locks to expire.

Verification:
- pnpm test src/infra/stale-lock-file.test.ts src/plugin-sdk/file-lock.test.ts
- pnpm tool-display:check
- git diff --check
- autoreview --mode branch --base origin/main

Known CI note: check-guards failed in deps:shrinkwrap:check because npm resolved newer AWS transitive versions than pnpm-lock.yaml contains; no package or lock files are changed in this PR.

Co-authored-by: Alix-007 <267018309+Alix-007@users.noreply.github.com>
2026-05-26 21:38:35 +01:00
Peter Steinberger
5e8f4981a5 fix(cli): add Windows stack-size respawn (#87031)
Add a Windows-only CLI respawn with `--stack-size=8192` so stack-heavy startup paths can run with a larger V8 stack.

The respawn path normalizes duplicated Windows `node.exe` launcher argv before handoff, preserves real non-launcher argv values containing `node.exe`, and treats both `--stack-size` and `--stack_size` as already configured.

Fixes #62055.
Supersedes #86307.
Thanks @giodl73-repo for the original fix.

Verification:
- `node --v8-options | rg -n "stack-size|stack_size"`
- `node --stack-size=8192 -e "console.log('ok')"`
- `node --stack_size=8192 -e "console.log('ok')"`
- `pnpm format:check src/cli/windows-argv.ts src/cli/windows-argv.test.ts src/entry.respawn.ts src/entry.respawn.test.ts`
- `node scripts/run-vitest.mjs src/entry.respawn.test.ts src/cli/windows-argv.test.ts`
- `.agents/skills/autoreview/scripts/autoreview --mode local`
- `pnpm check:changed` via Testbox `tbx_01ksjzf06pcgx29qrctjrn4rhr`, GitHub Actions run https://github.com/openclaw/openclaw/actions/runs/26473172664

Co-authored-by: Gio Della-Libera <giodl73@gmail.com>
2026-05-26 21:31:58 +01:00
martingarramon
ef86d8c95c fix(agents): preserve sessions_spawn transcript payloads (#82203)
Remove the transcript redaction path for sessions_spawn arguments and inline attachments. OpenClaw transcripts are local trusted-operator state, and streamTo/resumeSessionId are runtime routing fields that must not be rewritten before replay or dispatch.

Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-05-26 21:30:01 +01:00
Peter Steinberger
f7e2d9bb47 ci(release): port 2026.5.25 release gate fixes 2026-05-26 21:19:51 +01:00
狼哥
4a85cd76f6 fix(web-search): keep runtime legacy merge out of validation (#86818)
Runtime-injected web_search provider config from plugins.entries.<plugin>.config.webSearch now stays available to provider execution without being validated as user-authored legacy tools.web.search.<provider> config.

Co-authored-by: luoyanglang <hanwanlonga@gmail.com>
2026-05-26 21:15:44 +01:00
Vincent Koc
3127808473 fix(cli): default logs to local timestamps (#85387) 2026-05-26 21:14:47 +01:00
Peter Steinberger
8788ae1a8e fix(agents): dedupe transcripts tool display config 2026-05-26 16:12:03 -04:00
Mark
e070519f43 fix(updater): exclude prerelease tags from stable git channel (#86559)
Preserve legacy numeric stable git tags while excluding named semver prerelease tags from stable git channel detection and status display.

Thanks @goldmar.
2026-05-26 21:11:38 +01:00
Chunyue Wang
c430fcde1c fix(agents): memoize session lock owner args
Memoize owner process argv lookups per PID during `cleanStaleLockFiles`, and yield between lock entries so startup cleanup does not monopolize the event loop while inspecting many session locks.

This keeps lock classification semantics unchanged while avoiding repeated synchronous process-args reads for lock clusters owned by the same PID, especially the Windows PowerShell path.

Fixes #86509.

Verification:
- `git diff --check origin/main...HEAD`
- focused TSX harness against the current-main merge result: `session-lock memo regression harness passed`

Thanks @openperf.

Co-authored-by: openperf <16864032@qq.com>
2026-05-26 21:10:19 +01:00
Shakker
0f49bbbeb2 fix: dedupe transcripts tool display metadata 2026-05-26 21:09:18 +01:00
Peter Steinberger
abb85ccc86 fix(cli): validate timeout and banner TTY state
Fixes two CLI edge cases found by clawpatch.

- `emitCliBanner` now honors injected TTY state before writing to stdout.
- Nodes RPC timeout handling now rejects malformed `--timeout` values with the existing timeout parser instead of forwarding `NaN` into gateway transport calls.

Proof:
- `node scripts/run-vitest.mjs src/cli/banner.test.ts src/cli/nodes-cli/register.invoke.approval-transport-timeout.test.ts`
- `pnpm exec oxfmt --check --threads=1 src/cli/banner.ts src/cli/banner.test.ts src/cli/nodes-cli/rpc.runtime.ts src/cli/nodes-cli/register.invoke.approval-transport-timeout.test.ts`
- `.agents/skills/autoreview/scripts/autoreview --mode branch --base origin/main`
- Real CLI proof: `pnpm openclaw nodes list --timeout nope --json` exits 1 with `Invalid --timeout`.
- Runtime banner proof: injected `isTty:false` with `stdout.isTTY=true` produced `writes=0`, `emitted=false`.
2026-05-26 21:08:11 +01: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
mjamiv
f22c3a518e fix(auto-reply): stage sandboxed workspace media
Fixes #74061.

Stages absolute final-reply MEDIA paths that already live under the agent workspace before sandbox path translation runs, so Telegram/local delivery can attach generated workspace media instead of dropping it as Media failed. Outside-workspace host-local paths remain blocked, and host-read HTML stays denied pending separate security-boundary review.

Verification:
- git diff --check origin/main...refs/remotes/pull/86531
- git merge-tree --write-tree origin/main refs/remotes/pull/86531
- reviewed src/auto-reply/reply/reply-media-paths.ts, src/media/web-media.ts, and focused tests

Co-authored-by: mjamiv <74088820+mjamiv@users.noreply.github.com>
2026-05-26 21:05:08 +01:00
Vincent Koc
4d6593642e fix(exec): avoid default approval store writes (#86964)
* fix(exec): avoid default approval store writes

* fix(exec): harden token approvals on default policy

---------

Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-05-26 20:59:24 +01:00
Vincent Koc
9b1b6d02fd fix(agents): restore current guard checks (#86934) 2026-05-26 20:59:03 +01:00
Keshav's Bot
699c047c7d fix(reply): reduce visible reply delivery latency 2026-05-26 20:51:00 +01:00
Keshav's Bot
ed3ae0da43 fix(reply): defer context compaction safely 2026-05-26 20:51:00 +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
7951cc0c8a fix(agents): avoid runtime model hydration on hot paths 2026-05-26 20:51:00 +01:00
Keshav's Bot
c2b56ded61 fix(commands): keep slash handling off reply startup 2026-05-26 20:51:00 +01:00
Pavel Ganson
e7500417c8 fix(channels): preserve direct native progress callbacks
Preserve native direct-message progress callbacks for quiet Telegram/Codex turns while keeping text tool summaries behind verbose visibility.

The fix keeps source-delivery suppression and sendPolicy denial intact, so quiet native progress is allowed only for direct chat progress callbacks and does not leak when delivery is denied.

Verification:
- node scripts/run-vitest.mjs run --config test/vitest/vitest.auto-reply-reply.config.ts src/auto-reply/reply/dispatch-from-config.test.ts -t "direct native progress callbacks|channel-owned group progress callbacks|delivers text-only tool summaries when verbose overrides preview suppression|delivers verbose tool summaries despite message-tool-only source suppression"
- node scripts/run-oxlint.mjs --tsconfig config/tsconfig/oxlint.core.json src/auto-reply/reply/dispatch-from-config.ts src/auto-reply/reply/dispatch-from-config.test.ts
- git diff --check
- /Users/steipete/Projects/agent-skills/skills/autoreview/scripts/autoreview --mode branch --base origin/main

Thanks @PashaGanson.
2026-05-26 20:41:38 +01:00
Peter Steinberger
174cd49f78 fix: tighten parser edge cases (#86999)
* fix: tighten parser edge cases

* fix: dedupe lsof listener records

* fix: recognize ipv6 wildcard model URLs
2026-05-26 20:40:13 +01:00
Peter Steinberger
0ea7871e53 fix(gateway): bound live agent model probes 2026-05-26 20:20:01 +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
Peter Steinberger
4007df7f60 fix: improve discord voice playback and wake replies 2026-05-26 19:40:12 +01:00
Peter Steinberger
b56ddcc6ff ci: use supported codex mini live target 2026-05-26 19:04:43 +01:00
Peter Steinberger
6930538500 ci: require codex profiles for live probes 2026-05-26 18:51:43 +01:00
Fermin Quant
598aad4f66 fix(agents): disclose scoped session list results (#86944)
* fix(agents): disclose scoped session list results

* fix(agents): clarify scoped session count warning
2026-05-26 18:40:36 +01:00
Andy Ye
1fd8de8495 fix(telegram): treat ENETDOWN as transient network failure (#86762) 2026-05-26 18:40:31 +01:00
Peter Steinberger
9fd8158c06 ci: restore codex replay live probe contract 2026-05-26 18:35:56 +01:00
Peter Steinberger
7e6837bc07 fix: respect root options in startup guards (#86927) 2026-05-26 18:08:51 +01:00