Commit Graph

41282 Commits

Author SHA1 Message Date
Peter Steinberger
dbb2299e38 chore(config): refresh post-compaction guard labels 2026-05-05 02:15:42 +01:00
Peter Steinberger
ed4b223cf2 fix(agents): honor scoped post-compaction guard config 2026-05-05 02:15:42 +01:00
Peter Steinberger
1af6855bb0 refactor(agents): thread post-compaction guard observer 2026-05-05 02:15:42 +01:00
Peter Steinberger
e0fafdcc1d fix(agents): observe post-compaction guard live 2026-05-05 02:15:42 +01:00
Peter Steinberger
0d3b74e45a test(agents): avoid redundant guard scope spread 2026-05-05 02:15:42 +01:00
Peter Steinberger
3ba0f588ad fix(agents): observe matched post-compaction tool outcomes 2026-05-05 02:15:42 +01:00
Eduardo Piva
4c4825679b fix(agents): make post-compaction guard config valid + observation trim-resilient
Two correctness fixes from code review.

1. Zod schema (src/config/zod-schema.agent-runtime.ts) was strict and
   rejected tools.loopDetection.postCompactionGuard.* keys at validation
   time, making the guard's documented configurability inaccessible at
   gateway startup. Adds ToolLoopPostCompactionGuardSchema with both
   optional fields and wires it into ToolLoopDetectionSchema.

