Commit Graph

55350 Commits

Author SHA1 Message Date
Logan Ye
fdf6092494 fix(agents): accept disabled thinking params
Fixes #74374.

Normalizes params.thinking false, disabled, and none to the existing off state for agent and auto-reply model selection. Thanks @yelog.

Known proof gap: build-artifacts is failing in an unrelated plugin prerelease plan assertion that expects an old Docker stats helper string; targeted tests, diff check, autoreview, and all touched-path checks pass.
2026-05-31 15:07:18 +01:00
Jayesh Betala
f8f52592c5 fix(gateway): expose agent thinking defaults
Fixes #81760.

Exposes existing agent and model thinking defaults through agents.list, including protocol and Swift model support. Thanks @jbetala7.
2026-05-31 15:05:55 +01:00
Peter Steinberger
d99934aacd ci: use normal node_modules for Blacksmith Testbox 2026-05-31 15:04:49 +01:00
Steven
13d2800489 fix(agents): inherit subagent thinking defaults
Fixes #55790.

Adds tested subagent thinking precedence for explicit tool input, requester agent subagent defaults, global subagent defaults, and inherited caller thinking. Thanks @stevenepalmer.
2026-05-31 15:03:10 +01:00
Peter Steinberger
82a0ba8c4c fix(plugins): remove redundant proxy assertion 2026-05-31 15:02:44 +01:00
Peter Steinberger
4d69fc23d0 fix(codex): clear completed dynamic tool release blockers 2026-05-31 15:02:44 +01:00
Peter Steinberger
1e82263492 fix(codex): let async media coexist with terminal batches 2026-05-31 15:02:44 +01:00
Peter Steinberger
d99c824ac1 fix(plugins): delegate wrapped tool properties 2026-05-31 15:02:44 +01:00
Peter Steinberger
3ebbf9a0c1 fix(agents): keep async media starts nonterminal 2026-05-31 15:02:44 +01:00
Peter Steinberger
f62a22ce56 fix(plugins): preserve wrapped tool descriptors 2026-05-31 15:02:44 +01:00
Peter Steinberger
643633c1e5 fix(plugins): scope tool callbacks during materialization 2026-05-31 15:02:44 +01:00
Lellansin Huang
0dfcf73a57 fix(gateway): enforce OpenAI tool_choice contracts
Enforce OpenAI-compatible `tool_choice` contracts for Gateway HTTP Chat Completions and Responses client function tools.

- Add shared request normalization and post-run enforcement for required and pinned client function tool choices.
- Buffer streaming output until the tool-choice contract is satisfied, so failed runs do not leak partial assistant prose.
- Document the client-function-tool scope and add regression coverage for Chat/Responses success and failure cases.

Thanks @Lellansin for the contribution.

