Commit Graph

8755 Commits

Author SHA1 Message Date
clawsweeper
1bbbb44d2b fix(deepseek): normalize mcp union tool schemas
Co-authored-by: Andy Ye <35905412+TurboTheTurtle@users.noreply.github.com>

Co-authored-by: clawsweeper[bot] <274271284+clawsweeper[bot]@users.noreply.github.com>
2026-05-19 01:46:45 +00:00
Andy Ye
14c5d04264 fix(deepseek): normalize mcp union tool schemas 2026-05-19 01:46:45 +00:00
clawsweeper[bot]
48d9966aa1 fix(cli): include loopback tools in cli prompts (#83828)
Summary:
- The PR feeds loopback-scoped MCP tools into CLI system prompts and reports, persists a prompt tool-name hash for CLI session reuse, adds regression tests, and adds a changelog entry.
- Reproducibility: yes. from source inspection: current main builds the CLI prompt and report with `tools: []` ... execute a live CLI turn in this read-only review, but the source path and source PR terminal proof line up.

Automerge notes:
- PR branch already contained follow-up commit before automerge: fix(cli): gate prompt loopback tools on active runtime
- PR branch already contained follow-up commit before automerge: fix(cli): include loopback tools in cli prompts

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

Prepared head SHA: d196564d4d
Review: https://github.com/openclaw/openclaw/pull/83828#issuecomment-4483469332

Co-authored-by: Andy Ye <35905412+TurboTheTurtle@users.noreply.github.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-19 01:30:06 +00:00
Josh Avant
2c8f78e723 Harden final delivery routing refresh (#83835)
* harden final delivery routing refresh

* add changelog for final delivery hardening
2026-05-18 20:16:58 -05:00
Eduardo Piva
6f18decb7a fix: add Copilot IDE headers to resolved models (#82275)
* fix: add copilot headers to resolved models

* fix copilot header imports

* fix prod typecheck
2026-05-18 17:59:02 -07:00
clawsweeper[bot]
f1a55cbd52 fix(skills): refresh snapshots when watch roots change (#83823)
Summary:
- The replacement PR adds a `watch-targets` skills snapshot invalidation when `ensureSkillsWatcher` rebuilds f ... root set, reads the snapshot version after watcher setup, adds regression tests, and updates the changelog.
- Reproducibility: yes. Source inspection shows current main rebuilds the skills watcher on changed root targe ... the version before watcher setup; I did not run a live Gateway mount reproduction in this read-only review.

Automerge notes:
- PR branch already contained follow-up commit before automerge: fix(skills): refresh snapshots when watch roots change

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

Prepared head SHA: 2677dcc35a
Review: https://github.com/openclaw/openclaw/pull/83823#issuecomment-4483425019

Co-authored-by: hclsys <hclsys@openclaw.ai>
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-19 00:36:27 +00:00
Peter Steinberger
8477a67faf refactor(channels): unify session route projection 2026-05-19 00:49:25 +02:00
Andy Ye
98cc6df7ff fix(anthropic): preserve Claude image capability (#83756)
Summary:
- The PR adds Anthropic Claude 4.x image-capability normalization for stale text-only resolved model rows, regression tests for provider and fallback model resolution, and a changelog entry.
- Reproducibility: yes. for source-level reproduction: current main gates native images on model.input includi ... s text-only. I did not run the command locally because this review was constrained to read-only inspection.

Automerge notes:
- PR branch already contained follow-up commit before automerge: fix(anthropic): preserve Claude image capability

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

Prepared head SHA: 06dd378ea3
Review: https://github.com/openclaw/openclaw/pull/83756#issuecomment-4482116499

Co-authored-by: Andy Ye <35905412+TurboTheTurtle@users.noreply.github.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-18 22:16:01 +00:00
Patrick Erichsen
721ad1587a fix: keep inter-session provenance out of transcripts (#83755) 2026-05-18 14:02:25 -07:00
clawsweeper[bot]
bf9329486b fix(models): label picker auth via effective provider order (#83726)
Summary:
- The PR passes the effective OpenAI/Codex auth provider set into `/models` provider-header labeling, adds focused regression tests, and records the user-facing fix in the changelog.
- Reproducibility: yes. Current main lacks `acceptedProviderIds` in the shared picker header path, and the source PR's Mantis baseline/candidate proof shows the visible Telegram header mismatch and after-fix OAuth label.

Automerge notes:
- PR branch already contained follow-up commit before automerge: fix(models): label picker auth via effective provider order

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

Prepared head SHA: 8ca2924adc
Review: https://github.com/openclaw/openclaw/pull/83726#issuecomment-4480805713

Co-authored-by: Stellar鱼 <2182712990@qq.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-18 18:48:58 +00:00
Vincent Koc
cb408bb06b fix(release): repair broad gate regressions 2026-05-19 01:31:25 +08:00
nv-kasikritc
38f11a0844 feat(nvidia): tag NIM request origin (#81524) 2026-05-18 09:25:24 -07:00
Elarwei
9657b8e8ce fix(image-generate): allow distinct active image requests (#83614)
Summary:
- This PR prompt-scopes `image_generate` duplicate detection, adds same-prompt and distinct-prompt regression tests, and updates task guardrail docs and changelog.
- Reproducibility: yes. Current-main source shows the duplicate guard runs before prompt parsing and active lookup ignores prompt identity, matching the linked distinct-second-image failure mode.

Automerge notes:
- PR branch already contained follow-up commit before automerge: docs(tasks): clarify image generation guardrail
- PR branch already contained follow-up commit before automerge: fix(image-generate): allow distinct active image requests

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

Prepared head SHA: 9f19a96427
Review: https://github.com/openclaw/openclaw/pull/83614#issuecomment-4478236891

Co-authored-by: Elarwei <elarweis@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>
2026-05-18 16:01:12 +00:00
yaoyi1222
023e33cb07 fix(transcript): skip trailing custom entries in tail assistant reader (#83427) (#83635)
Summary:
- The branch updates the transcript tail assistant reader to skip trailing non-message rows, adds cache-ttl gap-fill regression tests, and adds a changelog entry.
- Reproducibility: yes. Source inspection shows cache-ttl custom rows can sit after the canonical assistant me ... r stops on that row; the PR body also supplies a concrete live three-turn CLI reproduction after the patch.

Automerge notes:
- PR branch already contained follow-up commit before automerge: fix(transcript): skip trailing custom entries in tail assistant reade…

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

Prepared head SHA: 866aa27ca8
Review: https://github.com/openclaw/openclaw/pull/83635#issuecomment-4478637780

Co-authored-by: yaoyi1222 <yaoyi_1222@163.com>
Co-authored-by: clawsweeper <274271284+clawsweeper[bot]@users.noreply.github.com>
Co-authored-by: clawsweeper[bot] <274271284+clawsweeper[bot]@users.noreply.github.com>
2026-05-18 15:43:09 +00:00
Krzysztof Probola
1912be8619 fix(codex): complete dynamic tool diagnostics
fix(codex): complete dynamic tool diagnostics

Co-authored-by: 0x505badc0de <32790662+rozmiarD@users.noreply.github.com>
Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-05-18 15:37:24 +01:00
Peter Steinberger
c49d909b60 fix(slack): persist inbound delivery dedupe 2026-05-18 15:28:07 +01:00
Peter Steinberger
f0b43bfd34 fix(ci): restore release e2e checks 2026-05-18 15:20:27 +01:00
yetval
1b82c0e3d9 fix(followup,reply): stop model-fallback retries duplicating session entries
Follow-up and main reply paths re-entered each embedded fallback candidate
with the same queued transcript prompt. After the first candidate persisted
that queued user message, later candidates appended it again. Failed
embedded candidates could also persist an assistant error stub on each
retry, leaving same-role transcript runs that downstream providers reject.

The fallback callers now keep two persistence latches for one fallback run:
queuedUserMessagePersistedAcrossFallback flips from onUserMessagePersisted,
and assistantErrorPersistedAcrossFallback flips only after the session guard
actually persists an assistant stopReason="error" message. Later candidates
suppress only the entries that were already written, so CLI or otherwise
non-persisting failures do not hide the first embedded error separator.

Plumb the assistant-error persistence callback through the embedded runner,
attempt params, and session guard wrapper. Add guard and runner regression
tests for all-embedded fallback retries and CLI-to-embedded fallback.

Closes #83404
2026-05-18 15:01:46 +01:00
Peter Steinberger
4f4d108639 chore(lint): remove underscore-dangle allow list (#83542)
* chore(lint): reduce underscore-dangle exceptions

* chore(lint): reduce more underscore exceptions

* chore(lint): remove underscore-dangle allow list

* fix(lint): repair underscore cleanup regressions

* test(lint): track version define suppression
2026-05-18 14:56:06 +01:00
Yao
6a5a1353c7 fix(agents): skip fallback for session coordination errors
Preserve provider fallback metadata when session coordination errors are nested under provider failures.

Co-authored-by: luyao618 <364939526@qq.com>
2026-05-18 14:30:58 +01:00
Peter Steinberger
4b35003051 fix(messages): keep Codex direct replies automatic 2026-05-18 13:51:21 +01:00
Peter Steinberger
67f8683ca3 fix: reduce strict-agentic activation logging 2026-05-18 13:07:41 +01:00
Eva
2a0350b5b4 Separate prompt surfaces by selected harness (#83454)
* fix: scope agent prompt surfaces

* fix(codex): preserve lightweight project doc suppression

* fix(codex): demote openclaw context for native turns

* fix(codex): report demoted prompt context

* fix(codex): align demoted prompt observability

* docs: format codex runtime table

* docs: align codex prompt overlay docs

* test: align codex prompt snapshots

* test: update prompt snapshot contract

---------

Co-authored-by: Eva (agent) <eva+agent-78055@100yen.org>
Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-05-18 13:00:53 +01:00
Kaspre
fd8877b5fd fix(code-mode): honor agent scoped code mode
Fixes #83388.

- Honor per-agent `tools.codeMode` in config schema, runtime code-mode resolution, and model payload filtering.
- Preserve grouped OpenAI tool declarations when code-mode filtering keeps only `exec` and `wait`.
- Sync generated config/prompt baselines and carry a narrow media CI unblocker from current `main` fallout.

Co-authored-by: Kaspre <kaspre@gmail.com>
2026-05-18 12:26:46 +01:00
Peter Steinberger
57c952f679 fix: add resilient media processing fallbacks (#83568) 2026-05-18 11:59:12 +01:00
fuller-stack-dev
ff47c51608 fix: route Telegram topic media completions 2026-05-18 16:22:01 +05:30
joshavant
76ce72cbe5 fix empty cli response handling 2026-05-18 11:33:29 +01:00
Peter Steinberger
957d50ad49 fix: hide unsupported video audio refs 2026-05-18 10:48:39 +01:00
Vincent Koc
25a4a620d1 chore: dedupe legacy OAuth sidecar helpers 2026-05-18 17:33:40 +08:00
Eva (agent)
08ecc518ec fix: close adversarial release stability gaps 2026-05-18 14:58:10 +05:30
Eva (agent)
54f87184f0 fix: recover stale release-stability stalls and auth loops 2026-05-18 14:58:10 +05:30
Josh Avant
5a7d31108e Load provider owner for Codex harness runtime (#83519)
* fix: load codex provider owner for harness runtime

* docs: add changelog for codex harness provider owner

* test: update codex harness owner expectation
2026-05-18 03:36:07 -05:00
Josh Avant
491ce8b753 fix(native-pi): pass Telegram images to Ollama (#83516)
* fix(native-pi): pass Telegram images to Ollama

* chore(changelog): note Telegram Ollama image fix
2026-05-18 03:22:10 -05:00
Peter Steinberger
4c613fbfe0 refactor(cron): centralize source delivery plan 2026-05-18 08:31:59 +01:00
Peter Steinberger
69aec10852 fix(agents): preserve code mode hook context (#83481) 2026-05-18 08:00:11 +01:00
Peter Steinberger
e96428b008 fix(config): share subagent model schema (#83339)
* fix(config): share subagent model schema

* fix(config): remove subagent model timeout surface

* fix(config): migrate ignored agent model timeouts

* test(config): fix doctor migration lint

* test(extensions): remove retired model timeout fixture

* fix(config): collect default subagent pricing refs
2026-05-18 07:07:52 +01:00
Peter Steinberger
102e4f2c9d fix: replay Xiaomi Anthropic reasoning blocks 2026-05-18 06:53:17 +01:00
Patrick Erichsen
9d4500f3ac test: cover gateway exec approval runtime flow (#83452)
* test: cover gateway exec approval runtime flow

* fix: satisfy exec approval e2e test types
2026-05-17 22:42:04 -07:00
Jesse Merhi
198f20fd20 Fix approval runtime gateway calls (#83433)
* fix approval runtime gateway calls

* docs: credit approval runtime fix contributors

* docs: include maintainer changelog credit
2026-05-18 15:10:15 +10:00
Vincent Koc
8f27b3e21f fix(agents): fail closed on missing Codex harness 2026-05-18 12:47:51 +08:00
Gio Della-Libera
bcbe8b6299 fix(codex): surface declined native tool replies (#83108) 2026-05-17 19:43:19 -07:00
Peter Steinberger
48f7db23f0 fix: harden clawpatch-reported edge cases 2026-05-18 03:18:55 +01:00
Jaaneek
5f1df99a9c xai: OAuth login fixes plus openclaw User-Agent attribution
OAuth login flow
----------------
- Hard-require refresh_token after the authorization-code exchange in
  xai-oauth.ts. Access-only responses persisted credentials that the
  downstream usability check later rejected; the new requireRefreshToken
  option fails the exchange instead. Error wording explains the missing
  refresh_token in OIDC scope terms (offline_access scope rejected),
  not a "grant".
- Derive token expiry from the access-token JWT exp claim when
  expires_in is missing. id_token exp is intentionally not used as a
  fallback because id_token lifetime tracks the OIDC session, not the
  access token, and would defer refresh past actual expiry.
- Handle CORS preflight OPTIONS on the loopback OAuth callback in
  src/plugin-sdk/provider-auth-runtime.ts. The previous handler treated
  any non-callback request as a failed GET, returned "Missing code or
  state", and tore the server down before the real GET arrived. The
  CORS allowlist is now an optional `corsOriginAllowlist` parameter on
  waitForLocalOAuthCallback so the SDK helper stays generic. The xAI
  plugin passes ["auth.x.ai", "accounts.x.ai"] from loginXaiOAuth.

Sidecar surfaces
----------------
- speech-provider.ts (POST /v1/tts) honors the xAI OAuth profile in
  addition to provider config and XAI_API_KEY. isConfigured now also
  reports true when an xAI auth profile is configured (via
  isProviderAuthProfileConfigured), so OAuth-only users are no longer
  silently filtered out by the selection layer. The bearer resolver
  threads req.cfg into resolveApiKeyForProvider so the right xAI auth
  profile is picked when a user has multiple.
- realtime-transcription-provider.ts (WSS /stt) gets the same
  isConfigured fix, and the lazy headers() resolver threads req.cfg
  into the OAuth bearer lookup. createSession stays sync per its
  plugin contract.
- stt.ts: drop the plugin-side OAuth fallback. The media-understanding
  core already resolves auth (cfg/agentDir-aware) via
  resolveProviderExecutionContext before calling transcribeAudio, so
  the wrapper was redundant. transcribeAudio is now the registered
  hook directly.

User-Agent attribution
----------------------
- New buildXaiAttributionPolicy in src/agents/provider-attribution.ts
  injects User-Agent: openclaw/<version>, originator, and version on
  /v1/responses and /v1/chat/completions traffic that goes through
  resolveProviderRequestHeaders. Gated to xai-native and default
  endpoint classes; custom proxy baseUrls remain withheld. reviewNote
  is honest about which headers are spec-verified vs mirrored.
- Shared extensions/xai/src/xai-user-agent.ts helper exports
  xaiUserAgentHeaderFor(baseUrl) which only emits the User-Agent when
  the resolved baseUrl points at the xAI-native API host. Threaded
  through TTS and realtime STT (WS upgrade headers) so user-configured
  proxy baseUrls do not receive the openclaw identity. OAuth discovery
  and token endpoints still send User-Agent unconditionally because
  isTrustedXaiOAuthEndpoint already restricts those URLs to *.x.ai.
- Image gen, batch STT, and video gen rely on the attribution policy
  alone (no manual User-Agent in defaultHeaders), so attribution
  withholding on user-configured proxy baseUrls is preserved
  end-to-end.
- UA is bearer-agnostic: same value whether the bearer comes from an
  xAI API key or the xAI OAuth flow.

Drop dead api.grok.x.ai alias
-----------------------------
- xAI retired the api.grok.x.ai alias; DNS now returns NXDOMAIN from
  xAI's own authoritative nameservers. Drop it from the xai-native
  endpoint host set in extensions/xai/openclaw.plugin.json,
  extensions/xai/api.ts, extensions/xai/tts.ts, and the
  openai-responses payload policy. Update the attribution test to
  classify api.grok.x.ai as "custom" (no live user can reach it; the
  classification keeps documenting the host's status).

Video generation now matches xAI's actual API behavior
------------------------------------------------------
Previously, real video generation requests failed with
"xAI video generation response malformed" because the poll-status
handler validated against a closed enum that did not match what the
xAI service actually returns. Four fixes:
- Loosen the poll-status handler. xAI returns intermediate strings
  outside `["queued", "processing", "done", "failed", "expired"]`
  (commonly `submitted`, `pending`, `in_progress`, ...). Treat `done`
  as terminal-success, `["failed", "error", "expired", "cancelled"]`
  as terminal-failure, and any other string (including empty) as
  continue-polling. Also accept `cancelled` as a terminal failure.
- Send default duration/aspect_ratio/resolution on every generate and
  reference-image submit. xAI rejects bodies that omit these fields.
  Defaults: duration=8s, aspect_ratio="16:9", resolution="720p".
- Accept lowercase resolution input ("480p"/"720p"/"1080p") in
  addition to uppercase, normalize to lowercase on the wire.
- Add an `x-idempotency-key` header (fresh `crypto.randomUUID()`) on
  every submit so a network retry does not double-charge the user.
  Polls intentionally reuse the unmodified `headers` without the key.

Ergonomics
----------
- All "missing xAI credentials" errors (code_execution, lazy
  code_execution fallback in extensions/xai/index.ts, x_search,
  web_search grok in web-search-provider.runtime.ts, TTS, batch STT,
  realtime STT) now mention `openclaw onboard --auth-choice xai-oauth`
  first.
- Dedupe the Grok model-id alias table: model-compat.ts re-exports
  normalizeXaiModelId from model-id.ts as normalizeNativeXaiModelId.

Test coverage
-------------
- src/plugin-sdk/provider-auth-runtime.test.ts: locks the new pure
  buildOAuthCallbackOriginResolver gate (allowlist match,
  case-normalization, https-only, non-allowlisted hosts dropped,
  multi-Origin handling).
- extensions/xai/xai-oauth.test.ts: locks
  XAI_OAUTH_CALLBACK_CORS_ORIGIN_ALLOWLIST so loginXaiOAuth keeps
  threading the right hosts to the SDK helper.
- extensions/xai/speech-provider.test.ts: OAuth-only auth profile
  flips isConfigured to true; cfg threads into the OAuth fallback
  resolver.
- extensions/xai/realtime-transcription-provider.test.ts: same +
  upgrade headers carry the OAuth bearer end-to-end.
- extensions/xai/stt.test.ts: explicit assertion that transcribeAudio
  trusts the core-resolved apiKey (no plugin-side wrapper).

Verification
------------
- pnpm install: clean
- 154/154 vitest tests pass across 13 touched test files
- pnpm check:changed: typecheck core/ext + tests, oxlint core/ext,
  runtime guards, dependency pin guard, package patch guard, runtime
  import cycles, sidecar loader guard - all green
- pnpm build: 0 errors, 0 [INEFFECTIVE_DYNAMIC_IMPORT] warnings
2026-05-18 02:43:12 +01:00
compoodment
6ebe91d92b test: cover one-chunk progress final payload 2026-05-18 01:37:59 +01:00
Peter Steinberger
9da0f80356 fix(openai): allow available Codex OAuth models 2026-05-18 01:04:14 +01:00
Josh Avant
06f4c97130 Keep legacy Codex OAuth sidecar profiles usable (#83312)
* fix legacy Codex oauth sidecar compatibility

* docs add changelog for legacy Codex oauth compatibility

* annotate legacy oauth hash compatibility
2026-05-17 18:41:07 -05:00
Peter Steinberger
691d62630f test: keep slow tests under duration cap 2026-05-18 00:26:44 +01:00
Peter Steinberger
7bcd5acc1a test(codex): type denied tool policy mocks (#82374) (thanks @VACInc) 2026-05-18 00:18:20 +01:00
VACInc
5f1d8a2ee4 fix(codex): fail closed restricted native tools 2026-05-18 00:18:20 +01:00
wAngByg
d63c581dec fix(gemini-transport): validate thought_signature base64 before forwarding to Gemini (#82995)
Merged via squash.

Prepared head SHA: 8634757622
Co-authored-by: wAngByg <281221101+wAngByg@users.noreply.github.com>
Co-authored-by: altaywtf <9790196+altaywtf@users.noreply.github.com>
Reviewed-by: @altaywtf
2026-05-18 02:16:13 +03:00