2. The runner observation cursor in pi-embedded-runner/run.ts used
   absolute indices into state.toolCallHistory, but that array is
   trimmed at historySize (default 30). Once the buffer was full, new
   records shifted out from under the cursor and the guard silently
   missed every loop in long-running sessions. Replaces the index
   cursor with a monotonic toolOutcomeSeq on SessionState that
   recordToolCallOutcome bumps on each observable push (unmatched
   branch only, mirroring the prior cursor's effective semantics).
   The runner now reads the most recent (currentSeq - lastSeq) entries
   from the tail of toolCallHistory, which is trim-resilient.

Adds zod parse tests for the new config keys (valid, empty, unknown
key, non-positive, non-integer) and a runner regression test that
seeds toolCallHistory at the trim cap before triggering a
post-compaction loop, asserting the abort still fires.

Refs #77474
2026-05-05 02:15:42 +01:00
Eduardo Piva
2a702f927f feat(agents): wire post-compaction loop guard into pi-embedded-runner
Arms the guard at each of the three compaction-success points in
run.ts and observes tool-call outcomes from the diagnostic session
state's toolCallHistory after each attempt. Aborts with
PostCompactionLoopPersistedError when the same (tool, args, result)
triple repeats windowSize times within the post-compaction window.

Refs #77474
2026-05-05 02:15:42 +01:00
Eduardo Piva
5b863c719e fix(agents): address review feedback on post-compaction loop guard
- Add PostCompactionLoopPersistedError.fromVerdict factory.
- Add unit tests for the error class + fromVerdict adapter.
- Disabled guard is now truly dormant (no state mutation when enabled=false).
- Tighten help text for postCompactionGuard.enabled.

Refs #77474
2026-05-05 02:15:42 +01:00
Eduardo Piva
96e7461c81 feat(agents): add post-compaction loop guard module + config
Pure module with unit tests; not yet wired into runner. The guard arms
after auto-compaction-retry and aborts when the same (tool, args, result)
triple repeats within the configured window.

Refs #77474
2026-05-05 02:15:42 +01:00
Vincent Koc
7295f19fbc test(live): use low reasoning for cache probes 2026-05-04 18:13:05 -07:00
Vincent Koc
16f9e83657 test(live): scale gateway profile timeout 2026-05-04 18:10:27 -07:00
Peter Steinberger
0747e63006 test(plugins): align metadata snapshot policy fixtures 2026-05-05 02:09:50 +01:00
Elliot Drel
3e4f076723 fix(lsp): resolve Windows .cmd shims (#75343)
Resolve Windows npm .cmd shim startup failures for bundled LSP servers by routing LSP process spawning through the shared Windows spawn resolver with a sanitized child environment.

The change reuses existing PATH/PATHEXT and .cmd shim handling, keeps non-Windows behavior unchanged, and adds focused regression coverage for resolver wiring, env sanitization, and spawn materialization.

Fixes #75352.

Tests:
- pnpm test src/agents/pi-bundle-lsp-runtime.windows-spawn.test.ts src/agents/pi-bundle-lsp-runtime.test.ts
- pnpm check:changed

Thanks @ElliotDrel.

Co-authored-by: Elliot Drel <156480527+ElliotDrel@users.noreply.github.com>
Co-authored-by: Brad Groux <3053586+BradGroux@users.noreply.github.com>
2026-05-04 20:08:00 -05:00
李claw
25db482cc6 fix(media): use r+ for Windows media fsync (#76593)
Fix Windows media offload failures by opening saved attachment temp files read/write before fsync, preserving the non-truncating temp-file write path while allowing Windows FlushFileBuffers to succeed.

Also adds the required changelog entry.

Tests:
- pnpm test src/media/store.test.ts src/gateway/chat-attachments.test.ts
- pnpm check:changed

Thanks @qq230849622-a11y.

Co-authored-by: 李claw <264894741+qq230849622-a11y@users.noreply.github.com>
Co-authored-by: Brad Groux <3053586+BradGroux@users.noreply.github.com>
2026-05-04 19:58:31 -05:00
Peter Steinberger
f7f5050252 docs: require live proof before landing 2026-05-05 01:55:54 +01:00
Peter Steinberger
47411f7c52 build: bump axios override 2026-05-05 01:51:23 +01:00
Peter Steinberger
2f3a9629d8 test: use latest kitchen sink canary 2026-05-05 01:51:23 +01:00
Peter Steinberger
b17bb63b9e fix: repair stale session route state in doctor 2026-05-05 01:51:23 +01:00
Brandon
e2e0908055 fix(secrets): preserve auth profile key refs during provider scrub (#77489)
* fix(secrets): preserve auth profile key refs during provider scrub

* Add changelog for secrets apply fix

* Seed auth profile ref for scrub regression

* fix(secrets): guard auth profile ref scrub

---------

Co-authored-by: Vincent Koc <vincentkoc@ieee.org>
2026-05-04 19:50:39 -05:00
Vincent Koc
b378a91257 test(live): retry cache probe text misses 2026-05-04 17:44:37 -07:00
Vincent Koc
967c0981e3 docs(help,security): cross-reference auth list and trusted-env-proxy
Two missing cross-references uncovered by the 24-hour doc audit:

- docs/help/faq-models.md: link to `openclaw models auth list` from the
  "What is an auth profile?" accordion. The command was added in
  23eb44b045 but the FAQ never pointed users at it.
- docs/security/network-proxy.md: list `tools.web.fetch.useTrustedEnvProxy`
  in Related Proxy Terms. The opt-in is fully documented in
  docs/tools/web-fetch.md but the proxy reference page omitted the
  cross-reference, leaving the page incomplete for proxy-state triage.
2026-05-04 17:43:09 -07:00
Peter Steinberger
2d8fa23447 fix(agents): mediate async media completions 2026-05-05 01:42:50 +01:00
Peter Steinberger
48ff390953 perf(plugins): reuse compatible metadata snapshots
Reuse compatible workspace-scoped plugin metadata snapshots for unscoped model catalog and manifest-contract readers while preserving env/config/workspace compatibility checks.

Also updates the stale kitchen-sink prerelease canary assertion to the current script default.

Fixes #77519.
Related #77532.
2026-05-05 01:39:34 +01:00
Vincent Koc
b38e674c9f docs(cli): document gateway restart --safe in command options
The `gateway restart` Command-options accordion only listed `--force`,
`--wait`, and `--json` even though `--safe` is a fully-supported flag
(documented in the prose at line 112 and rejected by lifecycle.ts when
combined with --force/--wait). Add --safe to the option list and a
Lifecycle-behavior bullet that explains the preflight-defer behavior
plus its mutual exclusion with --force and --wait, matching
src/cli/daemon-cli/lifecycle.ts:153-156.
2026-05-04 17:38:32 -07:00
Sarah Fortune
d6e991db49 Add instructions for how to setup slack for QA tests (#77606) 2026-05-04 17:38:16 -07:00
Peter Steinberger
5e0b890a5b docs: thank Discord reply fix contributor (#77596) 2026-05-05 01:33:22 +01:00
Patrick Erichsen
9e97cdb213 fix(discord): fail dropped final reply delivery 2026-05-05 01:33:22 +01:00
Vincent Koc
1a4c078399 test(plugins): update kitchen sink prerelease canary version 2026-05-04 17:30:55 -07:00
Vincent Koc
7e591a624f docs(changelog): credit @pashpashpash for Codex usage-limit reset surfacing
#77557 added user-facing surfacing of Codex app-server usage-limit reset
details and OpenClaw-owned runtime failure notices through tool-only
source-reply mode, but the entry landed without contributor attribution.
Add the merging PR ref and credit the human contributor @pashpashpash
per CLAUDE.md changelog-attribution rules.
2026-05-04 17:28:16 -07:00
Peter Steinberger
b156829505 fix(acpx): resolve plugin manifest from bundled runtime 2026-05-05 01:21:42 +01:00
Vincent Koc
44a10ceea2 test(live): run cache probe with node 2026-05-04 17:16:47 -07:00
Vincent Koc
da0a977678 test(plugins): refresh kitchen sink docker fixture 2026-05-04 17:15:47 -07:00
Vincent Koc
2cb03ee7b5 fix(openai): route Codex audio to transcription model 2026-05-04 17:14:08 -07:00
Vincent Koc
a491090b48 fix(release): refresh plugin sdk api gate
Refresh release baseline hashes and raise the Plugin SDK API baseline heap cap so release preflight reports real drift instead of OOMing.
2026-05-04 17:13:47 -07:00
pashpashpash
b2c3202a15 Surface Codex usage-limit reset details in chat replies (#77557)
* fix(codex): surface usage limit reset details

* fix(codex): satisfy extension lint

* fix: surface codex runtime failures in tool-only replies
2026-05-05 09:00:39 +09:00
Vincent Koc
306a582294 test(agents): remove redundant payload casts 2026-05-04 16:56:05 -07:00
Vincent Koc
d253392ea2 fix(plugins): keep explicit web providers on fast path 2026-05-04 16:56:05 -07:00
Josh Lehman
6dae3c273d fix: keep runtime prompt context out of system prompt (#77521) 2026-05-05 00:54:16 +01:00
Kevin Lin
cb9824d6b4 test: add slack onboarding channel smoke (#77575) 2026-05-04 16:51:34 -07:00
Vincent Koc
cf1bd30509 test(plugins): add kitchen sink rpc walk 2026-05-04 16:48:02 -07:00
Vincent Koc
0a62c1e665 fix(telegram): derive media placeholders from MIME
Fixes #69793.

Verification:
- repro before fix: `pnpm test:serial extensions/telegram/src/bot-message-context.body.test.ts -- --reporter=verbose` failed 3 new cases with `<media:image>` returned for non-image/mixed saved media
- `pnpm test:serial extensions/telegram/src/bot-message-context.body.test.ts -- --reporter=verbose` passed 9 tests after fix
- `pnpm exec oxfmt --check --threads=1 extensions/telegram/src/bot-message-context.body.ts extensions/telegram/src/bot-message-context.body.test.ts`
- `git diff --check`
- `OPENCLAW_TESTBOX=1 pnpm testbox:run --id tbx_01kqtnnhpg6rk1225tbb7109kf -- "pnpm check:changed"` passed
2026-05-04 16:46:58 -07:00
Peter Steinberger
d522a18971 fix: sync Codex app-server protocol (#77578)
* fix: sync codex app-server protocol

* docs: add codex protocol changelog

* fix: refresh codex protocol schemas
2026-05-05 00:43:07 +01:00
praveen9354
0677a4f8b3 fix(dashboard): guide manual token auth fallback
Summary:
- Add a redaction-safe dashboard fallback hint when tokenized URL delivery fails.
- Document the manual auth path and update the changelog.

Verification:
- PR CI exact head 48ccb97c08 green for relevant CI/security checks.
- pnpm test src/commands/dashboard.links.test.ts src/commands/dashboard.test.ts
- pnpm exec oxfmt --check --threads=1 src/commands/dashboard.ts src/commands/dashboard.links.test.ts
- pnpm format:docs:check
- pnpm docs:check-mdx
- pnpm docs:check-i18n-glossary
- targeted markdownlint for docs/cli/dashboard.md and docs/web/dashboard.md
2026-05-04 18:39:25 -05:00
Peter Steinberger
29eb47e736 docs(changelog): credit codex replay fix 2026-05-05 00:33:23 +01:00
Peter Steinberger
15d3fd83bb fix(openai-codex): match codex replay identity 2026-05-05 00:33:23 +01:00
mkdev11
27e467ad23 fix(openai-codex): avoid stale Responses replay state 2026-05-05 00:33:23 +01:00
Vincent Koc
8285786c22 fix(plugins): include json5 in memory runtime deps
* fix(plugins): include json5 in memory runtime deps

* chore(ci): allow bundled runtime json5 dep
2026-05-04 16:31:49 -07:00
Vincent Koc
ae142cad7c fix(doctor): repair allow-only official plugins 2026-05-04 16:31:41 -07:00
Penchan
d0c7f91ed1 fix(plugins): recover managed-npm external plugins after package-manager upgrade
Co-authored-by: pingu <pingu@penchan.co>
2026-05-04 16:31:35 -07:00