Proof: exact-head CI passed for `79fa0947360d307cf4ecffe713489cdf5db61093` in run `26714604449`; focused gateway tests passed locally.
2026-05-31 15:02:29 +01:00
Peter Steinberger
ec8cb8bcbf feat: add MCP code-mode namespace (#88636)
* feat: add MCP code-mode namespace

* fix: unblock mcp namespace ci gates
2026-05-31 15:02:19 +01:00
Andy Ye
44c65de17a fix(agents): avoid synthetic tool results during parallel races
Fixes the session transcript race where a newer assistant tool-call turn could force pending older tool calls to be written as synthetic missing-result entries while real parallel tool results were still in flight.

The guard no longer synthesizes at that racing boundary when synthetic repair is enabled, and transcript repair now moves late real results back beside their matching assistant tool-call turn before adding any placeholder. This keeps provider replay strict while preserving useful tool output.

Regression coverage: focused guard and transcript-repair tests for late parallel results.

Closes #88168.
Follow-up lock-lifetime report tracked in #88647.
Thanks @TurboTheTurtle for the fix and @jhartman00 for the report.

Co-authored-by: Andy Ye <35905412+TurboTheTurtle@users.noreply.github.com>
2026-05-31 15:00:44 +01:00
Vincent Koc
0833c68b1b fix(e2e): show plugins docker sweep progress 2026-05-31 15:57:19 +02:00
Peter Steinberger
f2ace9ff4e docs: require gh comment drafts 2026-05-31 09:56:56 -04:00
Peter Steinberger
036acbd358 docs: require codex source citations 2026-05-31 09:55:07 -04:00
Peter Steinberger
95890fe150 fix(agents): release session lock on manual abort
Release the embedded attempt session lock on manual aborts through the same best-effort abort cleanup path used by timeout aborts.

Proof: focused Vitest for abort/session-lock cleanup, `pnpm check:test-types`, oxfmt, `git diff --check`, branch autoreview, and full PR CI on 56fa5420d6.

Fixes #88600
2026-05-31 14:53:42 +01:00
Peter Steinberger
a7075f3634 docs: clarify autoreview refactor follow-up 2026-05-31 14:52:45 +01:00
Chunyue Wang
582fea942b fix(agents): scope timeout cooldowns by model
Fixes #87462.

Timeout transport failures now record cooldowns against the attempted model when available. Model-scoped cooldown bypasses continue to respect profile-wide blocked/disabled windows, and timeout expiry selection stays per profile while rate-limit expiry keeps shared reset aggregation.

Verification:
- pnpm exec oxfmt --check --threads=1 src/agents/auth-profiles/usage-state.ts src/agents/auth-profiles/usage.test.ts src/agents/auth-profiles.getsoonestcooldownexpiry.test.ts src/agents/auth-profiles.markauthprofilefailure.test.ts src/agents/embedded-agent-runner/run.ts
- pnpm check:test-types
- pnpm test src/agents/auth-profiles.getsoonestcooldownexpiry.test.ts src/agents/auth-profiles/usage.test.ts src/agents/auth-profiles.markauthprofilefailure.test.ts src/agents/embedded-agent-runner/run.incomplete-turn.test.ts
- autoreview clean
- GitHub Actions green on PR head d64e2a4d2f
2026-05-31 14:51:20 +01:00
Peter Steinberger
d927e73609 test(discord): drive application id retry timer 2026-05-31 14:50:08 +01:00
Peter Steinberger
b36ed41559 docs: strengthen review dependency inspection rules 2026-05-31 09:49:03 -04:00
Peter Steinberger
7dea283756 refactor: expand acp core package (#88618)
* refactor: expand acp core package

* chore: drop acp core package symlink

* fix: keep acp core dependency graph stable

* fix: add acp core tsconfig subpaths

* fix: sync acp core boundary path artifacts

* fix: use kysely for cron run-log queries

* fix: resolve acp core subpaths in loaders
2026-05-31 14:48:57 +01:00
Vincent Koc
cc290050b4 fix(doctor): diagnose malformed provider catalogs
Move malformed static provider catalog diagnostics into `openclaw doctor` instead of adding fallback behavior to runtime projection.

Doctor now validates full provider registrations for malformed static catalog hooks, result containers, provider keys, model arrays, model iteration, model ids/names, invalid catalog order, and proxy/access errors. Runtime unified text provider catalog projection remains strict on the typed provider catalog contract.

Verification:
- `node scripts/run-vitest.mjs src/flows/doctor-core-checks.runtime.test.ts src/flows/doctor-core-checks.test.ts src/flows/doctor-health-contributions.test.ts src/flows/doctor-health-conversion-plan.test.ts src/plugin-sdk/provider-entry.test.ts`
- `node_modules/.bin/oxfmt --check src/plugins/provider-catalog-unified-text.ts src/flows/doctor-core-checks.ts src/flows/doctor-core-checks.test.ts src/flows/doctor-core-checks.runtime.ts src/flows/doctor-core-checks.runtime.test.ts src/flows/doctor-health-contributions.ts src/flows/doctor-health-contributions.test.ts src/flows/doctor-health-conversion-plan.ts src/flows/doctor-health-conversion-plan.test.ts`
- `node scripts/run-oxlint.mjs src/flows/doctor-core-checks.runtime.ts src/flows/doctor-core-checks.runtime.test.ts src/plugins/provider-catalog-unified-text.ts`
- `pnpm tsgo:test`
- `git diff --check origin/main...HEAD`
- `.agents/skills/autoreview/scripts/autoreview --mode branch --base origin/main --prompt-file /tmp/provider-catalog-doctor-review-context.txt`
- GitHub PR checks green on head `876fdda5a352b0f15bfbe2abe9be43ebada7c596`

Co-authored-by: Vincent Koc <vincentkoc@ieee.org>
2026-05-31 14:48:15 +01:00
Andy Ye
826b378452 fix(agents): normalize prefixed Anthropic model ids (#88587) 2026-05-31 14:47:40 +01:00
Peter Steinberger
0d17623f00 chore: bump OpenClaw version to 2026.5.31
Bumps OpenClaw release metadata to 2026.5.31 across package manifests, app version files, plugin metadata, changelog headings, and generated shrinkwraps.

Verification:
- pnpm plugins:sync:check
- pnpm ios:version:check
- pnpm deps:shrinkwrap:check
- git diff --check
- stale 2026.5.30/build-code scan across changed files
- autoreview clean: no accepted/actionable findings
- PR CI green for real gates: Checks, security scans, dependency guard, app lanes, real behavior proof

Known non-code workflow issue:
- label workflow failed because this PR hits GitHub's 100-label issue cap before the size-label step.
2026-05-31 14:46:17 +01:00
Soham Patankar
400be62f76 feat(codex): add portable Codex command pickers (#82224)
Refactor Codex slash-command pickers so the Codex plugin owns the native command tree and returns portable presentation buttons for channels to render. Telegram now maps portable slash-command buttons to `tgcmd:` native callbacks while preserving approval callback shortening/bypass behavior, and the old Telegram-specific Codex callback menu path is gone.

Verification:
- `node scripts/run-vitest.mjs extensions/codex/src/command-plugins-management.test.ts extensions/codex/src/commands.test.ts extensions/telegram/src/button-types.test.ts`
- `node scripts/run-vitest.mjs extensions/telegram/src/bot.test.ts extensions/telegram/src/button-types.test.ts extensions/telegram/src/bot-native-commands.test.ts extensions/telegram/src/shared.test.ts`
- `node scripts/run-vitest.mjs run --config test/vitest/vitest.media-understanding.config.ts --reporter=verbose`
- `pnpm check:test-types`
- `pnpm tsgo:prod`
- `pnpm lint --threads=8`
- `git diff --check`
- `.agents/skills/autoreview/scripts/autoreview --mode branch --base origin/main`
- CI `26714121462`

Co-authored-by: Soham Patankar <102520430+yaanfpv@users.noreply.github.com>
2026-05-31 14:45:10 +01:00
Nao
5a0e67791f fix(tui): preserve pending local runs during session sync (#87959)
* fix(tui): preserve pending local runs during session sync

* fix(tui): guard optimistic run ownership

* fix(tui): consume early accepted run finals

* fix(tui): preserve deferred pending history reloads

---------

Co-authored-by: nao860226-rgb <nao860226-rgb@users.noreply.github.com>
Co-authored-by: Vincent Koc <vincentkoc@ieee.org>
2026-05-31 14:39:24 +01:00
Peter Steinberger
85beee613c docs: clarify inline code comments
Comment-only follow-up documenting reusable gateway, auth, proxy, device, Talk, session, and agent helper contracts.\n\nVerification: git diff --check plus targeted tests recorded in PR body.
2026-05-31 14:37:41 +01:00
yaoyi1222
75e0053cf9 fix(auto-reply): warn on substantive private message-tool finals
Warn operators when message_tool_only produces unusually substantive private final text without a delivered source reply. Keeps short/NO_REPLY silence quiet, avoids logging response bodies, and distinguishes unrelated side effects from source-reply delivery.
2026-05-31 14:35:58 +01:00
Sebastien Tardif
81b9da0bb0 fix(tui): use middle truncation for paths and commands in tool display (#88050)
* fix(tui): use middle truncation for paths and commands in tool display

Closes #87936

* fix(test): update channel-streaming test for middle truncation output

Signed-off-by: Sebastien Tardif <sebtardif@ncf.ca>

* chore: retrigger CI (vitest env teardown flake)

Signed-off-by: Sebastien Tardif <sebtardif@ncf.ca>

* fix(tui): redact tool details before middle truncation

Apply redactToolDetail() to command and generic string text before
middle truncation so credential-like suffixes are masked while full
flag/key context is still available. Previously, truncation could
remove the --flag prefix while preserving the raw secret at the tail,
causing redaction patterns to miss the value.

Add regression tests for sk- prefixed tokens in commands and ghp_
tokens in generic string details.

Signed-off-by: Sebastien Tardif <sebtardif@ncf.ca>

---------

Signed-off-by: Sebastien Tardif <sebtardif@ncf.ca>
2026-05-31 14:35:55 +01:00
Mukunda Rao Katta
e452d16cea fix(webchat): suppress stale active session rows (#87962) 2026-05-31 14:35:50 +01:00
Sebastien Tardif
9a1b95c1e6 fix(tui): skip history reload when final event has displayable output (#88004)
* fix(tui): skip history reload when final event has displayable output

On external/gateway runs, handleChatEvent fires void loadHistory() on
every final event. loadHistory() does clearAll() + rebuild from server
data, but the server may not have persisted the just-finished message
yet, causing the rendered final message to vanish.

Add a hasDisplayableFinal option to maybeRefreshHistoryForRun that skips
the destructive reload when the final text is already rendered locally.
This mirrors the existing local-run guard. Compute finalText before the
reload decision so the guard has the information it needs.

Closes #87922

Signed-off-by: Sebastien Tardif <sebtardif@ncf.ca>

* retrigger proof check

Signed-off-by: Seb Tardif <sebtardif@ncf.ca>

---------

Signed-off-by: Sebastien Tardif <sebtardif@ncf.ca>
Signed-off-by: Seb Tardif <sebtardif@ncf.ca>
2026-05-31 14:35:44 +01:00
Peter Steinberger
5dc4531fdf test(discord): isolate timer-sensitive request tests 2026-05-31 14:31:10 +01:00
Vincent Koc
9518d1f27c fix(auth): coerce persisted device auth tokens 2026-05-31 15:22:44 +02:00
Vincent Koc
fbde572491 fix(e2e): heartbeat resource-sampled docker lanes 2026-05-31 15:22:44 +02:00
Peter Steinberger
f24a138790 refactor: unify subagent handoffs into agent steering queue
Refactor the subagent completion handoff path into the generic agent steering queue, preserving legacy persisted handoff lease fields by normalizing them into steering lease fields on restore.

Also allowlists the split cron run-log SQLite boundary in the Kysely guardrail after rebasing onto current main.

Refs #88407.
2026-05-31 14:21:20 +01:00
Chunyue Wang
02c7b5b82f fix(tasks): reclaim ACP zombie runs blocking gateway restart (#88281)
* fix(tasks): reclaim ACP zombie runs blocking gateway restart (#88205)

hasBackingSession treated an ACP task as backed whenever its persisted
session-store entry existed, so a crashed mid-turn ACP run left a
status=running record that survived the crash and wedged gateway
restart/update forever.

Gate ACP backing on in-process live-turn liveness instead of entry
existence, behind the existing authoritative-process flag (generalized
from cron-only) so a standalone maintenance CLI with an empty live-turn
map stays conservative and never reclaims. The liveness signal lives in a
core-internal active-turns registry (mirroring cron active-jobs) so it
stays off the SDK-exported AcpSessionManager surface. It is marked once
before the backend loop and cleared when the task is marked terminal, so
a slow init or backend failover cleanup cannot let the sweep reclaim a
still-live turn.

* fix(tasks): preserve cron operator JSON diagnostic reason

Split the merged runtime_not_authoritative reason back into the existing cron_runtime_not_authoritative (shipped, consumed by openclaw tasks maintenance --json operator scripts) and a new acp_runtime_not_authoritative for the ACP branch. Strengthen the cron non-authoritative test to lock the reason string contract.

* fix(tasks): clear ACP turn liveness on retry failures

---------

Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-05-31 14:19:56 +01:00
Peter Steinberger
100dd79468 test(release): wait for bundled runtime commands 2026-05-31 14:09:27 +01:00
Chunyue Wang
318cae1500 fix(hooks): isolate slug-generator auth failures
Summary:
- route slug-generator embedded runs through lane-local auth profile failure handling
- add regression coverage for the run option
- repair current landing checks for media auth mocks, device auth parsing, transcript sanitizer harness typing, and lint

Verification:
- node scripts/run-vitest.mjs src/hooks/llm-slug-generator.test.ts src/agents/embedded-agent-runner/run/auth-profile-failure-policy.test.ts
- node scripts/run-vitest.mjs run --config test/vitest/vitest.media-understanding.config.ts --reporter=verbose
- pnpm check:test-types
- pnpm lint --threads=8
- git diff --check
- .agents/skills/autoreview/scripts/autoreview --mode branch --base origin/main

Fixes #71709.
Co-authored-by: openperf <16864032@qq.com>
2026-05-31 14:09:03 +01:00
Peter Steinberger
17c8602a9c docs: require issue summaries in agent replies 2026-05-31 14:07:08 +01:00
Peter Steinberger
3ca4e5f616 docs: clarify agent workflow rules 2026-05-31 14:06:22 +01:00
Peter Steinberger
7423e9cb66 refactor(openai): confine legacy codex repair to doctor
Confine retired OpenAI Codex identifiers to doctor repair and migration paths while keeping runtime OpenAI surfaces canonical.\n\nProof: focused Vitest; autoreview clean; AWS Crabbox check:changed run_3789cbe12413 (cbx_2c88b700810b) passed.
2026-05-31 14:03:17 +01:00
tynamite
2f7e6ec196 fix(auto-reply): honor per-model thinking params
Auto-reply now uses the existing per-model model params thinking value before falling back to the global thinkingDefault, matching gateway/shared model selection behavior.\n\nVerified with targeted auto-reply and agents Vitest coverage plus formatting and diff checks.\n\nThanks @tynamite for the fix.
2026-05-31 14:01:25 +01:00
Peter Steinberger
b222b5f6fa refactor(cron): keep legacy notify migration in doctor 2026-05-31 14:00:47 +01:00
Peter Steinberger
2fe019ccae fix(exec): allow predicate shell builtins in allowlist mode 2026-05-31 14:00:12 +01:00
Peter Steinberger
657a668d94 test(voice-call): drive Twilio stream failure timers 2026-05-31 13:59:48 +01:00
Peter Steinberger
c797f02ff7 fix(diagnostics): surface Bonjour state in support exports 2026-05-31 13:57:17 +01:00
Peter Steinberger
32c0279cec perf(cli): narrow gateway dispatch startup 2026-05-31 13:56:27 +01:00
Peter Steinberger
44512b5297 docs: tighten refactor storage policy 2026-05-31 13:51:43 +01:00