Commit Graph

11857 Commits

Author SHA1 Message Date
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
Peter Steinberger
e2249d8d1e fix: order meeting notes startup around channels 2026-05-24 00:30:39 +01:00
Peter Steinberger
3cf806d172 fix(telegram): cache outbound replies for context
Co-authored-by: Keshav's Bot <keshavbotagent@gmail.com>
2026-05-24 00:04:16 +01:00
brokemac79
0c044596c5 fix(twitch): evict client manager on disconnect failure (#85796) 2026-05-23 23:58:55 +01:00
Youssef Hemimy
f0ec7309fc fix(whatsapp): serialize Error in auto-reply delivery log (#85777)
The auto-reply "delivery failed" log path passes a raw Error
under the `err` field. tslog's default JSON serialization
renders bare Error instances as `{}` because Error own data
properties are non-enumerable. Every delivery failure in
production therefore logs `err: {}`, forcing operators to
guess the underlying Baileys error from timestamp alone.

Convert Error to `{ type, message, stack }` plus own-enumerable
properties at the log site, so Boom-style subclass diagnostics
(output.statusCode, data) and custom OutboundDeliveryError
fields (stage, results) survive. Non-Error rejection values
pass through unchanged.

Tests cover Error, Error subclass (Boom-style), string
rejection, and object rejection paths.

AI-assisted: Claude Code (Opus 4.7) authored, codex review
locally addressed.
2026-05-23 23:58:51 +01:00
Matthew Kern
a37ebb2d49 fix(browser): bypass managed proxy for loopback CDP
Keep browser CDP managed-proxy bypasses on the private bundled-plugin SSRF helper, strip WebSocket URL credentials before registering exact bypass URLs, and document the managed-browser loopback proxy behavior.

Co-authored-by: Matthew Kern <matthew@matthewkern.xyz>
2026-05-23 23:53:27 +01:00
Peter Steinberger
1b68dbe95a test: isolate Codex replay timeout outcome 2026-05-23 23:06:41 +01:00
Peter Steinberger
32a80d9954 test: isolate Codex hook channel context 2026-05-23 22:55:52 +01:00
Peter Steinberger
f6204d081f test: isolate Codex duplicate terminal diagnostics 2026-05-23 22:45:19 +01:00
Peter Steinberger
fa5c8345f3 test: isolate Codex terminal diagnostic fallback 2026-05-23 22:34:39 +01:00
Jason (Json)
f603fa58fe fix(discord): keep forced voice consult diagnostics private (#84411)
Summary:
- The PR removes forced consult diagnostics from Discord and phone-call realtime consult payloads, adds private debug logs and regression tests, and records the fix in the changelog.
- Reproducibility: yes. by source inspection. Current main builds the forced Discord consult message with the  ... gent_consult` diagnostic string, and the phone-call fallback passes the same diagnostic as consult context.

Automerge notes:
- PR branch already contained follow-up commit before automerge: fix(discord): log forced consult fallback reason
- PR branch already contained follow-up commit before automerge: fix(discord): keep forced voice consult diagnostics private

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

Prepared head SHA: c1592530c6
Review: https://github.com/openclaw/openclaw/pull/84411#issuecomment-4494164784

Co-authored-by: FullerStackDev <263060202+fuller-stack-dev@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>
2026-05-23 21:33:23 +00:00
Peter Steinberger
a705a9c911 test: drain Codex app-server attempts 2026-05-23 22:24:25 +01:00
Peter Steinberger
cd102efb70 test: isolate Codex native item release guard 2026-05-23 22:13:22 +01:00
Peter Steinberger
38e1654e09 fix: route Codex image API keys through OpenAI 2026-05-23 22:05:07 +01:00
Kevin Lin
5fbaf2a8a2 feat(whatsapp): support thumb approval reactions (#85477)
* feat(whatsapp): support emoji approval reactions

* fix(whatsapp): simplify approval resolved text

* fix(whatsapp): gate approvals on forwarding config

* ci: ignore injected secrets helpers in oxlint

* fix(whatsapp): use thumb reactions for approvals

* ci: keep secret helpers linted

* fix(approvals): preserve plugin turn source routes

* docs(approvals): remove whatsapp exec approval field refs
2026-05-23 13:58:00 -07:00
Peter Steinberger
6a3781dd7f test: isolate Codex terminal batch scheduler 2026-05-23 21:57:34 +01:00
Peter Steinberger
4c210e22fa Adapt image compression quality by model (#85742)
* feat: adapt image compression quality

* refactor: move image limits into model metadata

* test: cover adaptive image downscaling

* test: cover image tool live providers

* fix: apply media metadata to all image paths

* fix: align providerless image compression

* fix: add chutes runtime image limits

* fix: optimize image data urls with model limits

* fix: type media metadata merge

* fix: optimize data url byte limits after decode

* fix: preserve data url optimizer fallback

* fix: keep low-side image compression fallbacks

* fix: enforce data url image compression policy

* fix: preserve gif data url media policy

* fix: satisfy adaptive image type checks

* test: keep cron provider-runtime mock current
2026-05-23 21:45:55 +01:00
Peter Steinberger
00388134c4 test: isolate Codex terminal release decision 2026-05-23 21:31:17 +01:00
Peter Steinberger
c4f0da00a9 refactor: use channel target resolution APIs (#85814)
* refactor: use channel target resolution apis

* refactor: satisfy delivery lint

* refactor: remove unused target parsing shim

* fix: preserve routed cron topic targets
2026-05-23 21:26:55 +01:00
Kaspre
fd2a9adbe6 fix(ollama): bypass managed proxy for loopback embeddings (#85707)
* fix(ollama): bypass proxy for local embeddings

* fix(ollama): keep managed proxy bypass loopback-only

* fix(ollama): keep proxy bypass internal

* fix(ollama): keep proxy bypass private

* fix(ollama): harden internal proxy bypass

* chore(plugin-sdk): refresh api baseline

* fix(ollama): keep internal bypass out of qa aliases

* test(ollama): keep ssrf runtime mock complete

* fix(ollama): keep dist sdk aliases public-only

* fix(ollama): keep fetch bypass out of infra runtime

* fix(ollama): preserve packaged private sdk alias

* test(ollama): harden private ssrf alias coverage

* test(ollama): cover private ssrf resolver edges

* fix(ollama): scope private sdk native aliases

* test(ollama): audit blocked loopback bypasses

* fix(plugins): keep staged sdk aliases public-only

* test(ollama): harden proxy bypass proof

* test(ollama): cover origin mismatch proxy path

* test(ollama): cover ipv6 and batch bypass paths

* fix lint findings in Ollama proxy tests

* refactor: tighten Ollama proxy bypass

* fix: widen private sdk owner registry type

* test: stabilize Ollama proxy PR checks

---------

Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-05-23 21:17:55 +01:00
Peter Steinberger
f6b332c735 test: make Codex diagnostic test deterministic 2026-05-23 21:13:41 +01:00
Peter Steinberger
6fc9d7b14f test: bound Codex app-server cleanup waits 2026-05-23 20:48:03 +01:00
Peter Steinberger
9cef99f184 test: clean up Codex app-server run failures 2026-05-23 20:12:44 +01:00
Peter Steinberger
071c3e364b test: isolate Codex report snapshot tests 2026-05-23 19:48:06 +01:00
Peter Steinberger
02b1c8c902 ci: fix release reachability auth 2026-05-23 18:59:14 +01:00
Peter Steinberger
41f4605020 ci: harden release package validation 2026-05-23 18:48:17 +01:00
Peter Steinberger
f1226aeb6c perf(gateway): defer startup-idle runtime work 2026-05-23 18:27:04 +01:00
Peter Steinberger
391f29baad ci: harden beta release validation flakes 2026-05-23 18:23:39 +01:00
Peter Steinberger
86a0502711 test: type codex thread request mocks 2026-05-23 18:03:19 +01:00
Peter Steinberger
85664f8e71 test: avoid codex heartbeat lifecycle timeout 2026-05-23 17:56:26 +01:00
Peter Steinberger
f4b5e58231 fix: aggressively prune retired model catalogs 2026-05-23 17:29:50 +01:00
Jason O'Neal
7fffbf60b0 fix: harden package URL downloads (#85578)
* fix: harden package URL downloads

Guard package acceptance URL downloads with HTTPS-only validation, no embedded credentials, private/special-use DNS and IP rejection, manual redirect checks, bounded timeout/size limits, pinned lookup, and atomic temp-file writes. Add tooling tests for unsafe URLs, redirect validation, size limits, and successful writes.

* fix: cancel redirect response bodies before closing dispatcher

ClawSweeper P2: the redirect branch in openPackageDownloadResponse cleared
the timeout and awaited dispatcher.close() without first cancelling
response.body. Undici's close() is graceful — it waits for in-flight
requests to complete — so a malicious redirect with a slow/never-ending
body could hang the hardened downloader.

Fix: call response.body?.cancel() before dispatcher.close() to abort the
redirect body immediately.

Test: add a regression test that uses a ReadableStream with an indefinite
interval to simulate a hanging body, and asserts cancel() was called.

Refs: clawsweeper review on PR #85512

* test: harden redirect body cancellation race in regression test

Guard the ReadableStream controller.enqueue() call with a cancelled
flag and try/catch to prevent ERR_INVALID_STATE when the interval
fires after cancel() closes the controller.

* fix: cancel final response body before closing dispatcher in downloadUrl

ClawSweeper P2: the HTTP-error and declared-oversize early-exit paths
in downloadUrl threw before consuming or canceling response.body. The
finally block then cleared the timeout and awaited graceful
dispatcher.close() with the body still open, allowing a slow/never-ending
response to hang release tooling.

Fix: add response.body?.cancel() in the finally block before
dispatcher.close().

Tests: add two regressions:
- HTTP 500 with slow body: asserts cancel() called before dispatcher close
- Declared content-length oversize with slow body: same assertion

* fix: add trusted package URL source policy

* fix: keep package URL resolver dependency-free

* test: cover encoded IPv6 package URL bypasses

* docs: sync package acceptance source overview

* docs: restore release doc formatting

* docs: sync package acceptance trusted-url source

* test: cover dotted IPv4 embedded IPv6 package URLs

* fix: parse dotted IPv4 embedded in IPv6 package URLs

* test: isolate anthropic pruning defaults

* test: move anthropic dated model coverage

---------

Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-05-23 17:28:29 +01:00
Peter Steinberger
a04566da11 test: isolate Telegram spooled timeout from stall watchdog 2026-05-23 17:08:00 +01:00
davidbennett1979
983a3b94c9 fix(memory-core): avoid double bulleting promoted snippets (#85724) 2026-05-23 16:56:06 +01:00
Peter Steinberger
b6530beb05 fix: prune retired model catalog entries 2026-05-23 16:46:59 +01:00
Peter Steinberger
054002529d refactor(telegram): simplify action media sends 2026-05-23 16:43:23 +01:00
Keshav's Bot
fdf01db62b fix(telegram): send attachment paths as media 2026-05-23 16:43:23 +01:00
Peter Steinberger
5e8c71bf9f test(codex): avoid searchable-tool registration flake 2026-05-23 16:03:45 +01:00
Roslin Mahmud Joy
ec43acb432 fix(microsoft-foundry): DeepSeek V4 models incorrectly use openai-completions API (#85549)
When onboarding Microsoft Foundry-hosted DeepSeek-V4 models (Pro/Flash),
the onboarding wizard assigned api: 'openai-completions' because
usesFoundryResponsesByDefault() only matched GPT/o-series models.

These V4 models require the Responses API (openai-responses) to work
correctly against the Foundry endpoint. Without this fix, all calls fail
with 'provider rejected the request schema or tool payload'.

Fix: Add 'deepseek-v4' prefix to usesFoundryResponsesByDefault() so only
the verified V4 family defaults to openai-responses. Older DeepSeek
families (e.g., V3) remain on openai-completions until proven compatible.

Closes: DeepSeek V4 models deployed via Microsoft Foundry onboarding
failing immediately due to wrong API adapter.

Co-authored-by: Roslin <rmj010203@gmail.com>
2026-05-23 15:49:53 +01:00
Peter Steinberger
ef7e652ec4 test(codex): avoid forced-tool allowlist flake 2026-05-23 15:35:37 +01:00
Peter Steinberger
3e8fd4944f fix: avoid gateway startup event-loop stalls
Defer Gateway channel startup until after readiness, remove startup model prewarm, and move model catalog data onto manifest/static paths so startup no longer loads broad provider runtimes.

Verification:
- focused gateway/catalog/auth/QA Vitest runs
- autoreview clean
- Blacksmith Testbox-through-Crabbox tbx_01ksahn65rsrsqz3q1qyxwf929: pnpm check:changed, exit 0
- PR CI green on ee2b631c72
2026-05-23 15:08:58 +01:00
Peter Steinberger
f6ab188db0 test(codex): type forced-tool request mock 2026-05-23 15:07:49 +01:00
Peter Steinberger
8d1ab83cb3 test(codex): avoid forced-tool turn flake 2026-05-23 14:55:05 +01:00
Peter Steinberger
9ede882f08 test(codex): avoid startup cleanup socket flake 2026-05-23 14:32:13 +01:00
Peter Steinberger
b47bace014 fix(whatsapp): persist inbound delivery in plugin state (#85506)
* fix(whatsapp): persist inbound delivery in plugin state

* fix(whatsapp): type durable inbound payload

* fix(channels): close durable receive insert race

* fix(whatsapp): skip owned durable pending duplicates
2026-05-23 14:20:53 +01:00
Peter Steinberger
b4b2ef192d test(codex): make sandbox cleanup proof deterministic 2026-05-23 14:04:12 +01:00
haoyu-haoyu
353dfeb108 fix(anthropic): migrate 1M context to GA handling
* feat(anthropic): migrate 1M context from beta to GA

Anthropic has graduated the 1M context window from beta to GA.
This commit:

- Stops injecting the context-1m-2025-08-07 beta header when
  context1m: true is configured
- Removes the OAuth token skip logic that was needed because
  Anthropic previously rejected the context-1m beta with OAuth auth
  (OAuth now supports 1M natively)
- Strips the legacy beta header from user-configured anthropicBeta
  arrays to prevent sending a stale header
- Removes the now-unused isAnthropic1MModel helper,
  ANTHROPIC_1M_MODEL_PREFIXES constant, and logger import from
  the stream wrappers

The context1m config param continues to be respected for context
window sizing in context.ts — only the beta header injection is
removed.

Closes #45550 (Phase 1)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* feat(anthropic): migrate 1M context handling to GA

* fix(clownfish): address review for ghcrawl-156721-autonomous-smoke (1)

* fix(anthropic): restrict ga 1m context models

* docs(anthropic): align ga 1m context guidance

* fix(anthropic): normalize ga 1m model metadata

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: vincentkoc <25068+vincentkoc@users.noreply.github.com>
Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-05-23 12:29:31 +01:00
alkor2000
71ddc016a8 fix(twitch): preserve newer message handler during cleanup (#85425)
* fix(twitch): preserve newer message handler during cleanup

Fixes #83888.

`TwitchClientManager.onMessage` returns a cleanup closure that called
`messageHandlers.delete(key)` unconditionally. When a second onMessage()
for the same account replaced the handler, running the earlier cleanup
deleted the newer handler, leaving the account with no handler and
silently dropping all inbound messages.

Guard the delete with a referential check so the cleanup only removes
the handler it registered. Adds regression tests covering both the
stale-cleanup case (newer handler must survive) and the normal case
(current handler is still removed).

* fix(twitch): distinguish handler registrations

* fix(signal): avoid dangling test export name

* test(meeting-notes): use public sdk imports

* test(sdk): classify meeting-notes subpath

* fix(discord): keep channel entrypoint imports narrow

---------

Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-05-23 11:49:01 +01:00
Lion0710
e0bafc588c fix(diagnostics): drop snake case otel ids (#72645)
Co-authored-by: Vincent Koc <vincentkoc@ieee.org>
2026-05-23 18:34:39 +08:00
Vincent Koc
3a1d4dd43f fix(ci): clear signal and docs guard blockers (#85693)
* fix(signal): use lint-safe test api export

* docs: avoid private key sentinel example
2026-05-23 18:27:12 +08:00